aboutsummaryrefslogtreecommitdiffstats
path: root/testing/zimg/APKBUILD
blob: c95f6151e8ed353f0822c7e61ccf40ad428714d8 (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Contributor: Alexander Edland <alpine@ocv.me>
# Contributor: Nicolas Lorin <androw95220@gmail.com>
# Maintainer:
pkgname=zimg
pkgver=3.0.4
pkgrel=0
pkgdesc="Scaling, colorspace conversion and dithering library"
url="https://github.com/sekrit-twc/zimg"
arch="all !s390x" # Tests fail on big-endian
license="WTFPL-2.0"
makedepends="autoconf automake libtool cmake linux-headers"
subpackages="$pkgname-doc $pkgname-dev"
source="zimg-$pkgver.tar.gz::https://github.com/sekrit-twc/zimg/archive/release-$pkgver.tar.gz
	zimg-gtest-1.11.0.tar.gz::https://github.com/google/googletest/archive/release-1.11.0.tar.gz
	musl-missing-include.patch
	"
builddir="$srcdir/zimg-release-$pkgver"
options="!check" # we run tests in the build stage

prepare() {
	default_prepare
	mkdir -p "$pkgdir"
	# googletest is required in-tree
	ln -s "$srcdir"/googletest-*/* test/extra/googletest
	autoreconf -vfi
}

build() {
	# build and run test binaries here
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static \
		--enable-unit-test
	make
	make test/unit_test.log
	test/unit_test

	# build release binaries here without enabling tests,
	# as they make zimg slower
	make clean
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static
	make
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

sha512sums="
94beddb109f0b301f0fecf09ea2761d3707aaa1f0cc1caf682bb3d1d7dcd89164de8388e922758e274914df9c7c7c1a0a0c5192e78f88655ed4c6da0ee51995c  zimg-3.0.4.tar.gz
6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28  zimg-gtest-1.11.0.tar.gz
06c1b1220e0418ed5051a6c594bbf48ba7ed10a4e2a95b51d6ae2451ba49b1f0be97347115c203fe82322c7f3b9f75756ba03eabe902898b3e3dd2c9e1765891  musl-missing-include.patch
"