Skip to content

Commit

Permalink
[vcpkg baseline][pcre2] fix checksum and update to 10.39 (#21248)
Browse files Browse the repository at this point in the history
* [pcre2] fix checksum

* [pcre2] update to 10.39

* Set static build, format code.

* version

* [pcre2] Add cmake wrapper to use the generated cmake file

* [unicorn-lib] Fix dependency pcre2

* version

* [qt5-base] Fix dependency pcre2

* [pcre2] Fix pcre2-config.cmake

* version

* Re-fix pcre2-config.cmake

* Revert changes about pcre-config.cmake

* version

* remove cmake wrapper

* version

* Fix static name

* version

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
  • Loading branch information
camuward and JackBoosY committed Nov 10, 2021
1 parent 6cfa934 commit 70033db
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 34 deletions.
43 changes: 24 additions & 19 deletions ports/pcre2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,54 +1,59 @@
set(PCRE2_VERSION 10.37)
set(EXPECTED_SHA f91760a8e0747f52211612fb0e134d685e224d16bd884eb574718d077a586b1fd7b6435d4e3b75c879b12e02b252467ecc28cdc4bc2903c783dacab089f99c99)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO PhilipHazel/pcre2
REF pcre2-${PCRE2_VERSION}
SHA512 ${EXPECTED_SHA}
REF 35fee4193b852cb504892352bd0155de10809889 # pcre2-10.39
SHA512 a6e50f3354dc4172df05e887dd8646d4ce6a3584fe180b17dc27b42b094e13d1d1a7e5ab3cb15dd352764d81ac33cfd03e81b0c890d9ddec72d823ca6f8bd667
HEAD_REF master
PATCHES
pcre2-10.35_fix-uwp.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS")
set(JIT OFF)
else()
set(JIT ON)
endif()

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_STATIC_LIBS=${BUILD_STATIC}
-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)
-DPCRE2_BUILD_PCRE2GREP=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

file(READ ${CURRENT_PACKAGES_DIR}/include/pcre2.h PCRE2_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(READ "${CURRENT_PACKAGES_DIR}/include/pcre2.h" PCRE2_H)
if(BUILD_STATIC)
string(REPLACE "defined(PCRE2_STATIC)" "1" PCRE2_H "${PCRE2_H}")
else()
string(REPLACE "defined(PCRE2_STATIC)" "0" PCRE2_H "${PCRE2_H}")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/pcre2.h "${PCRE2_H}")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/pcre2.h" "${PCRE2_H}")

vcpkg_fixup_pkgconfig()

vcpkg_copy_pdbs()
# The cmake file provided by pcre2 has some problems, so don't use it for now.
#vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/cmake" "${CURRENT_PACKAGES_DIR}/debug/cmake")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/man")
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(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/man)
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")
if(BUILD_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)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
17 changes: 13 additions & 4 deletions ports/pcre2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"name": "pcre2",
"version-string": "10.37",
"port-version": 1,
"description": "PCRE2 is a re-working of the original Perl Compatible Regular Expressions library",
"homepage": "https://pcre.org/"
"version": "10.39",
"description": "Regular Expression pattern matching using the same syntax and semantics as Perl 5.",
"homepage": "https://github.com/PhilipHazel/pcre2",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 2 additions & 2 deletions ports/qt5-base/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ endif()
find_library(MYSQL_RELEASE NAMES libmysql mysqlclient PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux)
find_library(MYSQL_DEBUG NAMES libmysql libmysqld mysqlclient mysqlclientd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)

find_library(PCRE2_RELEASE NAMES pcre2-16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(PCRE2_DEBUG NAMES pcre2-16 pcre2-16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(PCRE2_RELEASE NAMES pcre2-16 pcre2-16-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(PCRE2_DEBUG NAMES pcre2-16 pcre2-16-static pcre2-16d pcre2-16-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(FREETYPE_RELEASE NAMES freetype PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #zlib, bzip2, libpng
find_library(FREETYPE_DEBUG NAMES freetype freetyped PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(DOUBLECONVERSION_RELEASE NAMES double-conversion PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
Expand Down
2 changes: 1 addition & 1 deletion ports/qt5-base/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qt5-base",
"version-semver": "5.15.2",
"port-version": 12,
"port-version": 13,
"description": "Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
"homepage": "https://www.qt.io/",
"dependencies": [
Expand Down
4 changes: 2 additions & 2 deletions ports/unicorn-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ option(UNICORN_LIB_SKIP_HEADERS "If the headers installation is skipped or not."
find_path(RS_CORE_LIB_INCLUDE_DIR rs-core/common.hpp)
#find_library(RW_UTILITIES_LIBRARY NAMES rw_utilities)
find_package(ZLIB REQUIRED)
find_library(PCRE2_LIBRARY_DEBUG NAMES pcre2-8d HINTS ${INSTALLED_LIB_PATH})
find_library(PCRE2_LIBRARY_RELEASE NAMES pcre2-8 HINTS ${INSTALLED_LIB_PATH})
find_library(PCRE2_LIBRARY_DEBUG NAMES pcre2-8d pcre2-8-staticd HINTS ${INSTALLED_LIB_PATH})
find_library(PCRE2_LIBRARY_RELEASE NAMES pcre2-8 pcre2-8-static HINTS ${INSTALLED_LIB_PATH})
select_library_configurations(PCRE2)

file(GLOB_RECURSE UNICORN_LIB_SOURCES ${PROJECT_SOURCE_DIR}/unicorn/*.cpp)
Expand Down
4 changes: 2 additions & 2 deletions ports/unicorn-lib/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "unicorn-lib",
"version-string": "2020-03-02",
"port-version": 1,
"version-date": "2020-03-02",
"port-version": 2,
"description": "Unicode library for C++ by Ross Smith",
"homepage": "https://github.com/CaptainCrowbar/unicorn-lib",
"dependencies": [
Expand Down
8 changes: 4 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5129,8 +5129,8 @@
"port-version": 1
},
"pcre2": {
"baseline": "10.37",
"port-version": 1
"baseline": "10.39",
"port-version": 0
},
"pdal": {
"baseline": "1.7.1",
Expand Down Expand Up @@ -5466,7 +5466,7 @@
},
"qt5-base": {
"baseline": "5.15.2",
"port-version": 12
"port-version": 13
},
"qt5-canvas3d": {
"baseline": "0",
Expand Down Expand Up @@ -6874,7 +6874,7 @@
},
"unicorn-lib": {
"baseline": "2020-03-02",
"port-version": 1
"port-version": 2
},
"units": {
"baseline": "2.3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/pcre2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a7adfd692604527d08dfc188301fb73bae107550",
"version": "10.39",
"port-version": 0
},
{
"git-tree": "f467ee4e8312b3536d9b7af3a181630c9956db5d",
"version-string": "10.37",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qt5-base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d0254baec079c6226b73cc7580e7724cad98648c",
"version-semver": "5.15.2",
"port-version": 13
},
{
"git-tree": "9a65e1b0d631a1c2879d566140c11d634601fca6",
"version-semver": "5.15.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/u-/unicorn-lib.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e88ab2927a310295171887057ac0f6cc6502a8d5",
"version-date": "2020-03-02",
"port-version": 2
},
{
"git-tree": "a79eb0ae5746d8c2c2ebbd68557baf5975193ac8",
"version-string": "2020-03-02",
Expand Down

0 comments on commit 70033db

Please sign in to comment.