aboutsummaryrefslogtreecommitdiffstats
path: root/main/pcre2/APKBUILD
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2017-08-06 13:31:30 +0300
committerJakub Jirutka <jakub@jirutka.cz>2017-08-06 12:36:23 +0200
commit1f6a9af0f43286b038ec743b01857beadb845873 (patch)
tree9e650fd742c80c71d039cf584891e40153afbf97 /main/pcre2/APKBUILD
parent82a605c20eecceb9d849109b2d6d7d13b0c07532 (diff)
downloadaports-1f6a9af0f43286b038ec743b01857beadb845873.tar.bz2
aports-1f6a9af0f43286b038ec743b01857beadb845873.tar.xz
community/pcre2: move to main
Diffstat (limited to 'main/pcre2/APKBUILD')
-rw-r--r--main/pcre2/APKBUILD60
1 files changed, 60 insertions, 0 deletions
diff --git a/main/pcre2/APKBUILD b/main/pcre2/APKBUILD
new file mode 100644
index 0000000000..a0109666e3
--- /dev/null
+++ b/main/pcre2/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=pcre2
+pkgver=10.23
+pkgrel=1
+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:_libpcre libpcre2-32:_libpcre"
+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.
+ [ "$CARCH" != "s390x" ] && _enable_jit="--enable-jit"
+ ./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-pcre2grep-libz \
+ --enable-pcre2test-libedit \
+ --with-match-limit-recursion=8192 \
+ $_enable_jit
+ make
+}
+
+package() {
+ cd "$builddir"
+
+ make DESTDIR="$pkgdir" install
+}
+
+_libpcre() {
+ local bits="${subpkgname##*-}"
+ pkgdesc="PCRE2 with $bits bit character support"
+
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libpcre2-$bits.so* "$subpkgdir"/usr/lib/
+}
+
+tools() {
+ pkgdesc="Auxiliary utilities for PCRE2"
+
+ mkdir -p "$subpkgdir"/usr/
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
+}
+
+sha512sums="26f99989f669432f61a3c358485e2f5fa7802a05b0fecd9fb3f5b0a0b573c4093455968ef9684a506f2da985994c8fd1911626750f60007104f0a03b068c7ce3 pcre2-10.23.tar.gz"