From 9c653c4e32eb130dd7d1ca7c75cfaad4058c3d75 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Mon, 23 Oct 2023 15:42:07 +0100 Subject: [PATCH] HPCC-30627 Relocate arrow into vcpkg Signed-off-by: Gordon Smith --- vcpkg | 2 +- vcpkg_overlays/arrow/fix-ci-error.patch | 13 -- vcpkg_overlays/arrow/msvc-static-name.patch | 13 -- vcpkg_overlays/arrow/portfile.cmake | 122 ------------------- vcpkg_overlays/arrow/thrift.patch | 22 ---- vcpkg_overlays/arrow/usage | 4 - vcpkg_overlays/arrow/usage-acero | 3 - vcpkg_overlays/arrow/usage-dataset | 3 - vcpkg_overlays/arrow/usage-parquet | 3 - vcpkg_overlays/arrow/utf8proc.patch | 13 -- vcpkg_overlays/arrow/vcpkg.json | 126 -------------------- 11 files changed, 1 insertion(+), 323 deletions(-) delete mode 100644 vcpkg_overlays/arrow/fix-ci-error.patch delete mode 100644 vcpkg_overlays/arrow/msvc-static-name.patch delete mode 100644 vcpkg_overlays/arrow/portfile.cmake delete mode 100644 vcpkg_overlays/arrow/thrift.patch delete mode 100644 vcpkg_overlays/arrow/usage delete mode 100644 vcpkg_overlays/arrow/usage-acero delete mode 100644 vcpkg_overlays/arrow/usage-dataset delete mode 100644 vcpkg_overlays/arrow/usage-parquet delete mode 100644 vcpkg_overlays/arrow/utf8proc.patch delete mode 100644 vcpkg_overlays/arrow/vcpkg.json diff --git a/vcpkg b/vcpkg index 1bc64df4225..8e7b6f66fa9 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 1bc64df4225a58259ac752adcdcbbb8bee243d2f +Subproject commit 8e7b6f66fa9458274b22e0b921e8c0e91b49bce0 diff --git a/vcpkg_overlays/arrow/fix-ci-error.patch b/vcpkg_overlays/arrow/fix-ci-error.patch deleted file mode 100644 index adbe0f86683..00000000000 --- a/vcpkg_overlays/arrow/fix-ci-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index eeda520..f55080e 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -921,7 +921,7 @@ if(WIN32) - list(APPEND ARROW_SYSTEM_LINK_LIBS "ws2_32.dll") - endif() - --if(NOT WIN32 AND NOT APPLE) -+if(NOT WIN32 AND NOT APPLE AND NOT ANDROID) - # Pass -lrt on Linux only - list(APPEND ARROW_SYSTEM_LINK_LIBS rt) - endif() diff --git a/vcpkg_overlays/arrow/msvc-static-name.patch b/vcpkg_overlays/arrow/msvc-static-name.patch deleted file mode 100644 index 45624f16898..00000000000 --- a/vcpkg_overlays/arrow/msvc-static-name.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake -index 391c43e0a..50f6d3d3c 100644 ---- a/cpp/cmake_modules/BuildUtils.cmake -+++ b/cpp/cmake_modules/BuildUtils.cmake -@@ -427,7 +427,7 @@ function(ADD_ARROW_LIB LIB_NAME) - target_include_directories(${LIB_NAME}_static PRIVATE ${ARG_PRIVATE_INCLUDES}) - endif() - -- if(MSVC_TOOLCHAIN) -+ if(MSVC_TOOLCHAIN AND 0) - set(LIB_NAME_STATIC ${LIB_NAME}_static) - else() - set(LIB_NAME_STATIC ${LIB_NAME}) diff --git a/vcpkg_overlays/arrow/portfile.cmake b/vcpkg_overlays/arrow/portfile.cmake deleted file mode 100644 index 1ee7a81efa8..00000000000 --- a/vcpkg_overlays/arrow/portfile.cmake +++ /dev/null @@ -1,122 +0,0 @@ -vcpkg_download_distfile( - ARCHIVE_PATH - URLS "https://archive.apache.org/dist/arrow/arrow-${VERSION}/apache-arrow-${VERSION}.tar.gz" - FILENAME apache-arrow-${VERSION}.tar.gz - SHA512 3314d79ef20ac2cfc63f2c16fafb30c3f6187c10c6f5ea6ff036f6db766621d7c65401d85bf1e979bd0ecf831fbb0a785467642792d6bf77016f9807243c064e -) -vcpkg_extract_source_archive( - SOURCE_PATH - ARCHIVE ${ARCHIVE_PATH} - PATCHES - msvc-static-name.patch - utf8proc.patch - thrift.patch - fix-ci-error.patch -) - -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - FEATURES - acero ARROW_ACERO - csv ARROW_CSV - cuda ARROW_CUDA - dataset ARROW_DATASET - filesystem ARROW_FILESYSTEM - flight ARROW_FLIGHT - gcs ARROW_GCS - jemalloc ARROW_JEMALLOC - json ARROW_JSON - mimalloc ARROW_MIMALLOC - orc ARROW_ORC - parquet ARROW_PARQUET - parquet PARQUET_REQUIRE_ENCRYPTION - s3 ARROW_S3 -) - -if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) - list(APPEND FEATURE_OPTIONS "-DARROW_USE_NATIVE_INT128=OFF") -endif() - -string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED) -string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC) -string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_DEPENDENCY_USE_SHARED) - -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}/cpp" - OPTIONS - ${FEATURE_OPTIONS} - -DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED} - -DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC} - -DARROW_BUILD_TESTS=OFF - -DARROW_DEPENDENCY_SOURCE=SYSTEM - -DARROW_DEPENDENCY_USE_SHARED=${ARROW_DEPENDENCY_USE_SHARED} - -DARROW_PACKAGE_KIND=vcpkg - -DARROW_WITH_BROTLI=ON - -DARROW_WITH_BZ2=ON - -DARROW_WITH_LZ4=ON - -DARROW_WITH_SNAPPY=ON - -DARROW_WITH_ZLIB=ON - -DARROW_WITH_ZSTD=ON - -DBUILD_WARNING_LEVEL=PRODUCTION - -DCMAKE_SYSTEM_PROCESSOR=${VCPKG_TARGET_ARCHITECTURE} - -DZSTD_MSVC_LIB_PREFIX= - MAYBE_UNUSED_VARIABLES - ZSTD_MSVC_LIB_PREFIX -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() - -vcpkg_fixup_pkgconfig() - -if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib") - message(FATAL_ERROR "Installed lib file should be named 'arrow.lib' via patching the upstream build.") -endif() - -if("dataset" IN_LIST FEATURES) - vcpkg_cmake_config_fixup( - PACKAGE_NAME arrowdataset - CONFIG_PATH lib/cmake/ArrowDataset - DO_NOT_DELETE_PARENT_CONFIG_PATH - ) -endif() - -if("acero" IN_LIST FEATURES) - vcpkg_cmake_config_fixup( - PACKAGE_NAME arrowacero - CONFIG_PATH lib/cmake/ArrowAcero - DO_NOT_DELETE_PARENT_CONFIG_PATH - ) -endif() - -if("parquet" IN_LIST FEATURES) - vcpkg_cmake_config_fixup( - PACKAGE_NAME parquet - CONFIG_PATH lib/cmake/Parquet - DO_NOT_DELETE_PARENT_CONFIG_PATH - ) -endif() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Arrow) - -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") -if("parquet" IN_LIST FEATURES) - file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-parquet" usage-parquet) - file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-parquet}") -endif() -if("dataset" IN_LIST FEATURES) - file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-dataset" usage-dataset) - file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-dataset}") -endif() -if("acero" IN_LIST FEATURES) - file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-acero" usage-acero) - file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-acero}") -endif() - -if("example" IN_LIST FEATURES) - file(INSTALL "${SOURCE_PATH}/cpp/examples/minimal_build/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/example") -endif() - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc") - -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt" "${SOURCE_PATH}/NOTICE.txt") diff --git a/vcpkg_overlays/arrow/thrift.patch b/vcpkg_overlays/arrow/thrift.patch deleted file mode 100644 index 7c81e23dba7..00000000000 --- a/vcpkg_overlays/arrow/thrift.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake -index f3e4902..65ceac8 100644 ---- a/cpp/cmake_modules/FindThriftAlt.cmake -+++ b/cpp/cmake_modules/FindThriftAlt.cmake -@@ -45,7 +45,7 @@ endif() - # * https://github.com/apache/thrift/pull/2725 - # * https://github.com/apache/thrift/pull/2726 - # * https://github.com/conda-forge/thrift-cpp-feedstock/issues/68 --if(NOT WIN32) -+ - set(find_package_args "") - if(ThriftAlt_FIND_VERSION) - list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) -@@ -61,7 +61,7 @@ if(NOT WIN32) - "${THRIFT_COMPILER}") - return() - endif() --endif() -+ - - function(extract_thrift_version) - if(ThriftAlt_INCLUDE_DIR) diff --git a/vcpkg_overlays/arrow/usage b/vcpkg_overlays/arrow/usage deleted file mode 100644 index b07f1c9c32b..00000000000 --- a/vcpkg_overlays/arrow/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package arrow provides CMake targets: - - find_package(Arrow CONFIG REQUIRED) - target_link_libraries(main PRIVATE "$,Arrow::arrow_static,Arrow::arrow_shared>") diff --git a/vcpkg_overlays/arrow/usage-acero b/vcpkg_overlays/arrow/usage-acero deleted file mode 100644 index 05c4776b797..00000000000 --- a/vcpkg_overlays/arrow/usage-acero +++ /dev/null @@ -1,3 +0,0 @@ - - find_package(ArrowAcero CONFIG REQUIRED) - target_link_libraries(main PRIVATE "$,ArrowAcero::arrow_acero_static,ArrowAcero::arrow_acero_shared>") diff --git a/vcpkg_overlays/arrow/usage-dataset b/vcpkg_overlays/arrow/usage-dataset deleted file mode 100644 index 8bedfb83246..00000000000 --- a/vcpkg_overlays/arrow/usage-dataset +++ /dev/null @@ -1,3 +0,0 @@ - - find_package(ArrowDataset CONFIG REQUIRED) - target_link_libraries(main PRIVATE "$,ArrowDataset::arrow_dataset_static,ArrowDataset::arrow_dataset_shared>") diff --git a/vcpkg_overlays/arrow/usage-parquet b/vcpkg_overlays/arrow/usage-parquet deleted file mode 100644 index ce04039a64e..00000000000 --- a/vcpkg_overlays/arrow/usage-parquet +++ /dev/null @@ -1,3 +0,0 @@ - - find_package(Parquet CONFIG REQUIRED) - target_link_libraries(main PRIVATE "$,Parquet::parquet_static,Parquet::parquet_shared>") diff --git a/vcpkg_overlays/arrow/utf8proc.patch b/vcpkg_overlays/arrow/utf8proc.patch deleted file mode 100644 index eea9ca59e2e..00000000000 --- a/vcpkg_overlays/arrow/utf8proc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cpp/cmake_modules/Findutf8proc.cmake b/cpp/cmake_modules/Findutf8proc.cmake -index e347414..83f2aa1 100644 ---- a/cpp/cmake_modules/Findutf8proc.cmake -+++ b/cpp/cmake_modules/Findutf8proc.cmake -@@ -30,7 +30,7 @@ if(ARROW_PACKAGE_KIND STREQUAL "vcpkg") - if(utf8proc_FIND_REQUIRED) - list(APPEND find_package_args REQUIRED) - endif() -- find_package(utf8proc NAMES unofficial-utf8proc ${find_package_args}) -+ find_package(utf8proc NAMES unofficial-utf8proc) - if(utf8proc_FOUND) - add_library(utf8proc::utf8proc ALIAS utf8proc) - return() diff --git a/vcpkg_overlays/arrow/vcpkg.json b/vcpkg_overlays/arrow/vcpkg.json deleted file mode 100644 index f467e377153..00000000000 --- a/vcpkg_overlays/arrow/vcpkg.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "arrow", - "version": "13.0.0", - "description": "Cross-language development platform for in-memory analytics", - "homepage": "https://arrow.apache.org", - "license": "Apache-2.0", - "supports": "x64 | (arm64 & !windows)", - "dependencies": [ - "boost-filesystem", - "boost-multiprecision", - "boost-system", - "brotli", - "bzip2", - "gflags", - "lz4", - "openssl", - "re2", - "snappy", - "thrift", - "utf8proc", - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - "xsimd", - "zlib", - "zstd" - ], - "default-features": [ - "csv", - "filesystem", - "json", - "parquet" - ], - "features": { - "acero": { - "description": "Acero support" - }, - "csv": { - "description": "CSV support" - }, - "cuda": { - "description": "cuda support", - "dependencies": [ - "cuda" - ] - }, - "dataset": { - "description": "Dataset support" - }, - "example": { - "description": "Install the minimal example (source code)" - }, - "filesystem": { - "description": "Filesystem support" - }, - "flight": { - "description": "Arrow Flight RPC support", - "dependencies": [ - "abseil", - "c-ares", - "grpc", - "protobuf" - ] - }, - "gcs": { - "description": "GCS support", - "dependencies": [ - { - "name": "google-cloud-cpp", - "default-features": false, - "features": [ - "storage" - ] - } - ] - }, - "jemalloc": { - "description": "jemalloc allocator", - "supports": "!windows" - }, - "json": { - "description": "JSON support", - "dependencies": [ - "rapidjson" - ] - }, - "mimalloc": { - "description": "mimalloc allocator", - "supports": "windows" - }, - "orc": { - "description": "ORC support", - "dependencies": [ - "orc" - ] - }, - "parquet": { - "description": "Parquet support", - "dependencies": [ - "rapidjson" - ] - }, - "s3": { - "description": "S3 support", - "dependencies": [ - { - "name": "aws-sdk-cpp", - "default-features": false, - "features": [ - "cognito-identity", - "config", - "identity-management", - "s3", - "sts", - "transfer" - ] - } - ] - } - } -}