diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2017-08-22 19:56:31 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2017-08-22 21:19:44 +0200 |
commit | 9cbbd455cefe0231147408ae62e0c20171581039 (patch) | |
tree | cdd2325b2769857941be9d8ae495253e818e2e97 /main/gnutls | |
parent | 8c506e85dd313a64bdc28c81471b58ad8a9bebc8 (diff) | |
download | aports-9cbbd455cefe0231147408ae62e0c20171581039.tar.bz2 aports-9cbbd455cefe0231147408ae62e0c20171581039.tar.xz |
main/gnutls: add check
Diffstat (limited to 'main/gnutls')
-rw-r--r-- | main/gnutls/APKBUILD | 12 | ||||
-rw-r--r-- | main/gnutls/fix-tests.patch | 16 |
2 files changed, 25 insertions, 3 deletions
diff --git a/main/gnutls/APKBUILD b/main/gnutls/APKBUILD index 8790ccf202..6e3ecb8627 100644 --- a/main/gnutls/APKBUILD +++ b/main/gnutls/APKBUILD @@ -3,11 +3,12 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=gnutls pkgver=3.5.13 -pkgrel=0 +pkgrel=1 pkgdesc="A TLS protocol implementation" url="http://www.gnutls.org/" arch="all" license="GPL" +checkdepends="diffutils" makedepends="nettle-dev zlib-dev libtasn1-dev p11-kit-dev libunistring-dev texinfo" subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-utils $pkgname-c++:xx" _v=${pkgver%.*} @@ -15,7 +16,7 @@ case $pkgver in *.*.*.*) _v=${_v%.*};; esac source="ftp://ftp.gnutls.org/gcrypt/gnutls/v${_v}/$pkgname-$pkgver.tar.xz - " + fix-tests.patch" builddir="$srcdir/$pkgname-$pkgver" @@ -40,6 +41,10 @@ build() { make } +check() { + make -C "$builddir" check +} + package() { make -j1 DESTDIR="$pkgdir" \ -C "$builddir" install @@ -57,4 +62,5 @@ xx() { mv "$pkgdir"/usr/lib/lib*xx.so.* "$subpkgdir"/usr/lib/ } -sha512sums="e98f23a589042f879936c3f8b474535e695fb7dd68a9e81323668c013241f765c2d3af6c6a072ecf867acc1e551ec46e15bb842144d3a06bdd5d2f4fc3d828a7 gnutls-3.5.13.tar.xz" +sha512sums="e98f23a589042f879936c3f8b474535e695fb7dd68a9e81323668c013241f765c2d3af6c6a072ecf867acc1e551ec46e15bb842144d3a06bdd5d2f4fc3d828a7 gnutls-3.5.13.tar.xz +f4f0a00d8f5f63cc099c8ddfc0ddf983a8d8fe3a27540b1a28a5723724111bc5888db3de7f30a9fa812ef4660a3ce8659d2e8b00a0e3456391469baa66645b0e fix-tests.patch" diff --git a/main/gnutls/fix-tests.patch b/main/gnutls/fix-tests.patch new file mode 100644 index 0000000000..b3b652393b --- /dev/null +++ b/main/gnutls/fix-tests.patch @@ -0,0 +1,16 @@ +Replace the expression for calculating a random port number, which +causes an arithmetic error on ash, with a simpler expression which +should also get the job done. + +diff -upr gnutls-3.5.13.orig/tests/scripts/common.sh gnutls-3.5.13/tests/scripts/common.sh +--- gnutls-3.5.13.orig/tests/scripts/common.sh 2017-08-22 20:43:46.767748915 +0200 ++++ gnutls-3.5.13/tests/scripts/common.sh 2017-08-22 20:47:45.474435430 +0200 +@@ -61,7 +61,7 @@ check_if_port_listening() { + # Find a port number not currently in use. + GETPORT='rc=0; myrandom=$(date +%N | sed s/^0*//) + while test $rc = 0;do +- PORT="$(((($$<<15)|$myrandom) % 63001 + 2000))" ++ PORT="$(($((myrandom + $$)) % 63001 + 2000))" + check_if_port_in_use $PORT;rc=$? + done + ' |