From 29795780a1ba6331811a29152d3681391e2ae1a4 Mon Sep 17 00:00:00 2001 From: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:20:57 +0100 Subject: [PATCH] [vcpkg baseline][libbson] Fix race condition during CMake configure (#35586) * Delete unused patches * disable finding Python * Fix race during CMake configure * version --- .../libbson/disable-dynamic-when-static.patch | 44 ------------------- ports/libbson/fix-missing-header.patch | 12 ----- ports/libbson/portfile.cmake | 3 ++ ports/libbson/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libbson.json | 5 +++ 6 files changed, 10 insertions(+), 58 deletions(-) delete mode 100644 ports/libbson/disable-dynamic-when-static.patch delete mode 100644 ports/libbson/fix-missing-header.patch diff --git a/ports/libbson/disable-dynamic-when-static.patch b/ports/libbson/disable-dynamic-when-static.patch deleted file mode 100644 index 4bf375b05c17e7..00000000000000 --- a/ports/libbson/disable-dynamic-when-static.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/src/libbson/CMakeLists.txt b/src/libbson/CMakeLists.txt -index 61e926747..6b4c5a911 100644 ---- a/src/libbson/CMakeLists.txt -+++ b/src/libbson/CMakeLists.txt -@@ -205,6 +205,7 @@ set (HEADERS_FORWARDING - ${PROJECT_SOURCE_DIR}/src/bson/forwarding/bson.h - ) - -+if(NOT MONGOC_ENABLE_STATIC_BUILD) - add_library (bson_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) - if (MSVC AND MSVC_VERSION VERSION_LESS 1900) - message (STATUS "Disabling warning C4756 for VS 2013 and older") -@@ -282,6 +283,7 @@ if (WIN32) - # must be handled specially since we can't resolve them - set (BSON_SYSTEM_LIBRARIES ${BSON_SYSTEM_LIBRARIES} ws2_32) - endif () -+endif() - - if (MONGOC_ENABLE_STATIC_BUILD) - add_library (bson_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) -@@ -367,7 +369,7 @@ set (BSON_HEADER_INSTALL_DIR - ) - - if (MONGOC_ENABLE_STATIC_INSTALL) -- set (TARGETS_TO_INSTALL bson_shared bson_static) -+ set (TARGETS_TO_INSTALL bson_static) - else () - set (TARGETS_TO_INSTALL bson_shared) - endif () -@@ -418,12 +420,14 @@ configure_file ( - ${CMAKE_CURRENT_BINARY_DIR}/src/libbson-1.0.pc - @ONLY) - -+if(NOT MONGOC_ENABLE_STATIC_INSTALL) - install ( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/src/libbson-1.0.pc - DESTINATION - ${CMAKE_INSTALL_LIBDIR}/pkgconfig - ) -+endif() - - if (MONGOC_ENABLE_STATIC_INSTALL) - configure_file ( diff --git a/ports/libbson/fix-missing-header.patch b/ports/libbson/fix-missing-header.patch deleted file mode 100644 index eee0e1907bb244..00000000000000 --- a/ports/libbson/fix-missing-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/libbson/CMakeLists.txt b/src/libbson/CMakeLists.txt -index 61e926747..715b304c0 100644 ---- a/src/libbson/CMakeLists.txt -+++ b/src/libbson/CMakeLists.txt -@@ -181,6 +181,7 @@ set (HEADERS - ${PROJECT_SOURCE_DIR}/src/bson/bson-compat.h - ${PROJECT_SOURCE_DIR}/src/bson/bson-context.h - ${PROJECT_SOURCE_DIR}/src/bson/bson-decimal128.h -+ ${PROJECT_SOURCE_DIR}/src/bson/bson-dsl.h # mongo-c-driver build time only - ${PROJECT_SOURCE_DIR}/src/bson/bson-endian.h - ${PROJECT_SOURCE_DIR}/src/bson/bson-error.h - ${PROJECT_SOURCE_DIR}/src/bson/bson.h diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index e615cb7cf270ed..442999bbdc1449 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -24,6 +24,7 @@ endif() vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE # because it writes the file VERSION_CURRENT in the source directory OPTIONS "-DBUILD_VERSION=${VERSION}" -DENABLE_BSON=ON @@ -40,6 +41,8 @@ vcpkg_cmake_configure( -DENABLE_UNINSTALL=OFF -DENABLE_ZLIB=SYSTEM -DENABLE_ZSTD=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Python=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON MAYBE_UNUSED_VARIABLES ENABLE_ICU ) diff --git a/ports/libbson/vcpkg.json b/ports/libbson/vcpkg.json index 06a9579d8b7b78..923b9b9666d3e1 100644 --- a/ports/libbson/vcpkg.json +++ b/ports/libbson/vcpkg.json @@ -1,7 +1,7 @@ { "name": "libbson", "version": "1.25.1", - "port-version": 1, + "port-version": 2, "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/versions/baseline.json b/versions/baseline.json index 1277f02a011d78..c0083028087a4a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4110,7 +4110,7 @@ }, "libbson": { "baseline": "1.25.1", - "port-version": 1 + "port-version": 2 }, "libcaer": { "baseline": "3.3.15", diff --git a/versions/l-/libbson.json b/versions/l-/libbson.json index 43426bf14ca68d..df7f0eee42a727 100644 --- a/versions/l-/libbson.json +++ b/versions/l-/libbson.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "cefffe3ffeb41cff3720044ea92a8734c42dc31c", + "version": "1.25.1", + "port-version": 2 + }, { "git-tree": "4e2365e51faaf5bea56b3466e7c94342cb43a9e4", "version": "1.25.1",