mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
54 lines
2.1 KiB
Bash
54 lines
2.1 KiB
Bash
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.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>
|
|
# - build AArch64 with -fPIC
|
|
|
|
pkgname=freeimage
|
|
pkgver=3.18.0
|
|
pkgrel=7
|
|
pkgdesc="Library project for developers who would like to support popular graphics image formats"
|
|
arch=('x86_64')
|
|
license=('GPL' 'custom:FIPL')
|
|
url="http://freeimage.sourceforge.net/"
|
|
depends=('libjpeg-turbo' 'openexr' 'openjpeg2' 'libwebp' 'libraw' 'jxrlib')
|
|
makedepends=('mesa' 'glu')
|
|
source=("https://downloads.sourceforge.net/project/freeimage/Source%20Distribution/${pkgver}/FreeImage${pkgver//./}.zip"
|
|
freeimage-unbundle.patch
|
|
freeimage-libraw-0.20.patch)
|
|
sha512sums=('9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818'
|
|
'605fd28aaaf3b0ad225d04dd7de5e34d825bb7aa4b1f3a3b4219657c51b2f1507512916e95ba1a731ca5fc8b704f03b83371ab9ad066d74fd49feee735cf13b5'
|
|
'5709e4c5baac3505bf2f2498082fbf6b8614e631fec69fc629036c8d033fbe21434a198e9ae24d577dd65928fd31a0d95c584ea4349d74134f7859d4e57b8397')
|
|
|
|
prepare() {
|
|
cd FreeImage
|
|
|
|
# TODO: This will only compile against libjpeg-turbo 2 but we will wait for that :D
|
|
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
|
|
|
|
patch -p1 -i ../freeimage-libraw-0.20.patch # Fix build with libraw 0.20
|
|
}
|
|
|
|
build() {
|
|
cd FreeImage
|
|
[[ $CARCH == "aarch64" ]] && CFLAGS+=" -fPIC" && CXXFLAGS+=" -fPIC"
|
|
sh gensrclist.sh
|
|
sh genfipsrclist.sh
|
|
make -f Makefile.gnu
|
|
make -f Makefile.fip
|
|
}
|
|
|
|
package() {
|
|
cd FreeImage
|
|
make -f Makefile.gnu DESTDIR="${pkgdir}" install
|
|
make -f Makefile.fip DESTDIR="${pkgdir}" install
|
|
|
|
install -D -m644 "${srcdir}"/FreeImage/license-fi.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
|
}
|