[arrow] update to 11.0.0 (#30511)

Co-authored-by: Jim Wang (Beyondsoft Corporation) <v-wangjim@microsoft.com>
This commit is contained in:
jim wang 2023-04-12 14:18:19 +08:00 committed by GitHub
parent aebac86646
commit b81b6e497a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 39 additions and 248 deletions

View File

@ -1,28 +0,0 @@
diff --git a/cpp/cmake_modules/FindBrotli.cmake b/cpp/cmake_modules/FindBrotli.cmake
index 4053b79ca7..bdca85fab4 100644
--- a/cpp/cmake_modules/FindBrotli.cmake
+++ b/cpp/cmake_modules/FindBrotli.cmake
@@ -21,6 +21,23 @@ if(Brotli_FOUND)
return()
endif()
+if(ARROW_PACAKGE_KIND STREQUAL "vcpkg")
+ set(find_package_args "")
+ if(Brotli_FIND_VERSION)
+ list(APPEND find_package_args ${Brotli_FIND_VERSION})
+ endif()
+ if(Brotli_FIND_QUIETLY)
+ list(APPEND find_package_args QUIET)
+ endif()
+ find_package(Brotli NAMES unofficial-brotli ${find_package_args})
+ if(Brotli_FOUND)
+ add_library(Brotli::brotlicommon ALIAS unofficial::brotli::brotlicommon)
+ add_library(Brotli::brotlienc ALIAS unofficial::brotli::brotlienc)
+ add_library(Brotli::brotlidec ALIAS unofficial::brotli::brotlidec)
+ return()
+ endif()
+endif()
+
if(ARROW_BROTLI_USE_SHARED)
set(BROTLI_COMMON_LIB_NAMES
brotlicommon

View File

@ -1,29 +0,0 @@
diff --git a/cpp/src/arrow/dataset/CMakeLists.txt b/cpp/src/arrow/dataset/CMakeLists.txt
index b80370e63985..04f80ab6d1b3 100644
--- a/cpp/src/arrow/dataset/CMakeLists.txt
+++ b/cpp/src/arrow/dataset/CMakeLists.txt
@@ -31,6 +31,12 @@ set(ARROW_DATASET_SRCS
scanner.cc
scan_node.cc)
+if(ARROW_PARQUET)
+ set(ARROW_DATASET_PKG_CONFIG_REQUIRES parquet)
+else()
+ set(ARROW_DATASET_PKG_CONFIG_REQUIRES arrow)
+endif()
+
set(ARROW_DATASET_STATIC_LINK_LIBS)
set(ARROW_DATASET_SHARED_LINK_LIBS)
set(ARROW_DATASET_STATIC_INSTALL_INTERFACE_LIBS)
diff --git a/cpp/src/arrow/dataset/arrow-dataset.pc.in b/cpp/src/arrow/dataset/arrow-dataset.pc.in
index 3e474e3825c5..d587fd110c08 100644
--- a/cpp/src/arrow/dataset/arrow-dataset.pc.in
+++ b/cpp/src/arrow/dataset/arrow-dataset.pc.in
@@ -22,6 +22,6 @@ libdir=@ARROW_PKG_CONFIG_LIBDIR@
Name: Apache Arrow Dataset
Description: Apache Arrow Dataset provides an API to read and write semantic datasets stored in different locations and formats.
Version: @ARROW_VERSION@
-Requires: arrow parquet
+Requires: @ARROW_DATASET_PKG_CONFIG_REQUIRES@
Libs: -L${libdir} -larrow_dataset
Cflags.private: -DARROW_DS_STATIC

View File

@ -1,100 +0,0 @@
From 109a40a12019e28ecd60bbf9210f9c949c827d31 Mon Sep 17 00:00:00 2001
From: Luke Elliott <luke.b.elliott@gmail.com>
Date: Wed, 7 Dec 2022 11:57:57 +0000
Subject: [PATCH] GH-14869: [C++] Add Cflags.private defining <lib>_STATIC to
<lib>.pc.in.
Required for Windows usage of static builds via vcpkg & pkgconfig.
---
cpp/src/arrow/arrow-testing.pc.in | 1 +
cpp/src/arrow/arrow.pc.in | 1 +
cpp/src/arrow/dataset/arrow-dataset.pc.in | 1 +
cpp/src/arrow/engine/arrow-substrait.pc.in | 1 +
cpp/src/arrow/flight/arrow-flight.pc.in | 1 +
cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in | 1 +
cpp/src/gandiva/gandiva.pc.in | 1 +
cpp/src/parquet/parquet.pc.in | 1 +
python/pyarrow/src/arrow-python.pc.in | 1 +
9 files changed, 9 insertions(+)
diff --git a/cpp/src/arrow/arrow-testing.pc.in b/cpp/src/arrow/arrow-testing.pc.in
index 5a991e796d83..9a452a5d113f 100644
--- a/cpp/src/arrow/arrow-testing.pc.in
+++ b/cpp/src/arrow/arrow-testing.pc.in
@@ -27,3 +27,4 @@ Version: @ARROW_VERSION@
Requires: arrow
Libs: -L${libdir} -larrow_testing
Cflags: -I${gtest_includedir}
+Cflags.private: -DARROW_TESTING_STATIC
diff --git a/cpp/src/arrow/arrow.pc.in b/cpp/src/arrow/arrow.pc.in
index 3a5710ab6b88..90c98bf32b2b 100644
--- a/cpp/src/arrow/arrow.pc.in
+++ b/cpp/src/arrow/arrow.pc.in
@@ -30,3 +30,4 @@ Requires.private:@ARROW_PC_REQUIRES_PRIVATE@
Libs: -L${libdir} -larrow
Libs.private:@ARROW_PC_LIBS_PRIVATE@
Cflags: -I${includedir}
+Cflags.private: -DARROW_STATIC
diff --git a/cpp/src/arrow/dataset/arrow-dataset.pc.in b/cpp/src/arrow/dataset/arrow-dataset.pc.in
index 7c433321c135..3e474e3825c5 100644
--- a/cpp/src/arrow/dataset/arrow-dataset.pc.in
+++ b/cpp/src/arrow/dataset/arrow-dataset.pc.in
@@ -24,3 +24,4 @@ Description: Apache Arrow Dataset provides an API to read and write semantic dat
Version: @ARROW_VERSION@
Requires: arrow parquet
Libs: -L${libdir} -larrow_dataset
+Cflags.private: -DARROW_DS_STATIC
diff --git a/cpp/src/arrow/engine/arrow-substrait.pc.in b/cpp/src/arrow/engine/arrow-substrait.pc.in
index 77ac510933f5..173e1c91efd8 100644
--- a/cpp/src/arrow/engine/arrow-substrait.pc.in
+++ b/cpp/src/arrow/engine/arrow-substrait.pc.in
@@ -24,3 +24,4 @@ Description: Apache Arrow's Substrait Consumer.
Version: @ARROW_VERSION@
Requires: arrow
Libs: -L${libdir} -larrow_substrait
+Cflags.private: -DARROW_ENGINE_STATIC
diff --git a/cpp/src/arrow/flight/arrow-flight.pc.in b/cpp/src/arrow/flight/arrow-flight.pc.in
index 955fc19b0df4..5a57a8922377 100644
--- a/cpp/src/arrow/flight/arrow-flight.pc.in
+++ b/cpp/src/arrow/flight/arrow-flight.pc.in
@@ -24,3 +24,4 @@ Description: Apache Arrow's RPC system built on gRPC
Version: @ARROW_VERSION@
Requires: arrow
Libs: -L${libdir} -larrow_flight
+Cflags.private: -DARROW_FLIGHT_STATIC
diff --git a/cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in b/cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in
index 4f8398bdd259..b76964b97c89 100644
--- a/cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in
+++ b/cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in
@@ -24,3 +24,4 @@ Description: Apache Arrow Flight SQL extension
Version: @ARROW_VERSION@
Requires: arrow-flight
Libs: -L${libdir} -larrow_flight_sql
+Cflags.private: -DARROW_FLIGHT_SQL_STATIC
diff --git a/cpp/src/gandiva/gandiva.pc.in b/cpp/src/gandiva/gandiva.pc.in
index 60034c285790..49260092d297 100644
--- a/cpp/src/gandiva/gandiva.pc.in
+++ b/cpp/src/gandiva/gandiva.pc.in
@@ -25,3 +25,4 @@ Version: @GANDIVA_VERSION@
Requires: arrow
Libs: -L${libdir} -lgandiva
Cflags: -I${includedir}
+Cflags.private: -DGANDIVA_STATIC
diff --git a/cpp/src/parquet/parquet.pc.in b/cpp/src/parquet/parquet.pc.in
index e510bb1d6bfc..b992eba81998 100644
--- a/cpp/src/parquet/parquet.pc.in
+++ b/cpp/src/parquet/parquet.pc.in
@@ -29,3 +29,4 @@ Version: @ARROW_VERSION@
Requires: arrow
Libs: -L${libdir} -lparquet
Cflags: -I${includedir}
+Cflags.private: -DPARQUET_STATIC
diff --git a/python/pyarrow/src/arrow-python.pc.in b/python/pyarrow/src/arrow-python.pc.in
index c077c7dc84c3..0efd0ad98309 100644
--- a/python/pyarrow/src/arrow-python.pc.in
+++ b/python/pyarrow/src/arrow-python.pc.in
@@ -25,3 +25,4 @@ Version: @ARROW_VERSION@
Requires: arrow
Libs: -L${libdir} -larrow_python
Cflags: -I${includedir} -I@PYTHON_INCLUDE_DIRS@
+Cflags.private: -DARROW_PYTHON_STATIC

View File

@ -2,18 +2,15 @@ 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 c6198e5c9b8fe5ccd89e445c9252da44d8d7c9e0c8eb5a802fa0cabf89482fddf775ed383bac1acc9331bc3195d21df7ea02c4a73aa6ee163c2959f34175d650
SHA512 46df4fb5a703d38d0a74fde9838e9f9702b24b442cb225517516c335a5ab18955699000bf0b2fc7d1698ada6d2e890ba3860933b6280f5160b0fce8a07484d0e
)
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE ${ARCHIVE_PATH}
PATCHES
brotli.patch
msvc-static-name.patch
thrift.patch
utf8proc.patch
fix-pkgconfig-windows.patch # needed for fix-dataset.patch (https://github.com/apache/arrow/pull/14900)
fix-dataset.patch # https://github.com/apache/arrow/pull/33665
thrift.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@ -1,62 +1,22 @@
diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThriftAlt.cmake
similarity index 91%
rename from cpp/cmake_modules/FindThrift.cmake
rename to cpp/cmake_modules/FindThriftAlt.cmake
index 2f20a5cb59..e317e2c7c4 100644
--- a/cpp/cmake_modules/FindThrift.cmake
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
@@ -28,7 +28,23 @@
# thrift::thrift, a library target to use Thrift
# thrift::compiler, a executable target to use Thrift compiler
+if(ThriftAlt_FOUND)
+ return()
+endif()
@@ -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()
+
+set(find_package_args "")
+if(ThriftAlt_FIND_VERSION)
+ list(APPEND find_package_args ${ThriftAlt_FIND_VERSION})
+endif()
+if(ThriftAlt_FIND_QUIETLY)
+ list(APPEND find_package_args QUIET)
+endif()
+find_package(Thrift ${find_package_args})
if(Thrift_FOUND)
+ set(ThriftAlt_FOUND TRUE)
+ add_executable(thrift::compiler IMPORTED)
+ set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION
+ "${THRIFT_COMPILER}")
return()
endif()
@@ -133,12 +149,12 @@ else()
endif()
find_package_handle_standard_args(
- Thrift
+ ThriftAlt
REQUIRED_VARS THRIFT_LIB THRIFT_INCLUDE_DIR
VERSION_VAR Thrift_VERSION
HANDLE_COMPONENTS)
-if(Thrift_FOUND)
+if(ThriftAlt_FOUND)
if(ARROW_THRIFT_USE_SHARED)
add_library(thrift::thrift SHARED IMPORTED)
else()
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index b7cd31f3d7..72b8cfe286 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1510,8 +1510,10 @@ macro(build_thrift)
endmacro()
if(ARROW_WITH_THRIFT)
- # Thrift c++ code generated by 0.13 requires 0.11 or greater
+ # Thrift C++ code generated by 0.13 requires 0.11 or greater
resolve_dependency(Thrift
+ HAVE_ALT
+ TRUE
REQUIRED_VERSION
0.11.0
PC_PACKAGE_NAMES
function(extract_thrift_version)
if(ThriftAlt_INCLUDE_DIR)

View File

@ -1,26 +1,13 @@
diff --git a/cpp/cmake_modules/Findutf8proc.cmake b/cpp/cmake_modules/Findutf8proc.cmake
index 2f0f59a02c..f5382a8f21 100644
index e347414..83f2aa1 100644
--- a/cpp/cmake_modules/Findutf8proc.cmake
+++ b/cpp/cmake_modules/Findutf8proc.cmake
@@ -19,6 +19,21 @@ if(utf8proc_FOUND)
return()
endif()
+if(ARROW_PACAKGE_KIND STREQUAL "vcpkg")
+ set(find_package_args "")
+ if(utf8proc_FIND_VERSION)
+ list(APPEND find_package_args ${utf8proc_FIND_VERSION})
+ endif()
+ if(utf8proc_FIND_QUIETLY)
+ list(APPEND find_package_args QUIET)
+ endif()
+ find_package(utf8proc NAMES unofficial-utf8proc ${find_package_args})
+ if(utf8proc_FOUND)
+ add_library(utf8proc::utf8proc ALIAS utf8proc)
+ return()
+ endif()
+endif()
+
function(extract_utf8proc_version)
if(utf8proc_INCLUDE_DIR)
file(READ "${utf8proc_INCLUDE_DIR}/utf8proc.h" UTF8PROC_H_CONTENT)
@@ -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()

View File

@ -1,7 +1,6 @@
{
"name": "arrow",
"version": "10.0.1",
"port-version": 4,
"version": "11.0.0",
"description": "Cross-language development platform for in-memory analytics",
"homepage": "https://arrow.apache.org",
"license": "Apache-2.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "21fea47a1e9c7bf68e6c088ad5a6b7b6e33c2fcb",
"version": "11.0.0",
"port-version": 0
},
{
"git-tree": "04944a4d39fe590b7fed071475502fa8bcfe5a27",
"version": "10.0.1",

View File

@ -217,8 +217,8 @@
"port-version": 4
},
"arrow": {
"baseline": "10.0.1",
"port-version": 4
"baseline": "11.0.0",
"port-version": 0
},
"arsenalgear": {
"baseline": "2.1.0",