diff options
Diffstat (limited to 'devel/pcre2/files')
3 files changed, 308 insertions, 11 deletions
diff --git a/devel/pcre2/files/patch-deps_sljit_sljit__src_sljitConfigInternal.h b/devel/pcre2/files/patch-deps_sljit_sljit__src_sljitConfigInternal.h deleted file mode 100644 index 67ebc2b80ddc..000000000000 --- a/devel/pcre2/files/patch-deps_sljit_sljit__src_sljitConfigInternal.h +++ /dev/null @@ -1,11 +0,0 @@ ---- deps/sljit/sljit_src/sljitConfigInternal.h.orig 2025-02-06 07:15:34 UTC -+++ deps/sljit/sljit_src/sljitConfigInternal.h -@@ -255,7 +255,7 @@ extern "C" { - * system provided method that should be defined below is used - * instead. - */ --#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin) -+#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin && !defined SLJIT_CONFIG_PPC_32) - #if __has_builtin(__builtin___clear_cache) && !defined(__clang__) - - /* diff --git a/devel/pcre2/files/patch-git-01-f8e7d124500e869ffc5643228c34d3745d64a3d7 b/devel/pcre2/files/patch-git-01-f8e7d124500e869ffc5643228c34d3745d64a3d7 new file mode 100644 index 000000000000..a0f49df6ffc5 --- /dev/null +++ b/devel/pcre2/files/patch-git-01-f8e7d124500e869ffc5643228c34d3745d64a3d7 @@ -0,0 +1,221 @@ +From f8e7d124500e869ffc5643228c34d3745d64a3d7 Mon Sep 17 00:00:00 2001 +From: Nicholas Wilson <nicholas@nicholaswilson.me.uk> +Date: Sat, 25 Oct 2025 12:28:05 +0100 +Subject: [PATCH] Use correctly-cased CMake variables for better compatibility + (#825) + +* Use the correct casing for <PackageName>_FOUND +* Add a CI test with CMake very latest (currently 4.1.2). This job also sets DCMAKE_POLICY_VERSION_MINIMUM to verify that we don't break any future policies, greater than our minimum version 3.15. +* Tidy the ncurses support for libreadline to use READLINE_LIBRARIES +--- + .github/workflows/dev.yml | 140 +++++++++++++++++++++++++++++++++----- + CMakeLists.txt | 50 ++++++-------- + cmake/FindEditline.cmake | 5 ++ + cmake/FindReadline.cmake | 17 ++++- + 4 files changed, 164 insertions(+), 48 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c97099601..ac3f8d001 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -146,7 +146,7 @@ endif() + # setting CMAKE_MODULE_PATH on the command line. + list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) + +-# external packages ++# External packages + find_package(BZip2) + find_package(ZLIB) + find_package(Readline) +@@ -446,7 +446,7 @@ if(HAVE_VSCRIPT) + endif() + + # bzip2 lib +-if(BZIP2_FOUND) ++if(BZip2_FOUND) + option(PCRE2_SUPPORT_LIBBZ2 "Enable support for linking pcre2grep with libbz2." ON) + endif() + +@@ -456,12 +456,12 @@ if(ZLIB_FOUND) + endif() + + # editline lib +-if(EDITLINE_FOUND) ++if(Editline_FOUND) + option(PCRE2_SUPPORT_LIBEDIT "Enable support for linking pcre2test with libedit." OFF) + endif() + + # readline lib +-if(READLINE_FOUND) ++if(Readline_FOUND) + option(PCRE2_SUPPORT_LIBREADLINE "Enable support for linking pcre2test with libreadline." ON) + endif() + +@@ -498,12 +498,12 @@ if(PCRE2_BUILD_PCRE2GREP AND NOT PCRE2_BUILD_PCRE2_8) + endif() + + if(PCRE2_SUPPORT_LIBBZ2) +- if(BZIP2_FOUND) +- include_directories(${BZIP2_INCLUDE_DIR}) ++ if(BZip2_FOUND) ++ include_directories(${BZIP2_INCLUDE_DIRS}) + else() + message( + FATAL_ERROR +- " libbz2 not found. Set BZIP2_INCLUDE_DIR to a compatible header\n" ++ " libbz2 not found. Set BZIP2_INCLUDE_DIRS to a compatible header\n" + " or set BZip2_ROOT to a full bzip2 installed tree, as needed." + ) + endif() +@@ -511,42 +511,42 @@ endif() + + if(PCRE2_SUPPORT_LIBZ) + if(ZLIB_FOUND) +- include_directories(${ZLIB_INCLUDE_DIR}) ++ include_directories(${ZLIB_INCLUDE_DIRS}) + else() + message( + FATAL_ERROR +- " zlib not found. Set ZLIB_INCLUDE_DIR to a compatible header\n" ++ " zlib not found. Set ZLIB_INCLUDE_DIRS to a compatible header\n" + " or set ZLIB_ROOT to a full zlib installed tree, as needed." + ) + endif() + endif() + + if(PCRE2_SUPPORT_LIBEDIT) +- if(EDITLINE_FOUND) +- include_directories(${EDITLINE_INCLUDE_DIR}) ++ if(Editline_FOUND) ++ include_directories(${EDITLINE_INCLUDE_DIRS}) + else() + message( + FATAL_ERROR +- " libedit not found. Set EDITLINE_INCLUDE_DIR to a compatible header\n" ++ " libedit not found. Set EDITLINE_INCLUDE_DIRS to a compatible header\n" + " or set Editline_ROOT to a full libedit installed tree, as needed." + ) + endif() + endif() + + if(PCRE2_SUPPORT_LIBREADLINE) +- if(READLINE_FOUND) +- include_directories(${READLINE_INCLUDE_DIR}) ++ if(Readline_FOUND) ++ include_directories(${READLINE_INCLUDE_DIRS}) + else() + message( + FATAL_ERROR +- " libreadline not found. Set READLINE_INCLUDE_DIR to a compatible header\n" ++ " libreadline not found. Set READLINE_INCLUDE_DIRS to a compatible header\n" + " or set Readline_ROOT to a full libreadline installed tree, as needed." + ) + endif() + endif() + + if(PCRE2_SUPPORT_LIBREADLINE AND PCRE2_SUPPORT_LIBEDIT) +- if(READLINE_FOUND) ++ if(Readline_FOUND) + message( + FATAL_ERROR + " Only one of the readline compatible libraries can be enabled.\n" +@@ -603,24 +603,16 @@ endif() + set(PCRE2TEST_LIBS) + set(PCRE2GREP_LIBS) + +-# This next one used to reference ${READLINE_LIBRARY}) +-# but I was advised to add the NCURSES test as well, along with +-# some modifications to cmake/FindReadline.cmake which should +-# make it possible to override the default if necessary. PH +- + if(PCRE2_SUPPORT_LIBREADLINE) + set(SUPPORT_LIBREADLINE 1) +- list(APPEND PCRE2TEST_LIBS ${READLINE_LIBRARY}) +- if(DEFINED NCURSES_LIBRARY) +- list(APPEND PCRE2TEST_LIBS ${NCURSES_LIBRARY}) +- endif() ++ list(APPEND PCRE2TEST_LIBS ${READLINE_LIBRARIES}) + endif() + + # libedit is a plug-compatible alternative to libreadline + + if(PCRE2_SUPPORT_LIBEDIT) + set(SUPPORT_LIBEDIT 1) +- list(APPEND PCRE2TEST_LIBS ${EDITLINE_LIBRARY}) ++ list(APPEND PCRE2TEST_LIBS ${EDITLINE_LIBRARIES}) + endif() + + if(PCRE2_SUPPORT_LIBZ) +@@ -1589,17 +1581,17 @@ if(PCRE2_SHOW_REPORT) + else() + message(STATUS " Link pcre2grep with libz .......... : Library not found") + endif() +- if(BZIP2_FOUND) ++ if(BZip2_FOUND) + message(STATUS " Link pcre2grep with libbz2 ........ : ${PCRE2_SUPPORT_LIBBZ2}") + else() + message(STATUS " Link pcre2grep with libbz2 ........ : Library not found") + endif() +- if(EDITLINE_FOUND) ++ if(Editline_FOUND) + message(STATUS " Link pcre2test with libeditline ... : ${PCRE2_SUPPORT_LIBEDIT}") + else() + message(STATUS " Link pcre2test with libeditline ... : Library not found") + endif() +- if(READLINE_FOUND) ++ if(Readline_FOUND) + message(STATUS " Link pcre2test with libreadline ... : ${PCRE2_SUPPORT_LIBREADLINE}") + else() + message(STATUS " Link pcre2test with libreadline ... : Library not found") +diff --git a/cmake/FindEditline.cmake b/cmake/FindEditline.cmake +index c973c7b64..4784e052c 100644 +--- cmake/FindEditline.cmake ++++ cmake/FindEditline.cmake +@@ -8,3 +8,8 @@ mark_as_advanced(EDITLINE_LIBRARY) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Editline DEFAULT_MSG EDITLINE_LIBRARY EDITLINE_INCLUDE_DIR) ++ ++if(Editline_FOUND) ++ set(EDITLINE_LIBRARIES "${EDITLINE_LIBRARY}") ++ set(EDITLINE_INCLUDE_DIRS "${EDITLINE_INCLUDE_DIR}") ++endif() +diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake +index 399096c37..e55fbcf22 100644 +--- cmake/FindReadline.cmake ++++ cmake/FindReadline.cmake +@@ -16,6 +16,11 @@ if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY) + include(CheckSymbolExists) + include(CMakePushCheckState) + ++ set(first_run FALSE) ++ if(NOT DEFINED HAVE_READLINE_FUNC) ++ set(first_run TRUE) ++ endif() ++ + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_LIBRARIES "${READLINE_LIBRARY}") + set(CMAKE_REQUIRED_INCLUDES "${READLINE_INCLUDE_DIR}") +@@ -36,7 +41,9 @@ if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY) + check_symbol_exists("readline" "stdio.h;readline/readline.h" HAVE_READLINE_FUNC_${lib}) + + if(HAVE_READLINE_FUNC_${lib}) +- message(STATUS "Looking for readline - readline needs ${lib}") ++ if(first_run) ++ message(STATUS "Looking for readline - readline needs ${lib}") ++ endif() + set(NCURSES_LIBRARY "${NCURSES_LIBRARY_${lib}}" CACHE FILEPATH "Path to the ncurses library") + mark_as_advanced(NCURSES_LIBRARY) + break() +@@ -50,3 +57,11 @@ endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Readline DEFAULT_MSG READLINE_LIBRARY READLINE_INCLUDE_DIR) ++ ++if(Readline_FOUND) ++ set(READLINE_LIBRARIES "${READLINE_LIBRARY}") ++ if(DEFINED NCURSES_LIBRARY) ++ list(APPEND READLINE_LIBRARIES "${NCURSES_LIBRARY}") ++ endif() ++ set(READLINE_INCLUDE_DIRS "${READLINE_INCLUDE_DIR}") ++endif() diff --git a/devel/pcre2/files/patch-git-02-3b9197727e70bffded674d24100e7b4c80e7ef58 b/devel/pcre2/files/patch-git-02-3b9197727e70bffded674d24100e7b4c80e7ef58 new file mode 100644 index 000000000000..b057c5f0cf2e --- /dev/null +++ b/devel/pcre2/files/patch-git-02-3b9197727e70bffded674d24100e7b4c80e7ef58 @@ -0,0 +1,87 @@ +From 3b9197727e70bffded674d24100e7b4c80e7ef58 Mon Sep 17 00:00:00 2001 +From: Lucas Trzesniewski <lucas.trzesniewski@gmail.com> +Date: Sat, 25 Oct 2025 21:43:32 +0200 +Subject: [PATCH] Fix incorrect version in docs (#829) + +--- + doc/html/pcre2api.html | 2 +- + doc/html/pcre2pattern.html | 2 +- + doc/pcre2.txt | 4 ++-- + doc/pcre2api.3 | 2 +- + doc/pcre2pattern.3 | 2 +- + 5 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/doc/html/pcre2api.html b/doc/html/pcre2api.html +index 52f013e5e..dc45d7b0e 100644 +--- doc/html/pcre2api.html ++++ doc/html/pcre2api.html +@@ -3526,7 +3526,7 @@ <h2><a name="SEC34" href="#TOC1">ITERATING OVER ALL MATCHES</a></h2> + for example, replacing all matches in the subject; splitting the subject on all + matches; or simply counting the number of matches. The <b>pcre2_next_match()</b> + function helps with this task by providing the appropriate parameters for the +-next match attempt (available since PCRE2 10.46). ++next match attempt (available since PCRE2 10.47). + </p> + <p> + First, a match attempt should be made using one of the matching functions +diff --git a/doc/html/pcre2pattern.html b/doc/html/pcre2pattern.html +index a18a29771..6374d93ed 100644 +--- doc/html/pcre2pattern.html ++++ doc/html/pcre2pattern.html +@@ -3451,7 +3451,7 @@ <h3> + Recursion and subroutines with returned capture groups + </h3> + <p> +-Since PCRE2 10.46, recursion and subroutine calls may also specify a list of ++Since PCRE2 10.47, recursion and subroutine calls may also specify a list of + capture groups to return. This is a PCRE2 syntax extension not supported by + Perl. The pattern matching recurses into the referenced expression as described + above, however, when the recursion returns to the calling expression the +diff --git a/doc/pcre2.txt b/doc/pcre2.txt +index 4c43489fe..6ecf94e6e 100644 +--- doc/pcre2.txt ++++ doc/pcre2.txt +@@ -3414,7 +3414,7 @@ ITERATING OVER ALL MATCHES + subject on all matches; or simply counting the number of matches. The + pcre2_next_match() function helps with this task by providing the ap- + propriate parameters for the next match attempt (available since PCRE2 +- 10.46). ++ 10.47). + + First, a match attempt should be made using one of the matching func- + tions (pcre2_match(), pcre2_dfa_match(), or pcre2_jit_match()). Then, +@@ -10105,7 +10105,7 @@ RECURSIVE PATTERNS + + Recursion and subroutines with returned capture groups + +- Since PCRE2 10.46, recursion and subroutine calls may also specify a ++ Since PCRE2 10.47, recursion and subroutine calls may also specify a + list of capture groups to return. This is a PCRE2 syntax extension not + supported by Perl. The pattern matching recurses into the referenced + expression as described above, however, when the recursion returns to +diff --git a/doc/pcre2api.3 b/doc/pcre2api.3 +index c43f57bee..1100e59af 100644 +--- doc/pcre2api.3 ++++ doc/pcre2api.3 +@@ -3543,7 +3543,7 @@ A common task for applications is to implement "global" matching behaviour, + for example, replacing all matches in the subject; splitting the subject on all + matches; or simply counting the number of matches. The \fBpcre2_next_match()\fP + function helps with this task by providing the appropriate parameters for the +-next match attempt (available since PCRE2 10.46). ++next match attempt (available since PCRE2 10.47). + .P + First, a match attempt should be made using one of the matching functions + (\fBpcre2_match()\fP, \fBpcre2_dfa_match()\fP, or \fBpcre2_jit_match()\fP). +diff --git a/doc/pcre2pattern.3 b/doc/pcre2pattern.3 +index 6f73e1b84..db7856449 100644 +--- doc/pcre2pattern.3 ++++ doc/pcre2pattern.3 +@@ -3499,7 +3499,7 @@ below. + .SS "Recursion and subroutines with returned capture groups" + .rs + .sp +-Since PCRE2 10.46, recursion and subroutine calls may also specify a list of ++Since PCRE2 10.47, recursion and subroutine calls may also specify a list of + capture groups to return. This is a PCRE2 syntax extension not supported by + Perl. The pattern matching recurses into the referenced expression as described + above, however, when the recursion returns to the calling expression the |
