# Contributor: Sergei Lukin # Maintainer: Natanael Copa pkgname=pcre pkgver=8.41 pkgrel=0 pkgdesc="Perl-compatible regular expression library" url="http://pcre.sourceforge.net" arch="all" license="BSD" depends= makedepends="" subpackages="$pkgname-dev $pkgname-doc $pkgname-tools libpcrecpp libpcre16 libpcre32" source="ftp://ftp.csx.cam.ac.uk/pub/software/programming/$pkgname/$pkgname-$pkgver.tar.bz2 " # secfixes: # 8.40-r2: # - CVE-2017-7186.patch builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" [ "$CARCH" = "s390x" ] && _enable_jit="" || _enable_jit="--enable-jit" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ $_enable_jit \ --enable-utf8 \ --enable-unicode-properties \ --enable-pcre8 \ --enable-pcre16 \ --enable-pcre32 \ --with-match-limit-recursion=8192 \ --htmldir=/usr/share/doc/$pkgname-$pkgver/html \ --docdir=/usr/share/doc/$pkgname-$pkgver \ || return 1 make || return 1 } package() { cd "$builddir" make DESTDIR="$pkgdir" install || return 1 } libpcrecpp() { pkgdesc="C++ bindings for PCRE" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libpcrecpp.so* "$subpkgdir"/usr/lib/ } libpcre16() { pkgdesc="PCRE with 16 bit character support" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libpcre16.so* "$subpkgdir"/usr/lib/ } libpcre32() { pkgdesc="PCRE with 32 bit character support" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libpcre32.so* "$subpkgdir"/usr/lib/ } tools() { pkgdesc="Auxiliary utilities for PCRE" mkdir -p "$subpkgdir"/usr/ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } sha512sums="cc9cdbeb98c010fe4f093a019bebfb91965dae4c6a48f8e49c38ec8df7d9da7f0d32c12fc58f22c51f1c2f010e72b65bcbf8bbf180060e93edf464fa9a7c3551 pcre-8.41.tar.bz2"