diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-08-15 20:33:38 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-08-15 20:37:07 +0200 |
commit | bf2eed2286b1abe5bec875805f7b08cdf5a2c4b5 (patch) | |
tree | 34738ed168cebd8cc024fc2448c9efc627cf5682 /main/pcre2 | |
parent | 0ab07ed802e7791b1c89324ef0e3ace9f5491fb5 (diff) | |
download | aports-bf2eed2286b1abe5bec875805f7b08cdf5a2c4b5.tar.bz2 aports-bf2eed2286b1abe5bec875805f7b08cdf5a2c4b5.tar.xz |
main/pcre2: run tests
Diffstat (limited to 'main/pcre2')
-rw-r--r-- | main/pcre2/APKBUILD | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/main/pcre2/APKBUILD b/main/pcre2/APKBUILD index 9632273021..2c844c7984 100644 --- a/main/pcre2/APKBUILD +++ b/main/pcre2/APKBUILD @@ -9,17 +9,21 @@ arch="all" license="BSD" depends="" depends_dev="libedit-dev zlib-dev" -makedepends="$depends_dev" +makedepends="$depends_dev paxmark" subpackages="$pkgname-dev $pkgname-doc $pkgname-tools libpcre2-16:_libpcre libpcre2-32:_libpcre" source="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$pkgname-$pkgver.tar.gz" builddir="$srcdir/$pkgname-$pkgver" +case "$CARCH" in + s390x) _enable_jit="";; + *) _enable_jit="--enable-jit";; +esac + build() { cd "$builddir" # Note: Forced -O3 is recommended (needed?) for Julia. - [ "$CARCH" != "s390x" ] && _enable_jit="--enable-jit" ./configure \ CFLAGS="$CFLAGS -O3" \ --build=$CBUILD \ @@ -36,6 +40,28 @@ build() { make } +# Note: RunTest and pcre2_jit_test generates some binaries in .libs that needs +# to disable MPROTECT on grsecurity kernel. That's why it's so complicated... +check() { + cd "$builddir" + + local is_pax=$(grep -q PaX /proc/$$/status && echo 'yes' || echo 'no') + + if [ "$is_pax" = yes ]; then + timeout -t 1 -s KILL ./RunTest 2>/dev/null || true + find .libs -type f ! -name 'lib*' | xargs paxmark m + fi + ./RunTest + + if [ -n "$_enable_jit" ]; then + if [ "$is_pax" = yes ]; then + timeout -t 1 -s KILL ./pcre2_jit_test >/dev/null || true + find .libs -type f ! -name 'lib*' | xargs paxmark m + fi + ./pcre2_jit_test + fi +} + package() { cd "$builddir" |