[arrow] Fix android (#37878)

Needed with NDK r26. Cherry-picked from #35851.
This commit is contained in:
Kai Pastor 2024-04-02 00:30:49 +02:00 committed by GitHub
parent e0f1ab414c
commit e58dac234a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 35 additions and 15 deletions

27
ports/arrow/android.patch Normal file
View File

@ -0,0 +1,27 @@
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 05c05c6..f2754a5 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -973,7 +973,7 @@ if(WIN32)
list(APPEND ARROW_SYSTEM_LINK_LIBS "ws2_32.dll")
endif()
-if(NOT WIN32 AND NOT APPLE)
+if(NOT WIN32 AND NOT APPLE AND NOT ANDROID)
# Pass -lrt on Linux only
list(APPEND ARROW_SYSTEM_LINK_LIBS rt)
endif()
diff --git a/cpp/src/arrow/vendored/musl/strptime.c b/cpp/src/arrow/vendored/musl/strptime.c
index 41912fd..0ea36e9 100644
--- a/cpp/src/arrow/vendored/musl/strptime.c
+++ b/cpp/src/arrow/vendored/musl/strptime.c
@@ -18,7 +18,9 @@
#undef HAVE_LANGINFO
#ifndef _WIN32
+# if !(defined(__ANDROID__) && __ANDROID_API__ < 26)
#define HAVE_LANGINFO 1
+# endif
#endif
#ifdef HAVE_LANGINFO

View File

@ -1,13 +0,0 @@
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index eeda520..f55080e 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -921,7 +921,7 @@ if(WIN32)
list(APPEND ARROW_SYSTEM_LINK_LIBS "ws2_32.dll")
endif()
-if(NOT WIN32 AND NOT APPLE)
+if(NOT WIN32 AND NOT APPLE AND NOT ANDROID)
# Pass -lrt on Linux only
list(APPEND ARROW_SYSTEM_LINK_LIBS rt)
endif()

View File

@ -8,10 +8,10 @@ vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE ${ARCHIVE_PATH}
PATCHES
android.patch
msvc-static-name.patch
utf8proc.patch
thrift.patch
fix-ci-error.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@ -1,6 +1,7 @@
{
"name": "arrow",
"version": "15.0.2",
"port-version": 1,
"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": "934c1383e14915071a7c9939bd61f38de5bd2c1b",
"version": "15.0.2",
"port-version": 1
},
{
"git-tree": "28965b502b1501b7832c506ea728e37924902909",
"version": "15.0.2",

View File

@ -242,7 +242,7 @@
},
"arrow": {
"baseline": "15.0.2",
"port-version": 0
"port-version": 1
},
"arsenalgear": {
"baseline": "2.1.0",