From 7f3781e19cc7d4e4882a4caec01668c6f7b5c163 Mon Sep 17 00:00:00 2001 From: Alexandre Moyer <92300101+moyer-avs@users.noreply.github.com> Date: Fri, 21 Aug 2026 04:32:31 +0200 Subject: [PATCH] [mongo-c-driver, poco] Remove unofficial-utf8proc use (#52645) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ports/mongo-c-driver/fix-dependencies.patch | 21 +++++-- ports/mongo-c-driver/usage | 8 +-- ports/mongo-c-driver/vcpkg.json | 2 +- ports/poco/0003-fix-dependency.patch | 46 +++++++++----- ports/poco/0007-find-pcre2.patch | 69 +++------------------ ports/poco/portfile.cmake | 8 ++- ports/poco/usage | 8 +-- ports/poco/vcpkg.json | 4 +- scripts/ci.feature.baseline.txt | 1 - versions/baseline.json | 4 +- versions/m-/mongo-c-driver.json | 5 ++ versions/p-/poco.json | 5 ++ 12 files changed, 82 insertions(+), 99 deletions(-) diff --git a/ports/mongo-c-driver/fix-dependencies.patch b/ports/mongo-c-driver/fix-dependencies.patch index 62118819b1..a908c6aee7 100644 --- a/ports/mongo-c-driver/fix-dependencies.patch +++ b/ports/mongo-c-driver/fix-dependencies.patch @@ -1,5 +1,5 @@ diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt -index 9b2c2f845d..9cb6397d2e 100644 +index 7b9f338..75c660d 100644 --- a/src/libmongoc/CMakeLists.txt +++ b/src/libmongoc/CMakeLists.txt @@ -52,7 +52,7 @@ endif () @@ -25,16 +25,25 @@ index 9b2c2f845d..9cb6397d2e 100644 endif () mongo_bool01 (MONGOC_ENABLE_SHM_COUNTERS ENABLE_SHM_COUNTERS) -@@ -780,7 +780,7 @@ set (STATIC_LIBRARIES +@@ -782,7 +782,7 @@ set (STATIC_LIBRARIES ) # utf8proc configuration -find_package(Utf8Proc REQUIRED) -+find_package(unofficial-utf8proc CONFIG REQUIRED) ++find_package(utf8proc CONFIG REQUIRED) set(UTF8PROC_INCLUDE_DIRS, "") if (USE_BUNDLED_UTF8PROC) set ( -@@ -913,7 +913,7 @@ if (ENABLE_SHARED) +@@ -791,7 +791,7 @@ if (USE_BUNDLED_UTF8PROC) + ) + list(APPEND SOURCES $) + else() +- target_link_libraries(_mongoc-dependencies INTERFACE utf8proc) ++ target_link_libraries(_mongoc-dependencies INTERFACE utf8proc::utf8proc) + endif() + + if(ENABLE_SRV) +@@ -915,7 +915,7 @@ if (NOT MONGOC_ENABLE_STATIC_BUILD) OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}${PROJECT_VERSION_MAJOR}" VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}" @@ -44,7 +53,7 @@ index 9b2c2f845d..9cb6397d2e 100644 mongo_generate_pkg_config(mongoc_shared INSTALL RENAME mongoc${PROJECT_VERSION_MAJOR}.pc) diff --git a/src/libmongoc/etc/mongocConfig.cmake.in b/src/libmongoc/etc/mongocConfig.cmake.in -index 14d7e4c7ed..1597473cee 100644 +index 14d7e4c..9d97123 100644 --- a/src/libmongoc/etc/mongocConfig.cmake.in +++ b/src/libmongoc/etc/mongocConfig.cmake.in @@ -48,6 +48,9 @@ include(CMakeFindDependencyMacro) @@ -71,7 +80,7 @@ index 14d7e4c7ed..1597473cee 100644 - return() - endif() endif() -+find_dependency(unofficial-utf8proc CONFIG) ++find_dependency(utf8proc CONFIG) # If we need to import a TLS package for our imported targets, do that now: if(__mongoc_tls_package) diff --git a/ports/mongo-c-driver/usage b/ports/mongo-c-driver/usage index ecf8be2cae..9b7c52e0d0 100644 --- a/ports/mongo-c-driver/usage +++ b/ports/mongo-c-driver/usage @@ -1,4 +1,4 @@ -mongo-c-driver provides CMake targets: - - find_package(mongoc CONFIG REQUIRED) - target_link_libraries(main PRIVATE $,mongo::shared,mongo::static>) +mongo-c-driver provides CMake targets: + + find_package(mongoc CONFIG REQUIRED) + target_link_libraries(main PRIVATE mongoc::mongoc) diff --git a/ports/mongo-c-driver/vcpkg.json b/ports/mongo-c-driver/vcpkg.json index 8048a09363..fd80febb10 100644 --- a/ports/mongo-c-driver/vcpkg.json +++ b/ports/mongo-c-driver/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mongo-c-driver", "version": "2.3.1", - "port-version": 1, + "port-version": 2, "description": "Client library written in C for MongoDB.", "homepage": "https://github.com/mongodb/mongo-c-driver", "license": "Apache-2.0", diff --git a/ports/poco/0003-fix-dependency.patch b/ports/poco/0003-fix-dependency.patch index 4939509736..825ed1ce21 100644 --- a/ports/poco/0003-fix-dependency.patch +++ b/ports/poco/0003-fix-dependency.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 861c27c..d2701ce 100644 +index 99add11..847dc7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,8 +80,6 @@ option(ENABLE_NETSSL_WIN "Enable NetSSL Windows" OFF) @@ -94,6 +94,16 @@ index 0ea8701..3c8a426 100644 target_include_directories(DataMySQL PUBLIC $ +diff --git a/Data/MySQL/cmake/PocoDataMySQLConfig.cmake b/Data/MySQL/cmake/PocoDataMySQLConfig.cmake +index 092774b..cc9d50e 100644 +--- a/Data/MySQL/cmake/PocoDataMySQLConfig.cmake ++++ b/Data/MySQL/cmake/PocoDataMySQLConfig.cmake +@@ -1,4 +1,5 @@ + include(CMakeFindDependencyMacro) + find_dependency(PocoFoundation) + find_dependency(PocoData) ++find_dependency(unofficial-libmysql CONFIG) + include("${CMAKE_CURRENT_LIST_DIR}/PocoDataMySQLTargets.cmake") diff --git a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h index 2386590..81b2c8e 100644 --- a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h @@ -129,6 +139,21 @@ index 7141112..0c73beb 100644 target_compile_definitions(DataSQLite PUBLIC POCO_UNBUNDLED SQLITE_THREADSAFE=1 +diff --git a/Foundation/cmake/PocoFoundationConfig.cmake b/Foundation/cmake/PocoFoundationConfig.cmake +index 32b5d83..4d816c9 100644 +--- a/Foundation/cmake/PocoFoundationConfig.cmake ++++ b/Foundation/cmake/PocoFoundationConfig.cmake +@@ -2,8 +2,8 @@ if(@POCO_UNBUNDLED@) + include(CMakeFindDependencyMacro) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + find_dependency(ZLIB REQUIRED) +- find_dependency(PCRE2 REQUIRED) +- find_dependency(Utf8Proc REQUIRED) ++ find_dependency(PCRE2 CONFIG COMPONENTS 8BIT) ++ find_dependency(utf8proc CONFIG) + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake") diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt index cf66250..89e6c8f 100644 --- a/XML/CMakeLists.txt @@ -160,7 +185,7 @@ index ef58207..4ed94ec 100644 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V39") endif() - find_dependency(EXPAT REQUIRED) -+ find_dependency(expat CONFIG REQUIRED) ++ find_dependency(expat CONFIG) endif() include("${CMAKE_CURRENT_LIST_DIR}/PocoXMLTargets.cmake") @@ -173,9 +198,9 @@ index 173eacd..90f68fc 100644 endif() +include(CMakeFindDependencyMacro) -+find_dependency(ZLIB REQUIRED) ++find_dependency(ZLIB) +if(Poco_FIND_REQUIRED_XML) -+ find_dependency(expat CONFIG REQUIRED) ++ find_dependency(expat CONFIG) +endif() + set(_Poco_FIND_PARTS_REQUIRED) @@ -190,16 +215,3 @@ index 173eacd..90f68fc 100644 foreach(module ${Poco_FIND_COMPONENTS}) find_package(Poco${module} -diff --git a/Foundation/cmake/PocoFoundationConfig.cmake b/Foundation/cmake/PocoFoundationConfig.cmake -index 82c5788..739adef 100644 ---- a/Foundation/cmake/PocoFoundationConfig.cmake -+++ b/Foundation/cmake/PocoFoundationConfig.cmake -@@ -3,7 +3,7 @@ if(@POCO_UNBUNDLED@) - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") - find_dependency(ZLIB REQUIRED) - find_dependency(PCRE2 REQUIRED) -- find_dependency(Utf8Proc REQUIRED) -+ find_dependency(unofficial-utf8proc REQUIRED) - endif() - - include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake") diff --git a/ports/poco/0007-find-pcre2.patch b/ports/poco/0007-find-pcre2.patch index 638750b5f3..ef0edac876 100644 --- a/ports/poco/0007-find-pcre2.patch +++ b/ports/poco/0007-find-pcre2.patch @@ -1,80 +1,27 @@ diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt -index d8df9dc..fe2b000 100644 +index cb29e69..8ff6332 100644 --- a/Foundation/CMakeLists.txt +++ b/Foundation/CMakeLists.txt -@@ -27,9 +27,12 @@ POCO_MESSAGES(SRCS Logging src/pocomsg.mc) +@@ -27,11 +27,11 @@ POCO_MESSAGES(SRCS Logging src/pocomsg.mc) # If POCO_UNBUNDLED is enabled we try to find the required packages # The configuration will fail if the packages are not found if(POCO_UNBUNDLED) - find_package(PCRE2 REQUIRED) ++ find_package(PCRE2 CONFIG REQUIRED COMPONENTS 8BIT) find_package(ZLIB REQUIRED) - find_package(Utf8Proc REQUIRED) -+ find_package(unofficial-utf8proc CONFIG REQUIRED) -+ include(SelectLibraryConfigurations) -+ 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) ++ find_package(utf8proc CONFIG REQUIRED) #HACK: Unicode.cpp requires functions from these files. The can't be taken from the library POCO_SOURCES(SRCS RegExp -@@ -99,7 +102,7 @@ set_target_properties(Foundation + src/pcre2_ucd.c + src/pcre2_tables.c +@@ -99,7 +99,7 @@ set_target_properties(Foundation ) if(POCO_UNBUNDLED) - target_link_libraries(Foundation PUBLIC Pcre2::Pcre2 ZLIB::ZLIB Utf8Proc::Utf8Proc) -+ target_link_libraries(Foundation PUBLIC ${PCRE2_LIBRARY} ZLIB::ZLIB utf8proc) ++ target_link_libraries(Foundation PUBLIC PCRE2::8BIT ZLIB::ZLIB utf8proc::utf8proc) target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED) add_definitions( -D_pcre2_utf8_table1=_poco_pcre2_utf8_table1 -diff --git a/cmake/FindPCRE2.cmake b/cmake/FindPCRE2.cmake -index e730f32..6e10df2 100644 ---- a/cmake/FindPCRE2.cmake -+++ b/cmake/FindPCRE2.cmake -@@ -54,7 +54,7 @@ Hints - include(FindPackageHandleStandardArgs) - - find_package(PkgConfig QUIET) --pkg_check_modules(PC_PCRE2 QUIET pcre2) -+pkg_check_modules(PC_PCRE2 QUIET libpcre2-8) - - find_path(PCRE2_INCLUDE_DIR - NAMES pcre2.h -@@ -66,8 +66,8 @@ find_path(PCRE2_INCLUDE_DIR - DOC "Specify the include directory containing pcre2.h" - ) - --find_library(PCRE2_LIBRARY -- NAMES pcre2-8 -+find_library(PCRE2_LIBRARY_DEBUG -+ NAMES pcre2-8d pcre2-8-staticd - HINTS - ${PCRE2_ROOT_DIR}/lib - ${PCRE2_ROOT_LIBRARY_DIRS} -@@ -76,6 +76,19 @@ find_library(PCRE2_LIBRARY - DOC "Specify the lib directory containing pcre2" - ) - -+find_library(PCRE2_LIBRARY_RELEASE -+ NAMES pcre2-8 pcre2-8-static -+ HINTS -+ ${PCRE2_ROOT_DIR}/lib -+ ${PCRE2_ROOT_LIBRARY_DIRS} -+ PATHS -+ ${PC_PCRE2_LIBRARY_DIRS} -+ DOC "Specify the lib directory containing pcre2" -+) -+ -+include(SelectLibraryConfigurations) -+select_library_configurations(PCRE2) -+ - set(PCRE2_VERSION ${PC_PCRE2_VERSION}) - - find_package_handle_standard_args(PCRE2 -@@ -87,7 +100,6 @@ find_package_handle_standard_args(PCRE2 - ) - - if(PCRE2_FOUND) -- set(PCRE2_LIBRARIES ${PCRE2_LIBRARY}) - set(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR}) - set(PCRE2_DEFINITIONS ${PC_PCRE2_CFLAGS_OTHER}) - endif() diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 0ad3dd31c7..bebf09155f 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -149,4 +149,10 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +vcpkg_install_copyright( + FILE_LIST + "${SOURCE_PATH}/LICENSE" + "${SOURCE_PATH}/Foundation/include/Poco/ordered_hash.h" + "${SOURCE_PATH}/Foundation/include/Poco/zlib.h" + "${SOURCE_PATH}/Foundation/src/pcre2_ucd.c" +) diff --git a/ports/poco/usage b/ports/poco/usage index 9adb3444e3..02e807cfe5 100644 --- a/ports/poco/usage +++ b/ports/poco/usage @@ -1,4 +1,4 @@ -The package poco is compatible with built-in CMake targets: - - find_package(Poco REQUIRED [COMPONENTS ...]) - target_link_libraries(main PRIVATE Poco::) +The package poco is compatible with built-in CMake targets: + + find_package(Poco REQUIRED [COMPONENTS ...]) + target_link_libraries(main PRIVATE Poco::) diff --git a/ports/poco/vcpkg.json b/ports/poco/vcpkg.json index 3ccf2b8c02..5a1b534c9e 100644 --- a/ports/poco/vcpkg.json +++ b/ports/poco/vcpkg.json @@ -1,10 +1,10 @@ { "name": "poco", "version": "1.14.1", - "port-version": 2, + "port-version": 3, "description": "Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.", "homepage": "https://github.com/pocoproject/poco", - "license": "BSL-1.0", + "license": "BSD-3-Clause AND BSL-1.0 AND MIT AND Zlib", "supports": "!uwp", "dependencies": [ "pcre2", diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index 84f8acb77e..c1d7f1ffcb 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -1077,7 +1077,6 @@ plplot[x11]:x64-windows=cascade plplot[x11]:x86-windows=cascade pmdk:x64-windows-static=fail poco[core,mariadb,mysql]=options # You can not install mariadb and mysql at the same time -poco[mysql]:x86-windows=cascade poco[odbc]:arm64-linux=feature-fails poco[pdf]:arm64-linux=cascade poppler[qt]:arm64-linux=cascade diff --git a/versions/baseline.json b/versions/baseline.json index 6d8c85ac47..bc8bfd7bee 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6738,7 +6738,7 @@ }, "mongo-c-driver": { "baseline": "2.3.1", - "port-version": 1 + "port-version": 2 }, "mongo-cxx-driver": { "baseline": "4.4.0", @@ -7962,7 +7962,7 @@ }, "poco": { "baseline": "1.14.1", - "port-version": 2 + "port-version": 3 }, "podofo": { "baseline": "1.1.1", diff --git a/versions/m-/mongo-c-driver.json b/versions/m-/mongo-c-driver.json index 3b21ee93b2..c5fe6dec6d 100644 --- a/versions/m-/mongo-c-driver.json +++ b/versions/m-/mongo-c-driver.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c05525c9ea0c66ab477c4dd036ed22f3dd7f6d63", + "version": "2.3.1", + "port-version": 2 + }, { "git-tree": "e1338692cf8462e5e974d24d097fe31870cc0f75", "version": "2.3.1", diff --git a/versions/p-/poco.json b/versions/p-/poco.json index 8dc7fb8d1d..5a57e0d635 100644 --- a/versions/p-/poco.json +++ b/versions/p-/poco.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5d5335d1bb4af801ce93eedf25656caad588a4ea", + "version": "1.14.1", + "port-version": 3 + }, { "git-tree": "1b7c8e1c9662ffc308a12a2382fdbd3ac105801c", "version": "1.14.1",