--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX freeimage-3.9.3-build.patch 4851 RMD160 9aa0f4e1db53f5079bf94088c1f0ffa98f3f221d SHA1 82488ad79d6e61af1aa90f62d3c044ee4ea835bc SHA256 f384c64a1e07ee43e1c830d1eb96f411f9df2ae964c4615d4c50877eac12876a
+MD5 b6e237c6334bb3d5a6802e6978931a2c files/freeimage-3.9.3-build.patch 4851
+RMD160 9aa0f4e1db53f5079bf94088c1f0ffa98f3f221d files/freeimage-3.9.3-build.patch 4851
+SHA256 f384c64a1e07ee43e1c830d1eb96f411f9df2ae964c4615d4c50877eac12876a files/freeimage-3.9.3-build.patch 4851
+DIST FreeImage393.pdf 2158061 RMD160 46ed9fd6781560a17220d5f9d5128207c8d7e8d0 SHA1 29981db35b5f62ab94450af5d3093265237bac81 SHA256 a982dc7fe4d0c40e650ca55fa0b010ed13b15c0681e3831ced48f95853952395
+DIST FreeImage393.zip 2507055 RMD160 d7a33a6c9b101d39db16ee18f9177b3f590df6ab SHA1 07696e54ed246d08cf401a9e39e9256b4e73ec9a SHA256 59f6b75d778e40eff7cb4068e556c65230f9fe1af8d17ad74fec48f334a34fc0
+EBUILD freeimage-3.9.3.ebuild 1178 RMD160 50b8ae30d2d143e624fd1a5d223a6bd7c0296682 SHA1 5b20ed41fb7e2d9afa31d7757397cda3d93da7c9 SHA256 931252af656ad632d82295639a04e203bfb098caee751df424736b79d3c075e0
+MD5 638c711ea3b77dcd8a8ccf70ea06a421 freeimage-3.9.3.ebuild 1178
+RMD160 50b8ae30d2d143e624fd1a5d223a6bd7c0296682 freeimage-3.9.3.ebuild 1178
+SHA256 931252af656ad632d82295639a04e203bfb098caee751df424736b79d3c075e0 freeimage-3.9.3.ebuild 1178
+MISC ChangeLog 402 RMD160 05dea32e1a4552f2b716e7d4d3f06260737c3d40 SHA1 c14925f95308dcff35b754f691b75c5cbbe6ba53 SHA256 c98231b52b9ed4b00c56b4781a65d61db319c354cf103dbd318b5f3fc1182785
+MD5 50359735bd7d62b7133a7ac6767cdac0 ChangeLog 402
+RMD160 05dea32e1a4552f2b716e7d4d3f06260737c3d40 ChangeLog 402
+SHA256 c98231b52b9ed4b00c56b4781a65d61db319c354cf103dbd318b5f3fc1182785 ChangeLog 402
+MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3
+MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
+RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea metadata.xml 158
+SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3 metadata.xml 158
+MD5 2a9cb3dff7debed004fcd1b08c4816cd files/digest-freeimage-3.9.3 464
+RMD160 9dd38f47bf2e10d715696e6135d24b9e5aafbdff files/digest-freeimage-3.9.3 464
+SHA256 02dd381f0f4a824f218e42e9c5fb0470436e4185f6c985b420740ca59a9c7e4a files/digest-freeimage-3.9.3 464
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.3 (GNU/Linux)
+
+iD8DBQFGDffBdz7hIScOURERAnV8AKDfHRERa4cooI6vYpORkZLvYOC0UgCeMCMJ
+f41eRZlhtL6vJzZV/Q2uoSU=
+=RZj3
+-----END PGP SIGNATURE-----
--- /dev/null
+--- genfipsrclist.sh
++++ genfipsrclist.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh\r
+ \r
+-DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibMNG Source/LibPNG Source/LibTIFF Source/ZLib Wrapper/FreeImagePlus"\r
++DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Wrapper/FreeImagePlus"\r
+ \r
+ echo "VER_MAJOR = 3" > fipMakefile.srcs\r
+ echo "VER_MINOR = 9.3" >> fipMakefile.srcs\r
+@@ -12,7 +12,7 @@
+ egrep 'RelativePath=.*\.(c|cpp)' $DIR/*.vcproj | cut -d'"' -f2 | tr '\\' '/' | awk '{print "'$DIR'/"$0}' | tr '\r\n' ' ' | tr -s ' ' >> fipMakefile.srcs\r
+ fi\r
+ done\r
+-echo >> fipMakefile.srcs\r
++echo Source/LibJPEG/transupp.c >> fipMakefile.srcs\r
+ \r
+ echo -n "INCLUDE =" >> fipMakefile.srcs\r
+ for DIR in $DIRLIST; do\r
+--- gensrclist.sh
++++ gensrclist.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh\r
+ \r
+-DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibMNG Source/LibPNG Source/LibTIFF Source/ZLib"\r
++DIRLIST=". Source Source/Metadata Source/FreeImageToolkit"\r
+ \r
+ echo "VER_MAJOR = 3" > Makefile.srcs\r
+ echo "VER_MINOR = 9.3" >> Makefile.srcs\r
+@@ -12,7 +12,7 @@
+ egrep 'RelativePath=.*\.(c|cpp)' $DIR/*.vcproj | cut -d'"' -f2 | tr '\\' '/' | awk '{print "'$DIR'/"$0}' | tr '\r\n' ' ' | tr -s ' ' >> Makefile.srcs\r
+ fi\r
+ done\r
+-echo >> Makefile.srcs\r
++echo Source/LibJPEG/transupp.c >> Makefile.srcs\r
+ \r
+ echo -n "INCLS = " >> Makefile.srcs\r
+ find . -name "*.h" -print | xargs echo >> Makefile.srcs\r
+--- Makefile
++++ Makefile
+@@ -14,8 +14,11 @@
+ MAKEFILE = solaris\r
+ endif\r
+ \r
++FLAGS = -Wall -fPIC\r
++LIBS = -lstdc++ -lpng -lmng -ltiff -ljpeg\r
+ default:\r
+- $(MAKE) -f Makefile.$(MAKEFILE) \r
++ $(MAKE) CC="$(CC)" CXX="$(CXX)" AR="$(AR)" COMPILERFLAGS="$(FLAGS)" LIBRARIES="$(LIBS)" -f Makefile.gnu\r
++ $(MAKE) CC="$(CC)" CXX="$(CXX)" AR="$(AR)" COMPILERFLAGS="$(FLAGS)" LIBRARIES="$(LIBS)" -f Makefile.fip\r
+ \r
+ all:\r
+ $(MAKE) -f Makefile.$(MAKEFILE) all \r
+@@ -24,7 +27,8 @@
+ $(MAKE) -f Makefile.$(MAKEFILE) dist \r
+ \r
+ install:\r
+- $(MAKE) -f Makefile.$(MAKEFILE) install \r
++ $(MAKE) -f Makefile.gnu install\r
++ $(MAKE) -f Makefile.fip install\r
+ \r
+ clean:\r
+ $(MAKE) -f Makefile.$(MAKEFILE) clean \r
+--- Makefile.fip
++++ Makefile.fip
+@@ -19,8 +19,8 @@
+ \r
+ MODULES = $(SRCS:.c=.o)\r
+ MODULES := $(MODULES:.cpp=.o)\r
+-CFLAGS = $(COMPILERFLAGS) $(INCLUDE)\r
+-CXXFLAGS = $(COMPILERFLAGS) -Wno-ctor-dtor-privacy $(INCLUDE)\r
++CFLAGS += $(COMPILERFLAGS) $(INCLUDE)\r
++CXXFLAGS += $(COMPILERFLAGS) -Wno-ctor-dtor-privacy $(INCLUDE)\r
+ \r
+ TARGET = freeimageplus\r
+ STATICLIB = lib$(TARGET).a\r
+@@ -56,16 +56,15 @@
+ $(AR) r $@ $(MODULES)\r
+ \r
+ $(SHAREDLIB): $(MODULES)\r
+- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES)\r
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES)\r
+ \r
+ install:\r
+- install -m 644 -o root -g root $(HEADER) $(INCDIR)\r
+- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR)\r
+- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)\r
+- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)\r
+- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)\r
+- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)\r
+- ldconfig\r
++ install -m 644 $(HEADER) $(DESTDIR)/$(INCDIR)\r
++ install -m 644 $(HEADERFIP) $(DESTDIR)/$(INCDIR)\r
++ install -m 644 $(STATICLIB) $(DESTDIR)/$(LIBDIR)\r
++ install -m 755 $(SHAREDLIB) $(DESTDIR)/$(LIBDIR)\r
++ ln -sf $(SHAREDLIB) $(DESTDIR)/$(LIBDIR)/$(VERLIBNAME)\r
++ ln -sf $(VERLIBNAME) $(DESTDIR)/$(LIBDIR)/$(LIBNAME)\r
+ \r
+ clean:\r
+ rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)\r
+--- Makefile.gnu
++++ Makefile.gnu
+@@ -19,8 +19,8 @@
+ \r
+ MODULES = $(SRCS:.c=.o)\r
+ MODULES := $(MODULES:.cpp=.o)\r
+-CFLAGS = $(COMPILERFLAGS) $(INCLUDE)\r
+-CXXFLAGS = $(COMPILERFLAGS) -Wno-ctor-dtor-privacy $(INCLUDE)\r
++CFLAGS += $(COMPILERFLAGS) $(INCLUDE)\r
++CXXFLAGS += $(COMPILERFLAGS) -Wno-ctor-dtor-privacy $(INCLUDE)\r
+ \r
+ TARGET = freeimage\r
+ STATICLIB = lib$(TARGET).a\r
+@@ -55,15 +55,15 @@
+ $(AR) r $@ $(MODULES)\r
+ \r
+ $(SHAREDLIB): $(MODULES)\r
+- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES)\r
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES)\r
+ \r
+ install:\r
+- install -m 644 -o root -g root $(HEADER) $(INCDIR)\r
+- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)\r
+- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)\r
+- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)\r
+- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) \r
+- ldconfig\r
++ install -d $(DESTDIR)/$(INCDIR) $(DESTDIR)/$(LIBDIR)\r
++ install -m 644 $(HEADER) $(DESTDIR)/$(INCDIR)\r
++ install -m 644 $(STATICLIB) $(DESTDIR)/$(LIBDIR)\r
++ install -m 755 $(SHAREDLIB) $(DESTDIR)/$(LIBDIR)\r
++ ln -sf $(SHAREDLIB) $(DESTDIR)/$(LIBDIR)/$(VERLIBNAME)\r
++ ln -sf $(VERLIBNAME) $(DESTDIR)/$(LIBDIR)/$(LIBNAME)\r
+ \r
+ clean:\r
+ rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)\r
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/freeimage/freeimage-3.9.3.ebuild,v 1.1 2007/03/31 05:55:07 nyhm Exp $
+
+inherit eutils toolchain-funcs multilib
+
+MY_PN=FreeImage
+MY_P=${MY_PN}${PV//.}
+DESCRIPTION="Image library supporting many formats"
+HOMEPAGE="http://freeimage.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip
+ doc? ( mirror://sourceforge/${PN}/${MY_P}.pdf )"
+
+LICENSE="GPL-2 FIPL-1.0"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="doc"
+
+RDEPEND="media-libs/jpeg
+ media-libs/tiff
+ media-libs/libpng
+ media-libs/libmng"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.patch
+ edos2unix gensrclist.sh genfipsrclist.sh
+ sh ./gensrclist.sh || die "gensrclist failed"
+ sh ./genfipsrclist.sh || die "genfipsrclist failed"
+}
+
+src_compile() {
+ tc-export CC CXX AR
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR=/usr/$(get_libdir) install \
+ || die "emake install failed"
+ dodoc README.linux Whatsnew.txt
+ use doc && dodoc "${DISTDIR}"/${MY_P}.pdf
+}