From 939eaca4969825d5ccd06ec64f7541864c96a606 Mon Sep 17 00:00:00 2001 From: jim wang <122244446+jimwang118@users.noreply.github.com> Date: Fri, 17 Nov 2023 08:52:43 +0800 Subject: [PATCH] [mongo-cxx-driver] update to 3.9.0 (#34994) * update to 3.9.0 * update version * update libbson * update version * Fix static compilation issue * update version * patch * update version * patch * update version --- ports/libbson/fix-include-directory.patch | 30 ++----- ports/libbson/portfile.cmake | 10 ++- ports/libbson/vcpkg.json | 2 +- .../disable-dynamic-when-static.patch | 63 ++++++------- ports/mongo-c-driver/fix-dependencies.patch | 89 +++++++++---------- .../fix-include-directory.patch | 24 +---- ports/mongo-c-driver/fix-mingw.patch | 59 +++++------- ports/mongo-c-driver/pkgconfig.patch | 36 -------- ports/mongo-c-driver/portfile.cmake | 7 +- ports/mongo-c-driver/vcpkg.json | 2 +- ports/mongo-cxx-driver/fix-dependencies.patch | 55 +++++++++--- ports/mongo-cxx-driver/portfile.cmake | 8 +- ports/mongo-cxx-driver/vcpkg.json | 2 +- versions/baseline.json | 6 +- versions/l-/libbson.json | 5 ++ versions/m-/mongo-c-driver.json | 5 ++ versions/m-/mongo-cxx-driver.json | 5 ++ 17 files changed, 174 insertions(+), 234 deletions(-) delete mode 100644 ports/mongo-c-driver/pkgconfig.patch diff --git a/ports/libbson/fix-include-directory.patch b/ports/libbson/fix-include-directory.patch index 02a35320dcbb91..398644f90ccdab 100644 --- a/ports/libbson/fix-include-directory.patch +++ b/ports/libbson/fix-include-directory.patch @@ -1,33 +1,13 @@ diff --git a/src/libbson/CMakeLists.txt b/src/libbson/CMakeLists.txt -index 88de79a..c3cfd7e 100644 +index e3eaca4..ef3644b 100644 --- a/src/libbson/CMakeLists.txt +++ b/src/libbson/CMakeLists.txt -@@ -347,7 +347,7 @@ if (ENABLE_EXAMPLES) - endif () # ENABLE_EXAMPLES +@@ -302,7 +302,7 @@ endif () # ENABLE_EXAMPLES + # 8888888 888 888 88888P' "Y888 "Y888888 888 888 set (BSON_HEADER_INSTALL_DIR - "${CMAKE_INSTALL_INCLUDEDIR}/libbson-${BSON_API_VERSION}" + "${CMAKE_INSTALL_INCLUDEDIR}" ) - - if (MONGOC_ENABLE_STATIC_INSTALL) -diff --git a/src/libbson/src/libbson-1.0.pc.in b/src/libbson/src/libbson-1.0.pc.in -index b65abbc..33346f3 100644 ---- a/src/libbson/src/libbson-1.0.pc.in -+++ b/src/libbson/src/libbson-1.0.pc.in -@@ -7,4 +7,4 @@ Name: libbson - Description: The libbson BSON serialization library. - Version: @VERSION@ - Libs: -L${libdir} -lbson-@BSON_API_VERSION@ --Cflags: -I${includedir}/libbson-@BSON_API_VERSION@ -+Cflags: -I${includedir} -diff --git a/src/libbson/src/libbson-static-1.0.pc.in b/src/libbson/src/libbson-static-1.0.pc.in -index 6ee58d0..e03a95b 100644 ---- a/src/libbson/src/libbson-static-1.0.pc.in -+++ b/src/libbson/src/libbson-static-1.0.pc.in -@@ -7,4 +7,4 @@ Name: libbson static archive - Description: The libbson BSON serialization library. - Version: @VERSION@ - Libs: -L${libdir} -lbson-static-@BSON_API_VERSION@ @LIBBSON_LIBRARIES@ --Cflags: -I${includedir}/libbson-@BSON_API_VERSION@ -DBSON_STATIC -+Cflags: -I${includedir} -DBSON_STATIC + function(install_export_target target) + # Tell pkg-config where the headers are going: diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index 38341d152ec0a6..cc936f85419ce3 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -6,19 +6,20 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mongodb/mongo-c-driver REF "${VERSION}" - SHA512 242416638bf6722ccda67ecc15cf78f8531f1a4ae0e89fd66cde74221d7b98b859442f5b70628802972961e69156fd7afcc916d7a83cc134d5723eb0b6e15cc9 + SHA512 e0f15a8a45ff156136251f1a0e5d0cc2b0253ba9dbf062a6eaef73e02c3b7999d3af31a9eb2ebf2c141e5b2367e356b3ea56b8eb083a5097d88f81bbc4f0be23 HEAD_REF master PATCHES - disable-dynamic-when-static.patch fix-include-directory.patch # vcpkg legacy decision - fix-missing-header.patch # for building mongo-c-driver ) file(WRITE "${SOURCE_PATH}/VERSION_CURRENT" "${VERSION}") # Cannot use string(COMPARE EQUAL ...) set(ENABLE_STATIC OFF) +set(ENABLE_SHARED OFF) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(ENABLE_STATIC ON) +else() + set(ENABLE_SHARED ON) endif() vcpkg_cmake_configure( @@ -33,10 +34,13 @@ vcpkg_cmake_configure( -DENABLE_SRV=OFF -DENABLE_SSL=OFF -DENABLE_STATIC=${ENABLE_STATIC} + -DENABLE_SHARED=${ENABLE_SHARED} -DENABLE_TESTS=OFF -DENABLE_UNINSTALL=OFF -DENABLE_ZLIB=SYSTEM -DENABLE_ZSTD=OFF + MAYBE_UNUSED_VARIABLES + ENABLE_ICU ) vcpkg_cmake_install() vcpkg_copy_pdbs() diff --git a/ports/libbson/vcpkg.json b/ports/libbson/vcpkg.json index ba4d23c8a9676c..452f0dc41ebdb0 100644 --- a/ports/libbson/vcpkg.json +++ b/ports/libbson/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libbson", - "version": "1.24.3", + "version": "1.25.1", "description": "libbson is a library providing useful routines related to building, parsing, and iterating BSON documents.", "homepage": "https://github.com/mongodb/mongo-c-driver/tree/master/src/libbson", "license": null, diff --git a/ports/mongo-c-driver/disable-dynamic-when-static.patch b/ports/mongo-c-driver/disable-dynamic-when-static.patch index 4404dfcad42cf3..e40742cdb237be 100644 --- a/ports/mongo-c-driver/disable-dynamic-when-static.patch +++ b/ports/mongo-c-driver/disable-dynamic-when-static.patch @@ -1,37 +1,38 @@ diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt -index bf95bd0c1..c9900b7fa 100644 +index 61cae9c..5f553c5 100644 --- a/src/libmongoc/CMakeLists.txt +++ b/src/libmongoc/CMakeLists.txt -@@ -745,6 +745,7 @@ if (MONGOC_ENABLE_STATIC_BUILD) +@@ -812,6 +812,7 @@ if (MONGOC_ENABLE_STATIC_BUILD) set_target_properties (mcd_rpc PROPERTIES OUTPUT_NAME "mcd-rpc") endif () - + +if (NOT MONGOC_ENABLE_STATIC_BUILD) add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) - target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) -@@ -786,7 +787,7 @@ target_include_directories ( - set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) - set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-${MONGOC_API_VERSION}") - + if(WIN32) + # Add resource-definition script for Windows shared library (.dll). +@@ -865,7 +866,7 @@ set_target_properties (mongoc_shared PROPERTIES + ) + mongo_generate_pkg_config(mongoc_shared INSTALL RENAME libmongoc-${MONGOC_API_VERSION}.pc) + -if (MONGOC_ENABLE_STATIC_BUILD) +else() add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - if(ENABLE_COVERAGE) - target_compile_options(mongoc_static PRIVATE --coverage) -@@ -840,7 +841,11 @@ if (ENABLE_APPLE_FRAMEWORK) + target_link_libraries (mongoc_static PUBLIC ${STATIC_LIBRARIES} ${BSON_STATIC_LIBRARIES} mongo::detail::c_dependencies) + if (NOT WIN32 AND ENABLE_PIC) +@@ -934,7 +935,11 @@ if (ENABLE_APPLE_FRAMEWORK) endif () - + add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) +-target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) +if (NOT MONGOC_ENABLE_STATIC_BUILD) - target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) ++ target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) +else() -+target_link_libraries (mongoc-stat mongoc_static ${LIBRARIES}) ++ target_link_libraries (mongoc-stat mongoc_static ${LIBRARIES}) +endif() - + # mongoc-stat works if shared memory performance counters are enabled. if (ENABLE_SHM_COUNTERS) -@@ -1161,7 +1166,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} +@@ -1244,7 +1249,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) if (MONGOC_ENABLE_STATIC_INSTALL) @@ -40,33 +41,19 @@ index bf95bd0c1..c9900b7fa 100644 else () set (TARGETS_TO_INSTALL mongoc_shared) endif () -@@ -1226,10 +1231,12 @@ configure_file ( - ${CMAKE_CURRENT_SOURCE_DIR}/src/libmongoc-1.0.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/src/libmongoc-1.0.pc - @ONLY) +@@ -1299,6 +1304,7 @@ endif() + # Relative include-path will be given the install prefix: + set_property(TARGET ${TARGETS_TO_INSTALL} APPEND PROPERTY pkg_config_INCLUDE_DIRECTORIES "${MONGOC_HEADER_INSTALL_DIR}") + +if(NOT MONGOC_ENABLE_STATIC_INSTALL) - install ( - FILES ${CMAKE_CURRENT_BINARY_DIR}/src/libmongoc-1.0.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - ) -+endif() - if (MONGOC_ENABLE_STATIC_INSTALL) - configure_file ( - ${CMAKE_CURRENT_SOURCE_DIR}/src/libmongoc-static-1.0.pc.in -@@ -1239,7 +1246,7 @@ if (MONGOC_ENABLE_STATIC_INSTALL) - FILES ${CMAKE_CURRENT_BINARY_DIR}/src/libmongoc-static-1.0.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - ) --endif () -+else() # Deprecated alias for libmongoc-1.0.pc, see CDRIVER-2086. if (MONGOC_ENABLE_SSL) configure_file ( -@@ -1251,6 +1258,7 @@ if (MONGOC_ENABLE_SSL) +@@ -1310,6 +1316,7 @@ if (MONGOC_ENABLE_SSL) DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) endif () -+endif() ++endif () include (CMakePackageConfigHelpers) - set (INCLUDE_INSTALL_DIRS "${MONGOC_HEADER_INSTALL_DIR}") + diff --git a/ports/mongo-c-driver/fix-dependencies.patch b/ports/mongo-c-driver/fix-dependencies.patch index 90c9585c559a48..2cb09d59132c22 100644 --- a/ports/mongo-c-driver/fix-dependencies.patch +++ b/ports/mongo-c-driver/fix-dependencies.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 71c13fd..8464824 100644 +index 1fe4c76..96be699 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -205,11 +205,9 @@ if (ENABLE_BSON STREQUAL SYSTEM) +@@ -347,11 +347,9 @@ if (USE_SYSTEM_LIBBSON) set (USING_SYSTEM_BSON TRUE) if (NOT TARGET mongo::bson_shared) @@ -14,11 +14,39 @@ index 71c13fd..8464824 100644 endif () set (BSON_STATIC_LIBRARIES mongo::bson_static) endif () +diff --git a/build/cmake/libmongoc-1.0-config.cmake.in b/build/cmake/libmongoc-1.0-config.cmake.in +index a068408..d0aeadd 100644 +--- a/build/cmake/libmongoc-1.0-config.cmake.in ++++ b/build/cmake/libmongoc-1.0-config.cmake.in +@@ -24,6 +24,9 @@ set (MONGOC_VERSION_FULL @libmongoc_VERSION_FULL@) + + include(CMakeFindDependencyMacro) + find_dependency (mongoc-1.0) ++if("@ENABLE_SNAPPY@" STREQUAL "ON") ++ find_dependency(Snappy CONFIG) ++endif() + + set(MONGOC_LIBRARY mongo::mongoc_shared) + set(MONGOC_LIBRARIES mongo::mongoc_shared) +diff --git a/build/cmake/libmongoc-static-1.0-config.cmake.in b/build/cmake/libmongoc-static-1.0-config.cmake.in +index bec3163..a32d5f3 100644 +--- a/build/cmake/libmongoc-static-1.0-config.cmake.in ++++ b/build/cmake/libmongoc-static-1.0-config.cmake.in +@@ -24,6 +24,9 @@ set (MONGOC_STATIC_VERSION_FULL @libmongoc_VERSION_FULL@) + + include(CMakeFindDependencyMacro) + find_dependency (mongoc-1.0) ++if("@ENABLE_SNAPPY@" STREQUAL "ON") ++ find_dependency(Snappy CONFIG) ++endif() + + set(MONGOC_STATIC_LIBRARY mongo::mongoc_static) + set(MONGOC_STATIC_LIBRARIES mongo::mongoc_static) diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt -index d108e5d..a097016 100644 +index 5f553c5..4675313 100644 --- a/src/libmongoc/CMakeLists.txt +++ b/src/libmongoc/CMakeLists.txt -@@ -51,7 +51,7 @@ configure_file ( +@@ -50,7 +50,7 @@ endif () set (ZLIB_INCLUDE_DIRS "") if (ENABLE_ZLIB MATCHES "SYSTEM|AUTO") message (STATUS "Searching for zlib CMake packages") @@ -27,16 +55,7 @@ index d108e5d..a097016 100644 if (ZLIB_FOUND) message (STATUS " zlib found version \"${ZLIB_VERSION_STRING}\"") message (STATUS " zlib include path \"${ZLIB_INCLUDE_DIRS}\"") -@@ -146,7 +146,7 @@ if (NOT ENABLE_SSL STREQUAL OFF) - if (ENABLE_SSL STREQUAL "OPENSSL" - OR (NOT APPLE AND NOT WIN32 AND ENABLE_SSL STREQUAL "AUTO")) - # Sets OPENSSL_FOUND on success. -- include (FindOpenSSL) -+ find_package(OpenSSL REQUIRED) - endif () - - if (ENABLE_SSL STREQUAL LIBRESSL) -@@ -364,10 +364,10 @@ else () +@@ -468,10 +468,10 @@ else () endif () # Sets SNAPPY_LIBRARIES and SNAPPY_INCLUDE_DIRS. @@ -49,45 +68,17 @@ index d108e5d..a097016 100644 - include_directories ("${SNAPPY_INCLUDE_DIRS}") endif () - set (MONGOC_ENABLE_SHM_COUNTERS 0) -diff --git a/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in b/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in -index feeca02..1ec92ae 100644 ---- a/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in -+++ b/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in -@@ -19,6 +19,10 @@ set (MONGOC_MINOR_VERSION @MONGOC_MINOR_VERSION@) - set (MONGOC_MICRO_VERSION @MONGOC_MICRO_VERSION@) - set (MONGOC_VERSION @MONGOC_VERSION@) - -+include(CMakeFindDependencyMacro) -+if("@ENABLE_SNAPPY@" STREQUAL "ON") -+ find_dependency(Snappy CONFIG) -+endif() - find_package (libbson-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED) - - @PACKAGE_INIT@ -diff --git a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in b/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in -index 6f05b0c..0e388e6 100644 ---- a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in -+++ b/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in -@@ -19,6 +19,10 @@ set (MONGOC_STATIC_MINOR_VERSION @MONGOC_MINOR_VERSION@) - set (MONGOC_STATIC_MICRO_VERSION @MONGOC_MICRO_VERSION@) - set (MONGOC_STATIC_VERSION @MONGOC_VERSION@) - -+include(CMakeFindDependencyMacro) -+if("@ENABLE_SNAPPY@" STREQUAL "ON") -+ find_dependency(Snappy CONFIG) -+endif() - find_package (libbson-static-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED) - - @PACKAGE_INIT@ + mongo_bool01 (MONGOC_ENABLE_SHM_COUNTERS ENABLE_SHM_COUNTERS) diff --git a/src/libmongoc/src/mongoc-config.cmake b/src/libmongoc/src/mongoc-config.cmake -index 7fe7cf4..12611a3 100644 +index 31e6cbc..365fb5b 100644 --- a/src/libmongoc/src/mongoc-config.cmake +++ b/src/libmongoc/src/mongoc-config.cmake -@@ -1,3 +1,6 @@ +@@ -1,5 +1,8 @@ include(CMakeFindDependencyMacro) + find_dependency(bson-1.0 @libmongoc_VERSION@) +if("@ENABLE_SNAPPY@" STREQUAL "ON") + find_dependency(Snappy CONFIG) +endif() - find_dependency(bson-1.0 @MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@.@MONGOC_MICRO_VERSION@) - include("${CMAKE_CURRENT_LIST_DIR}/mongoc-targets.cmake") + + # If we need to import a TLS package for our imported targets, do that now: + set(MONGOC_TLS_BACKEND [[@TLS_BACKEND@]]) diff --git a/ports/mongo-c-driver/fix-include-directory.patch b/ports/mongo-c-driver/fix-include-directory.patch index 411604fe36f129..965f1d17a2f5ea 100644 --- a/ports/mongo-c-driver/fix-include-directory.patch +++ b/ports/mongo-c-driver/fix-include-directory.patch @@ -1,8 +1,8 @@ diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt -index 86f59ae..d108e5d 100644 +index 4675313..847e073 100644 --- a/src/libmongoc/CMakeLists.txt +++ b/src/libmongoc/CMakeLists.txt -@@ -1172,7 +1172,7 @@ else () +@@ -1255,7 +1255,7 @@ else () endif () set (MONGOC_HEADER_INSTALL_DIR @@ -11,23 +11,3 @@ index 86f59ae..d108e5d 100644 ) install ( -diff --git a/src/libmongoc/src/libmongoc-1.0.pc.in b/src/libmongoc/src/libmongoc-1.0.pc.in -index 1b489d8..991603e 100644 ---- a/src/libmongoc/src/libmongoc-1.0.pc.in -+++ b/src/libmongoc/src/libmongoc-1.0.pc.in -@@ -8,4 +8,4 @@ Description: The libmongoc MongoDB client library. - Version: @VERSION@ - Requires: libbson-1.0 - Libs: -L${libdir} -lmongoc-1.0 --Cflags: -I${includedir}/libmongoc-@MONGOC_API_VERSION@ -+Cflags: -I${includedir} -diff --git a/src/libmongoc/src/libmongoc-static-1.0.pc.in b/src/libmongoc/src/libmongoc-static-1.0.pc.in -index d59ee64..c23bb62 100644 ---- a/src/libmongoc/src/libmongoc-static-1.0.pc.in -+++ b/src/libmongoc/src/libmongoc-static-1.0.pc.in -@@ -8,4 +8,4 @@ Description: The libmongoc MongoDB client library. - Version: @VERSION@ - Requires: libbson-static-1.0 - Libs: -L${libdir} -lmongoc-static-1.0 @MONGOC_LIBRARIES@ --Cflags: -I${includedir}/libmongoc-@MONGOC_API_VERSION@ -DMONGOC_STATIC -+Cflags: -I${includedir}/libmongoc -DMONGOC_STATIC diff --git a/ports/mongo-c-driver/fix-mingw.patch b/ports/mongo-c-driver/fix-mingw.patch index 2695cea12af271..4ff5c8658e4870 100644 --- a/ports/mongo-c-driver/fix-mingw.patch +++ b/ports/mongo-c-driver/fix-mingw.patch @@ -1,55 +1,42 @@ -diff --git a/build/cmake/FindResSearch.cmake b/build/cmake/FindResSearch.cmake -index fcd791b..346f715 100644 ---- a/build/cmake/FindResSearch.cmake -+++ b/build/cmake/FindResSearch.cmake -@@ -2,7 +2,7 @@ include (CheckSymbolExists) - - if (ENABLE_SRV STREQUAL ON OR ENABLE_SRV STREQUAL AUTO) - if (WIN32) -- set (RESOLV_LIBRARIES Dnsapi) -+ set (RESOLV_LIBRARIES dnsapi) - set (MONGOC_HAVE_DNSAPI 1) - set (MONGOC_HAVE_RES_NSEARCH 0) - set (MONGOC_HAVE_RES_NDESTROY 0) diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt -index 2e1f854..95e6b6b 100644 +index 847e073..5338bea 100644 --- a/src/libmongoc/CMakeLists.txt +++ b/src/libmongoc/CMakeLists.txt -@@ -688,7 +688,7 @@ if (NOT ENABLE_SSL STREQUAL OFF) - ${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-stream-tls-secure-channel.c - ${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-secure-channel.c - ) -- set (SSL_LIBRARIES secur32.lib crypt32.lib Bcrypt.lib) -+ set (SSL_LIBRARIES secur32.lib crypt32.lib bcrypt.lib) - elseif (LIBRESSL) - message (STATUS "Compiling against LibreSSL") - set (SOURCES ${SOURCES} -@@ -714,7 +714,7 @@ if (MONGOC_ENABLE_SASL) - message (STATUS "Compiling against Windows SSPI") - set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-cluster-sspi.c) - set (SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/src/mongoc/mongoc-sspi.c) -- set (SASL_LIBRARIES secur32.lib crypt32.lib Shlwapi.lib) -+ set (SASL_LIBRARIES secur32.lib crypt32.lib shlwapi.lib) - endif () - else () - message (STATUS "SASL disabled") +@@ -189,7 +189,7 @@ endfunction() + # Per-backend link libs/options: + set(SecureTransport/LINK_LIBRARIES "-framework CoreFoundation" "-framework Security") + set(SecureTransport/pkg_config_LIBS -framework Corefoundation -framework Security) +-set(SecureChannel/LINK_LIBRARIES secur32.lib crypt32.lib Bcrypt.lib) ++set(SecureChannel/LINK_LIBRARIES secur32.lib crypt32.lib bcrypt.lib) + set(SecureChannel/pkg_config_LIBS ${SecureChannel/LINK_LIBRARIES}) + set(LibreSSL/LINK_LIBRARIES LibreSSL::TLS LibreSSL::Crypto) + set(LibreSSL/pkg_config_LIBS -ltls -lcrypto) +@@ -340,7 +340,7 @@ function(_use_sasl libname) + target_link_libraries(_mongoc-dependencies INTERFACE _mongoc-sasl_backend) + install(TARGETS _mongoc-sasl_backend EXPORT mongoc-targets) + if(libname STREQUAL "SSPI") +- target_link_libraries(_mongoc-sasl_backend INTERFACE secur32.lib crypt32.lib Shlwapi.lib) ++ target_link_libraries(_mongoc-sasl_backend INTERFACE secur32.lib crypt32.lib shlwapi.lib) + set(backend "SSPI") + elseif(libname STREQUAL "CYRUS") + find_package(SASL2 2.0 REQUIRED) diff --git a/src/libmongoc/src/mongoc/mongoc-client.c b/src/libmongoc/src/mongoc/mongoc-client.c -index 457c841..7b6d585 100644 +index 15517e6..00cd017 100644 --- a/src/libmongoc/src/mongoc/mongoc-client.c +++ b/src/libmongoc/src/mongoc/mongoc-client.c -@@ -19,8 +19,8 @@ +@@ -18,8 +18,8 @@ #include "mongoc-config.h" #ifdef MONGOC_HAVE_DNSAPI /* for DnsQuery_UTF8 */ -#include -#include +#include -+#include ++#include #include #else #if defined(MONGOC_HAVE_RES_NSEARCH) || defined(MONGOC_HAVE_RES_SEARCH) diff --git a/src/libmongoc/src/mongoc/mongoc-socket.c b/src/libmongoc/src/mongoc/mongoc-socket.c -index e085adb..592bc89 100644 +index a77d805..15d39b4 100644 --- a/src/libmongoc/src/mongoc/mongoc-socket.c +++ b/src/libmongoc/src/mongoc/mongoc-socket.c @@ -25,7 +25,7 @@ diff --git a/ports/mongo-c-driver/pkgconfig.patch b/ports/mongo-c-driver/pkgconfig.patch deleted file mode 100644 index 65a94c20bc8834..00000000000000 --- a/ports/mongo-c-driver/pkgconfig.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt -index 1b32e6c..2e1f854 100644 ---- a/src/libmongoc/CMakeLists.txt -+++ b/src/libmongoc/CMakeLists.txt -@@ -1207,6 +1207,22 @@ set (VERSION "${MONGOC_VERSION}") - set (prefix "${CMAKE_INSTALL_PREFIX}") - set (libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}") - -+set(MONGOC_REQUIRES_PRIVATE zlib) -+set(ZLIB_LIBRARIES "") -+if(ENABLE_SSL STREQUAL "OPENSSL") -+ string(APPEND MONGOC_REQUIRES_PRIVATE " openssl") -+ set(SSL_LIBRARIES "") -+endif() -+if(ENABLE_ICU) -+ string(APPEND MONGOC_REQUIRES_PRIVATE " icu-uc") -+ set(ICU_LIBRARIES "") -+endif() -+if(ENABLE_SNAPPY) -+ set(SNAPPY_LIBRARIES "-lsnappy") -+ if(CMAKE_BUILD_TYPE STREQUAL "Debug") -+ string(APPEND SNAPPY_LIBRARIES "d") -+ endif() -+endif() - foreach ( - FLAG - ${SASL_LIBRARIES} ${SSL_LIBRARIES} ${SHM_LIBRARIES} ${RESOLV_LIBRARIES} -diff --git a/src/libmongoc/src/libmongoc-static-1.0.pc.in b/src/libmongoc/src/libmongoc-static-1.0.pc.in -index c23bb62..7b38f0a 100644 ---- a/src/libmongoc/src/libmongoc-static-1.0.pc.in -+++ b/src/libmongoc/src/libmongoc-static-1.0.pc.in -@@ -9,3 +9,4 @@ Version: @VERSION@ - Requires: libbson-static-1.0 - Libs: -L${libdir} -lmongoc-static-1.0 @MONGOC_LIBRARIES@ - Cflags: -I${includedir}/libmongoc -DMONGOC_STATIC -+Requires.private: @MONGOC_REQUIRES_PRIVATE@ diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index f04c6575adb457..5f87c1aa7bb7cb 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -6,14 +6,13 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mongodb/mongo-c-driver REF "${VERSION}" - SHA512 242416638bf6722ccda67ecc15cf78f8531f1a4ae0e89fd66cde74221d7b98b859442f5b70628802972961e69156fd7afcc916d7a83cc134d5723eb0b6e15cc9 + SHA512 e0f15a8a45ff156136251f1a0e5d0cc2b0253ba9dbf062a6eaef73e02c3b7999d3af31a9eb2ebf2c141e5b2367e356b3ea56b8eb083a5097d88f81bbc4f0be23 HEAD_REF master PATCHES disable-dynamic-when-static.patch - fix-include-directory.patch # vcpkg legacy decision fix-dependencies.patch + fix-include-directory.patch fix-mingw.patch - pkgconfig.patch ) file(WRITE "${SOURCE_PATH}/VERSION_CURRENT" "${VERSION}") @@ -56,6 +55,8 @@ vcpkg_cmake_configure( -DENABLE_UNINSTALL=OFF -DENABLE_ZLIB=SYSTEM -DVCPKG_HOST_TRIPLET=${HOST_TRIPLET} # for host pkgconf in PATH + MAYBE_UNUSED_VARIABLES + ENABLE_ICU ) vcpkg_cmake_install() vcpkg_copy_pdbs() diff --git a/ports/mongo-c-driver/vcpkg.json b/ports/mongo-c-driver/vcpkg.json index ef533e5213f55c..e22eb9e88ee0e0 100644 --- a/ports/mongo-c-driver/vcpkg.json +++ b/ports/mongo-c-driver/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mongo-c-driver", - "version": "1.24.3", + "version": "1.25.1", "description": "Client library written in C for MongoDB.", "homepage": "https://github.com/mongodb/mongo-c-driver", "license": null, diff --git a/ports/mongo-cxx-driver/fix-dependencies.patch b/ports/mongo-cxx-driver/fix-dependencies.patch index 215a31a05625b7..8d94b5a7f98122 100644 --- a/ports/mongo-cxx-driver/fix-dependencies.patch +++ b/ports/mongo-cxx-driver/fix-dependencies.patch @@ -1,14 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a1b60bd..78c6907 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -100,7 +100,6 @@ if(NEED_DOWNLOAD_C_DRIVER) + set(BUILD_TESTING OFF) + string(REPLACE " -Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string(REPLACE " -Werror" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") +- add_subdirectory(${mongo-c-driver_SOURCE_DIR} ${mongo-c-driver_BINARY_DIR}) + set(CMAKE_CXX_FLAGS ${OLD_CMAKE_CXX_FLAGS}) + set(CMAKE_C_FLAGS ${OLD_CMAKE_C_FLAGS}) + set(ENABLE_TESTS ${OLD_ENABLE_TESTS}) diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt -index f30aea836..50610ffb1 100644 +index 1e241f5..adf9a27 100644 --- a/src/bsoncxx/CMakeLists.txt +++ b/src/bsoncxx/CMakeLists.txt -@@ -215,6 +215,9 @@ if(BSONCXX_BUILD_STATIC) - bsoncxx_install_deprecated_cmake(bsoncxx-static) - list(APPEND bsoncxx_target_list bsoncxx_static) - set(bsoncxx_pkg_dep "find_dependency(bson-1.0 REQUIRED)") -+ if(BSONCXX_POLY_USE_BOOST) -+ string(APPEND bsoncxx_pkg_dep "\nfind_dependency(Boost)") -+ endif() - endif() - if(BSONCXX_POLY_USE_BOOST) - set(bsoncxx_boost_pkg_dep "find_dependency(Boost 1.56.0 REQUIRED)") +@@ -105,7 +105,7 @@ else() + else() + # Require package of old libbson name (with lib). + if(NOT BSONCXX_LINK_WITH_STATIC_MONGOC) +- find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} REQUIRED) ++ find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED) + message(STATUS "found libbson version ${BSON_VERSION}") + set(libbson_target ${BSON_LIBRARIES}) + set(libbson_include_directories ${BSON_INCLUDE_DIRS}) +diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt +index 4fe323f..2e27410 100644 +--- a/src/mongocxx/CMakeLists.txt ++++ b/src/mongocxx/CMakeLists.txt +@@ -41,7 +41,7 @@ if(TARGET mongoc_shared OR TARGET mongoc_static) + set(MONGOCXX_PKG_DEP "find_dependency(mongoc-${LIBMONGOC_REQUIRED_ABI_VERSION} REQUIRED)") + else() + # Attempt to find libmongoc by new package name (without lib). +- find_package(mongoc-${LIBMONGOC_REQUIRED_ABI_VERSION} ${LIBMONGOC_REQUIRED_VERSION} QUIET) ++ find_package(mongoc-${LIBMONGOC_REQUIRED_ABI_VERSION} CONFIG REQUIRED) + + if(mongoc-${LIBMONGOC_REQUIRED_ABI_VERSION}_FOUND) + message(STATUS "found libmongoc version ${mongoc-${LIBMONGOC_REQUIRED_ABI_VERSION}_VERSION}") +@@ -56,7 +56,7 @@ else() + else() + # Require package of old libmongoc name (with lib). + if(NOT MONGOCXX_LINK_WITH_STATIC_MONGOC) +- find_package(libmongoc-${LIBMONGOC_REQUIRED_ABI_VERSION} ${LIBMONGOC_REQUIRED_VERSION} REQUIRED) ++ find_package(libmongoc-${LIBMONGOC_REQUIRED_ABI_VERSION} REQUIRED) + message(STATUS "found libmongoc version ${MONGOC_VERSION}") + set(libmongoc_target ${MONGOC_LIBRARIES}) + set(libmongoc_definitions ${MONGOC_DEFINITIONS}) diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index c943f3e4d06b47..de8e1752e196a8 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -2,7 +2,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mongodb/mongo-cxx-driver REF "r${VERSION}" - SHA512 f9f0d83ee2ef1f3c2dae1f3663b893d819737d4e646d0137fb623b84663382eb93ab36123c2a85247f43ae979a95276fa231d5da8ad62a6da002ab9daecaa0d4 + SHA512 34ff303d496dd2c9b8cada16dc215c40fddccfe660bdc7fe59c92449861876b820c3ea4e3e5c91029e0322411bbe98a11cb1f3fa046b028d92d3c9a3509ce988 HEAD_REF master PATCHES fix-dependencies.patch @@ -30,6 +30,8 @@ vcpkg_cmake_configure( -DMONGOCXX_HEADER_INSTALL_DIR=include MAYBE_UNUSED_VARIABLES CMAKE_DISABLE_FIND_PACKAGE_Boost + BSONCXX_HEADER_INSTALL_DIR + MONGOCXX_HEADER_INSTALL_DIR ) vcpkg_cmake_install() vcpkg_copy_pdbs() @@ -38,12 +40,8 @@ vcpkg_fixup_pkgconfig() vcpkg_cmake_config_fixup(PACKAGE_NAME "bsoncxx" CONFIG_PATH "lib/cmake/bsoncxx-${VERSION}" DO_NOT_DELETE_PARENT_CONFIG_PATH) vcpkg_cmake_config_fixup(PACKAGE_NAME "mongocxx" CONFIG_PATH "lib/cmake/mongocxx-${VERSION}" DO_NOT_DELETE_PARENT_CONFIG_PATH) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/export.hpp" - "#define BSONCXX_API_H" "#define BSONCXX_API_H\n#ifndef BSONCXX_STATIC\n#define BSONCXX_STATIC\n#endif") vcpkg_cmake_config_fixup(PACKAGE_NAME "libbsoncxx-static" CONFIG_PATH "lib/cmake/libbsoncxx-static-${VERSION}" DO_NOT_DELETE_PARENT_CONFIG_PATH) file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/libbsoncxx-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libbsoncxx") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mongocxx/config/export.hpp" - "#define MONGOCXX_API_H" "#define MONGOCXX_API_H\n#ifndef MONGOCXX_STATIC\n#define MONGOCXX_STATIC\n#endif") vcpkg_cmake_config_fixup(PACKAGE_NAME "libmongocxx-static" CONFIG_PATH "lib/cmake/libmongocxx-static-${VERSION}") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/libmongocxx-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libmongocxx") else() diff --git a/ports/mongo-cxx-driver/vcpkg.json b/ports/mongo-cxx-driver/vcpkg.json index 76231b86e6e257..4cc9f79cf5f8a3 100644 --- a/ports/mongo-cxx-driver/vcpkg.json +++ b/ports/mongo-cxx-driver/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mongo-cxx-driver", - "version": "3.8.0", + "version": "3.9.0", "description": "MongoDB C++ Driver.", "homepage": "https://github.com/mongodb/mongo-cxx-driver", "license": "Apache-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index d63cb4d05b7326..e1fb2a7402d6c3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4081,7 +4081,7 @@ "port-version": 4 }, "libbson": { - "baseline": "1.24.3", + "baseline": "1.25.1", "port-version": 0 }, "libcaer": { @@ -5617,11 +5617,11 @@ "port-version": 2 }, "mongo-c-driver": { - "baseline": "1.24.3", + "baseline": "1.25.1", "port-version": 0 }, "mongo-cxx-driver": { - "baseline": "3.8.0", + "baseline": "3.9.0", "port-version": 0 }, "mongoose": { diff --git a/versions/l-/libbson.json b/versions/l-/libbson.json index 0fe63b070037c3..97503458d6da80 100644 --- a/versions/l-/libbson.json +++ b/versions/l-/libbson.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9cc5cb4ec6ee37e4a07e65f6e8aee04f83f535ec", + "version": "1.25.1", + "port-version": 0 + }, { "git-tree": "3a3f08e9e91a77ee7b6b56f88d1e0013349c34e1", "version": "1.24.3", diff --git a/versions/m-/mongo-c-driver.json b/versions/m-/mongo-c-driver.json index f94ce8b967aaba..e3f820205649b6 100644 --- a/versions/m-/mongo-c-driver.json +++ b/versions/m-/mongo-c-driver.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7bc0eb795e698bac0f4d77bed4b6ecbde0f57857", + "version": "1.25.1", + "port-version": 0 + }, { "git-tree": "c9ddb78bc06cb779848d6afffa88938870ae8a7b", "version": "1.24.3", diff --git a/versions/m-/mongo-cxx-driver.json b/versions/m-/mongo-cxx-driver.json index 8808aec2439b76..fe043b3f171e5f 100644 --- a/versions/m-/mongo-cxx-driver.json +++ b/versions/m-/mongo-cxx-driver.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9682855a28fdd67511a8b454e361f4a7841584a8", + "version": "3.9.0", + "port-version": 0 + }, { "git-tree": "d8fc862744aad29acd0e6a0d947fc5b561d3f5f7", "version": "3.8.0",