aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorFrancisco Facioni <francisco@remyrobotics.com>2021-06-09 23:45:10 +0200
committerGitHub <noreply@github.com>2021-06-09 14:45:10 -0700
commitd989c8b90070fd8b1b1239d5a057a12e3dd2e064 (patch)
tree413ef0e512ffaf6b2146b20c003d8e5a475518f5 /ports
parent38d2893b30d4d4b3c09485216ecf4f6e8ef35d88 (diff)
downloadvcpkg-d989c8b90070fd8b1b1239d5a057a12e3dd2e064.tar.gz
vcpkg-d989c8b90070fd8b1b1239d5a057a12e3dd2e064.zip
[libbson] fix cmake find (#14720)
Diffstat (limited to 'ports')
-rw-r--r--ports/libbson/portfile.cmake22
-rw-r--r--ports/mongo-c-driver/CONTROL4
-rw-r--r--ports/mongo-c-driver/fix-dependency-libbson.patch39
-rw-r--r--ports/mongo-cxx-driver/CONTROL2
-rw-r--r--ports/mongo-cxx-driver/fix-dependency-libbson.patch4
5 files changed, 39 insertions, 32 deletions
diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake
index 477f2eb67..7bd0bf8f7 100644
--- a/ports/libbson/portfile.cmake
+++ b/ports/libbson/portfile.cmake
@@ -43,9 +43,9 @@ vcpkg_copy_pdbs()
set(PORT_POSTFIX "1.0")
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-static-${PORT_POSTFIX} TARGET_PATH share/bson-${PORT_POSTFIX})
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-static-${PORT_POSTFIX} TARGET_PATH share/libbson-${PORT_POSTFIX})
else()
- vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-${PORT_POSTFIX} TARGET_PATH share/bson-${PORT_POSTFIX})
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-${PORT_POSTFIX} TARGET_PATH share/libbson-${PORT_POSTFIX})
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
@@ -66,20 +66,20 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/bson/bson-macros.h
"define BSON_API __declspec(dllimport)" "define BSON_API")
- file(RENAME ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/libbson-static-${PORT_POSTFIX}-config.cmake
- ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/bson-${PORT_POSTFIX}-config.cmake)
- file(RENAME ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/libbson-static-${PORT_POSTFIX}-config-version.cmake
- ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/bson-${PORT_POSTFIX}-config-version.cmake)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}/libbson-static-${PORT_POSTFIX}-config.cmake
+ ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config.cmake)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}/libbson-static-${PORT_POSTFIX}-config-version.cmake
+ ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config-version.cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
else()
- file(RENAME ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config.cmake
- ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/bson-${PORT_POSTFIX}-config.cmake)
- file(RENAME ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config-version.cmake
- ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/bson-${PORT_POSTFIX}-config-version.cmake)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config.cmake
+ ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config.cmake)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config-version.cmake
+ ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config-version.cmake)
endif()
-vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/bson-1.0/bson-1.0-config.cmake
+vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/libbson-1.0/libbson-1.0-config.cmake
"include/libbson-1.0" "include/")
file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson)
diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL
index 5cc9c336e..6472ce1a2 100644
--- a/ports/mongo-c-driver/CONTROL
+++ b/ports/mongo-c-driver/CONTROL
@@ -1,6 +1,6 @@
Source: mongo-c-driver
Version: 1.16.1
-Port-Version: 3
+Port-Version: 4
Build-Depends: libbson, openssl (!windows), zlib
Description: Client library written in C for MongoDB.
Homepage: https://github.com/mongodb/mongo-c-driver
@@ -11,4 +11,4 @@ Build-Depends: snappy
Feature: icu
Description: Enable ICU support, necessary to use non-ASCII usernames or passwords
-Build-Depends: icu \ No newline at end of file
+Build-Depends: icu
diff --git a/ports/mongo-c-driver/fix-dependency-libbson.patch b/ports/mongo-c-driver/fix-dependency-libbson.patch
index 68e7b2b9b..241121271 100644
--- a/ports/mongo-c-driver/fix-dependency-libbson.patch
+++ b/ports/mongo-c-driver/fix-dependency-libbson.patch
@@ -1,8 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1a2b7ba..7c939d6 100644
+index 1a2b7bad7..7ff8bbf32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -169,14 +169,6 @@ if (ENABLE_BSON STREQUAL SYSTEM)
+@@ -151,16 +151,15 @@ if (ENABLE_BSON STREQUAL SYSTEM)
+ # The input variable BSON_ROOT_DIR is respected for backwards compatibility,
+ # but you should use the standard CMAKE_PREFIX_PATH instead.
+ message (STATUS "Searching for libbson CMake packages")
+- find_package (bson-1.0
+- "${MONGOC_MAJOR_VERSION}.${MONGOC_MINOR_VERSION}.${MONGOC_MICRO_VERSION}"
++ find_package (libbson-1.0 CONFIG
+ HINTS
+ ${BSON_ROOT_DIR})
+
+- if (NOT bson-1.0_FOUND)
++ if (NOT libbson-1.0_FOUND)
+ message (FATAL_ERROR "System libbson not found")
+ endif ()
+
+- message ("-- libbson found version \"${bson-1.0_VERSION}\"")
++ message ("-- libbson found version \"${libbson-1.0_VERSION}\"")
+ message ("-- disabling test-libmongoc since using system libbson")
+ SET (ENABLE_TESTS OFF)
+
+@@ -169,14 +168,6 @@ if (ENABLE_BSON STREQUAL SYSTEM)
endif ()
set (USING_SYSTEM_BSON TRUE)
@@ -50,19 +70,6 @@ index 0f9e50c..797aaec 100644
target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES})
# mongoc-stat works if shared memory performance counters are enabled.
-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..62aa21a 100644
---- a/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in
-+++ b/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in
-@@ -19,7 +19,7 @@ set (MONGOC_MINOR_VERSION @MONGOC_MINOR_VERSION@)
- set (MONGOC_MICRO_VERSION @MONGOC_MICRO_VERSION@)
- set (MONGOC_VERSION @MONGOC_VERSION@)
-
--find_package (libbson-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED)
-+find_package (bson-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..113804e 100644
--- a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in
@@ -72,7 +79,7 @@ index 6f05b0c..113804e 100644
set (MONGOC_STATIC_VERSION @MONGOC_VERSION@)
-find_package (libbson-static-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED)
-+find_package (bson-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED)
++find_package (libbson-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED)
@PACKAGE_INIT@
diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL
index 0f5676012..c7b22bef1 100644
--- a/ports/mongo-cxx-driver/CONTROL
+++ b/ports/mongo-cxx-driver/CONTROL
@@ -1,6 +1,6 @@
Source: mongo-cxx-driver
Version: 3.4.0-5
-Port-Version: 1
+Port-Version: 2
Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility
Homepage: https://github.com/mongodb/mongo-cxx-driver
Description: MongoDB C++ Driver.
diff --git a/ports/mongo-cxx-driver/fix-dependency-libbson.patch b/ports/mongo-cxx-driver/fix-dependency-libbson.patch
index 405919c63..de9b9d7b6 100644
--- a/ports/mongo-cxx-driver/fix-dependency-libbson.patch
+++ b/ports/mongo-cxx-driver/fix-dependency-libbson.patch
@@ -7,7 +7,7 @@ index 69b53b3..655b33a 100644
if (BUILD_SHARED_LIBS)
- find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} REQUIRED)
-+ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED)
++ find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED)
set(libbson_libraries ${BSON_LIBRARIES})
set(libbson_include_directories ${BSON_INCLUDE_DIRS})
set(libbson_definitions ${BSON_DEFINITIONS})
@@ -16,7 +16,7 @@ index 69b53b3..655b33a 100644
- set(libbson_libraries ${BSON_STATIC_LIBRARIES})
- set(libbson_include_directories ${BSON_STATIC_INCLUDE_DIRS})
- set(libbson_definitions ${BSON_STATIC_DEFINITIONS})
-+ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED)
++ find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED)
+ set(libbson_libraries ${BSON_LIBRARIES})
+ set(libbson_include_directories ${BSON_INCLUDE_DIRS})
+ set(libbson_definitions ${BSON_DEFINITIONS})