diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2017-11-29 01:36:22 +0100 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2017-12-01 08:57:41 +0100 |
commit | ecc3c431822c8e98ea1c35d28c1c051ead5a28b0 (patch) | |
tree | 23dc29e6e5e14184ae4c98c1dc1a9700f40e971a | |
parent | 011d49fc2e6284bbcaa6bd4706f13d38bbe5689b (diff) | |
download | aports-ecc3c431822c8e98ea1c35d28c1c051ead5a28b0.tar.bz2 aports-ecc3c431822c8e98ea1c35d28c1c051ead5a28b0.tar.xz |
main/grep: add check
-rw-r--r-- | main/grep/APKBUILD | 19 | ||||
-rw-r--r-- | main/grep/fix-tests.patch | 23 |
2 files changed, 39 insertions, 3 deletions
diff --git a/main/grep/APKBUILD b/main/grep/APKBUILD index 992ff13865..69b06ecd34 100644 --- a/main/grep/APKBUILD +++ b/main/grep/APKBUILD @@ -2,16 +2,24 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=grep pkgver=3.1 -pkgrel=0 +pkgrel=1 pkgdesc="Searches input files for lines containing a match to a specified pattern" url="https://www.gnu.org/software/grep/grep.html" arch="all" license="GPL" makedepends="pcre-dev autoconf automake" +checkdepends="coreutils bash diffutils" subpackages="$pkgname-doc" -source="http://mirrors.kernel.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz" +source="http://mirrors.kernel.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz + fix-tests.patch" builddir="$srcdir/$pkgname-$pkgver" +prepare() { + default_prepare + sed -i '/test-localename$(EXEEXT)/d' \ + "$builddir"/gnulib-tests/Makefile.in +} + build() { cd "$builddir" ./configure \ @@ -25,6 +33,10 @@ build() { make } +check() { + make -C "$builddir" check +} + package() { cd "$builddir" make DESTDIR="$pkgdir" install @@ -33,4 +45,5 @@ package() { rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true } -sha512sums="05494381c7dd8aad7e2ee4c17450de8d7b969a99dcfe17747db60df3475bf02d5323d091e896e8343e4f3251c29dc7f0b7a9f93c575c9d58ee2a57014c2c9d26 grep-3.1.tar.xz" +sha512sums="05494381c7dd8aad7e2ee4c17450de8d7b969a99dcfe17747db60df3475bf02d5323d091e896e8343e4f3251c29dc7f0b7a9f93c575c9d58ee2a57014c2c9d26 grep-3.1.tar.xz +9ba6b01c0c74933299afb469dadd2ea0c7e24befa34c691671a576063e32a1f0c735541e5e2bb0073d8afd814790909f7f895827aa8a2fbacdfcae380a7bcb11 fix-tests.patch" diff --git a/main/grep/fix-tests.patch b/main/grep/fix-tests.patch new file mode 100644 index 0000000000..cb29457147 --- /dev/null +++ b/main/grep/fix-tests.patch @@ -0,0 +1,23 @@ +diff -upr grep-3.1.orig/tests/pcre-jitstack grep-3.1/tests/pcre-jitstack +--- grep-3.1.orig/tests/pcre-jitstack 2017-11-29 01:48:08.772121987 +0100 ++++ grep-3.1/tests/pcre-jitstack 2017-11-29 01:49:37.763570125 +0100 +@@ -25,7 +25,7 @@ foo=$( (echo foo | gzip | gzip -d) 2>/de + + fail=0 + +-b64_decode >pcrejit.txt.gz <<'EOF' || framework_failure_ ++cat <<EOF + H4sIAAAAAAACA+2bUU4DMQxE/7mMz5T7XwKE+IBKVLue58yk0B9EtX6xJxN7t4VaH69a6+tHrW+/ + r4e3n75KARWShSOFTtiumE3FPVyo79ATIJ0Ry0No/yXe99UIUqTGKKUzYHFJHJoaCONQDCnDSCDS + IPAvGCVeXNsZ7lpbWFfdaZtgPos5LeK2C1TBKzD09V3HFlCOsbFT/hNbz4HzJaRjnjdam9FXw/o6 +@@ -36,7 +36,9 @@ uSHRnTkzIdZMmZ5kYX/iJFtTwu9cFvr3aDWcUx4p + dkcKkYUglER2Q4L4gnmOiNGzSBATwGQgwihs5/QffIhyfg4hJvM2r4Rp6L+1ibCCd4jYZ6jCiBlc + 2+y4fl4yTGIwcWXNAUEeXmu8iCMV96DNTnmRNICDk2N5qaXGbsF91OX/0hlcYTjrMfy02p9Xv70D + mv3RZCFOAAA= +-EOF ++EOF > pcrejit.tmp.txt ++ ++b64_decode < pcrejit.tmp.txt > pcrejit.txt.gz || framework_failure_ + + gzip -d pcrejit.txt || framework_failure_ + |