Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 72 additions & 24 deletions ports/arrow/fix-dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index b5a39bf33..af1e16a9b 100644
index ba8c36e81..eac441dee 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -668,7 +668,7 @@ endif()
@@ -689,7 +689,7 @@ endif()

if(ARROW_WITH_BROTLI)
# Order is important for static linking
Expand All @@ -11,7 +11,7 @@ index b5a39bf33..af1e16a9b 100644
list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS})
list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS})
if(Brotli_SOURCE STREQUAL "SYSTEM")
@@ -684,9 +684,9 @@ if(ARROW_WITH_BZ2)
@@ -705,9 +705,9 @@ if(ARROW_WITH_BZ2)
endif()

if(ARROW_WITH_LZ4)
Expand All @@ -23,7 +23,7 @@ index b5a39bf33..af1e16a9b 100644
endif()
endif()

@@ -735,10 +735,10 @@ if(ARROW_S3)
@@ -764,10 +764,10 @@ if(ARROW_S3)
endif()

if(ARROW_WITH_UTF8PROC)
Expand All @@ -38,7 +38,7 @@ index b5a39bf33..af1e16a9b 100644
endif()

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index e6852d9c2..fc0973ffa 100644
index 673a58eed..8c2c1e2fb 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -53,7 +53,7 @@ set(ARROW_THIRDPARTY_DEPENDENCIES
Expand All @@ -50,7 +50,7 @@ index e6852d9c2..fc0973ffa 100644
BZip2
c-ares
gflags
@@ -61,14 +61,14 @@ set(ARROW_THIRDPARTY_DEPENDENCIES
@@ -62,14 +62,14 @@ set(ARROW_THIRDPARTY_DEPENDENCIES
gRPC
GTest
LLVM
Expand All @@ -67,7 +67,26 @@ index e6852d9c2..fc0973ffa 100644
xsimd
ZLIB
zstd)
@@ -945,7 +945,7 @@ macro(build_snappy)
@@ -872,17 +872,7 @@ set(Boost_ADDITIONAL_VERSIONS
# so we first need to determine whether we're building it
if(ARROW_WITH_THRIFT AND Thrift_SOURCE STREQUAL "AUTO")
find_package(Thrift 0.11.0 MODULE COMPONENTS ${ARROW_THRIFT_REQUIRED_COMPONENTS})
- if(Thrift_FOUND)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we set THRIFT_SOURCE to BUNDLED rather than patching this?

Will BUNDLED end up trying to use a vendored copy of thrift that might conflict with what other vcpkg ports are using?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will BUNDLED end up trying to use a vendored copy of thrift that might conflict with what other vcpkg ports are using?

Yes, that is the concern. We need to do some testing to investigate this further before making the change. I opened #21821 for the arrow port maintainers to investigate this. If it's OK with the vcpkg maintainers, we would prefer to address this after this PR is merged.

- find_package(PkgConfig QUIET)
- pkg_check_modules(THRIFT_PC
- thrift
- NO_CMAKE_PATH
- NO_CMAKE_ENVIRONMENT_PATH
- QUIET)
- if(THRIFT_PC_FOUND)
- string(APPEND ARROW_PC_REQUIRES_PRIVATE " thrift")
- endif()
- else()
+ if(NOT Thrift_FOUND AND NOT THRIFT_FOUND)
set(Thrift_SOURCE "BUNDLED")
endif()
endif()
@@ -991,7 +981,7 @@ macro(build_snappy)
endmacro()

if(ARROW_WITH_SNAPPY)
Expand All @@ -76,7 +95,7 @@ index e6852d9c2..fc0973ffa 100644
if(${Snappy_SOURCE} STREQUAL "SYSTEM" AND NOT snappy_PC_FOUND)
get_target_property(SNAPPY_LIB Snappy::snappy IMPORTED_LOCATION)
string(APPEND ARROW_PC_LIBS_PRIVATE " ${SNAPPY_LIB}")
@@ -1014,10 +1014,16 @@ macro(build_brotli)
@@ -1061,10 +1051,16 @@ macro(build_brotli)
endmacro()

if(ARROW_WITH_BROTLI)
Expand All @@ -96,7 +115,7 @@ index e6852d9c2..fc0973ffa 100644
include_directories(SYSTEM ${BROTLI_INCLUDE_DIR})
endif()

@@ -1133,7 +1139,7 @@ macro(build_glog)
@@ -1181,7 +1177,7 @@ macro(build_glog)
endmacro()

if(ARROW_USE_GLOG)
Expand All @@ -105,7 +124,7 @@ index e6852d9c2..fc0973ffa 100644
# TODO: Don't use global includes but rather target_include_directories
get_target_property(GLOG_INCLUDE_DIR glog::glog INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${GLOG_INCLUDE_DIR})
@@ -1206,8 +1212,7 @@ endmacro()
@@ -1255,8 +1251,7 @@ endmacro()
if(ARROW_NEED_GFLAGS)
set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0")
resolve_dependency(gflags
Expand All @@ -115,23 +134,42 @@ index e6852d9c2..fc0973ffa 100644
REQUIRED_VERSION
${ARROW_GFLAGS_REQUIRED_VERSION}
IS_RUNTIME_DEPENDENCY
@@ -1309,6 +1314,7 @@ if(ARROW_WITH_THRIFT)
if(NOT Thrift_FOUND AND NOT THRIFT_FOUND)
@@ -1355,9 +1350,10 @@ endmacro()
if(ARROW_WITH_THRIFT)
# We already may have looked for Thrift earlier, when considering whether
# to build Boost, so don't look again if already found.
- if(NOT Thrift_FOUND)
+ if(TRUE)
# Thrift c++ code generated by 0.13 requires 0.11 or greater
resolve_dependency(Thrift
+ USE_CONFIG TRUE
REQUIRED_VERSION
0.11.0
PC_PACKAGE_NAMES
@@ -1413,6 +1419,7 @@ if(ARROW_WITH_PROTOBUF)
@@ -1366,6 +1362,14 @@ if(ARROW_WITH_THRIFT)
# TODO: Don't use global includes but rather target_include_directories
include_directories(SYSTEM ${THRIFT_INCLUDE_DIR})

+ if(THRIFT_INCLUDE_DIR)
+ file(READ "${THRIFT_INCLUDE_DIR}/config.h" THRIFT_CONFIG_H_CONTENT)
+ string(REGEX MATCH "#define PACKAGE_VERSION \"[0-9.]+\"" THRIFT_VERSION_DEFINITION
+ "${THRIFT_CONFIG_H_CONTENT}")
+ string(REGEX MATCH "[0-9.]+" THRIFT_VERSION "${THRIFT_VERSION_DEFINITION}")
+ set(THRIFT_VERSION "${THRIFT_VERSION}")
+ endif()
+
string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION})
list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR)
list(GET VERSION_LIST 1 THRIFT_VERSION_MINOR)
@@ -1480,6 +1484,7 @@ if(ARROW_WITH_PROTOBUF)
set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1")
endif()
resolve_dependency(Protobuf
+ USE_CONFIG TRUE
REQUIRED_VERSION
${ARROW_PROTOBUF_REQUIRED_VERSION}
PC_PACKAGE_NAMES
@@ -1423,6 +1430,10 @@ if(ARROW_WITH_PROTOBUF)
@@ -1490,6 +1495,10 @@ if(ARROW_WITH_PROTOBUF)
endif()

# TODO: Don't use global includes but rather target_include_directories
Expand All @@ -142,7 +180,7 @@ index e6852d9c2..fc0973ffa 100644
include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR})

if(TARGET arrow::protobuf::libprotobuf)
@@ -1471,12 +1482,18 @@ if(ARROW_WITH_PROTOBUF)
@@ -1538,12 +1547,18 @@ if(ARROW_WITH_PROTOBUF)

# Log protobuf paths as we often see issues with mixed sources for
# the libraries and protoc.
Expand All @@ -161,7 +199,7 @@ index e6852d9c2..fc0973ffa 100644
message(STATUS "Found libprotobuf: ${PROTOBUF_LIBRARY}")
message(STATUS "Found protobuf headers: ${PROTOBUF_INCLUDE_DIR}")
endif()
@@ -1889,7 +1906,7 @@ endmacro()
@@ -1954,7 +1969,7 @@ endmacro()
if(ARROW_WITH_RAPIDJSON)
set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0")
resolve_dependency(RapidJSON
Expand All @@ -170,7 +208,7 @@ index e6852d9c2..fc0973ffa 100644
TRUE
REQUIRED_VERSION
${ARROW_RAPIDJSON_REQUIRED_VERSION}
@@ -2024,10 +2041,11 @@ macro(build_lz4)
@@ -2093,10 +2108,11 @@ macro(build_lz4)
endmacro()

if(ARROW_WITH_LZ4)
Expand All @@ -184,7 +222,7 @@ index e6852d9c2..fc0973ffa 100644
include_directories(SYSTEM ${LZ4_INCLUDE_DIR})
endif()

@@ -2090,7 +2108,7 @@ endmacro()
@@ -2160,7 +2176,7 @@ endmacro()
if(ARROW_WITH_ZSTD)
# ARROW-13384: ZSTD_minCLevel was added in v1.4.0, required by ARROW-13091
resolve_dependency(zstd
Expand All @@ -193,7 +231,7 @@ index e6852d9c2..fc0973ffa 100644
libzstd
REQUIRED_VERSION
1.4.0)
@@ -2262,9 +2280,8 @@ macro(build_utf8proc)
@@ -2343,9 +2359,8 @@ macro(build_utf8proc)
endmacro()

if(ARROW_WITH_UTF8PROC)
Expand All @@ -205,7 +243,7 @@ index e6852d9c2..fc0973ffa 100644
PC_PACKAGE_NAMES
libutf8proc)

@@ -2272,7 +2289,7 @@ if(ARROW_WITH_UTF8PROC)
@@ -2353,7 +2368,7 @@ if(ARROW_WITH_UTF8PROC)

# TODO: Don't use global definitions but rather
# target_compile_definitions or target_link_libraries
Expand All @@ -214,7 +252,7 @@ index e6852d9c2..fc0973ffa 100644
INTERFACE_COMPILER_DEFINITIONS)
if(UTF8PROC_COMPILER_DEFINITIONS)
add_definitions(-D${UTF8PROC_COMPILER_DEFINITIONS})
@@ -2280,7 +2297,7 @@ if(ARROW_WITH_UTF8PROC)
@@ -2361,7 +2376,7 @@ if(ARROW_WITH_UTF8PROC)

