mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
libpcre: bump to 8.42, add debuginfo. (#2358)
Also update SOURCE_URI because SF does not have the tarball yet.
This commit is contained in:
138
dev-libs/libpcre/libpcre-8.42.recipe
Normal file
138
dev-libs/libpcre/libpcre-8.42.recipe
Normal file
@@ -0,0 +1,138 @@
|
||||
SUMMARY="Perl5 Compatible Regular Expressions"
|
||||
DESCRIPTION="The PCRE library is a set of functions that implement regular \
|
||||
expression pattern matching using the same syntax and semantics as Perl 5. \
|
||||
PCRE has its own native API, as well as a set of wrapper functions that \
|
||||
correspond to the POSIX regular expression API. The PCRE library is free, even \
|
||||
for building proprietary software.
|
||||
This package contains the native API."
|
||||
COPYRIGHT="1997-2018 University of Cambridge
|
||||
2007-2012, Google Inc. All rights reserved."
|
||||
HOMEPAGE="http://www.pcre.org/"
|
||||
LICENSE="PCRE"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://ftp.pcre.org/pub/pcre/pcre-$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="2cd04b7c887808be030254e8d77de11d3fe9d4505c39d4b15d2664ffe8bf9301"
|
||||
SOURCE_DIR="pcre-$portVersion"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
pcreLibs="\
|
||||
libpcre \
|
||||
libpcrecpp \
|
||||
libpcreposix \
|
||||
"
|
||||
libpcreVersion="1.2.10"
|
||||
libpcrecppVersion="0.0.1"
|
||||
libpcreposixVersion="0.0.6"
|
||||
portVersionCompat="$portVersion compat >= 8"
|
||||
for i in $pcreLibs; do
|
||||
eval "${i}VersionCompat=\"\$${i}Version compat >= \${${i}Version%%.*}\""
|
||||
done
|
||||
|
||||
PROVIDES="
|
||||
libpcre$secondaryArchSuffix = $portVersion
|
||||
lib:libpcre$secondaryArchSuffix = $libpcreVersionCompat
|
||||
lib:libpcrecpp$secondaryArchSuffix = $libpcrecppVersionCompat
|
||||
lib:libpcreposix$secondaryArchSuffix = $libpcreposixVersionCompat
|
||||
"
|
||||
if [ -z "$secondaryArchSuffix" ];then
|
||||
PROVIDES="$PROVIDES
|
||||
cmd:pcregrep = $portVersionCompat
|
||||
cmd:pcretest = $portVersionCompat
|
||||
"
|
||||
fi
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libpcre${secondaryArchSuffix}_devel = $portVersion
|
||||
cmd:pcre_config$secondaryArchSuffix = $portVersionCompat
|
||||
devel:libpcre$secondaryArchSuffix = $libpcreVersionCompat
|
||||
devel:libpcrecpp$secondaryArchSuffix = $libpcrecppVersionCompat
|
||||
devel:libpcreposix$secondaryArchSuffix = $libpcreposixVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libpcre$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
debugList=(
|
||||
"$libDir"/libpcre.so.$libpcreVersion
|
||||
"$libDir"/libpcrecpp.so.$libpcrecppVersion
|
||||
"$libDir"/libpcreposix.so.$libpcreposixVersion
|
||||
)
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
for i in `echo "$PROVIDES" | sed -n -e \
|
||||
"s/^[\t]*cmd:\(.*\)$secondaryArchSuffix =.*/\1/p;"`; do
|
||||
debugList+=("$binDir"/$i)
|
||||
done
|
||||
fi
|
||||
defineDebugInfoPackage libpcre$secondaryArchSuffix "${debugList[@]}"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
aclocal
|
||||
autoconf
|
||||
automake --add-missing
|
||||
runConfigure ./configure \
|
||||
--enable-utf8 \
|
||||
--enable-unicode-properties \
|
||||
--with-pic
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
rm $libDir/libpcre*.la
|
||||
|
||||
# prepare develop/lib
|
||||
prepareInstalledDevelLibs $pcreLibs
|
||||
fixPkgconfig
|
||||
|
||||
# fix pcre-config
|
||||
fixDevelopLibDirReferences $binDir/pcre-config
|
||||
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
maybe_manDir_man1_pcre_config=
|
||||
maybe_manDir_man3=
|
||||
rm -rf $documentationDir
|
||||
else
|
||||
maybe_manDir_man1_pcre_config=$manDir/man1/pcre-config.1
|
||||
maybe_manDir_man3=$manDir/man3
|
||||
fi
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$binDir/pcre-config \
|
||||
$developDir \
|
||||
$maybe_manDir_man1_pcre_config \
|
||||
$maybe_manDir_man3
|
||||
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
rm -rf $binDir
|
||||
fi
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
Reference in New Issue
Block a user