aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pcre2
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-06-04 23:12:57 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-06-09 19:26:06 +0200
commit1e5e5641b996b10a8b96a508849a4f9c90e40d1e (patch)
tree2b2682fc819bca1948ce4c52848b3162669592cf /testing/pcre2
parent88eba5488854f436eabbdffd42cfdff587cbf884 (diff)
downloadaports-1e5e5641b996b10a8b96a508849a4f9c90e40d1e.tar.bz2
aports-1e5e5641b996b10a8b96a508849a4f9c90e40d1e.tar.xz
testing/pcre2: new abuild
http://pcre.sourceforge.net/ Perl-compatible regular expression library
Diffstat (limited to 'testing/pcre2')
-rw-r--r--testing/pcre2/APKBUILD64
1 files changed, 64 insertions, 0 deletions
diff --git a/testing/pcre2/APKBUILD b/testing/pcre2/APKBUILD
new file mode 100644
index 0000000000..37ed2f277f
--- /dev/null
+++ b/testing/pcre2/APKBUILD
@@ -0,0 +1,64 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=pcre2
+pkgver=10.21
+pkgrel=0
+pkgdesc="Perl-compatible regular expression library"
+url="http://pcre.sourceforge.net/"
+arch="all"
+license="BSD"
+depends=""
+depends_dev="libedit-dev zlib-dev"
+makedepends="$depends_dev"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-tools
+ libpcre2-16:libpcre16 libpcre2-32:libpcre32"
+source="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ # Note: Forced -O3 is recommended (needed?) for Julia.
+ ./configure \
+ CFLAGS="$CFLAGS -O3" \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --docdir=/usr/share/doc/$pkgname-$pkgver \
+ --htmldir=/usr/share/doc/$pkgname-$pkgver/html \
+ --enable-pcre2-16 \
+ --enable-pcre2-32 \
+ --enable-jit \
+ --enable-pcre2grep-libz \
+ --enable-pcre2test-libedit \
+ --with-match-limit-recursion=8192 \
+ || return 1
+ make
+}
+
+package() {
+ cd "$builddir"
+
+ make DESTDIR="$pkgdir" install
+}
+
+_libpcre() {
+ local bits="$1"
+ pkgdesc="PCRE2 with $bits bit character support"
+
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libpcre2-$bits.so* "$subpkgdir"/usr/lib/
+}
+libpcre16() { _libpcre 16; }
+libpcre32() { _libpcre 32; }
+
+tools() {
+ pkgdesc="Auxiliary utilities for PCRE2"
+
+ mkdir -p "$subpkgdir"/usr/
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
+}
+
+md5sums="b75fcdcce309c9778d1a5733b591c5db pcre2-10.21.tar.gz"
+sha256sums="1cfd43caffe07fe7f2cfafc74c8f0d87b38d80bbb63226a1193407476508e317 pcre2-10.21.tar.gz"
+sha512sums="feca1283bf2dd53bce4b6986a9bd4b420ca17a53fbb89a09ca50b7e2a326cea8cfc93b842f004fb9b8a487be69cecd0f18b894c04973fe3b1b2b32986f4854db pcre2-10.21.tar.gz"