diff --git a/ports/clickhouse-cpp/00001-fix-build.patch b/ports/clickhouse-cpp/00001-fix-build.patch deleted file mode 100644 index 8fb57d50edbca9..00000000000000 --- a/ports/clickhouse-cpp/00001-fix-build.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/clickhouse/base/compressed.cpp b/clickhouse/base/compressed.cpp -index 6b7af08..c3a6449 100644 ---- a/clickhouse/base/compressed.cpp -+++ b/clickhouse/base/compressed.cpp -@@ -1,8 +1,8 @@ - #include "compressed.h" - #include "wire_format.h" - --#include --#include -+#include -+#include - - #include - -diff --git a/clickhouse/client.cpp b/clickhouse/client.cpp -index 1053006..59950ab 100644 ---- a/clickhouse/client.cpp -+++ b/clickhouse/client.cpp -@@ -8,8 +8,8 @@ - - #include "columns/factory.h" - --#include --#include -+#include -+#include - - #include - #include -diff --git a/clickhouse/types/types.h b/clickhouse/types/types.h -index 8d453cd..69aa6a4 100644 ---- a/clickhouse/types/types.h -+++ b/clickhouse/types/types.h -@@ -4,6 +4,7 @@ - #include - #include - #include -+#include - - namespace clickhouse { - diff --git a/ports/clickhouse-cpp/CMakeLists.txt b/ports/clickhouse-cpp/CMakeLists.txt deleted file mode 100644 index 08a597b395ce5d..00000000000000 --- a/ports/clickhouse-cpp/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -project(clickhouse-cpp CXX) - -find_package(lz4 CONFIG REQUIRED) -find_package(cityhash CONFIG REQUIRED) - -file(GLOB_RECURSE SOURCES "clickhouse/*.cpp") -file(GLOB_RECURSE HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "clickhouse/*.h") - -add_library(clickhouse-cpp STATIC ${SOURCES}) - -target_compile_definitions(clickhouse-cpp PRIVATE LZ4_DISABLE_DEPRECATE_WARNINGS) - -set_target_properties(clickhouse-cpp PROPERTIES - CXX_STANDARD 11 - CXX_STANDARD_REQUIRED ON -) - -target_include_directories(clickhouse-cpp PUBLIC - $ - $ -) - -target_link_libraries(clickhouse-cpp - PRIVATE lz4::lz4 - PRIVATE cityhash -) - -install(TARGETS clickhouse-cpp EXPORT clickhouse-cpp-config - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib -) - -install(EXPORT clickhouse-cpp-config DESTINATION share/cmake/clickhouse-cpp) - -foreach (HEADER ${HEADERS} ) - get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) - install(FILES ${HEADER} DESTINATION include/${HEADER_DIR}) -endforeach() diff --git a/ports/clickhouse-cpp/fix-error-C4996.patch b/ports/clickhouse-cpp/fix-error-C4996.patch new file mode 100644 index 00000000000000..8da054b57f4994 --- /dev/null +++ b/ports/clickhouse-cpp/fix-error-C4996.patch @@ -0,0 +1,15 @@ +diff --git a/clickhouse/CMakeLists.txt b/clickhouse/CMakeLists.txt +index 7e10ffd..cbbffdc 100644 +--- a/clickhouse/CMakeLists.txt ++++ b/clickhouse/CMakeLists.txt +@@ -31,6 +31,10 @@ SET ( clickhouse-cpp-lib-src + query.cpp + ) + ++if (MSVC) ++ add_compile_options(/wd4996) ++endif() ++ + ADD_LIBRARY (clickhouse-cpp-lib SHARED ${clickhouse-cpp-lib-src}) + SET_TARGET_PROPERTIES(clickhouse-cpp-lib PROPERTIES LINKER_LANGUAGE CXX) + TARGET_LINK_LIBRARIES (clickhouse-cpp-lib diff --git a/ports/clickhouse-cpp/fix-error-c2668.patch b/ports/clickhouse-cpp/fix-error-c2668.patch new file mode 100644 index 00000000000000..4ad1df95364850 --- /dev/null +++ b/ports/clickhouse-cpp/fix-error-c2668.patch @@ -0,0 +1,13 @@ +diff --git a/clickhouse/columns/decimal.cpp b/clickhouse/columns/decimal.cpp +index 7334bb1..41d43b6 100644 +--- a/clickhouse/columns/decimal.cpp ++++ b/clickhouse/columns/decimal.cpp +@@ -27,7 +27,7 @@ inline bool mulOverflow(const Int128 & l, const T & r, Int128 * result) + + #else + template +-inline bool getSignBit(const T & v) ++inline bool getSignBit(const T & (long double v)) + { + return std::signbit(v); + } diff --git a/ports/clickhouse-cpp/portfile.cmake b/ports/clickhouse-cpp/portfile.cmake index d6ccf177b15307..5837fb88f9d546 100644 --- a/ports/clickhouse-cpp/portfile.cmake +++ b/ports/clickhouse-cpp/portfile.cmake @@ -2,25 +2,23 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO artpaul/clickhouse-cpp - REF 1634d8b9e2f3183de1574344563d90557be3b305 - SHA512 bef74f624c2a777f8ec6b7e87ac3cc564e914bcecc639b3889695da56be4c90531309a8fd87054c2777580c36bc3b2d6e9c5690a6345018bf65a5294eeeb3390 + REPO ClickHouse/clickhouse-cpp + REF 1415b5936a2ac2f084850b09057e05fb5798b2f1 #v1.5.0 + SHA512 222b31b16744af64f0a874ec956568adcecb553e43f8d4a2d16c00d55b31015d917a4dc7bb30d5430a894459b1be5e05b292e2d0918bf6f5609046a60539f80f HEAD_REF master - PATCHES 00001-fix-build.patch + PATCHES + fix-error-c2668.patch + fix-error-C4996.patch #fix x64-uwp error:std::uncaught_exception() is deprecated in C++17 ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/clickhouse-cpp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/clickhouse-cpp/copyright COPYONLY) +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/clickhouse-cpp/vcpkg.json b/ports/clickhouse-cpp/vcpkg.json index 2c5d6a4f3f61e3..e3a5b37f190989 100644 --- a/ports/clickhouse-cpp/vcpkg.json +++ b/ports/clickhouse-cpp/vcpkg.json @@ -1,11 +1,18 @@ { "name": "clickhouse-cpp", - "version-string": "2019-05-22", - "port-version": 1, - "description": "C++ client for Yandex ClickHouse.", - "homepage": "https://github.com/artpaul/clickhouse-cpp", + "version": "1.5.0", + "description": "C++ client for Yandex ClickHouse", + "homepage": "https://github.com/ClickHouse/clickhouse-cpp", "dependencies": [ "cityhash", - "lz4" + "lz4", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } ] } diff --git a/versions/baseline.json b/versions/baseline.json index 2340b4354c05aa..78569d8cb4da32 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1361,8 +1361,8 @@ "port-version": 0 }, "clickhouse-cpp": { - "baseline": "2019-05-22", - "port-version": 1 + "baseline": "1.5.0", + "port-version": 0 }, "clipp": { "baseline": "2019-04-30", diff --git a/versions/c-/clickhouse-cpp.json b/versions/c-/clickhouse-cpp.json index 3da06ee911871e..12cd74ccb40cd0 100644 --- a/versions/c-/clickhouse-cpp.json +++ b/versions/c-/clickhouse-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "14c4074d1a59fbe8b01ebe934698519c63885b8b", + "version": "1.5.0", + "port-version": 0 + }, { "git-tree": "a748366b06afe85b514215e2d27832304581b811", "version-string": "2019-05-22",