| Name |
pcre |
| Description |
Perl-compatible regular expression library |
| Version |
8.45-r4 |
| Package Base |
pcre |
| Homepage |
https://www.pcre.org/ |
| Maintainers |
['Natanael Copa <ncopa@alpinelinux.org>'] |
| Contributors |
['Sergei Lukin <sergej.lukin@gmail.com>'] |
| Distro-repo |
https://gitlab.alpinelinux.org/alpine/aports/-/tree/3.22-stable/main/pcre |
| Sources |
['https://downloads.sourceforge.net/project/pcre/pcre/8.45-r4/pcre-8.45-r4.tar.bz2'] |
| Dependencies |
['libc.musl-x86_64.so.1'] |
| Optional-Dependencies |
[] |
| Build-Dependencies |
['m4', 'libtool', 'autoconf', 'automake'] |
| Provides |
['so:libpcre.so.1=1.2.13', 'so:libpcreposix.so.0=0.0.7'] |
| Builddate |
10-02-2025 23:12:21 |
| Architecture |
x86_64 |
| Distro-Version |
v3.22 |
| Licenses |
['BSD-3-Clause'] |
| Hash |
Q17AtCBtnRnLaSaSRzAQNoKhkIeko= |
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pcre
pkgver=8.45
pkgrel=4
pkgdesc="Perl-compatible regular expression library"
url="https://www.pcre.org/"
arch="all"
makedepends="m4 libtool autoconf automake"
license="BSD-3-Clause"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-tools
libpcrecpp libpcre16 libpcre32"
source="https://downloads.sourceforge.net/project/pcre/pcre/$pkgver/pcre-$pkgver.tar.bz2"
# secfixes:
# 8.44-r0:
# - CVE-2020-14155
# 8.40-r2:
# - CVE-2017-7186
# 7.8-r0:
# - CVE-2017-11164
# - CVE-2017-16231
# use sysroot if cross compiling to avoid pulling in system libs
[ "$CBUILD" != "$CHOST" ] && _cross_configure="--with-sysroot=$CBUILDROOT"
prepare() {
default_prepare
update_config_sub
# update libtool so it won't use system libs when a sysroot is provided
libtoolize -f &&
aclocal &&
autoconf &&
automake --add-missing
}
build() {
local _enable_jit="--enable-jit"
case "$CARCH" in
s390x) _enable_jit="";;
riscv*) _enable_jit="";;
loongarch64) _enable_jit="";;
esac
./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 \
$_cross_configure
make
}
package() {
make DESTDIR="$pkgdir" install
}
check() {
# skip locale specific tests
sed -i -e 's/do3=yes//g' RunTest
make check
}
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="
91bff52eed4a2dfc3f3bfdc9c672b88e7e2ffcf3c4b121540af8a4ae8c1ce05178430aa6b8000658b9bb7b4252239357250890e20ceb84b79cdfcde05154061a pcre-8.45.tar.bz2
"