aboutsummaryrefslogtreecommitdiffstats
path: root/testing/zimg
diff options
context:
space:
mode:
authorAlexander Edland <s@ocv.me>2018-08-05 06:26:37 +0200
committerShiz <hi@shiz.me>2018-08-05 20:57:52 +0200
commitbd37a96070281d90e2067a71b7b462cf5b55f77a (patch)
tree97b2366ce7c12aed5f92c3aaf5f42e57cd06a736 /testing/zimg
parentf52dc834612f38e8a22357623d4411286be2ec21 (diff)
downloadaports-bd37a96070281d90e2067a71b7b462cf5b55f77a.tar.bz2
aports-bd37a96070281d90e2067a71b7b462cf5b55f77a.tar.xz
testing/zimg: new aport
Diffstat (limited to 'testing/zimg')
-rw-r--r--testing/zimg/APKBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/testing/zimg/APKBUILD b/testing/zimg/APKBUILD
new file mode 100644
index 0000000000..50d5969b5d
--- /dev/null
+++ b/testing/zimg/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Alexander Edland <alpine@ocv.me>
+# Maintainer: Alexander Edland <alpine@ocv.me>
+pkgname=zimg
+pkgver=2.7.5
+pkgrel=0
+pkgdesc="Scaling, colorspace conversion, and dithering library"
+url="https://github.com/sekrit-twc/zimg"
+arch="all"
+license="WTFPL-2.0"
+options="!check" # testing is done by make
+makedepends="autoconf automake libtool cmake"
+subpackages="$pkgname-dev $pkgname-doc"
+source="zimg-$pkgver.tar.gz::https://github.com/sekrit-twc/zimg/archive/release-$pkgver.tar.gz
+ zimg-gtest.tar.gz::https://github.com/google/googletest/archive/0fe96607d85cf3a25ac40da369db62bbee2939a5.tar.gz"
+builddir="$srcdir/zimg-release-$pkgver"
+
+build() {
+ cd "$builddir"
+ ./autogen.sh
+
+ # test suite results in slower code, so we build twice
+ cp -pR "$builddir" "$builddir-test"
+ local cfg_args="
+ --build=$CBUILD
+ --host=$CHOST
+ --prefix=/usr
+ --sysconfdir=/etc
+ --mandir=/usr/share/man
+ --localstatedir=/var"
+
+ # a particular version of googletest is required
+ cd "$builddir-test"
+ mv "$srcdir"/googletest-release-*/* test/extra/googletest
+ cd test/extra/googletest/googletest
+ autoreconf --verbose --install --force
+
+ # build and run tests
+ cd "$builddir-test"
+ ./configure $cfg_args \
+ --enable-testapp \
+ --enable-unit-test
+ make all
+ make test/unit_test.log
+
+ # build for release
+ cd "$builddir"
+ ./configure $cfg_args
+ make
+}
+
+package() {
+ cd "$builddir"
+ make -j1 DESTDIR="$pkgdir" install
+}
+
+sha512sums="600139f86b074f2ed9614daa58d969465fa3d1578d8165bd2f841193f7b793c4b36389064dd4eee8e01e66a745d1c71c62e5bdb0b5283e54c435ed4a130a5b3b zimg-2.7.5.tar.gz
+1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d zimg-gtest.tar.gz"