2022-11-12 06:36:32 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
ARCHIVE_PATH
|
|
|
|
URLS "https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/arrow-${VERSION}/apache-arrow-${VERSION}.tar.gz"
|
|
|
|
FILENAME apache-arrow-${VERSION}.tar.gz
|
|
|
|
SHA512 0856cfda98af8ae75d7011b4b2cb7305592dc16edeb27be8a845ee762cd1c4484997634e9bfe3fdc2a359fcfe0cbe036e0747ee0ea49677979920b95d1b4ced3
|
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE_PATH}
|
2017-09-04 09:09:03 +08:00
|
|
|
PATCHES
|
2022-11-12 06:36:32 +08:00
|
|
|
brotli.patch
|
2022-07-28 03:39:30 +08:00
|
|
|
msvc-static-name.patch
|
2022-11-12 06:36:32 +08:00
|
|
|
processor-type.patch
|
|
|
|
thrift.patch
|
|
|
|
utf8proc.patch
|
2017-09-04 09:09:03 +08:00
|
|
|
)
|
|
|
|
|
2020-04-24 04:27:34 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-06-16 07:59:52 +08:00
|
|
|
FEATURES
|
|
|
|
csv ARROW_CSV
|
2022-11-12 06:36:32 +08:00
|
|
|
cuda ARROW_CUDA
|
2021-06-16 07:59:52 +08:00
|
|
|
dataset ARROW_DATASET
|
|
|
|
filesystem ARROW_FILESYSTEM
|
|
|
|
flight ARROW_FLIGHT
|
2022-11-12 06:36:32 +08:00
|
|
|
jemalloc ARROW_JEMALLOC
|
2021-06-16 07:59:52 +08:00
|
|
|
json ARROW_JSON
|
2022-11-12 06:36:32 +08:00
|
|
|
mimalloc ARROW_MIMALLOC
|
2021-06-16 07:59:52 +08:00
|
|
|
orc ARROW_ORC
|
|
|
|
parquet ARROW_PARQUET
|
|
|
|
parquet PARQUET_REQUIRE_ENCRYPTION
|
2022-02-23 04:08:23 +08:00
|
|
|
plasma ARROW_PLASMA
|
2021-06-16 07:59:52 +08:00
|
|
|
s3 ARROW_S3
|
2020-04-24 04:27:34 +08:00
|
|
|
)
|
|
|
|
|
2022-08-06 14:48:36 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DARROW_USE_NATIVE_INT128=OFF")
|
|
|
|
endif()
|
|
|
|
|
2021-06-16 07:59:52 +08:00
|
|
|
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)
|
|
|
|
|
2021-11-19 12:39:34 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-12-09 06:05:15 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}/cpp"
|
2017-12-06 05:01:50 +08:00
|
|
|
OPTIONS
|
2020-04-24 04:27:34 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2019-05-17 09:33:32 +08:00
|
|
|
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED}
|
2021-06-16 07:59:52 +08:00
|
|
|
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC}
|
|
|
|
-DARROW_BUILD_TESTS=OFF
|
|
|
|
-DARROW_DEPENDENCY_SOURCE=SYSTEM
|
|
|
|
-DARROW_DEPENDENCY_USE_SHARED=${ARROW_DEPENDENCY_USE_SHARED}
|
2022-11-12 06:36:32 +08:00
|
|
|
-DARROW_PACKAGE_KIND=vcpkg
|
2022-05-28 04:24:32 +08:00
|
|
|
-DARROW_WITH_BROTLI=ON
|
2020-01-31 22:53:14 +08:00
|
|
|
-DARROW_WITH_BZ2=ON
|
|
|
|
-DARROW_WITH_LZ4=ON
|
|
|
|
-DARROW_WITH_SNAPPY=ON
|
2021-06-16 07:59:52 +08:00
|
|
|
-DARROW_WITH_ZLIB=ON
|
|
|
|
-DARROW_WITH_ZSTD=ON
|
2022-11-12 06:36:32 +08:00
|
|
|
-DBUILD_WARNING_LEVEL=PRODUCTION
|
|
|
|
-DCMAKE_SYSTEM_PROCESSOR=${VCPKG_TARGET_ARCHITECTURE}
|
2021-06-16 07:59:52 +08:00
|
|
|
-DZSTD_MSVC_LIB_PREFIX=
|
2021-12-09 06:05:15 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
ZSTD_MSVC_LIB_PREFIX
|
2017-05-25 07:30:01 +08:00
|
|
|
)
|
|
|
|
|
2021-11-19 12:39:34 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-01-17 02:29:07 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-07-28 03:39:30 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2021-12-09 06:05:15 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib")
|
2019-05-17 09:33:32 +08:00
|
|
|
message(FATAL_ERROR "Installed lib file should be named 'arrow.lib' via patching the upstream build.")
|
2017-06-10 10:34:32 +08:00
|
|
|
endif()
|
2017-05-25 07:30:01 +08:00
|
|
|
|
2022-11-12 06:36:32 +08:00
|
|
|
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)
|
2019-05-17 09:33:32 +08:00
|
|
|
|
2022-01-08 05:57:16 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2022-07-28 03:39:30 +08:00
|
|
|
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()
|
2022-01-08 05:57:16 +08:00
|
|
|
|
2022-07-28 03:39:30 +08:00
|
|
|
if("example" IN_LIST FEATURES)
|
|
|
|
file(INSTALL "${SOURCE_PATH}/cpp/examples/minimal_build/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/example")
|
|
|
|
endif()
|
2021-10-28 06:19:28 +08:00
|
|
|
|
2022-11-12 06:36:32 +08:00
|
|
|
if("plasma" IN_LIST FEATURES)
|
2022-02-23 04:08:23 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES plasma-store-server AUTO_CLEAN)
|
2022-11-12 06:36:32 +08:00
|
|
|
endif()
|
2022-02-23 04:08:23 +08:00
|
|
|
|
2022-07-28 03:39:30 +08:00
|
|
|
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")
|