From d706cb6c16b8a523f6119ed13d2d867e82abb5fc Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 24 Apr 2026 07:02:00 +0900 Subject: [PATCH] [mongo-cxx-driver] update to 4.3.0 (#51351) --- ports/mongo-cxx-driver/portfile.cmake | 112 +++++++++++++------------- ports/mongo-cxx-driver/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/m-/mongo-cxx-driver.json | 5 ++ 4 files changed, 63 insertions(+), 58 deletions(-) diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index 28f3b5bf9d..4fb8701cc4 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -1,56 +1,56 @@ -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO mongodb/mongo-cxx-driver - REF "r${VERSION}" - SHA512 8a7c7d37120e97a8aafca5fea986b4e98e062466df7006ee311bb79bf0b16016a3d6070e18beffc236b145dfa86d5968aa66f5c4b8e6f0ba5683d960c695006f - HEAD_REF master - PATCHES - fix-dependencies.patch -) - -file(WRITE "${SOURCE_PATH}/build/VERSION_CURRENT" "${VERSION}") - -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" - OPTIONS - "-DCMAKE_PROJECT_MONGO_CXX_DRIVER_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake" - -DBSONCXX_HEADER_INSTALL_DIR=include - -DENABLE_TESTS=OFF - -DENABLE_UNINSTALL=OFF - -DMONGOCXX_HEADER_INSTALL_DIR=include - -DNEED_DOWNLOAD_C_DRIVER=OFF - MAYBE_UNUSED_VARIABLES - BSONCXX_HEADER_INSTALL_DIR - MONGOCXX_HEADER_INSTALL_DIR -) -vcpkg_cmake_install() -vcpkg_copy_pdbs() -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}") - -file(REMOVE_RECURSE - "${CURRENT_PACKAGES_DIR}/debug/include" - "${CURRENT_PACKAGES_DIR}/debug/share" -) - -function(auto_clean dir) - file(GLOB entries "${dir}/*") - file(GLOB files LIST_DIRECTORIES false "${dir}/*") - foreach(entry IN LISTS entries) - if(entry IN_LIST files) - continue() - endif() - file(GLOB_RECURSE children "${entry}/*") - if(children) - auto_clean("${entry}") - else() - file(REMOVE_RECURSE "${entry}") - endif() - endforeach() -endfunction() -auto_clean("${CURRENT_PACKAGES_DIR}/include") - -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/mongo-cxx-driver + REF "r${VERSION}" + SHA512 21592fd610bb1e75b6a2c0bcf476044aa84a651d301d035f4e36e99ca0ada5b4609411e90569a913a685d2cdb7d669e702e9bdabdbdfeb99a19b0cf168637a12 + HEAD_REF master + PATCHES + fix-dependencies.patch +) + +file(WRITE "${SOURCE_PATH}/build/VERSION_CURRENT" "${VERSION}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DCMAKE_PROJECT_MONGO_CXX_DRIVER_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake" + -DBSONCXX_HEADER_INSTALL_DIR=include + -DENABLE_TESTS=OFF + -DENABLE_UNINSTALL=OFF + -DMONGOCXX_HEADER_INSTALL_DIR=include + -DNEED_DOWNLOAD_C_DRIVER=OFF + MAYBE_UNUSED_VARIABLES + BSONCXX_HEADER_INSTALL_DIR + MONGOCXX_HEADER_INSTALL_DIR +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +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}") + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +function(auto_clean dir) + file(GLOB entries "${dir}/*") + file(GLOB files LIST_DIRECTORIES false "${dir}/*") + foreach(entry IN LISTS entries) + if(entry IN_LIST files) + continue() + endif() + file(GLOB_RECURSE children "${entry}/*") + if(children) + auto_clean("${entry}") + else() + file(REMOVE_RECURSE "${entry}") + endif() + endforeach() +endfunction() +auto_clean("${CURRENT_PACKAGES_DIR}/include") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/mongo-cxx-driver/vcpkg.json b/ports/mongo-cxx-driver/vcpkg.json index d2c1752ee2..013cd6ff03 100644 --- a/ports/mongo-cxx-driver/vcpkg.json +++ b/ports/mongo-cxx-driver/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mongo-cxx-driver", - "version": "4.1.4", + "version": "4.3.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 a0b7bf4e23..44522a5810 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6597,7 +6597,7 @@ "port-version": 0 }, "mongo-cxx-driver": { - "baseline": "4.1.4", + "baseline": "4.3.0", "port-version": 0 }, "mongoose": { diff --git a/versions/m-/mongo-cxx-driver.json b/versions/m-/mongo-cxx-driver.json index 2144ad11b8..bb322329fc 100644 --- a/versions/m-/mongo-cxx-driver.json +++ b/versions/m-/mongo-cxx-driver.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "23ca101312ac919b87c2c5cd9259c8efb806ace0", + "version": "4.3.0", + "port-version": 0 + }, { "git-tree": "43b553ec9e4eae1fd19f699dc73670a8de205514", "version": "4.1.4",