diff options
| author | sdcb <sdflysha@qq.com> | 2016-12-18 16:26:12 +0800 |
|---|---|---|
| committer | sdcb <sdflysha@qq.com> | 2016-12-18 16:26:12 +0800 |
| commit | ea3113a4f520f7cb6383df1c261138cc21abceb6 (patch) | |
| tree | ec7edb4927644888d1b816209f84137511e04b50 /ports/mongo-cxx-driver | |
| parent | 835693ce97f271c0213f65c1c782e8df84cfb409 (diff) | |
| download | vcpkg-ea3113a4f520f7cb6383df1c261138cc21abceb6.tar.gz vcpkg-ea3113a4f520f7cb6383df1c261138cc21abceb6.zip | |
[mongo-x-driver] upgrade to 1.51/3.10
Diffstat (limited to 'ports/mongo-cxx-driver')
| -rw-r--r-- | ports/mongo-cxx-driver/portfile.cmake | 175 |
1 files changed, 88 insertions, 87 deletions
diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index fa0549fd7..a6c97335c 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -1,88 +1,89 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.0.3) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.0.3.tar.gz" - FILENAME "mongo-cxx-driver-r3.0.3.tar.gz" - SHA512 29f7ae77dab160c4279eb2eba8e960b25afc7118bf82570d240f5c68e1e17b10dc99910c855888467c304d70399f2d02031463b0c168a95ad0b9323742ccfd35 -) -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 -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR} - -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR} - -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON -) - -vcpkg_install_cmake() - -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx - ${CURRENT_PACKAGES_DIR}/temp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx) -file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/bsoncxx) - -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx - ${CURRENT_PACKAGES_DIR}/temp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mongocxx) -file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/mongocxx) - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/lib/cmake - ${CURRENT_PACKAGES_DIR}/debug/lib/cmake - - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test - ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party - - ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake - ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private - ${CURRENT_PACKAGES_DIR}/include/mongocxx/test - ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util - ${CURRENT_PACKAGES_DIR}/include/mongocxx/private - ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private - - ${CURRENT_PACKAGES_DIR}/debug/include) - - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) - - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib - ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib) - - # define MONGOCXX_STATIC in config/export.hpp - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/static.patch - ) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib) -endif() - +include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-cxx-driver-r3.1.0)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/mongodb/mongo-cxx-driver/archive/r3.1.0.tar.gz"
+ FILENAME "mongo-cxx-driver-r3.1.0.tar.gz"
+ SHA512 2c9323f5e28304057b6ed6fc8bf33aad14db1313e234eaa74a96fb4cf93e99d24fd8c7c3f20b4b29cda7b1fe5c58f08dcb5cddcffbf62259c08334312fda4fba
+)
+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
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR}
+ -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR}
+ -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
+)
+
+vcpkg_install_cmake()
+
+file(RENAME
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/v_noabi/bsoncxx
+ ${CURRENT_PACKAGES_DIR}/temp)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx)
+file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/bsoncxx)
+
+file(RENAME
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/v_noabi/mongocxx
+ ${CURRENT_PACKAGES_DIR}/temp)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mongocxx)
+file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include/mongocxx)
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/lib/cmake
+ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake
+
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test
+ ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party
+
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/test
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/private
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private
+ ${CURRENT_PACKAGES_DIR}/include/mongocxx/options
+
+ ${CURRENT_PACKAGES_DIR}/debug/include)
+
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/bsoncxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongocxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
+
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib
+ ${CURRENT_PACKAGES_DIR}/lib/bsoncxx.lib)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mongocxx.lib)
+
+ # define MONGOCXX_STATIC in config/export.hpp
+ vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/static.patch
+ )
+else()
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libbsoncxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libbsoncxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmongocxx.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmongocxx.lib)
+endif()
+
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver RENAME copyright)
\ No newline at end of file |
