libpcre2: bump version (#10118)

This commit is contained in:
kenmays
2024-02-23 07:22:57 -08:00
committed by GitHub
parent ba7552d670
commit 91301503c2
5 changed files with 191 additions and 24 deletions

View File

@@ -0,0 +1,133 @@
SUMMARY="Perl5 Compatible Regular Expressions"
DESCRIPTION="The PCRE2 library is a set of functions that implement regular \
expression pattern matching using the same syntax and semantics as Perl 5. \
PCRE2 has its own native API, as well as a set of wrapper functions that \
correspond to the POSIX regular expression API. The PCRE2 library is free, \
even for building proprietary software.
PCRE2 is a re-working of the original PCRE library to provide an entirely new \
API."
HOMEPAGE="https://www.pcre.org/"
COPYRIGHT="1997-2021 University of Cambridge"
LICENSE="PCRE"
REVISION="3"
SOURCE_URI="https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$portVersion/pcre2-$portVersion.tar.bz2"
CHECKSUM_SHA256="0f03caf57f81d9ff362ac28cd389c055ec2bf0678d277349a1a4bee00ad6d440"
SOURCE_DIR="pcre2-$portVersion"
PATCHES="libpcre2-$portVersion.patchset"
ARCHITECTURES="all x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libpcre2Version="0.10.4"
libpcre2posixVersion="3.0.1"
libpcre2VersionCompat="$libpcre2Version compat >= ${libpcre2Version%%.*}"
libpcre2posixVersionCompat="$libpcre2posixVersion compat >= ${libpcre2posixVersion%%.*}"
portVersionCompat="$portVersion compat >= 10"
PROVIDES="
libpcre2$secondaryArchSuffix = $portVersionCompat
cmd:pcre2grep$secondaryArchSuffix
cmd:pcre2test$secondaryArchSuffix
lib:libpcre2_16$secondaryArchSuffix = $libpcre2VersionCompat
lib:libpcre2_32$secondaryArchSuffix = $libpcre2VersionCompat
lib:libpcre2_8$secondaryArchSuffix = $libpcre2VersionCompat
lib:libpcre2_posix$secondaryArchSuffix = $libpcre2posixVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libedit$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
libpcre2${secondaryArchSuffix}_devel = $portVersionCompat
cmd:pcre2_config$secondaryArchSuffix = $portVersionCompat
devel:libpcre2_16$secondaryArchSuffix = $libpcre2VersionCompat
devel:libpcre2_32$secondaryArchSuffix = $libpcre2VersionCompat
devel:libpcre2_8$secondaryArchSuffix = $libpcre2VersionCompat
devel:libpcre2_posix$secondaryArchSuffix = $libpcre2posixVersionCompat
"
REQUIRES_devel="
libpcre2$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
"
BUILD()
{
libtoolize --force --copy --install
aclocal
autoconf
automake --add-missing
jitOption=--enable-jit
if [ "$effectiveTargetArchitecture" = x86_gcc2 ] || [ "$effectiveTargetArchitecture" = riscv64 ]; then
jitOption=--disable-jit
fi
runConfigure ./configure \
--with-pic \
--enable-pcre2-16 \
--enable-pcre2-32 \
$jitOption \
--enable-pcre2grep-libz \
--enable-pcre2grep-libbz2 \
--enable-pcre2test-libedit \
--disable-static
#--enable-pcre2test-libreadline \
#--enable-debug
make $jobArgs
}
INSTALL()
{
make install
# remove libtool files
rm -f "$libDir"/libpcre2-*.la
# prepare develop/lib
prepareInstalledDevelLibs \
libpcre2-8 \
libpcre2-16 \
libpcre2-32 \
libpcre2-posix
fixPkgconfig
# fix pcre-config
fixDevelopLibDirReferences $binDir/pcre2-config
if [ -z "$secondaryArchSuffix" ]; then
maybe_manDir_man1_pcre2_config="$manDir"/man1/pcre2-config.1
maybe_manDir_man3="$manDir"/man3
else
maybe_manDir_man1_pcre2_config=
maybe_manDir_man3=
rm -rf "$documentationDir"
fi
# devel package
packageEntries devel \
"$binDir"/pcre2-config \
"$developDir" \
${maybe_manDir_man1_pcre2_config:+"$maybe_manDir_man1_pcre2_config"} \
${maybe_manDir_man3:+"$maybe_manDir_man3"}
}
TEST()
{
make check
}

View File

@@ -7,15 +7,15 @@ even for building proprietary software.
PCRE2 is a re-working of the original PCRE library to provide an entirely new \
API."
HOMEPAGE="https://www.pcre.org/"
COPYRIGHT="1997-2022 University of Cambridge"
COPYRIGHT="1997-2024 University of Cambridge"
LICENSE="PCRE"
REVISION="1"
SOURCE_URI="https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$portVersion/pcre2-$portVersion.tar.bz2"
CHECKSUM_SHA256="8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840"
CHECKSUM_SHA256="e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb"
SOURCE_DIR="pcre2-$portVersion"
PATCHES="libpcre2-$portVersion.patchset"
ARCHITECTURES="all"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libpcre2Version="0.11.2"

View File

@@ -4,10 +4,11 @@ PCRE2 LICENCE
PCRE2 is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
Release 10 of PCRE2 is distributed under the terms of the "BSD" licence, as
specified below. The documentation for PCRE2, supplied in the "doc"
directory, is distributed under the same terms as the software itself. The data
in the testdata directory is not copyrighted and is in the public domain.
Releases 10.00 and above of PCRE2 are distributed under the terms of the "BSD"
licence, as specified below, with one exemption for certain binary
redistributions. The documentation for PCRE2, supplied in the "doc" directory,
is distributed under the same terms as the software itself. The data in the
testdata directory is not copyrighted and is in the public domain.
The basic library functions are written in C and are freestanding. Also
included in the distribution is a just-in-time compiler that can be used to
@@ -19,13 +20,13 @@ THE BASIC LIBRARY FUNCTIONS
---------------------------
Written by: Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
Email local part: Philip.Hazel
Email domain: gmail.com
University of Cambridge Computing Service,
Retired from University of Cambridge Computing Service,
Cambridge, England.
Copyright (c) 1997-2016 University of Cambridge
Copyright (c) 1997-2024 University of Cambridge
All rights reserved.
@@ -34,9 +35,9 @@ PCRE2 JUST-IN-TIME COMPILATION SUPPORT
Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Email domain: freemail.hu
Copyright(c) 2010-2016 Zoltan Herczeg
Copyright(c) 2010-2024 Zoltan Herczeg
All rights reserved.
@@ -45,9 +46,9 @@ STACK-LESS JUST-IN-TIME COMPILER
Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Email domain: freemail.hu
Copyright(c) 2009-2016 Zoltan Herczeg
Copyright(c) 2009-2024 Zoltan Herczeg
All rights reserved.
@@ -57,11 +58,11 @@ THE "BSD" LICENCE
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
* Redistributions of source code must retain the above copyright notices,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
notices, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the University of Cambridge nor the names of any
@@ -80,4 +81,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
EXEMPTION FOR BINARY LIBRARY-LIKE PACKAGES
------------------------------------------
The second condition in the BSD licence (covering binary redistributions) does
not apply all the way down a chain of software. If binary package A includes
PCRE2, it must respect the condition, but if package B is software that
includes package A, the condition is not imposed on package B unless it uses
PCRE2 independently.
End

View File

@@ -1,14 +1,14 @@
From db4f91a001f4eb4c48fc4c82df7f1d1989ea87b7 Mon Sep 17 00:00:00 2001
From 1f47ad9a79525e0c7837907011c8fa68155dd380 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 30 Apr 2019 18:33:26 +0200
Subject: gcc2 fix
diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c
index 0afd27c..24db5d8 100644
index db2ce65..f3b049f 100644
--- a/src/pcre2_jit_compile.c
+++ b/src/pcre2_jit_compile.c
@@ -3833,6 +3833,8 @@ static void peek_char_back(compiler_common *common, sljit_u32 max, jump_list **b
@@ -3759,6 +3759,8 @@ static void peek_char_back(compiler_common *common, sljit_u32 max, jump_list **b
contain the start of the subject buffer. Affects TMP1, TMP2, and RETURN_ADDR. */
DEFINE_COMPILER;
@@ -17,7 +17,7 @@ index 0afd27c..24db5d8 100644
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
struct sljit_jump *jump;
#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 */
@@ -3894,6 +3896,7 @@ if (common->invalid_utf)
@@ -3820,6 +3822,7 @@ if (common->invalid_utf)
#endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */
#endif /* SUPPORT_UNICODE */
}
@@ -29,17 +29,17 @@ index 0afd27c..24db5d8 100644
2.42.1
From ab93da802ce6618b9fddf9bf082a546a9d6963ce Mon Sep 17 00:00:00 2001
From f44c4b6e80df1ea36407739b7b0b0e3791b0566b Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 24 Nov 2019 11:14:44 +0100
Subject: workaround broken setrlimit on Haiku.
diff --git a/src/pcre2test.c b/src/pcre2test.c
index 4fa5884..397e8a0 100644
index 84987d7..ca7c3fa 100644
--- a/src/pcre2test.c
+++ b/src/pcre2test.c
@@ -9016,7 +9016,9 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
@@ -8717,7 +8717,9 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
{
fprintf(stderr, "pcre2test: setting stack size %luMiB failed: %s\n",
(unsigned long int)stack_size, strerror(errno));

View File

@@ -0,0 +1,23 @@
From c0774e3b14df017e021e0e78cfb6c19b9bf07d07 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 24 Nov 2019 11:14:44 +0100
Subject: workaround broken setrlimit on Haiku.
diff --git a/src/pcre2test.c b/src/pcre2test.c
index 8066d96..7f3c4cf 100644
--- a/src/pcre2test.c
+++ b/src/pcre2test.c
@@ -9173,7 +9173,9 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
{
fprintf(stderr, "pcre2test: setting stack size %luMiB failed: %s\n",
(unsigned long int)stack_size, strerror(errno));
+#ifndef __HAIKU__
exit(1);
+#endif
}
op++;
argc--;
--
2.42.1