From 9893f75b7e9f0e9b28f6927410285d3a333c0d68 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Tue, 8 Jun 2021 16:07:42 +0800 Subject: [PATCH 01/12] [clickhouse-cpp] update to 1.2.2 --- ports/clickhouse-cpp/CONTROL | 5 ----- ports/clickhouse-cpp/portfile.cmake | 6 +++--- ports/clickhouse-cpp/vcpkg.json | 11 +++++++++++ 3 files changed, 14 insertions(+), 8 deletions(-) delete mode 100644 ports/clickhouse-cpp/CONTROL create mode 100644 ports/clickhouse-cpp/vcpkg.json diff --git a/ports/clickhouse-cpp/CONTROL b/ports/clickhouse-cpp/CONTROL deleted file mode 100644 index fc8cf6a61b28a2..00000000000000 --- a/ports/clickhouse-cpp/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: clickhouse-cpp -Version: 2019-05-22 -Build-Depends: lz4, cityhash -Homepage: https://github.com/artpaul/clickhouse-cpp -Description: C++ client for Yandex ClickHouse. diff --git a/ports/clickhouse-cpp/portfile.cmake b/ports/clickhouse-cpp/portfile.cmake index d6ccf177b15307..dc42b7df1002b7 100644 --- a/ports/clickhouse-cpp/portfile.cmake +++ b/ports/clickhouse-cpp/portfile.cmake @@ -3,8 +3,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO artpaul/clickhouse-cpp - REF 1634d8b9e2f3183de1574344563d90557be3b305 - SHA512 bef74f624c2a777f8ec6b7e87ac3cc564e914bcecc639b3889695da56be4c90531309a8fd87054c2777580c36bc3b2d6e9c5690a6345018bf65a5294eeeb3390 + REF 08ad35895f732a27fea82590dc9d05017e312146 #v1.2.2 + SHA512 4bdbb0d701cab03d39036c75b817bc5e43b7444d7874d156891cf746178fc2c6ef350bf72ac83e2a398357bb9ca263f85f449579cd9aae7d2126e92d3ddc4da2 HEAD_REF master PATCHES 00001-fix-build.patch ) @@ -23,4 +23,4 @@ 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) -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 new file mode 100644 index 00000000000000..29e5fe6a1bb794 --- /dev/null +++ b/ports/clickhouse-cpp/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "clickhouse-cpp", + "version": "1.2.2", + "description": "C++ client for Yandex ClickHouse", + "homepage": "https://github.com/artpaul/clickhouse-cpp", + "dependencies": [ + "abseil", + "cityhash", + "lz4" + ] +} From ec1f56271ba158b2f1b8e06b0d545e999324ceed Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Tue, 8 Jun 2021 16:08:26 +0800 Subject: [PATCH 02/12] update version --- versions/baseline.json | 2 +- versions/c-/clickhouse-cpp.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index dac0aa82750e6d..d4105318849105 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1285,7 +1285,7 @@ "port-version": 0 }, "clickhouse-cpp": { - "baseline": "2019-05-22", + "baseline": "1.2.2", "port-version": 0 }, "clipp": { diff --git a/versions/c-/clickhouse-cpp.json b/versions/c-/clickhouse-cpp.json index 20039f22b9ebf0..85957d9e4d6fa7 100644 --- a/versions/c-/clickhouse-cpp.json +++ b/versions/c-/clickhouse-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "03154b34396655375723a6d5ad56cd9aa820b6ed", + "version": "1.2.2", + "port-version": 0 + }, { "git-tree": "bd61eb545cd11c0329de99de697ef0dd124cce60", "version-string": "2019-05-22", From 87b5b214c56d9a1fa23c2cf74f738e60befbd7a6 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 29 Jul 2021 17:22:16 +0800 Subject: [PATCH 03/12] [clickhouse-cpp] update to 1.5.0 --- ports/clickhouse-cpp/00001-fix-build.patch | 42 ---------------------- ports/clickhouse-cpp/CMakeLists.txt | 40 --------------------- ports/clickhouse-cpp/fix-error-c2668.patch | 13 +++++++ ports/clickhouse-cpp/portfile.cmake | 23 ++++++------ ports/clickhouse-cpp/vcpkg.json | 15 +++++--- 5 files changed, 34 insertions(+), 99 deletions(-) delete mode 100644 ports/clickhouse-cpp/00001-fix-build.patch delete mode 100644 ports/clickhouse-cpp/CMakeLists.txt create mode 100644 ports/clickhouse-cpp/fix-error-c2668.patch 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-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 dc42b7df1002b7..8c828404f4288b 100644 --- a/ports/clickhouse-cpp/portfile.cmake +++ b/ports/clickhouse-cpp/portfile.cmake @@ -2,25 +2,22 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO artpaul/clickhouse-cpp - REF 08ad35895f732a27fea82590dc9d05017e312146 #v1.2.2 - SHA512 4bdbb0d701cab03d39036c75b817bc5e43b7444d7874d156891cf746178fc2c6ef350bf72ac83e2a398357bb9ca263f85f449579cd9aae7d2126e92d3ddc4da2 + REPO ClickHouse/clickhouse-cpp + REF 1415b5936a2ac2f084850b09057e05fb5798b2f1 #v1.5.0 + SHA512 222b31b16744af64f0a874ec956568adcecb553e43f8d4a2d16c00d55b31015d917a4dc7bb30d5430a894459b1be5e05b292e2d0918bf6f5609046a60539f80f HEAD_REF master - PATCHES 00001-fix-build.patch + PATCHES + fix-error-c2668.patch ) -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/${PORT}/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 29e5fe6a1bb794..e3a5b37f190989 100644 --- a/ports/clickhouse-cpp/vcpkg.json +++ b/ports/clickhouse-cpp/vcpkg.json @@ -1,11 +1,18 @@ { "name": "clickhouse-cpp", - "version": "1.2.2", + "version": "1.5.0", "description": "C++ client for Yandex ClickHouse", - "homepage": "https://github.com/artpaul/clickhouse-cpp", + "homepage": "https://github.com/ClickHouse/clickhouse-cpp", "dependencies": [ - "abseil", "cityhash", - "lz4" + "lz4", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } ] } From 83f29ba5e674a63fad18d560db5c4cc676da1bb5 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 29 Jul 2021 17:23:32 +0800 Subject: [PATCH 04/12] update version --- versions/baseline.json | 2 +- versions/c-/clickhouse-cpp.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index d4105318849105..a4338f2a4ba06d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1285,7 +1285,7 @@ "port-version": 0 }, "clickhouse-cpp": { - "baseline": "1.2.2", + "baseline": "1.5.0", "port-version": 0 }, "clipp": { diff --git a/versions/c-/clickhouse-cpp.json b/versions/c-/clickhouse-cpp.json index 85957d9e4d6fa7..7bf4113008a715 100644 --- a/versions/c-/clickhouse-cpp.json +++ b/versions/c-/clickhouse-cpp.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "03154b34396655375723a6d5ad56cd9aa820b6ed", - "version": "1.2.2", + "git-tree": "fd307863b4c94d8264173b5d509239eb4710c680", + "version": "1.5.0", "port-version": 0 }, { From 53e7d04dd235c6e056d8101be1fd701cb335977b Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Tue, 3 Aug 2021 15:00:11 +0800 Subject: [PATCH 05/12] fix error c4996 --- ports/clickhouse-cpp/fix-error-C4996.patch | 15 +++++++++++++++ ports/clickhouse-cpp/portfile.cmake | 1 + 2 files changed, 16 insertions(+) create mode 100644 ports/clickhouse-cpp/fix-error-C4996.patch 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/portfile.cmake b/ports/clickhouse-cpp/portfile.cmake index 8c828404f4288b..d315964e490e41 100644 --- a/ports/clickhouse-cpp/portfile.cmake +++ b/ports/clickhouse-cpp/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-error-c2668.patch + fix-error-C4996.patch ) vcpkg_cmake_configure( From c0ca9843b857704f4e1e2eb59a58a6d9b401a703 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Tue, 3 Aug 2021 15:00:45 +0800 Subject: [PATCH 06/12] update version --- versions/c-/clickhouse-cpp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/clickhouse-cpp.json b/versions/c-/clickhouse-cpp.json index 7bf4113008a715..1875e88d294df4 100644 --- a/versions/c-/clickhouse-cpp.json +++ b/versions/c-/clickhouse-cpp.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fd307863b4c94d8264173b5d509239eb4710c680", + "git-tree": "e7d8a6e106835a7455f4fa6c3192b2a6b0e508f4", "version": "1.5.0", "port-version": 0 }, From 7e9518bd26a862b22fa8d8ffc9dde59987b2476f Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 16 Sep 2021 14:44:09 +0800 Subject: [PATCH 07/12] merge baseline.json --- versions/baseline.json | 5 ----- versions/c-/clickhouse-cpp.json | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 93f67727014569..2340b4354c05aa 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1361,13 +1361,8 @@ "port-version": 0 }, "clickhouse-cpp": { -<<<<<<< HEAD - "baseline": "1.5.0", - "port-version": 0 -======= "baseline": "2019-05-22", "port-version": 1 ->>>>>>> 5d734efcef674dbf9b7b204484fc8f006101dcb5 }, "clipp": { "baseline": "2019-04-30", diff --git a/versions/c-/clickhouse-cpp.json b/versions/c-/clickhouse-cpp.json index 3da06ee911871e..a85cb7095559eb 100644 --- a/versions/c-/clickhouse-cpp.json +++ b/versions/c-/clickhouse-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e7d8a6e106835a7455f4fa6c3192b2a6b0e508f4", + "version": "1.5.0", + "port-version": 0 + }, { "git-tree": "a748366b06afe85b514215e2d27832304581b811", "version-string": "2019-05-22", From 6b99c21ede01b15faea8694fb8f398ed56cd0231 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 16 Sep 2021 14:51:36 +0800 Subject: [PATCH 08/12] update baseline.json --- versions/baseline.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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", From 1c6fe82dff4228227ceabe54f52882e062038d20 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 16 Sep 2021 15:11:28 +0800 Subject: [PATCH 09/12] add Add patch description --- ports/clickhouse-cpp/fix-error-C4996.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/clickhouse-cpp/fix-error-C4996.patch b/ports/clickhouse-cpp/fix-error-C4996.patch index 8da054b57f4994..1587d0ddbee4fe 100644 --- a/ports/clickhouse-cpp/fix-error-C4996.patch +++ b/ports/clickhouse-cpp/fix-error-C4996.patch @@ -7,7 +7,7 @@ index 7e10ffd..cbbffdc 100644 ) +if (MSVC) -+ add_compile_options(/wd4996) ++ add_compile_options(/wd4996) #fix x64-uwp error:std::uncaught_exception() is deprecated in C++17 +endif() + ADD_LIBRARY (clickhouse-cpp-lib SHARED ${clickhouse-cpp-lib-src}) From 0f4f28df2db528541a4ccfeb7b25e652c18cc5bd Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 16 Sep 2021 15:12:53 +0800 Subject: [PATCH 10/12] update version --- versions/c-/clickhouse-cpp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/clickhouse-cpp.json b/versions/c-/clickhouse-cpp.json index a85cb7095559eb..756d9f4b384104 100644 --- a/versions/c-/clickhouse-cpp.json +++ b/versions/c-/clickhouse-cpp.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e7d8a6e106835a7455f4fa6c3192b2a6b0e508f4", + "git-tree": "3edaf716db0ddb63fb1af25ba8ef92fd58a976f1", "version": "1.5.0", "port-version": 0 }, From 3e8f8cd150a943f970d3dceee06f587b3c3c865a Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 16 Sep 2021 17:47:31 +0800 Subject: [PATCH 11/12] Add patch comment --- ports/clickhouse-cpp/fix-error-C4996.patch | 2 +- ports/clickhouse-cpp/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/clickhouse-cpp/fix-error-C4996.patch b/ports/clickhouse-cpp/fix-error-C4996.patch index 1587d0ddbee4fe..8da054b57f4994 100644 --- a/ports/clickhouse-cpp/fix-error-C4996.patch +++ b/ports/clickhouse-cpp/fix-error-C4996.patch @@ -7,7 +7,7 @@ index 7e10ffd..cbbffdc 100644 ) +if (MSVC) -+ add_compile_options(/wd4996) #fix x64-uwp error:std::uncaught_exception() is deprecated in C++17 ++ add_compile_options(/wd4996) +endif() + ADD_LIBRARY (clickhouse-cpp-lib SHARED ${clickhouse-cpp-lib-src}) diff --git a/ports/clickhouse-cpp/portfile.cmake b/ports/clickhouse-cpp/portfile.cmake index d315964e490e41..5837fb88f9d546 100644 --- a/ports/clickhouse-cpp/portfile.cmake +++ b/ports/clickhouse-cpp/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-error-c2668.patch - fix-error-C4996.patch + fix-error-C4996.patch #fix x64-uwp error:std::uncaught_exception() is deprecated in C++17 ) vcpkg_cmake_configure( From 1752f1e9b86bd698d54b88c4aaa3142dc22b9c9e Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 16 Sep 2021 17:48:05 +0800 Subject: [PATCH 12/12] update version --- versions/c-/clickhouse-cpp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/clickhouse-cpp.json b/versions/c-/clickhouse-cpp.json index 756d9f4b384104..12cd74ccb40cd0 100644 --- a/versions/c-/clickhouse-cpp.json +++ b/versions/c-/clickhouse-cpp.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3edaf716db0ddb63fb1af25ba8ef92fd58a976f1", + "git-tree": "14c4074d1a59fbe8b01ebe934698519c63885b8b", "version": "1.5.0", "port-version": 0 },