From 9a469723aee0873241d055b1345d8e21b445071c Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Mon, 16 Jan 2023 21:53:41 +0100 Subject: [PATCH] [arrow] Fix dataset feature (#28969) --- ports/arrow/fix-dataset.patch | 29 +++++++ ports/arrow/fix-pkgconfig-windows.patch | 100 ++++++++++++++++++++++++ ports/arrow/portfile.cmake | 2 + ports/arrow/vcpkg.json | 2 +- versions/a-/arrow.json | 5 ++ versions/baseline.json | 2 +- 6 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 ports/arrow/fix-dataset.patch create mode 100644 ports/arrow/fix-pkgconfig-windows.patch diff --git a/ports/arrow/fix-dataset.patch b/ports/arrow/fix-dataset.patch new file mode 100644 index 0000000000..24e2972154 --- /dev/null +++ b/ports/arrow/fix-dataset.patch @@ -0,0 +1,29 @@ +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 diff --git a/ports/arrow/fix-pkgconfig-windows.patch b/ports/arrow/fix-pkgconfig-windows.patch new file mode 100644 index 0000000000..eaef423bc4 --- /dev/null +++ b/ports/arrow/fix-pkgconfig-windows.patch @@ -0,0 +1,100 @@ +From 109a40a12019e28ecd60bbf9210f9c949c827d31 Mon Sep 17 00:00:00 2001 +From: Luke Elliott +Date: Wed, 7 Dec 2022 11:57:57 +0000 +Subject: [PATCH] GH-14869: [C++] Add Cflags.private defining _STATIC to + .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 diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index fa097c136b..fd835238b9 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -12,6 +12,8 @@ vcpkg_extract_source_archive( 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 ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS diff --git a/ports/arrow/vcpkg.json b/ports/arrow/vcpkg.json index ac5bfcb364..d9df755a89 100644 --- a/ports/arrow/vcpkg.json +++ b/ports/arrow/vcpkg.json @@ -1,7 +1,7 @@ { "name": "arrow", "version": "10.0.1", - "port-version": 2, + "port-version": 3, "description": "Cross-language development platform for in-memory analytics", "homepage": "https://arrow.apache.org", "license": "Apache-2.0", diff --git a/versions/a-/arrow.json b/versions/a-/arrow.json index 12691f5d65..832f5bf2f7 100644 --- a/versions/a-/arrow.json +++ b/versions/a-/arrow.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3829a0697ffe3ba8cb1274e2edd7cfbcbc48482b", + "version": "10.0.1", + "port-version": 3 + }, { "git-tree": "ea9873418e3de2180518389baa3562084a566702", "version": "10.0.1", diff --git a/versions/baseline.json b/versions/baseline.json index d43a22347c..058c012984 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -198,7 +198,7 @@ }, "arrow": { "baseline": "10.0.1", - "port-version": 2 + "port-version": 3 }, "ashes": { "baseline": "2022-06-08",