aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-10-30 14:25:56 +0800
committerVictor Romero <romerosanchezv@gmail.com>2019-10-29 23:25:56 -0700
commit8445fcce87a5171352ab7d8593a75cc3e13ddb8c (patch)
tree9836a4a1112bd51f36c61f296d3721ef9b1c5017
parentb9150c410f48a8c85bad12bcd1d75029e63e9d6d (diff)
downloadvcpkg-8445fcce87a5171352ab7d8593a75cc3e13ddb8c.tar.gz
vcpkg-8445fcce87a5171352ab7d8593a75cc3e13ddb8c.zip
[pcre2]Fix uwp build failure. (#8620)
-rw-r--r--ports/pcre2/CONTROL2
-rw-r--r--ports/pcre2/fix-uwp.patch25
-rw-r--r--ports/pcre2/portfile.cmake7
3 files changed, 30 insertions, 4 deletions
diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL
index 462916ef1..be71b866e 100644
--- a/ports/pcre2/CONTROL
+++ b/ports/pcre2/CONTROL
@@ -1,4 +1,4 @@
Source: pcre2
-Version: 10.30-5
+Version: 10.30-6
Homepage: https://pcre.org/
Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library
diff --git a/ports/pcre2/fix-uwp.patch b/ports/pcre2/fix-uwp.patch
new file mode 100644
index 000000000..29aaf1a2b
--- /dev/null
+++ b/ports/pcre2/fix-uwp.patch
@@ -0,0 +1,25 @@
+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(). */
diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake
index f5f81b818..199f72a59 100644
--- a/ports/pcre2/portfile.cmake
+++ b/ports/pcre2/portfile.cmake
@@ -10,7 +10,9 @@ vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES fix-space.patch
- fix-arm64-config.patch)
+ fix-arm64-config.patch
+ fix-uwp.patch
+)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set(JIT OFF)
@@ -52,5 +54,4 @@ 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)
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcre2)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcre2/COPYING ${CURRENT_PACKAGES_DIR}/share/pcre2/copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)