PKGBUILDs/extra/freeimage/PKGBUILD

58 lines
2.4 KiB
Bash
Raw Normal View History

2020-07-28 02:33:53 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
2016-04-30 03:37:16 +00:00
# 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
2018-10-18 02:44:42 +00:00
pkgver=3.18.0
2023-03-09 19:12:21 +00:00
pkgrel=18
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/"
2022-06-06 18:38:30 +00:00
depends=('libjpeg-turbo' 'openexr' 'openjpeg2' 'libwebp' 'libraw' 'libtiff' 'jxrlib')
2018-06-13 20:05:38 +00:00
makedepends=('mesa' 'glu')
2018-06-12 12:41:52 +00:00
source=("https://downloads.sourceforge.net/project/freeimage/Source%20Distribution/${pkgver}/FreeImage${pkgver//./}.zip"
2020-07-25 16:32:21 +00:00
freeimage-unbundle.patch
2022-12-19 22:14:23 +00:00
freeimage-libraw-0.20.patch
freeimage-libraw-0.21.patch)
2018-10-18 02:44:42 +00:00
sha512sums=('9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818'
2022-06-09 16:31:19 +00:00
'bd96331900e3f13c8830ef59377c840fa36b3c3ef97d1effd6f644acfefb7d618812b268f00f8f051e9d4c978b8dac0c0ab0e6ec7db5aaebf0fa0328913cfaac'
2022-12-19 22:14:23 +00:00
'5709e4c5baac3505bf2f2498082fbf6b8614e631fec69fc629036c8d033fbe21434a198e9ae24d577dd65928fd31a0d95c584ea4349d74134f7859d4e57b8397'
'f922af1e000ee83afc87871bbce04076372220174c74a83a6fc3812277f6a0203b631d7f49f250dd78f94015d1a3fb2b72a6b5c4d0a32d4071b197b417d65b8a')
2018-06-12 12:41:52 +00:00
prepare() {
cd FreeImage
2018-10-18 02:44:42 +00:00
# TODO: This will only compile against libjpeg-turbo 2 but we will wait for that :D
2018-06-12 12:41:52 +00:00
patch -p1 -i ../freeimage-unbundle.patch # Unbundle libraries (Fedora)
rm -r Source/Lib* Source/ZLib Source/OpenEXR
2018-10-18 02:44:42 +00:00
# can't be built due to private headers
2018-06-12 12:41:52 +00:00
> Source/FreeImage/PluginG3.cpp
> Source/FreeImageToolkit/JPEGTransform.cpp
2020-07-25 16:32:21 +00:00
patch -p1 -i ../freeimage-libraw-0.20.patch # Fix build with libraw 0.20
2022-12-19 22:14:23 +00:00
patch -p1 -i ../freeimage-libraw-0.21.patch # Fix build with libraw 0.21
2018-06-12 12:41:52 +00:00
}
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
2020-07-28 02:33:53 +00:00
make -f Makefile.gnu DESTDIR="${pkgdir}" install
make -f Makefile.fip DESTDIR="${pkgdir}" install
2016-04-30 03:37:16 +00:00
2020-07-28 02:33:53 +00:00
install -D -m644 "${srcdir}"/FreeImage/license-fi.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
2016-04-30 03:37:16 +00:00
}