[pcre2] Update to 10.37 (#18547)

- New upstream version 10.37
- Drop patches (fixed upstream):
    pcre2-10.35_add_check_for_Intel_CET.patch
    pcre2-10.35_fix_postfix_for_debug_Windows_builds.patch
    pcre2-10.35_fix-space.patch
- Switch from CONTROL to vcpkg.json
    .\vcpkg format-manifest .\ports\pcre2\CONTROL
This commit is contained in:
Wolfgang Stöggl 2021-06-21 22:30:31 +02:00 committed by GitHub
parent d1d672d756
commit 88a341b215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 190 deletions

View File

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

View File

@ -1,26 +0,0 @@
--- a/CMakeLists.txt 2020-05-09 16:43:10.000000000 +0200
+++ b/CMakeLists.txt 2020-07-09 19:33:12.725648600 +0200
@@ -146,6 +146,23 @@
)
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
+# Check whether Intel CET is enabled, and if so, adjust compiler flags. This
+# code was written by PH, trying to imitate the logic from the autotools
+# configuration.
+
+CHECK_C_SOURCE_COMPILES(
+ "#ifndef __CET__
+ #error CET is not enabled
+ #endif
+ int main() { return 0; }"
+ INTEL_CET_ENABLED
+)
+
+IF (INTEL_CET_ENABLED)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mshstk")
+ENDIF(INTEL_CET_ENABLED)
+
+
# User-configurable options
#
# Note: CMakeSetup displays these in alphabetical order, regardless of

View File

@ -1,11 +0,0 @@
--- 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

@ -1,141 +0,0 @@
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,10 +1,7 @@
set(PCRE2_VERSION 10.35)
set(EXPECTED_SHA bf1cb6ab8b1103f9503609783945b02cdc4294bb266643d0ba03656c941f07b6e183793f3bf513da950460e78cb9b429bff8ade27d8930339a63caed3a3236e3)
set(PCRE2_VERSION 10.37)
set(EXPECTED_SHA f91760a8e0747f52211612fb0e134d685e224d16bd884eb574718d077a586b1fd7b6435d4e3b75c879b12e02b252467ecc28cdc4bc2903c783dacab089f99c99)
set(PATCHES
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
pcre2-10.35_add_check_for_Intel_CET.patch # Upstream: https://bugs.exim.org/show_bug.cgi?id=2578
)
vcpkg_download_distfile(ARCHIVE

6
ports/pcre2/vcpkg.json Normal file
View File

@ -0,0 +1,6 @@
{
"name": "pcre2",
"version-string": "10.37",
"description": "PCRE2 is a re-working of the original Perl Compatible Regular Expressions library",
"homepage": "https://pcre.org/"
}

View File

@ -4761,8 +4761,8 @@
"port-version": 8
},
"pcre2": {
"baseline": "10.35",
"port-version": 2
"baseline": "10.37",
"port-version": 0
},
"pdal": {
"baseline": "1.7.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9f61b1640aff6d4d306d30338bbd360c223301b0",
"version-string": "10.37",
"port-version": 0
},
{
"git-tree": "c0357d3b67540bd7e46f4301e5e1507ecddfaa1e",
"version-string": "10.35",