aboutsummaryrefslogtreecommitdiff
path: root/ports/mongo-cxx-driver
diff options
context:
space:
mode:
authorLarry-Hu <v-daih@microsoft.com>2018-06-12 01:34:07 -0700
committerLarry-Hu <v-daih@microsoft.com>2018-06-12 01:34:07 -0700
commit9d0c7ca02e9eb72e3de06fe4b615e210874e4b11 (patch)
treef5fe6499627615d96299aeb7b2e191538290a82f /ports/mongo-cxx-driver
parent80f64c24dc0513b053f431059bc50634321702e7 (diff)
downloadvcpkg-9d0c7ca02e9eb72e3de06fe4b615e210874e4b11.tar.gz
vcpkg-9d0c7ca02e9eb72e3de06fe4b615e210874e4b11.zip
Add Compiler option -D_DISABLE_EXTENDED_ALIGNED to disable error C2338
Diffstat (limited to 'ports/mongo-cxx-driver')
-rw-r--r--ports/mongo-cxx-driver/CONTROL2
-rw-r--r--ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch11
-rw-r--r--ports/mongo-cxx-driver/portfile.cmake24
-rw-r--r--ports/mongo-cxx-driver/static.patch12
4 files changed, 22 insertions, 27 deletions
diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL
index 065fbbab0..08de8ddec 100644
--- a/ports/mongo-cxx-driver/CONTROL
+++ b/ports/mongo-cxx-driver/CONTROL
@@ -1,4 +1,4 @@
Source: mongo-cxx-driver
-Version: 3.1.1-2
+Version: 3.1.1-3
Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility
Description: MongoDB C++ Driver.
diff --git a/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch b/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch
new file mode 100644
index 000000000..04bbcd638
--- /dev/null
+++ b/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch
@@ -0,0 +1,11 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a019eb1..8ab0f71 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -14,5 +14,6 @@
+
+ add_definitions(-DMONGO_CXX_DRIVER_COMPILING)
+ add_definitions(-D_SCL_SECURE_NO_WARNINGS)
++add_definitions(-D_DISABLE_EXTENDED_ALIGNED_STORAGE)
+ add_subdirectory(bsoncxx)
+ add_subdirectory(mongocxx)
diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake
index fd978a271..b80c8a5bf 100644
--- a/ports/mongo-cxx-driver/portfile.cmake
+++ b/ports/mongo-cxx-driver/portfile.cmake
@@ -1,19 +1,15 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.1.1)
-
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.1.1.tar.gz"
- FILENAME "mongo-cxx-driver-r3.1.1.tar.gz"
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mongodb/mongo-cxx-driver
+ REF r3.1.1
SHA512 ba8a735e5645cbce4497df71a4577e891d507f577dbd5270ec8a82e54c39c2806bf2ff4848b621f18b36d31fb6031e5b4211972b661c43009bff0ed7ab6cf338
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/disable_test_and_example.patch
- ${CMAKE_CURRENT_LIST_DIR}/disable_shared.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch
+ HEAD_REF master
+ PATCHES
+ "${CURRENT_PORT_DIR}/disable_test_and_example.patch"
+ "${CURRENT_PORT_DIR}/disable_shared.patch"
+ "${CURRENT_PORT_DIR}/fix-uwp.patch"
+ "${CURRENT_PORT_DIR}/disable-c2338-mongo-cxx-driver.patch"
)
vcpkg_configure_cmake(
diff --git a/ports/mongo-cxx-driver/static.patch b/ports/mongo-cxx-driver/static.patch
deleted file mode 100644
index a485efe3d..000000000
--- a/ports/mongo-cxx-driver/static.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/mongocxx/config/export.hpp b/mongocxx/config/export.hpp
-index 61a3e74..7fc951c 100644
---- a/mongocxx/config/export.hpp
-+++ b/mongocxx/config/export.hpp
-@@ -2,6 +2,7 @@
- #ifndef MONGOCXX_API_H
- #define MONGOCXX_API_H
-
-+#define MONGOCXX_STATIC
- #ifdef MONGOCXX_STATIC
- # define MONGOCXX_API
- # define MONGOCXX_PRIVATE