summaryrefslogtreecommitdiff
path: root/community/freeimage
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/freeimage
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/freeimage')
-rw-r--r--community/freeimage/PKGBUILD44
-rw-r--r--community/freeimage/gcc4.5_ln.patch62
2 files changed, 106 insertions, 0 deletions
diff --git a/community/freeimage/PKGBUILD b/community/freeimage/PKGBUILD
new file mode 100644
index 000000000..9e6020ad2
--- /dev/null
+++ b/community/freeimage/PKGBUILD
@@ -0,0 +1,44 @@
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: Mihai Militaru <mihai.militaru@gmx.com>
+# Contributor: scippio <scippio@berounet.cz>
+
+pkgname=freeimage
+pkgver=3.15.0
+pkgrel=1
+pkgdesc="Library project for developers who would like to support popular graphics image formats."
+arch=('i686' 'x86_64')
+license=('GPL' 'custom:FIPL')
+url="http://freeimage.sourceforge.net/"
+depends=('gcc-libs')
+makedepends=('hd2u')
+source=("http://downloads.sourceforge.net/project/freeimage/Source%20Distribution/${pkgver}/FreeImage${pkgver//./}.zip"
+ 'gcc4.5_ln.patch')
+md5sums=('3b4f08e4985b269beb29a2fced1ef888'
+ 'f85279b2572a0a9e03775909cd9cd759')
+
+build() {
+ cp -r FreeImage FreeImagefip
+
+ cd FreeImage
+ patch -Np1 < ${srcdir}/gcc4.5_ln.patch
+ make
+
+ cd ${srcdir}/FreeImagefip
+ patch -Np1 < ${srcdir}/gcc4.5_ln.patch
+ make -f Makefile.fip
+}
+
+package() {
+ cd FreeImage
+ make DESTDIR=${pkgdir} install
+
+ cd ${srcdir}/FreeImagefip
+ make -f Makefile.fip DESTDIR=${pkgdir} install
+
+ install -D -m644 ${srcdir}/FreeImage/license-fi.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/license-fi.txt
+
+ ln -s libfreeimage-${pkgver}.so ${pkgdir}/usr/lib/libfreeimage.so
+ ln -s libfreeimageplus-${pkgver}.so ${pkgdir}/usr/lib/libfreeimageplus.so
+}
diff --git a/community/freeimage/gcc4.5_ln.patch b/community/freeimage/gcc4.5_ln.patch
new file mode 100644
index 000000000..317a48004
--- /dev/null
+++ b/community/freeimage/gcc4.5_ln.patch
@@ -0,0 +1,62 @@
+diff -Naur FreeImage.orig//Makefile.fip FreeImage.new//Makefile.fip
+--- FreeImage.orig//Makefile.fip 2010-08-10 19:15:20.000000000 +0200
++++ FreeImage.new//Makefile.fip 2010-09-12 23:29:36.000000000 +0200
+@@ -15,9 +15,9 @@
+
+ MODULES = $(SRCS:.c=.o)
+ MODULES := $(MODULES:.cpp=.o)
+-CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
++CFLAGS += -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
+ CFLAGS += $(INCLUDE)
+-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
++CXXFLAGS += -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+ CXXFLAGS += $(INCLUDE)
+
+ ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
+diff -Naur FreeImage.orig//Makefile.gnu FreeImage.new//Makefile.gnu
+--- FreeImage.orig//Makefile.gnu 2010-08-10 19:15:20.000000000 +0200
++++ FreeImage.new//Makefile.gnu 2010-09-12 23:01:57.000000000 +0200
+@@ -15,9 +15,9 @@
+
+ MODULES = $(SRCS:.c=.o)
+ MODULES := $(MODULES:.cpp=.o)
+-CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
++CFLAGS += -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
+ CFLAGS += $(INCLUDE)
+-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
++CXXFLAGS += -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+ CXXFLAGS += $(INCLUDE)
+
+ ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
+@@ -65,9 +65,6 @@
+ install -m 644 -o root -g root $(HEADER) $(INCDIR)
+ install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
+ install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
+- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
+- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
+- ldconfig
+
+ clean:
+ rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
+diff -Naur FreeImage.orig//Source/FreeImageToolkit/Background.cpp FreeImage.new//Source/FreeImageToolkit/Background.cpp
+--- FreeImage.orig//Source/FreeImageToolkit/Background.cpp 2010-08-10 19:15:20.000000000 +0200
++++ FreeImage.new//Source/FreeImageToolkit/Background.cpp 2010-08-10 19:16:12.000000000 +0200
+@@ -21,6 +21,7 @@
+
+ #include "FreeImage.h"
+ #include "Utilities.h"
++#include <limits.h>
+
+ /** @brief Determines, whether a palletized image is visually greyscale or not.
+
+diff -Naur FreeImage.orig//Source/OpenEXR/Imath/ImathMatrix.h FreeImage.new//Source/OpenEXR/Imath/ImathMatrix.h
+--- FreeImage.orig//Source/OpenEXR/Imath/ImathMatrix.h 2010-08-10 19:15:20.000000000 +0200
++++ FreeImage.new//Source/OpenEXR/Imath/ImathMatrix.h 2010-08-10 21:43:26.000000000 +0200
+@@ -51,6 +51,7 @@
+
+ #include <iostream>
+ #include <iomanip>
++#include <cstring>
+
+ #if (defined _WIN32 || defined _WIN64) && defined _MSC_VER
+ // suppress exception specification warnings