From d54600af13be09bf23d48071e8835bddfa03df00 Mon Sep 17 00:00:00 2001 From: talregev Date: Thu, 11 May 2023 21:37:21 +0300 Subject: [PATCH] Create JIT as a feature (#31294) --- ports/pcre2/portfile.cmake | 11 ++++++----- ports/pcre2/vcpkg.json | 25 +++++++++++++++++++++++-- versions/baseline.json | 2 +- versions/p-/pcre2.json | 5 +++++ 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake index 8f5ac8c855..6287bc7c9d 100644 --- a/ports/pcre2/portfile.cmake +++ b/ports/pcre2/portfile.cmake @@ -13,20 +13,21 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" INSTALL_PDB) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_STATIC_CRT) -set(JIT ON) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") - set(JIT OFF) -endif() +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + jit PCRE2_SUPPORT_JIT +) vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS + ${FEATURE_OPTIONS} -DBUILD_STATIC_LIBS=${BUILD_STATIC} -DPCRE2_STATIC_RUNTIME=${BUILD_STATIC_CRT} -DPCRE2_BUILD_PCRE2_8=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON - -DPCRE2_SUPPORT_JIT=${JIT} -DPCRE2_SUPPORT_UNICODE=ON -DPCRE2_BUILD_TESTS=OFF -DPCRE2_BUILD_PCRE2GREP=OFF diff --git a/ports/pcre2/vcpkg.json b/ports/pcre2/vcpkg.json index df88f3c5c7..8b6338038f 100644 --- a/ports/pcre2/vcpkg.json +++ b/ports/pcre2/vcpkg.json @@ -1,7 +1,7 @@ { "name": "pcre2", "version": "10.40", - "port-version": 1, + "port-version": 2, "description": "Regular Expression pattern matching using the same syntax and semantics as Perl 5.", "homepage": "https://github.com/PCRE2Project/pcre2", "license": "BSD-3-Clause", @@ -19,5 +19,26 @@ "host": true }, "zlib" - ] + ], + "default-features": [ + "platform-default-features" + ], + "features": { + "jit": { + "description": "Build JIT support", + "supports": "!emscripten" + }, + "platform-default-features": { + "description": "Enable default features", + "dependencies": [ + { + "name": "pcre2", + "features": [ + "jit" + ], + "platform": "!emscripten" + } + ] + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index cf01271042..f20ad87e80 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6110,7 +6110,7 @@ }, "pcre2": { "baseline": "10.40", - "port-version": 1 + "port-version": 2 }, "pdal": { "baseline": "2.5.3", diff --git a/versions/p-/pcre2.json b/versions/p-/pcre2.json index 46b57427e9..a9ce1fd02b 100644 --- a/versions/p-/pcre2.json +++ b/versions/p-/pcre2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "533fc8ada3da33f695eb499fe8190a5e9b24a5c8", + "version": "10.40", + "port-version": 2 + }, { "git-tree": "941f187c16a9385815fd353a9b79abf55bd2a7ec", "version": "10.40",