[pcre2] Update to 10.35 (#11754)

- New upstream version 10.35
- Update patches:
  pcre2-10.35_fix-space.patch
  pcre2-10.35_fix-uwp.patch
- Add patch:
  pcre2-10.35_fix_postfix_for_debug_Windows_builds.patch
- Drop patch (fixed upstream):
  fix-arm64-config.patch
- Since 10.35, pkgconfig files are created using CMake
  * fix debug suffix of pkgconfig files under Windows
  * add vcpkg_fixup_pkgconfig()
- Remove bin and debug/bin in case of static build
- Update ci.baseline.txt
  Remove "pcre2:arm-uwp=fail", because arm-uwp passes now
  Add "unicorn-lib:arm-uwp=fail"
This commit is contained in:
Wolfgang Stöggl 2020-07-07 23:54:39 +02:00 committed by GitHub
parent aa6f70b665
commit 3e615cdb1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 177 additions and 74 deletions

View File

@ -1,4 +1,4 @@
Source: pcre2
Version: 10.30-9
Version: 10.35
Homepage: https://pcre.org/
Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library

View File

@ -1,29 +0,0 @@
diff --git a/src/sljit/sljitConfigInternal.h b/src/sljit/sljitConfigInternal.h
index cc0810f..964afe8 100644
--- a/src/sljit/sljitConfigInternal.h
+++ b/src/sljit/sljitConfigInternal.h
@@ -151,6 +151,8 @@
#define SLJIT_CONFIG_X86_64 1
#elif defined(_ARM_)
#define SLJIT_CONFIG_ARM_V5 1
+#elif defined(_M_ARM64)
+#define SLJIT_CONFIG_ARM_64 1
#else
#define SLJIT_CONFIG_X86_32 1
#endif
@@ -324,9 +326,15 @@
#else
+#if defined(__linux__)
/* Calls __ARM_NR_cacheflush on ARM-Linux. */
#define SLJIT_CACHE_FLUSH(from, to) \
__clear_cache((char*)(from), (char*)(to))
+#elif(_WIN32)
+#pragma comment(lib, "kernel32.lib")
+#define SLJIT_CACHE_FLUSH(from, to) \
+ FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from));
+#endif
#endif

View File

@ -1,13 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fbc37fe..54e25f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,7 +91,7 @@ CMAKE_POLICY(SET CMP0026 OLD)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR}/src")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I\"${PROJECT_SOURCE_DIR}/src\"")
# external packages
FIND_PACKAGE( BZip2 )

View File

@ -1,25 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e8a164..7e8150c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -506,6 +506,7 @@ ADD_DEFINITIONS(-DHAVE_CONFIG_H)
IF(MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
+ add_compile_options(/wd4146)
ENDIF(MSVC)
SET(CMAKE_INCLUDE_CURRENT_DIR 1)
diff --git a/src/pcre2_match.c b/src/pcre2_match.c
index 050b7e9..49925a2 100644
--- a/src/pcre2_match.c
+++ b/src/pcre2_match.c
@@ -566,7 +566,7 @@ match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, PCRE2_SIZE *ovector,
heapframe *F; /* Current frame pointer */
heapframe *N = NULL; /* Temporary frame pointers */
heapframe *P = NULL;
-heapframe *assert_accept_frame; /* For passing back the frame with captures */
+heapframe *assert_accept_frame = NULL; /* For passing back the frame with captures */
PCRE2_SIZE frame_copy_size; /* Amount to copy when creating a new frame */
/* Local variables that do not need to be preserved over calls to RRMATCH(). */

View File

@ -0,0 +1,11 @@
--- a/CMakeLists.txt 2020-05-09 16:43:10.000000000 +0200
+++ b/CMakeLists.txt 2020-06-03 20:50:46.532419900 +0200
@@ -108,7 +108,7 @@
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR}/src")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I\"${PROJECT_SOURCE_DIR}/src\"")
# external packages
FIND_PACKAGE( BZip2 )

View File

