aboutsummaryrefslogtreecommitdiffstats
path: root/community/freeimage/APKBUILD
blob: 5642935697726c70f5aac524df0de9f0d29b634f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=freeimage
_pkgname="FreeImage"
pkgver=3.18.0
pkgrel=2
pkgdesc="Open Source library project for developers who would like to support popular graphics image formats."
url="http://freeimage.sourceforge.net/"
arch="all !s390x !mips64" # build fails on s390x and mips64
license="GPL-2.0-or-later FIPL"
makedepends="dos2unix"
subpackages="$pkgname-dev"
source="https://downloads.sourceforge.net/${pkgname}/${_pkgname}${pkgver//.}.zip
	0001-no-root-install.patch
	0002-fix-cpuid-x86.patch
	0005-makefile-gnu.patch
	CVE-2019-12211_3.patch
	"

options="!check"

# secfixes:
#   3.18.0-r2:
#     - CVE-2019-12211
#     - CVE-2019-12213

prepare() {
	mv ${srcdir}/${_pkgname} ${srcdir}/${pkgname}-${pkgver}
	find "$builddir" -type f -exec dos2unix -q -s {} \;
	default_prepare
}

build() {
	cd "$builddir"
	case "$CARCH" in
		aarch64) export CFLAGS="$CFLAGS -DPNG_ARM_NEON_OPT=0";;
		ppc64le) export CFLAGS="$CFLAGS -U__ALTIVEC__";;
	esac
	make
}

package() {
	cd "$builddir"
	make DESTDIR="${pkgdir}" install
}
sha512sums="9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818  FreeImage3180.zip
2dc51d700671962339cc1f27c0ad7e679e7ed6233d1534b81d68fcffb6e86960fa182b6916d19da7451bf34b69efe4a1b62b7f335b9802d7799706b766257d59  0001-no-root-install.patch
ef88862593bd8d271d11f86ec389c8a92c131ffb03fb7028e87dfddc7ae74e22bef50327175a7dcee9c414df80e84579c59f3b8e1f825d54f0fdc76a0530c06f  0002-fix-cpuid-x86.patch
18fba0dc68f94365ffbe7070594825b7e8f77f462ece31d96971de18f085b5110f3c3bdff780a02aa162ee9a64dd20c5fda7871d8759c8eeaa20d7bf3dddd72e  0005-makefile-gnu.patch
de88bbf9f5d43f2b5be4d4df3baabb895ba6dca1d28308909f825f973634bdf8bc10bda61b2ce90e48f67d024cf6ab75f797ce42474101fa6a0896ee42107770  CVE-2019-12211_3.patch"