# TODO: Don't use global includes but rather
# target_include_directories or target_link_libraries
Expand All @@ -223,7 +261,7 @@ index e6852d9c2..fc0973ffa 100644
INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${UTF8PROC_INCLUDE_DIR})
endif()
@@ -2335,7 +2352,7 @@ endmacro()
@@ -3270,7 +3285,7 @@ endmacro()

macro(build_grpc)
resolve_dependency(c-ares
Expand All @@ -232,7 +270,7 @@ index e6852d9c2..fc0973ffa 100644
TRUE
PC_PACKAGE_NAMES
libcares)
@@ -2600,7 +2617,7 @@ endmacro()
@@ -3493,7 +3508,7 @@ endmacro()
if(ARROW_WITH_GRPC)
set(ARROW_GRPC_REQUIRED_VERSION "1.17.0")
resolve_dependency(gRPC
Expand All @@ -241,7 +279,7 @@ index e6852d9c2..fc0973ffa 100644
TRUE
REQUIRED_VERSION
${ARROW_GRPC_REQUIRED_VERSION}
@@ -2610,6 +2627,10 @@ if(ARROW_WITH_GRPC)
@@ -3503,6 +3518,10 @@ if(ARROW_WITH_GRPC)
# TODO: Don't use global includes but rather target_include_directories
get_target_property(GRPC_INCLUDE_DIR gRPC::grpc++ INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${GRPC_INCLUDE_DIR})
Expand All @@ -252,6 +290,16 @@ index e6852d9c2..fc0973ffa 100644

if(GRPC_VENDORED)
set(GRPCPP_PP_INCLUDE TRUE)
@@ -4019,7 +4038,8 @@ if(ARROW_S3)
s3
transfer
identity-management
- sts)
+ sts
+ CONFIG)
endif()

