aboutsummaryrefslogtreecommitdiffstats
path: root/testing/freeimage/APKBUILD
blob: 1115dae75b2fc939eda75245326e28d047d775a9 (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
# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=freeimage
_pkgname="FreeImage"
pkgver=3.18.0
pkgrel=1
pkgdesc="Open Source library project for developers who would like to support popular graphics image formats."
url="http://freeimage.sourceforge.net/"
arch="all"
license="GPL-2.0-only FreeImage"
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"

options="!check"

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"