PKGBUILDs/community/freeimage/PKGBUILD

54 lines
1.8 KiB
Bash
Raw Normal View History

2016-04-30 03:37:16 +00:00
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# 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>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2018-06-12 12:41:52 +00:00
# - build AArch64 with -fPIC
2016-04-30 03:37:16 +00:00
pkgname=freeimage
pkgver=3.17.0
2018-08-24 12:37:03 +00:00
pkgrel=8
2016-04-30 03:37:16 +00:00
pkgdesc="Library project for developers who would like to support popular graphics image formats"
2018-06-12 12:41:52 +00:00
arch=('x86_64')
2016-04-30 03:37:16 +00:00
license=('GPL' 'custom:FIPL')
url="http://freeimage.sourceforge.net/"
2018-06-13 20:05:38 +00:00
depends=('libjpeg-turbo' 'openexr' 'openjpeg2' 'libwebp' 'libraw' 'jxrlib')
makedepends=('mesa' 'glu')
2018-06-12 12:41:52 +00:00
source=("https://downloads.sourceforge.net/project/freeimage/Source%20Distribution/${pkgver}/FreeImage${pkgver//./}.zip"
freeimage-unbundle.patch CVE-2015-0852.patch CVE-2016-5684.patch)
md5sums=('459e15f0ec75d6efa3c7bd63277ead86'
2018-06-13 22:26:50 +00:00
'c336ba01a7fab92bff97f78140f190e9'
2018-06-12 12:41:52 +00:00
'b21385e2da5dcdf4aa4e98d11150115d'
'2efbe4123d832930778b7c146d4f60f1')
prepare() {
cd FreeImage
patch -p1 -i ../CVE-2016-5684.patch
patch -p1 -i ../CVE-2015-0852.patch
patch -p1 -i ../freeimage-unbundle.patch # Unbundle libraries (Fedora)
rm -r Source/Lib* Source/ZLib Source/OpenEXR
# can't be built due to private headers
> Source/FreeImage/PluginG3.cpp
> Source/FreeImageToolkit/JPEGTransform.cpp
}
2016-04-30 03:37:16 +00:00
build() {
cd FreeImage
2018-06-12 12:41:52 +00:00
[[ $CARCH == "aarch64" ]] && CFLAGS+=" -fPIC" && CXXFLAGS+=" -fPIC"
sh gensrclist.sh
sh genfipsrclist.sh
make -f Makefile.gnu
make -f Makefile.fip
2016-04-30 03:37:16 +00:00
}
package() {
cd FreeImage
2018-06-12 12:41:52 +00:00
make -f Makefile.gnu DESTDIR=${pkgdir} install
2016-04-30 03:37:16 +00:00
make -f Makefile.fip DESTDIR=${pkgdir} install
install -D -m644 ${srcdir}/FreeImage/license-fi.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}