# Restore previous value of BUILD_SHARED_LIBS
diff --git a/cpp/src/arrow/adapters/orc/CMakeLists.txt b/cpp/src/arrow/adapters/orc/CMakeLists.txt
index ca901b07d..4512a175f 100644
--- a/cpp/src/arrow/adapters/orc/CMakeLists.txt
Expand Down
48 changes: 27 additions & 21 deletions ports/arrow/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/arrow
REF apache-arrow-5.0.0
SHA512 68f4377f654423e7ea47c8c0170ddb030d0b020b936ec435854e216392e6515d870287f410d0acd48b36dcfec61be4c4a95794857f1d91c66745f3c6ed748034
REF apache-arrow-6.0.0
SHA512 a5f89085f06a52c85ed9aadd5deee5988c28ab2abd775bb22b9c26efb99429ad3dead7e1976777c3fa159b8c07b536c04eac43fa81e655f40c08c07ba12f8b8b
HEAD_REF master
PATCHES
all.patch
fix-dependencies.patch
)

file(REMOVE ${SOURCE_PATH}/cpp/cmake_modules/Findzstd.cmake
${SOURCE_PATH}/cpp/cmake_modules/FindBrotli.cmake
${SOURCE_PATH}/cpp/cmake_modules/Find-c-aresAlt.cmake
${SOURCE_PATH}/cpp/cmake_modules/FindLz4.cmake
${SOURCE_PATH}/cpp/cmake_modules/FindSnappy.cmake
${SOURCE_PATH}/cpp/cmake_modules/FindThrift.cmake
${SOURCE_PATH}/cpp/cmake_modules/FindGLOG.cmake
${SOURCE_PATH}/cpp/cmake_modules/Findutf8proc.cmake
${SOURCE_PATH}/cpp/cmake_modules/FindRapidJSONAlt.cmake
${SOURCE_PATH}/cpp/cmake_modules/FindgRPCAlt.cmake
${SOURCE_PATH}/cpp/cmake_modules/FindgflagsAlt.cmake
file(REMOVE "${SOURCE_PATH}/cpp/cmake_modules/Findzstd.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindBrotli.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/Find-c-aresAlt.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindLz4.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindSnappy.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindThrift.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindGLOG.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/Findutf8proc.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindRapidJSONAlt.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindgRPCAlt.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindgflagsAlt.cmake"
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down Expand Up @@ -59,12 +59,16 @@ else()
set(THRIFT_USE_SHARED ${ARROW_DEPENDENCY_USE_SHARED})
endif()

if(ARROW_S3)
Comment thread
ianmcook marked this conversation as resolved.
Outdated
set(S3_OPTIONS -DAWSSDK_ROOT_DIR="${CURRENT_PACKAGES_DIR}" -DAWSSDK_INSTALL_AS_SHARED_LIBS=OFF)
Comment thread
ianmcook marked this conversation as resolved.
Outdated
endif()

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}/cpp
PREFER_NINJA
SOURCE_PATH "${SOURCE_PATH}/cpp"
OPTIONS
${FEATURE_OPTIONS}
${MALLOC_OPTIONS}
${S3_OPTIONS}
-DCMAKE_SYSTEM_PROCESSOR=${VCPKG_TARGET_ARCHITECTURE}
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED}
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC}
Expand All @@ -80,24 +84,26 @@ vcpkg_cmake_configure(
-DARROW_WITH_ZLIB=ON
-DARROW_WITH_ZSTD=ON
-DZSTD_MSVC_LIB_PREFIX=
MAYBE_UNUSED_VARIABLES
ZSTD_MSVC_LIB_PREFIX
)

vcpkg_cmake_install()

vcpkg_copy_pdbs()

if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib)
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()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/arrow)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake")

file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

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")

vcpkg_fixup_pkgconfig()
3 changes: 1 addition & 2 deletions ports/arrow/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "arrow",
"version": "5.0.0",
"port-version": 2,
"version": "6.0.0",
"description": "Cross-language development platform for in-memory analytics",
"homepage": "https://arrow.apache.org",
"supports": "x64 | (arm64 & !windows)",
Expand Down
6 changes: 3 additions & 3 deletions versions/a-/arrow.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"versions": [
{
"git-tree": "8a30c7d6553216924aa3a3957ceb87d0fda39592",
"version": "5.0.0",
"port-version": 2
"git-tree": "6c3d306ac3d08f5ce9b9443f741e656cfe24e5ec",
"version": "6.0.0",
"port-version": 0
},
{
"git-tree": "79938475d53bb40ad7bf8d0fbda9e65f7630dde7",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@
"port-version": 0
},
"arrow": {
"baseline": "5.0.0",
"port-version": 2
"baseline": "6.0.0",
"port-version": 0
},
"ashes": {
"baseline": "2021-06-18",
Expand Down