From 87a281601949c2af152db3d62b2f0b84527642a7 Mon Sep 17 00:00:00 2001 From: philjdf Date: Tue, 28 Jan 2020 16:43:37 +0000 Subject: [PATCH 1/6] Update to Arrow 0.16 --- ports/arrow/CONTROL | 2 +- ports/arrow/all.patch | 128 ++++++++++++-------------------- ports/arrow/fix-msvc-1900.patch | 31 -------- ports/arrow/portfile.cmake | 5 +- 4 files changed, 49 insertions(+), 117 deletions(-) delete mode 100644 ports/arrow/fix-msvc-1900.patch diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index 780568f03..575cad7e8 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,5 +1,5 @@ Source: arrow -Version: 0.15.1 +Version: 0.16.0 Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser Homepage: https://github.com/apache/arrow Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/all.patch b/ports/arrow/all.patch index 0675356ff..3e60cada2 100644 --- a/ports/arrow/all.patch +++ b/ports/arrow/all.patch @@ -1,5 +1,5 @@ diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake -index 4ef2948..9c3c121 100644 +index f5f0ad7..3dca82e 100644 --- a/cpp/cmake_modules/BuildUtils.cmake +++ b/cpp/cmake_modules/BuildUtils.cmake @@ -305,7 +305,7 @@ function(ADD_ARROW_LIB LIB_NAME) @@ -11,49 +11,8 @@ index 4ef2948..9c3c121 100644 set(LIB_NAME_STATIC ${LIB_NAME}_static) else() set(LIB_NAME_STATIC ${LIB_NAME}) -diff --git a/cpp/cmake_modules/FindLz4.cmake b/cpp/cmake_modules/FindLz4.cmake -index 8410916..a196b25 100644 ---- a/cpp/cmake_modules/FindLz4.cmake -+++ b/cpp/cmake_modules/FindLz4.cmake -@@ -19,14 +19,16 @@ if(MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX) - set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static") - endif() - --set(LZ4_STATIC_LIB_SUFFIX "${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") -+if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(LZ4_LIB_NAME_DEBUG_SUFFIX d) -+endif() - --set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX}) -+set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_MSVC_STATIC_LIB_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) - - if(LZ4_ROOT) - find_library( - LZ4_LIB -- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} -+ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} - "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATHS ${LZ4_ROOT} - PATH_SUFFIXES ${LIB_PATH_SUFFIXES} -@@ -43,14 +45,14 @@ else() - set(LZ4_INCLUDE_DIR "${LZ4_PC_INCLUDEDIR}") - - list(APPEND LZ4_PC_LIBRARY_DIRS "${LZ4_PC_LIBDIR}") -- find_library(LZ4_LIB lz4 -+ find_library(LZ4_LIB lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} - PATHS ${LZ4_PC_LIBRARY_DIRS} - NO_DEFAULT_PATH - PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) - else() - find_library( - LZ4_LIB -- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} -+ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} - "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) - find_path(LZ4_INCLUDE_DIR NAMES lz4.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake -index 87cc24e..4de0760 100644 +index f9d6296..82b8d22 100644 --- a/cpp/cmake_modules/FindThrift.cmake +++ b/cpp/cmake_modules/FindThrift.cmake @@ -54,6 +54,10 @@ if(MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX) @@ -67,7 +26,7 @@ index 87cc24e..4de0760 100644 if(Thrift_ROOT) find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} PATHS ${Thrift_ROOT} -@@ -71,15 +75,13 @@ else() +@@ -74,16 +78,14 @@ else() list(APPEND THRIFT_PC_LIBRARY_DIRS "${THRIFT_PC_LIBDIR}") @@ -80,51 +39,56 @@ index 87cc24e..4de0760 100644 HINTS ${THRIFT_PC_PREFIX} - NO_DEFAULT_PATH PATH_SUFFIXES "bin") + set(THRIFT_VERSION ${THRIFT_PC_VERSION}) else() - find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} + find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX} PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib") find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h PATH_SUFFIXES "include") find_program(THRIFT_COMPILER thrift PATH_SUFFIXES "bin") -diff --git a/cpp/cmake_modules/FindZSTD.cmake b/cpp/cmake_modules/FindZSTD.cmake -index 8e47086..d7ce559 100644 ---- a/cpp/cmake_modules/FindZSTD.cmake -+++ b/cpp/cmake_modules/FindZSTD.cmake -@@ -19,14 +19,18 @@ if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX) - set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static") - endif() +diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake +index 75b33c2..80cac9a 100644 +--- a/cpp/cmake_modules/SetupCxxFlags.cmake ++++ b/cpp/cmake_modules/SetupCxxFlags.cmake +@@ -128,7 +128,9 @@ macro(arrow_add_werror_if_debug) + if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") + # Treat all compiler warnings as errors + if(MSVC) +- set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /WX") ++ if(MSVC_VERSION VERSION_LESS 1900) ++ set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /WX") ++ endif() + else() + set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Werror") + endif() +diff --git a/cpp/src/arrow/stl.h b/cpp/src/arrow/stl.h +index 7ae9eaf..b9efdcb 100644 +--- a/cpp/src/arrow/stl.h ++++ b/cpp/src/arrow/stl.h +@@ -518,6 +518,9 @@ class allocator { --set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") -+if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") -+ set(ZSTD_LIB_NAME_DEBUG_SUFFIX d) -+endif() + private: + MemoryPool* pool_; + -+set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") - set(ZSTD_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX}) ++ template ++ friend class allocator; + }; - # First, find via if specified ZTD_ROOT - if(ZSTD_ROOT) - message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}") - find_library(ZSTD_LIB -- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" -+ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" - "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATHS ${ZSTD_ROOT} - PATH_SUFFIXES ${LIB_PATH_SUFFIXES} -@@ -44,14 +48,14 @@ else() - set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}") + /// \brief A MemoryPool implementation delegating allocations to a STL allocator +diff --git a/cpp/src/parquet/schema.h b/cpp/src/parquet/schema.h +index 87db4de..095ef9a 100644 +--- a/cpp/src/parquet/schema.h ++++ b/cpp/src/parquet/schema.h +@@ -460,7 +460,11 @@ class PARQUET_EXPORT SchemaDescriptor { + // -- -- b | + // -- -- -- c | + // -- -- -- -- d +- std::unordered_map leaf_to_base_; ++#if _MSC_VER >= 1900 ++ std::unordered_map leaf_to_base_; ++#else ++ std::unordered_map leaf_to_base_; ++#endif - list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}") -- find_library(ZSTD_LIB zstd -+ find_library(ZSTD_LIB zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} - PATHS ${ZSTD_PC_LIBRARY_DIRS} - NO_DEFAULT_PATH - PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) - # Third, check all other CMake paths - else() - find_library(ZSTD_LIB -- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" -+ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" - "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) - find_path(ZSTD_INCLUDE_DIR NAMES zstd.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) + // Mapping between ColumnPath DotString to the leaf index + std::unordered_multimap leaf_to_idx_; diff --git a/ports/arrow/fix-msvc-1900.patch b/ports/arrow/fix-msvc-1900.patch deleted file mode 100644 index 7c29070b7..000000000 --- a/ports/arrow/fix-msvc-1900.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake -index 496904b..887f9c4 100644 ---- a/cpp/cmake_modules/SetupCxxFlags.cmake -+++ b/cpp/cmake_modules/SetupCxxFlags.cmake -@@ -124,7 +124,9 @@ macro(arrow_add_werror_if_debug) - if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") - # Treat all compiler warnings as errors - if("${COMPILER_FAMILY}" STREQUAL "msvc") -- set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /WX") -+ if (MSVC_VERSION VERSION_LESS 1900) -+ set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /WX") -+ endif() - else() - set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Werror") - endif() -diff --git a/cpp/src/parquet/schema.h b/cpp/src/parquet/schema.h -index 740edbc..1526c73 100644 ---- a/cpp/src/parquet/schema.h -+++ b/cpp/src/parquet/schema.h -@@ -457,7 +457,11 @@ class PARQUET_EXPORT SchemaDescriptor { - // -- -- b | - // -- -- -- c | - // -- -- -- -- d -+#if _MSC_VER >= 1900 -+ std::unordered_map leaf_to_base_; -+#else - std::unordered_map leaf_to_base_; -+#endif - - // Mapping between ColumnPath DotString to the leaf index - std::unordered_multimap leaf_to_idx_; diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index 3bf029752..406a9c0b9 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -7,12 +7,11 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/arrow - REF apache-arrow-0.15.1 - SHA512 f371c687ad8f944c3552f2111ee3c721b89fd0cea01c4ab64c22322fe1ad96f6feff851b6f5505d8522ff4a28e59f6cafa6ce1ee0bc291d83338e4297150dc9e + REF apache-arrow-0.16.0 + SHA512 fbee9ebbbfaf89435a95ac60fd9e0e0104e73c580810cd94d7a0c3f881758127e370be9283aa7fc92ea25f96a438dcbd78a3d43122aed75cc9ad30f4659a0d4f HEAD_REF master PATCHES all.patch - fix-msvc-1900.patch ) string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED) From 5268c6766e865a7f0d6c779ae82ddb5cb7e700af Mon Sep 17 00:00:00 2001 From: philjdf Date: Fri, 31 Jan 2020 14:53:14 +0000 Subject: [PATCH 2/6] Re-enable compression libs --- ports/arrow/CONTROL | 2 +- ports/arrow/portfile.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index 575cad7e8..5da695487 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,5 +1,5 @@ Source: arrow Version: 0.16.0 -Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser +Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, bzip2, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser Homepage: https://github.com/apache/arrow Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index 406a9c0b9..c1caba4d5 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -30,6 +30,12 @@ vcpkg_configure_cmake( -DARROW_GFLAGS_USE_SHARED=off -DARROW_JEMALLOC=off -DARROW_BUILD_UTILITIES=OFF + -DARROW_WITH_BZ2=ON + -DARROW_WITH_ZLIB=ON + -DARROW_WITH_ZSTD=ON + -DARROW_WITH_LZ4=ON + -DARROW_WITH_SNAPPY=ON + -DARROW_WITH_BROTLI=ON ) vcpkg_install_cmake() From 17f1df9c3d9412fd7eaae11c2694f374869c2ae1 Mon Sep 17 00:00:00 2001 From: philjdf Date: Fri, 31 Jan 2020 15:23:51 +0000 Subject: [PATCH 3/6] Support encryption --- ports/arrow/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index c1caba4d5..cb3aa4bd5 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -36,6 +36,7 @@ vcpkg_configure_cmake( -DARROW_WITH_LZ4=ON -DARROW_WITH_SNAPPY=ON -DARROW_WITH_BROTLI=ON + -DPARQUET_REQUIRE_ENCRYPTION=ON ) vcpkg_install_cmake() From 6b3d4b817280d67fa98d2ffab37b0b8fdaef8be3 Mon Sep 17 00:00:00 2001 From: philjdf Date: Mon, 3 Feb 2020 10:30:36 +0000 Subject: [PATCH 4/6] Update hash because Arrow release changed --- ports/arrow/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index cb3aa4bd5..a2f883149 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/arrow REF apache-arrow-0.16.0 - SHA512 fbee9ebbbfaf89435a95ac60fd9e0e0104e73c580810cd94d7a0c3f881758127e370be9283aa7fc92ea25f96a438dcbd78a3d43122aed75cc9ad30f4659a0d4f + SHA512 c8d693e927218c65526b48f18c4f00f9530d1a8731575b051b017a5350e68114c16dcd41ff578b4c0cc29cc79096621809658b8eac250934ecf0fcaabadf2cf6 HEAD_REF master PATCHES all.patch From e33f9fad97332fc126f7f56e6f7a8fcf6a606869 Mon Sep 17 00:00:00 2001 From: Hannemit Date: Mon, 3 Feb 2020 15:17:41 +0000 Subject: [PATCH 5/6] Fix linux build --- ports/arrow/all.patch | 83 ++++++++++++++++++++++++++++++++++++++ ports/arrow/portfile.cmake | 2 +- 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/ports/arrow/all.patch b/ports/arrow/all.patch index 3e60cada2..3b2bdad2f 100644 --- a/ports/arrow/all.patch +++ b/ports/arrow/all.patch @@ -11,6 +11,47 @@ index f5f0ad7..3dca82e 100644 set(LIB_NAME_STATIC ${LIB_NAME}_static) else() set(LIB_NAME_STATIC ${LIB_NAME}) +diff --git a/cpp/cmake_modules/FindLz4.cmake b/cpp/cmake_modules/FindLz4.cmake +index 8410916..a196b25 100644 +--- a/cpp/cmake_modules/FindLz4.cmake ++++ b/cpp/cmake_modules/FindLz4.cmake +@@ -19,14 +19,16 @@ if(MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX) + set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static") + endif() + +-set(LZ4_STATIC_LIB_SUFFIX "${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(LZ4_LIB_NAME_DEBUG_SUFFIX d) ++endif() + +-set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX}) ++set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_MSVC_STATIC_LIB_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) + + if(LZ4_ROOT) + find_library( + LZ4_LIB +- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} ++ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} + "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATHS ${LZ4_ROOT} + PATH_SUFFIXES ${LIB_PATH_SUFFIXES} +@@ -43,14 +45,14 @@ else() + set(LZ4_INCLUDE_DIR "${LZ4_PC_INCLUDEDIR}") + + list(APPEND LZ4_PC_LIBRARY_DIRS "${LZ4_PC_LIBDIR}") +- find_library(LZ4_LIB lz4 ++ find_library(LZ4_LIB lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} + PATHS ${LZ4_PC_LIBRARY_DIRS} + NO_DEFAULT_PATH + PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) + else() + find_library( + LZ4_LIB +- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} ++ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} + "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) + find_path(LZ4_INCLUDE_DIR NAMES lz4.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake index f9d6296..82b8d22 100644 --- a/cpp/cmake_modules/FindThrift.cmake @@ -46,6 +87,48 @@ index f9d6296..82b8d22 100644 PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib") find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h PATH_SUFFIXES "include") find_program(THRIFT_COMPILER thrift PATH_SUFFIXES "bin") +diff --git a/cpp/cmake_modules/FindZSTD.cmake b/cpp/cmake_modules/FindZSTD.cmake +index 8e47086..d7ce559 100644 +--- a/cpp/cmake_modules/FindZSTD.cmake ++++ b/cpp/cmake_modules/FindZSTD.cmake +@@ -19,14 +19,18 @@ if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX) + set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static") + endif() + +-set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(ZSTD_LIB_NAME_DEBUG_SUFFIX d) ++endif() ++ ++set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(ZSTD_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX}) + + # First, find via if specified ZTD_ROOT + if(ZSTD_ROOT) + message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}") + find_library(ZSTD_LIB +- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" ++ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" + "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATHS ${ZSTD_ROOT} + PATH_SUFFIXES ${LIB_PATH_SUFFIXES} +@@ -44,14 +48,14 @@ else() + set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}") + + list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}") +- find_library(ZSTD_LIB zstd ++ find_library(ZSTD_LIB zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} + PATHS ${ZSTD_PC_LIBRARY_DIRS} + NO_DEFAULT_PATH + PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) + # Third, check all other CMake paths + else() + find_library(ZSTD_LIB +- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" ++ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}" + "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) + find_path(ZSTD_INCLUDE_DIR NAMES zstd.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index 75b33c2..80cac9a 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index a2f883149..c67e61230 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -55,4 +55,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/arrow RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) \ No newline at end of file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) From 622c10b388ac1e59966f754224f6db11f96acd04 Mon Sep 17 00:00:00 2001 From: Phil Felton <39185762+philjdf@users.noreply.github.com> Date: Wed, 5 Feb 2020 10:48:00 +0000 Subject: [PATCH 6/6] Update CONTROL --- ports/arrow/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index 5da695487..d13797ac7 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,5 +1,5 @@ Source: arrow Version: 0.16.0 -Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, bzip2, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser +Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, bzip2, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser, openssl Homepage: https://github.com/apache/arrow Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations.