diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2018-01-03 15:29:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-03 15:29:12 +0200 |
| commit | 14636552aded023d8c266098438420eb6c113cfe (patch) | |
| tree | 3bff1a1b01d6bf8c11abea49d6ccdb371513a39a | |
| parent | c4bc3a25e51563b8949380bf8fca99052caf07f0 (diff) | |
| parent | 68f9f8943114677d6c66d85c14ccd1e5dcca8fd7 (diff) | |
| download | vcpkg-14636552aded023d8c266098438420eb6c113cfe.tar.gz vcpkg-14636552aded023d8c266098438420eb6c113cfe.zip | |
Merge pull request #2492 from lebdron/cpp-redis-4.3.0
[cpp-redis] Update to 4.3.0
| -rw-r--r-- | ports/cpp-redis/CONTROL | 2 | ||||
| -rw-r--r-- | ports/cpp-redis/fix-cmakelists.patch | 29 | ||||
| -rw-r--r-- | ports/cpp-redis/fix-export.patch | 22 | ||||
| -rw-r--r-- | ports/cpp-redis/portfile.cmake | 26 |
4 files changed, 71 insertions, 8 deletions
diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 554755b57..53ed862c2 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,4 +1,4 @@ Source: cpp-redis -Version: 3.5.2-2 +Version: 4.3.0 Build-Depends: tacopie Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cpp-redis/fix-cmakelists.patch b/ports/cpp-redis/fix-cmakelists.patch new file mode 100644 index 000000000..2839ce56f --- /dev/null +++ b/ports/cpp-redis/fix-cmakelists.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ae20868..01bb84c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,6 +26,7 @@ + cmake_minimum_required(VERSION 2.8.7) + set(CMAKE_MACOSX_RPATH 1) + include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) ++include(${CMAKE_ROOT}/Modules/GenerateExportHeader.cmake) + + + ### +@@ -170,6 +171,8 @@ if(USE_CUSTOM_TCP_CLIENT) + set_target_properties(${PROJECT} PROPERTIES COMPILE_DEFINITIONS "__CPP_REDIS_USE_CUSTOM_TCP_CLIENT=${USE_CUSTOM_TCP_CLIENT}") + endif(USE_CUSTOM_TCP_CLIENT) + ++generate_export_header(${PROJECT} EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/cpp_redis/misc/${PROJECT}_export.hpp) ++target_include_directories(${PROJECT} PUBLIC ${CMAKE_BINARY_DIR}) + + ### + # install +@@ -181,6 +184,7 @@ install(DIRECTORY DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} DESTINATION lib USE_SOURCE_PERMISSIONS) + install(DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DESTINATION bin USE_SOURCE_PERMISSIONS) + install(DIRECTORY ${CPP_REDIS_INCLUDES}/ DESTINATION include USE_SOURCE_PERMISSIONS) ++install (FILES ${CMAKE_BINARY_DIR}/cpp_redis/misc/${PROJECT}_export.hpp DESTINATION include/cpp_redis/misc) + + + ### diff --git a/ports/cpp-redis/fix-export.patch b/ports/cpp-redis/fix-export.patch new file mode 100644 index 000000000..1b071c511 --- /dev/null +++ b/ports/cpp-redis/fix-export.patch @@ -0,0 +1,22 @@ +diff --git a/includes/cpp_redis/misc/logger.hpp b/includes/cpp_redis/misc/logger.hpp +index d79a98f..bfb33b9 100644 +--- a/includes/cpp_redis/misc/logger.hpp ++++ b/includes/cpp_redis/misc/logger.hpp +@@ -26,6 +26,8 @@ + #include <mutex> + #include <string> + ++#include <cpp_redis/misc/cpp_redis_export.hpp> ++ + namespace cpp_redis { + + //! +@@ -161,7 +163,7 @@ private: + //! variable containing the current logger + //! by default, not set (no logs) + //! +-extern std::unique_ptr<logger_iface> active_logger; ++extern CPP_REDIS_EXPORT std::unique_ptr<logger_iface> active_logger; + + //! + //! debug logging diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake index 3a560a047..ea0ea1194 100644 --- a/ports/cpp-redis/portfile.cmake +++ b/ports/cpp-redis/portfile.cmake @@ -1,17 +1,20 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "cpp-redis only supports static library linkage.") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cylix/cpp_redis - REF 3.5.2 - SHA512 d19445c93fad9fba39c7aed07b2d196ec0c96366324a2a2ee856c930683b5428fe8b5bc46de4b2b23112aae83f8229a4703c2355d1c74831602ec3a7f8dac315 + REF 4.3.0 + SHA512 d4a2865b72b4dfa80b6d3c004245014a77e74d4a3d254d6b0a9d50e890a22dc3d9ce54688a8c9185ecee9bbf8cdf76046a9788c70887ccf8a08d5cdcef298b46 HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-export.patch +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/tacopie/CMakeLists.txt DESTINATION ${SOURCE_PATH}/tacopie) if(VCPKG_CRT_LINKAGE STREQUAL dynamic) @@ -29,11 +32,12 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG} + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(GLOB_RECURSE FILES "${CURRENT_PACKAGES_DIR}/include/*") foreach(file ${FILES}) @@ -42,6 +46,14 @@ foreach(file ${FILES}) file(WRITE ${file} "${_contents}") endforeach() +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/lib ${CURRENT_PACKAGES_DIR}/debug/bin/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/lib ${CURRENT_PACKAGES_DIR}/bin/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/lib ${CURRENT_PACKAGES_DIR}/debug/bin/bin ${CURRENT_PACKAGES_DIR}/lib/lib ${CURRENT_PACKAGES_DIR}/bin/bin) + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-redis RENAME copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + vcpkg_copy_pdbs() |
