blob: 4120d0a7b30a59a196db4f27f463db813bd9159d (
plain) (
tree)
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer:
pkgname=pcre2
pkgver=10.33
pkgrel=1
pkgdesc="Perl-compatible regular expression library"
url="https://pcre.org"
arch="all"
license="BSD-3-Clause"
depends=""
depends_dev="libedit-dev zlib-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools
libpcre2-16:_libpcre libpcre2-32:_libpcre"
source="https://ftp.pcre.org/pub/pcre/$pkgname-$pkgver.tar.gz
CVE-2019-20454.patch
"
# secfixes:
# 10.33-r1:
# - CVE-2019-20454
case "$CARCH" in
s390x) _enable_jit="";;
pmmx) _enable_jit="";; # maybe someday fix sse2 detection
*) _enable_jit="--enable-jit";;
esac
build() {
# 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-pcre2grep-libz \
--enable-pcre2test-libedit \
--with-match-limit-recursion=8192 \
$_enable_jit
make
}
check() {
./RunTest
[ ! -n "$_enable_jit" ] || ./pcre2_jit_test
}
package() {
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="649983c7725e2fd2451ba89243b4c08c408fc279b7be3b2d225045cced3b0667ff6da4c9dd37510eb9e5aed6478aff54c2dbd1d92f4d0f1174579df9ec2c1882 pcre2-10.33.tar.gz
07c43ccf130c1ed2b4f97036671f92e9c1d0100fd32c053b448e5dbdf976543c12f74568e37b661db7fbd603e815f5683a59cb2a9f9c307505dca3cb36db8120 CVE-2019-20454.patch"
|