mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 05:28:01 +08:00
Fixed port of mongo-c-driver/mongo-cxx-driver for android (#13850)
* Fixed port of mongo-c-driver/mongo-cxx-driver for android * mongo-c-driver - Default value of ENABLE_SHM_COUNTERS is AUTO * Use vcpkg provided variable VCPKG_TARGET_IS_ANDROID to detect android Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Increased port-version of mongo-c-driver * Increased port-version of mongo-cxx-driver Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
parent
26279b79d0
commit
98c5261b40
@ -1,5 +1,6 @@
|
||||
Source: mongo-c-driver
|
||||
Version: 1.16.1-1
|
||||
Port-Version: 1
|
||||
Build-Depends: libbson, openssl (!windows), zlib
|
||||
Description: Client library written in C for MongoDB.
|
||||
Homepage: https://github.com/mongodb/mongo-c-driver
|
||||
|
@ -28,6 +28,14 @@ else()
|
||||
set(ENABLE_SSL "OPENSSL")
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_ANDROID)
|
||||
set(ENABLE_SRV OFF)
|
||||
set(ENABLE_SHM_COUNTERS OFF)
|
||||
else()
|
||||
set(ENABLE_SRV AUTO)
|
||||
set(ENABLE_SHM_COUNTERS AUTO)
|
||||
endif()
|
||||
|
||||
file(READ ${CMAKE_CURRENT_LIST_DIR}/CONTROL _contents)
|
||||
string(REGEX MATCH "\nVersion:[ ]*[^ \n]+" _contents "${_contents}")
|
||||
string(REGEX REPLACE ".+Version:[ ]*([\\.0-9]+).*" "\\1" BUILD_VERSION "${_contents}")
|
||||
@ -41,6 +49,8 @@ vcpkg_configure_cmake(
|
||||
-DENABLE_BSON=SYSTEM
|
||||
-DENABLE_TESTS=OFF
|
||||
-DENABLE_EXAMPLES=OFF
|
||||
-DENABLE_SRV=${ENABLE_SRV}
|
||||
-DENABLE_SHM_COUNTERS=${ENABLE_SHM_COUNTERS}
|
||||
-DENABLE_SSL=${ENABLE_SSL}
|
||||
-DENABLE_ZLIB=SYSTEM
|
||||
-DENABLE_STATIC=${ENABLE_STATIC}
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: mongo-cxx-driver
|
||||
Version: 3.4.0-5
|
||||
Port-Version: 1
|
||||
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.
|
||||
|
13
ports/mongo-cxx-driver/fix-android.patch
Normal file
13
ports/mongo-cxx-driver/fix-android.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git "a/src/mongocxx/options/change_stream.cpp" "b/src/mongocxx/options/change_stream.cpp"
|
||||
index 2c651a7e0..2e9c34eb6 100644
|
||||
--- "a/src/mongocxx/options/change_stream.cpp"
|
||||
+++ "b/src/mongocxx/options/change_stream.cpp"
|
||||
@@ -108,7 +108,7 @@ bsoncxx::document::value change_stream::as_bson() const {
|
||||
if ((count < 0) || (count >= std::numeric_limits<std::uint32_t>::max())) {
|
||||
throw mongocxx::logic_error{mongocxx::error_code::k_invalid_parameter};
|
||||
}
|
||||
- out.append(bsoncxx::builder::basic::kvp("maxAwaitTimeMS", count));
|
||||
+ out.append(bsoncxx::builder::basic::kvp("maxAwaitTimeMS", static_cast<int64_t>(count)));
|
||||
}
|
||||
|
||||
return out.extract();
|
@ -16,6 +16,7 @@ vcpkg_from_github(
|
||||
fix-dependency-libbson.patch
|
||||
fix-dependency-mongocdriver.patch
|
||||
github-654.patch
|
||||
fix-android.patch
|
||||
)
|
||||
|
||||
if ("mnmlstc" IN_LIST FEATURES)
|
||||
|
Loading…
x
Reference in New Issue
Block a user