2022-11-12 06:36:32 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
ARCHIVE_PATH
|
2023-02-03 07:46:55 +08:00
|
|
|
URLS "https://archive.apache.org/dist/arrow/arrow-${VERSION}/apache-arrow-${VERSION}.tar.gz"
|
2022-11-12 06:36:32 +08:00
|
|
|
FILENAME apache-arrow-${VERSION}.tar.gz
|
2024-07-31 05:56:36 +08:00
|
|
|
SHA512 4e2a617b8deeb9f94ee085653a721904a75696f0827bcba82b535cc7f4f723066a09914c7fa83c593e51a8a4031e8bf99e563cac1ebb1d89604cb406975d4864
|
2022-11-12 06:36:32 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE_PATH}
|
2017-09-04 09:09:03 +08:00
|
|
|
PATCHES
|
2024-04-02 06:30:49 +08:00
|
|
|
android.patch
|
2022-07-28 03:39:30 +08:00
|
|
|
msvc-static-name.patch
|
2022-11-12 06:36:32 +08:00
|
|
|
utf8proc.patch
|
2023-04-12 14:18:19 +08:00
|
|
|
thrift.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
|
2023-05-11 03:31:11 +08:00
|
|
|
acero ARROW_ACERO
|
2023-12-07 07:50:13 +08:00
|
|
|
compute ARROW_COMPUTE
|
2021-06-16 07:59:52 +08:00
|
|
|
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
|
2024-01-18 03:13:28 +08:00
|
|
|
flightsql ARROW_FLIGHT_SQL
|
2022-11-29 08:13:26 +08:00
|
|
|
gcs ARROW_GCS
|
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
|
|
|
|
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-12-14 10:09:53 +08:00
|
|
|
if("dataset" IN_LIST FEATURES)
|
|
|
|
vcpkg_cmake_config_fixup(
|
|
|
|
PACKAGE_NAME arrowdataset
|
|
|
|
CONFIG_PATH lib/cmake/ArrowDataset
|
|
|
|
DO_NOT_DELETE_PARENT_CONFIG_PATH
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2023-06-07 05:53:23 +08:00
|
|
|
if("acero" IN_LIST FEATURES)
|
|
|
|
vcpkg_cmake_config_fixup(
|
|
|
|
PACKAGE_NAME arrowacero
|
|
|
|
CONFIG_PATH lib/cmake/ArrowAcero
|
|
|
|
DO_NOT_DELETE_PARENT_CONFIG_PATH
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2023-09-27 11:37:01 +08:00
|
|
|
if("flight" IN_LIST FEATURES)
|
|
|
|
vcpkg_cmake_config_fixup(
|
|
|
|
PACKAGE_NAME ArrowFlight
|
|
|
|
CONFIG_PATH lib/cmake/ArrowFlight
|
|
|
|
DO_NOT_DELETE_PARENT_CONFIG_PATH
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2024-01-18 03:13:28 +08:00
|
|
|
if("flightsql" IN_LIST FEATURES)
|
|
|
|
vcpkg_cmake_config_fixup(
|
|
|
|
PACKAGE_NAME ArrowFlightSql
|
|
|
|
CONFIG_PATH lib/cmake/ArrowFlightSql
|
|
|
|
DO_NOT_DELETE_PARENT_CONFIG_PATH
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
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()
|
2023-06-07 05:53:23 +08:00
|
|
|
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()
|
2022-01-08 05:57:16 +08:00
|
|
|
|
2023-09-27 11:37:01 +08:00
|
|
|
if("flight" IN_LIST FEATURES)
|
|
|
|
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-flight" usage-flight)
|
|
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-flight}")
|
|
|
|
endif()
|
|
|
|
|
2024-01-18 03:13:28 +08:00
|
|
|
if("flightsql" IN_LIST FEATURES)
|
|
|
|
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-flightsql" usage-flightsql)
|
|
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-flightsql}")
|
|
|
|
endif()
|
|
|
|
|
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-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")
|
|
|
|
|
2024-01-17 02:58:08 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|