diff options
author | prspkt <prspkt@protonmail.com> | 2019-08-13 03:02:18 +0300 |
---|---|---|
committer | prspkt <prspkt@protonmail.com> | 2019-08-13 20:53:21 +0300 |
commit | c1782be93d7ee2bbdc803490d6e089d9b1f6618a (patch) | |
tree | 6668c3a92068d9fbaf869ec6cf8e3ef21ec61d17 /testing/zimg | |
parent | d1380515f40b1acaf4e459d99e2102300d25f68e (diff) | |
download | aports-c1782be93d7ee2bbdc803490d6e089d9b1f6618a.tar.bz2 aports-c1782be93d7ee2bbdc803490d6e089d9b1f6618a.tar.xz |
testing/zimg: cleanup, run test suite
* Add prepare and check functions.
Signed-off-by: prspkt <prspkt@protonmail.com>
Diffstat (limited to 'testing/zimg')
-rw-r--r-- | testing/zimg/APKBUILD | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/testing/zimg/APKBUILD b/testing/zimg/APKBUILD index 648c3d3674..c048fab487 100644 --- a/testing/zimg/APKBUILD +++ b/testing/zimg/APKBUILD @@ -3,54 +3,55 @@ pkgname=zimg pkgver=2.9.2 pkgrel=0 -pkgdesc="Scaling, colorspace conversion, and dithering library" +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" subpackages="$pkgname-doc $pkgname-dev" source="zimg-$pkgver.tar.gz::https://github.com/sekrit-twc/zimg/archive/release-$pkgver.tar.gz zimg-gtest-1.8.0.tar.gz::https://github.com/google/googletest/archive/release-1.8.0.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" - +prepare() { + default_prepare + mkdir -p "$pkgdir" # googletest is required in-tree - 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 \ + ln -s "$srcdir"/googletest-*/* test/extra/googletest + autoreconf -vfi +} + +build() { + # do not enable tests here, they make zimg slower + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --disable-static + make + make -j1 DESTDIR="$pkgdir" install +} + +check() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --disable-static \ --enable-unit-test - make all - make test/unit_test.log - - # build for release - cd "$builddir" - ./configure $cfg_args --disable-static make + make test/unit_test.log + test/unit_test } package() { - cd "$builddir" - make -j1 DESTDIR="$pkgdir" install + return 0 } sha512sums="b688f8e93a2e4549f2c844cd58c6e0714e6494d6fc8c800dc1b0cdf2278fb9925a646fc332350c1b5d77cef2134bf35e18a873c24ea1979c1adce57bfef68ebe zimg-2.9.2.tar.gz |