diff options
Diffstat (limited to 'ports/mongo-c-driver/fix-uwp.patch')
| -rw-r--r-- | ports/mongo-c-driver/fix-uwp.patch | 72 |
1 files changed, 68 insertions, 4 deletions
diff --git a/ports/mongo-c-driver/fix-uwp.patch b/ports/mongo-c-driver/fix-uwp.patch index 13c0a2299..59d67c6be 100644 --- a/ports/mongo-c-driver/fix-uwp.patch +++ b/ports/mongo-c-driver/fix-uwp.patch @@ -1,8 +1,72 @@ -diff --git a/src/mongoc/mongoc-gridfs-file.c b/src/mongoc/mongoc-gridfs-file.c +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5beb610..7e74ff7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,6 +55,7 @@ + + include(MaintainerFlags) + ++if ((NOT ENABLE_STATIC STREQUAL ON) AND (NOT ENABLE_STATIC STREQUAL AUTO)) + # 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") +@@ -67,12 +68,14 @@ + message ("-- libbson found version \"${BSON_VERSION}\"") + message ("-- libbson include path \"${BSON_INCLUDE_DIRS}\"") + message ("-- libbson libraries \"${BSON_LIBRARIES}\"") ++endif () + + if (ENABLE_STATIC STREQUAL ON OR ENABLE_STATIC STREQUAL AUTO) + find_package (libbson-static-1.0 + "${MONGOC_MAJOR_VERSION}.${MONGOC_MINOR_VERSION}.${MONGOC_MICRO_VERSION}" + HINTS +- ${BSON_ROOT_DIR}) ++ ${BSON_ROOT_DIR} ++ REQUIRED) + + if (ENABLE_STATIC STREQUAL ON AND NOT BSON_STATIC_LIBRARY) + message (FATAL_ERROR "Static libbson not found. Pass -DENABLE_STATIC=OFF") +@@ -627,6 +630,7 @@ + set (LIBS ${LIBS} ws2_32) + endif() + ++if (NOT MONGOC_ENABLE_STATIC) + add_library(mongoc_shared SHARED ${SOURCES} ${HEADERS}) + set_target_properties(mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) + target_link_libraries (mongoc_shared ${LIBS} ${BSON_LIBRARIES}) +@@ -638,6 +642,7 @@ + # This hack sets up standard symlink, libmongoc-1.0.so -> libmongoc-1.0.0.so + set_target_properties(mongoc_shared PROPERTIES VERSION 0 SOVERSION ${MONGOC_MAJOR_VERSION}) + set_target_properties(mongoc_shared PROPERTIES OUTPUT_NAME "mongoc-${MONGOC_API_VERSION}" PREFIX "lib") ++endif () + + if (MONGOC_ENABLE_STATIC) + add_library(mongoc_static STATIC ${SOURCES} ${HEADERS}) +@@ -804,6 +809,7 @@ + file(COPY ${SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR}/tests) + file(COPY ${SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) + ++if (NOT MONGOC_ENABLE_STATIC) + install( + TARGETS mongoc_shared ${EXAMPLES} + LIBRARY DESTINATION lib +@@ -810,10 +816,11 @@ + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + ) ++endif () + + if (MONGOC_ENABLE_STATIC) + install( +- TARGETS mongoc_shared mongoc_static ${EXAMPLES} ++ TARGETS mongoc_static ${EXAMPLES} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin index 5beb610..7e74ff7 100644 --- a/src/mongoc/mongoc-gridfs-file.c +++ b/src/mongoc/mongoc-gridfs-file.c -@@ -734,7 +734,7 @@ _mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file) +@@ -753,7 +753,7 @@ _mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file) bson_t query; bson_t child; bson_t opts; @@ -15,7 +79,7 @@ diff --git a/src/mongoc/mongoc-handshake.c b/src/mongoc/mongoc-handshake.c index 4e181bd..b274fc1 100644 --- a/src/mongoc/mongoc-handshake.c +++ b/src/mongoc/mongoc-handshake.c -@@ -195,7 +195,8 @@ _get_os_version (void) +@@ -243,7 +243,8 @@ _get_os_version (void) char *ret = bson_malloc (HANDSHAKE_OS_VERSION_MAX); bool found = false; @@ -29,7 +93,7 @@ diff --git a/src/mongoc/mongoc-util.c b/src/mongoc/mongoc-util.c index 6dbb26d..7f33780 100644 --- a/src/mongoc/mongoc-util.c +++ b/src/mongoc/mongoc-util.c -@@ -46,7 +46,11 @@ _mongoc_hex_md5 (const char *input) +@@ -69,7 +69,11 @@ _mongoc_hex_md5 (const char *input) void _mongoc_usleep (int64_t usec) { |