@ -0,0 +1,10 @@
--- a/CMakeLists.txt 2020-05-09 16:43:10.000000000 +0200
+++ b/CMakeLists.txt 2020-06-03 20:57:17.026182500 +0200
@@ -619,6 +619,7 @@
IF(MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
+ add_compile_options(/wd4146)
ENDIF(MSVC)
SET(CMAKE_INCLUDE_CURRENT_DIR 1)

View File

@ -0,0 +1,141 @@
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 1255)
+++ CMakeLists.txt (working copy)
@@ -475,6 +475,12 @@
${PROJECT_BINARY_DIR}/pcre2.h
@ONLY)
+# Make sure to not link debug libs
+# against release libs and vice versa
+IF(WIN32)
+ SET(CMAKE_DEBUG_POSTFIX "d")
+ENDIF(WIN32)
+
# Generate pkg-config files
SET(PACKAGE_VERSION "${PCRE2_MAJOR}.${PCRE2_MINOR}")
@@ -483,6 +489,9 @@
SET(exec_prefix "\${prefix}")
SET(libdir "\${exec_prefix}/lib")
SET(includedir "\${prefix}/include")
+IF(WIN32 AND (CMAKE_BUILD_TYPE MATCHES Debug))
+ SET(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+ENDIF()
CONFIGURE_FILE(libpcre2-posix.pc.in libpcre2-posix.pc @ONLY)
SET(pkg_config_files ${pkg_config_files} "${CMAKE_CURRENT_BINARY_DIR}/libpcre2-posix.pc")
@@ -622,11 +631,6 @@
ENDIF(MSVC)
SET(CMAKE_INCLUDE_CURRENT_DIR 1)
-# needed to make sure to not link debug libs
-# against release libs and vice versa
-IF(WIN32)
- SET(CMAKE_DEBUG_POSTFIX "d")
-ENDIF(WIN32)
SET(targets)
Index: configure.ac
===================================================================
--- configure.ac (revision 1255)
+++ configure.ac (working copy)
@@ -1007,6 +1007,9 @@
AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"])
# Produce these files, in addition to config.h.
+# LIB_POSTFIX is used by CMakeLists.txt for Windows debug builds.
+# Pass empty LIB_POSTFIX to *.pc files and pcre2-config here.
+AC_SUBST(LIB_POSTFIX)
AC_CONFIG_FILES(
Makefile
libpcre2-8.pc
Index: libpcre2-16.pc.in
===================================================================
--- libpcre2-16.pc.in (revision 1255)
+++ libpcre2-16.pc.in (working copy)
@@ -8,6 +8,6 @@
Name: libpcre2-16
Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lpcre2-16
+Libs: -L${libdir} -lpcre2-16@LIB_POSTFIX@
Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@
Index: libpcre2-32.pc.in
===================================================================
--- libpcre2-32.pc.in (revision 1255)
+++ libpcre2-32.pc.in (working copy)
@@ -8,6 +8,6 @@
Name: libpcre2-32
Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lpcre2-32
+Libs: -L${libdir} -lpcre2-32@LIB_POSTFIX@
Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@
Index: libpcre2-8.pc.in
===================================================================
--- libpcre2-8.pc.in (revision 1255)
+++ libpcre2-8.pc.in (working copy)
@@ -8,6 +8,6 @@
Name: libpcre2-8
Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lpcre2-8
+Libs: -L${libdir} -lpcre2-8@LIB_POSTFIX@
Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@
Index: libpcre2-posix.pc.in
===================================================================
--- libpcre2-posix.pc.in (revision 1255)
+++ libpcre2-posix.pc.in (working copy)
@@ -8,6 +8,6 @@
Name: libpcre2-posix
Description: Posix compatible interface to libpcre2-8
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lpcre2-posix
+Libs: -L${libdir} -lpcre2-posix@LIB_POSTFIX@
Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@
Requires.private: libpcre2-8
Index: pcre2-config.in
===================================================================
--- pcre2-config.in (revision 1255)
+++ pcre2-config.in (working copy)
@@ -86,7 +86,7 @@
;;
--libs-posix)
if test @enable_pcre2_8@ = yes ; then
- echo $libS$libR -lpcre2-posix -lpcre2-8
+ echo $libS$libR -lpcre2-posix@LIB_POSTFIX@ -lpcre2-8@LIB_POSTFIX@
else
echo "${usage}" 1>&2
fi
@@ -93,7 +93,7 @@
;;
--libs8)
if test @enable_pcre2_8@ = yes ; then
- echo $libS$libR -lpcre2-8
+ echo $libS$libR -lpcre2-8@LIB_POSTFIX@
else
echo "${usage}" 1>&2
fi
@@ -100,7 +100,7 @@
;;
--libs16)
if test @enable_pcre2_16@ = yes ; then
- echo $libS$libR -lpcre2-16
+ echo $libS$libR -lpcre2-16@LIB_POSTFIX@
else
echo "${usage}" 1>&2
fi
@@ -107,7 +107,7 @@
;;
--libs32)
if test @enable_pcre2_32@ = yes ; then
- echo $libS$libR -lpcre2-32
+ echo $libS$libR -lpcre2-32@LIB_POSTFIX@
else
echo "${usage}" 1>&2
fi

View File

@ -1,9 +1,10 @@
set(PCRE2_VERSION 10.30)
set(EXPECTED_SHA 03e570b946ac29498a114b27e715a0fcf25702bfc9623f9fc085ee8a3214ab3c303baccb9c0af55da6916e8ce40d931d97f1ee9628690563041a943f0aa2bc54)
set(PCRE2_VERSION 10.35)
set(EXPECTED_SHA bf1cb6ab8b1103f9503609783945b02cdc4294bb266643d0ba03656c941f07b6e183793f3bf513da950460e78cb9b429bff8ade27d8930339a63caed3a3236e3)
set(PATCHES
fix-space.patch
fix-arm64-config.patch
fix-uwp.patch)
pcre2-10.35_fix-space.patch # Upstream: https://bugs.exim.org/show_bug.cgi?id=2588
pcre2-10.35_fix-uwp.patch
pcre2-10.35_fix_postfix_for_debug_Windows_builds.patch # Upstream: https://bugs.exim.org/show_bug.cgi?id=2600
)
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.pcre.org/pub/pcre/pcre2-${PCRE2_VERSION}.zip"
@ -61,6 +62,9 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/include/pcre2.h "${PCRE2_H}")
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/pcre2posix.h)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/pcre2-posix.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pcre2-posixd.lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/pcre2-posix.dll ${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-posixd.dll)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpcre2-posix.pc ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcre2-posix.pc)
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
@ -69,4 +73,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1319,7 +1319,6 @@ pangomm:x64-osx=fail
pangomm:arm64-windows=fail
parmetis:x64-linux=fail
parmetis:x64-osx=fail
pcre2:arm-uwp=fail
pdal:x64-linux=fail
pdal:x64-osx=fail
pdal-c:x64-windows-static=fail
@ -1778,6 +1777,7 @@ unicorn:arm-uwp=fail
unicorn:x64-linux=fail
unicorn:x64-osx=fail
unicorn:x64-uwp=fail
unicorn-lib:arm-uwp=fail
unicorn-lib:x64-uwp=fail
unittest-cpp:arm64-windows=fail
unittest-cpp:arm-uwp=fail