void-packages/srcpkgs/pcre/template
2022-02-28 22:41:03 +01:00

71 lines
1.8 KiB
Bash

# Template file for 'pcre'
pkgname=pcre
version=8.45
revision=3
build_style=gnu-configure
configure_args="--enable-utf8 --enable-unicode-properties --with-pic
--enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-newline-is-anycrlf
--enable-pcretest-libedit --enable-jit --enable-static"
makedepends="bzip2-devel libedit-devel zlib-devel"
short_desc="Perl Compatible Regular Expressions"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://www.pcre.org/"
distfiles="${SOURCEFORGE_SITE}/pcre/pcre/${version}/${pkgname}-${version}.tar.bz2"
checksum=4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8
case "$XBPS_TARGET_MACHINE" in
mips*) ;; # Without stack for recursion the mips builds fail
*) configure_args+=" --disable-stack-for-recursion" ;;
esac
post_install() {
vlicense LICENCE
}
if [ "$CROSS_BUILD" ]; then
hostmakedepends="automake libtool"
pre_configure() {
# Mips needs a hint if an FPU is available or not
case "$XBPS_TARGET_MACHINE" in
mips-musl|mipsel-musl)
CFLAGS="-DSLJIT_IS_FPU_AVAILABLE=0"
;;
mipshf-musl|mipselhf-musl)
CFLAGS="-DSLJIT_IS_FPU_AVAILABLE=1"
;;
esac
autoreconf -fi
}
fi
libpcrecpp_package() {
short_desc+=" - C++ shared libraries"
pkg_install() {
vmove "usr/lib/libpcrecpp.so.*"
}
}
libpcre_package() {
short_desc+=" - shared libraries"
replaces="pcre<8.11"
pkg_install() {
vmove "usr/lib/libpcre.so.*"
vmove "usr/lib/libpcreposix.so.*"
}
}
pcre-devel_package() {
depends="zlib-devel bzip2-devel libpcre>=${version}_${revision} libpcrecpp>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/pcre-config
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share/man/man1/pcre-config.1
vmove usr/share/man/man3
vmove usr/share/doc
}
}