summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libpcre2/files')
-rw-r--r--dev-libs/libpcre2/files/libpcre2-10.10-000-Fix-multilib.patch37
-rw-r--r--dev-libs/libpcre2/files/libpcre2-10.37-jit_fixes.patch80
-rw-r--r--dev-libs/libpcre2/files/libpcre2-10.38-fix-fix-incorrect-detection-of-alternatives-in-first-character-search.patch49
-rw-r--r--dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch30
4 files changed, 67 insertions, 129 deletions
diff --git a/dev-libs/libpcre2/files/libpcre2-10.10-000-Fix-multilib.patch b/dev-libs/libpcre2/files/libpcre2-10.10-000-Fix-multilib.patch
new file mode 100644
index 000000000000..c216aa62d279
--- /dev/null
+++ b/dev-libs/libpcre2/files/libpcre2-10.10-000-Fix-multilib.patch
@@ -0,0 +1,37 @@
+From 8b6b10229201e5b148979a24e06c640dbbcfbad9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Fri, 20 Feb 2015 14:34:26 +0100
+Subject: [PATCH] Fix multilib
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Do not set RPATH nor add explicit -L path to compiler.
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+
+--- a/pcre2-config.in
++++ b/pcre2-config.in
+@@ -28,19 +28,7 @@ if test $# -eq 0; then
+ fi
+
+ libR=
+-case `uname -s` in
+- *SunOS*)
+- libR=" -R@libdir@"
+- ;;
+- *BSD*)
+- libR=" -Wl,-R@libdir@"
+- ;;
+-esac
+-
+ libS=
+-if test @libdir@ != /usr/lib ; then
+- libS=-L@libdir@
+-fi
+
+ while test $# -gt 0; do
+ case "$1" in
+--
+2.1.0
+
diff --git a/dev-libs/libpcre2/files/libpcre2-10.37-jit_fixes.patch b/dev-libs/libpcre2/files/libpcre2-10.37-jit_fixes.patch
deleted file mode 100644
index 6ee5494f2bc5..000000000000
--- a/dev-libs/libpcre2/files/libpcre2-10.37-jit_fixes.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-Index: pcre2/ChangeLog
-===================================================================
---- pcre2/ChangeLog (revision 1314)
-+++ pcre2/ChangeLog (revision 1315)
-@@ -1,7 +1,14 @@
- Change Log for PCRE2
- --------------------
-
-+Version 10.38-RC1 xx-xxx-2021
-+-----------------------------
-
-+1. Fix invalid single character repetition issues in JIT when the repetition
-+is inside a capturing bracket and the bracket is preceeded by character
-+literals.
-+
-+
- Version 10.37 26-May-2021
- -------------------------
-
-Index: pcre2/src/pcre2_jit_compile.c
-===================================================================
---- pcre2/src/pcre2_jit_compile.c (revision 1314)
-+++ pcre2/src/pcre2_jit_compile.c (revision 1315)
-@@ -1236,15 +1236,16 @@
-
- return: current number of iterators enhanced with fast fail
- */
--static int detect_early_fail(compiler_common *common, PCRE2_SPTR cc, int *private_data_start, sljit_s32 depth, int start)
-+static int detect_early_fail(compiler_common *common, PCRE2_SPTR cc, int *private_data_start,
-+ sljit_s32 depth, int start, BOOL fast_forward_allowed)
- {
- PCRE2_SPTR begin = cc;
- PCRE2_SPTR next_alt;
- PCRE2_SPTR end;
- PCRE2_SPTR accelerated_start;
-+BOOL prev_fast_forward_allowed;
- int result = 0;
- int count;
--BOOL fast_forward_allowed = TRUE;
-
- SLJIT_ASSERT(*cc == OP_ONCE || *cc == OP_BRA || *cc == OP_CBRA);
- SLJIT_ASSERT(*cc != OP_CBRA || common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] != 0);
-@@ -1476,6 +1477,7 @@
- case OP_CBRA:
- end = cc + GET(cc, 1);
-
-+ prev_fast_forward_allowed = fast_forward_allowed;
- fast_forward_allowed = FALSE;
- if (depth >= 4)
- break;
-@@ -1484,7 +1486,7 @@
- if (*end != OP_KET || (*cc == OP_CBRA && common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0))
- break;
-
-- count = detect_early_fail(common, cc, private_data_start, depth + 1, count);
-+ count = detect_early_fail(common, cc, private_data_start, depth + 1, count, prev_fast_forward_allowed);
-
- if (PRIVATE_DATA(cc) != 0)
- common->private_data_ptrs[begin - common->start] = 1;
-@@ -13657,7 +13659,7 @@
- private_data_size = common->cbra_ptr + (re->top_bracket + 1) * sizeof(sljit_sw);
-
- if ((re->overall_options & PCRE2_ANCHORED) == 0 && (re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0 && !common->has_skip_in_assert_back)
-- detect_early_fail(common, common->start, &private_data_size, 0, 0);
-+ detect_early_fail(common, common->start, &private_data_size, 0, 0, TRUE);
-
- set_private_data_ptrs(common, &private_data_size, ccend);
-
-Index: pcre2/src/pcre2_jit_test.c
-===================================================================
---- pcre2/src/pcre2_jit_test.c (revision 1314)
-+++ pcre2/src/pcre2_jit_test.c (revision 1315)
-@@ -351,6 +351,7 @@
- { MU, A, 0, 0, ".[ab]*a", "xxa" },
- { MU, A, 0, 0, ".[ab]?.", "xx" },
- { MU, A, 0, 0, "_[ab]+_*a", "_aa" },
-+ { MU, A, 0, 0, "#(A+)#\\d+", "#A#A#0" },
-
- /* Bracket repeats with limit. */
- { MU, A, 0, 0, "(?:(ab){2}){5}M", "abababababababababababM" },
diff --git a/dev-libs/libpcre2/files/libpcre2-10.38-fix-fix-incorrect-detection-of-alternatives-in-first-character-search.patch b/dev-libs/libpcre2/files/libpcre2-10.38-fix-fix-incorrect-detection-of-alternatives-in-first-character-search.patch
deleted file mode 100644
index 936bd057a0e9..000000000000
--- a/dev-libs/libpcre2/files/libpcre2-10.38-fix-fix-incorrect-detection-of-alternatives-in-first-character-search.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-https://github.com/PhilipHazel/pcre2/pull/22
-
---- a/src/pcre2_jit_compile.c
-+++ b/src/pcre2_jit_compile.c
-@@ -1251,10 +1251,13 @@ SLJIT_ASSERT(*cc == OP_ONCE || *cc == OP_BRA || *cc == OP_CBRA);
- SLJIT_ASSERT(*cc != OP_CBRA || common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] != 0);
- SLJIT_ASSERT(start < EARLY_FAIL_ENHANCE_MAX);
-
-+next_alt = cc + GET(cc, 1);
-+if (*next_alt == OP_ALT)
-+ fast_forward_allowed = FALSE;
-+
- do
- {
- count = start;
-- next_alt = cc + GET(cc, 1);
- cc += 1 + LINK_SIZE + ((*cc == OP_CBRA) ? IMM2_SIZE : 0);
-
- while (TRUE)
-@@ -1512,7 +1515,7 @@ do
- {
- count++;
-
-- if (fast_forward_allowed && *next_alt == OP_KET)
-+ if (fast_forward_allowed)
- {
- common->fast_forward_bc_ptr = accelerated_start;
- common->private_data_ptrs[(accelerated_start + 1) - common->start] = ((*private_data_start) << 3) | type_skip;
-@@ -1562,8 +1565,8 @@ do
- else if (result < count)
- result = count;
-
-- fast_forward_allowed = FALSE;
- cc = next_alt;
-+ next_alt = cc + GET(cc, 1);
- }
- while (*cc == OP_ALT);
-
---- a/src/pcre2_jit_test.c
-+++ b/src/pcre2_jit_test.c
-@@ -352,6 +352,7 @@ static struct regression_test_case regression_test_cases[] = {
- { MU, A, 0, 0, ".[ab]?.", "xx" },
- { MU, A, 0, 0, "_[ab]+_*a", "_aa" },
- { MU, A, 0, 0, "#(A+)#\\d+", "#A#A#0" },
-+ { MU, A, 0, 0, "(?P<size>\\d+)m|M", "4M" },
-
- /* Bracket repeats with limit. */
- { MU, A, 0, 0, "(?:(ab){2}){5}M", "abababababababababababM" },
-
diff --git a/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch b/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch
new file mode 100644
index 000000000000..30fe49410bd5
--- /dev/null
+++ b/dev-libs/libpcre2/files/libpcre2-10.43-fix-loong-sljit.patch
@@ -0,0 +1,30 @@
+https://github.com/zherczeg/sljit/commit/7a821cd714d132e46e748275a80d402beea24764
+with file path adjusted to libpcre2 layout
+
+From: lrzlin <54242813+lrzlin@users.noreply.github.com>
+Date: Wed, 10 Jan 2024 07:13:55 +0800
+Subject: [PATCH] Add LoongArch float to integer conversion special cases
+ (#226)
+
+--- a/src/sljit/sljitConfigInternal.h
++++ b/src/sljit/sljitConfigInternal.h
+@@ -198,7 +198,7 @@ extern "C" {
+ /* Type of public API functions. */
+ /*********************************/
+
+-#ifndef SLJIT_API_FUNC_ATTRIBUTE
++#ifndef SLJIT_API_FUNC_ATTRIBUTE
+ #if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC)
+ /* Static ABI functions. For all-in-one programs. */
+
+@@ -399,6 +399,10 @@ typedef double sljit_f64;
+ #define SLJIT_CONV_MAX_FLOAT SLJIT_CONV_RESULT_MAX_INT
+ #define SLJIT_CONV_MIN_FLOAT SLJIT_CONV_RESULT_MIN_INT
+ #define SLJIT_CONV_NAN_FLOAT SLJIT_CONV_RESULT_MIN_INT
++#elif (defined SLJIT_CONFIG_LOONGARCH && SLJIT_CONFIG_LOONGARCH)
++#define SLJIT_CONV_MAX_FLOAT SLJIT_CONV_RESULT_MAX_INT
++#define SLJIT_CONV_MIN_FLOAT SLJIT_CONV_RESULT_MIN_INT
++#define SLJIT_CONV_NAN_FLOAT SLJIT_CONV_RESULT_ZERO
+ #else
+ #error "Result for float to integer conversion is not defined"
+ #endif