Skip to content

Commit

Permalink
[arrow] update to 11.0.0 (#30511)
Browse files Browse the repository at this point in the history
Co-authored-by: Jim Wang (Beyondsoft Corporation) <[email protected]>
  • Loading branch information
jimwang118 and jimwang118 authored Apr 12, 2023
1 parent aebac86 commit b81b6e4
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 248 deletions.
28 changes: 0 additions & 28 deletions ports/arrow/brotli.patch

This file was deleted.

29 changes: 0 additions & 29 deletions ports/arrow/fix-dataset.patch

This file was deleted.

100 changes: 0 additions & 100 deletions ports/arrow/fix-pkgconfig-windows.patch

This file was deleted.

7 changes: 2 additions & 5 deletions ports/arrow/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
78 changes: 19 additions & 59 deletions ports/arrow/thrift.patch
Original file line number Diff line number Diff line change
@@ -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)
33 changes: 10 additions & 23 deletions ports/arrow/utf8proc.patch
Original file line number Diff line number Diff line change
@@ -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()
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": "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",
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/arrow.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "21fea47a1e9c7bf68e6c088ad5a6b7b6e33c2fcb",
"version": "11.0.0",
"port-version": 0
},
{
"git-tree": "04944a4d39fe590b7fed071475502fa8bcfe5a27",
"version": "10.0.1",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b81b6e4

Please sign in to comment.