summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxantares2015-06-09 21:28:56 +0200
committerxantares2015-06-09 21:28:56 +0200
commit82bbf1b82a329d7d0a2fc29f65405682a1ec9c19 (patch)
tree589ac6bfe68c9a5120e612a4d00458b3273f138b
downloadaur-82bbf1b82a329d7d0a2fc29f65405682a1ec9c19.tar.gz
Initial import
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD72
2 files changed, 90 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..65a3830ee0b1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = mingw-w64-freeimage
+ pkgdesc = Library project for developers who would like to support popular graphics image formats (mingw-w64)
+ pkgver = 3.17.0
+ pkgrel = 1
+ url = http://freeimage.sourceforge.net/
+ arch = any
+ license = GPL
+ license = custom:FIPL
+ makedepends = mingw-w64-gcc
+ depends = mingw-w64-crt
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = http://downloads.sourceforge.net/sourceforge/freeimage/FreeImage3170.zip
+ md5sums = 459e15f0ec75d6efa3c7bd63277ead86
+
+pkgname = mingw-w64-freeimage
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e9120b4bf757
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,72 @@
+# Contributor: Davorin Učakar <davorin.ucakar@gmail.com>
+# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: Mihai Militaru <mihai.militaru@gmx.com>
+# Contributor: scippio <scippio@berounet.cz>
+
+pkgname=mingw-w64-freeimage
+pkgver=3.17.0
+pkgrel=1
+pkgdesc="Library project for developers who would like to support popular graphics image formats (mingw-w64)"
+arch=(any)
+license=("GPL" "custom:FIPL")
+url="http://freeimage.sourceforge.net/"
+depends=(mingw-w64-crt)
+makedepends=(mingw-w64-gcc)
+options=(!strip !buildflags staticlibs)
+source=("http://downloads.sourceforge.net/sourceforge/freeimage/FreeImage${pkgver//./}.zip")
+md5sums=('459e15f0ec75d6efa3c7bd63277ead86')
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd FreeImage
+ sed -i "s|IMPORTLIB = \$(TARGET).lib|IMPORTLIB = \$(TARGET).dll.a|g" Makefile.mingw
+ sed -i 's/#include "..\\x86\\x86.h"/#include "..\/x86\/x86.h"/' Source/LibJXR/image/sys/strcodec.h
+ rm Source/LibJXR/common/include/guiddef.h
+ sed -i "s,WIN32_CFLAGS =,WIN32_CFLAGS = -fpermissive -D__MINGW64_TOOLCHAIN__," Makefile.mingw
+ sed -i -e "s,#ifdef __GNUC__,#ifdef WHATEVER," -e "s,_MSC_VER,WINVER," Source/OpenEXR/IlmImf/ImfSystemSpecific.h
+}
+
+build() {
+ for _arch in ${_architectures}; do
+ rm -rf FreeImage-${_arch}
+ cp -r FreeImage FreeImage-${_arch}
+ pushd FreeImage-${_arch}
+
+ make \
+ CC=${_arch}-gcc \
+ CXX=${_arch}-g++ \
+ LD=${_arch}-g++ \
+ RC=${_arch}-windres \
+ AR=${_arch}-ar \
+ DLLTOOL=${_arch}-dlltool \
+ FREEIMAGE_LIBRARY_TYPE="STATIC" \
+ -f Makefile.mingw
+ make \
+ CC=${_arch}-gcc \
+ CXX=${_arch}-g++ \
+ LD=${_arch}-g++ \
+ RC=${_arch}-windres \
+ AR=${_arch}-ar \
+ DLLTOOL=${_arch}-dlltool \
+ FREEIMAGE_LIBRARY_TYPE="SHARED" \
+ -f Makefile.mingw
+ popd
+ done
+
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd ${srcdir}/FreeImage-${_arch}
+ install -d "${pkgdir}"/usr/${_arch}/lib
+ install -d "${pkgdir}"/usr/${_arch}/bin
+ install -d "${pkgdir}"/usr/${_arch}/include
+ install -m755 Dist/FreeImage.dll "${pkgdir}"/usr/${_arch}/bin/
+ install -m644 Dist/FreeImage.dll.a "${pkgdir}"/usr/${_arch}/lib/libFreeImage.dll.a
+ install -m644 Dist/libFreeImage.a "${pkgdir}"/usr/${_arch}/lib/
+ install -m644 Dist/FreeImage.h "${pkgdir}"/usr/${_arch}/include/
+ find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
+ done
+}