[arrow] Update to 8.0.1, fix usage (#25983)

* Use expressive patch name

* Fix BROTLI_INCLUDE_DIR import

* glog is unused (off by default)

* Cleanup portfile, fix 'arrow[core]'

* Add CI test port

* Update to 8.0.1 [skip actions]

* Declare dependency source for substituted packages

* Trim obsolete patch chunks

* Fix static link libs export

* Use substituted targets directly, for proper export

* Fix snappy lib export to pc file

* Update versions

* Add license for test port

* Add =pass entries for the new "vcpkg-ci-Xxx" port.

Co-authored-by: Billy O'Neal <bion@microsoft.com>
This commit is contained in:
Kai Pastor 2022-07-27 21:39:30 +02:00 committed by GitHub
parent dd73b021dc
commit e20e1c7908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 192 additions and 55 deletions

View File

@ -1,3 +1,42 @@
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 7d9c5c7..33afd70 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -705,7 +705,7 @@ endif()
if(ARROW_WITH_BROTLI)
# Order is important for static linking
- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon)
+ set(ARROW_BROTLI_LIBS unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon)
list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS})
list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS})
if(Brotli_SOURCE STREQUAL "SYSTEM")
@@ -721,9 +721,9 @@ if(ARROW_WITH_BZ2)
endif()
if(ARROW_WITH_LZ4)
- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4)
+ list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4)
if(Lz4_SOURCE STREQUAL "SYSTEM")
- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4)
+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS lz4::lz4)
endif()
endif()
@@ -793,10 +793,10 @@ if(ARROW_WITH_OPENTELEMETRY)
endif()
if(ARROW_WITH_UTF8PROC)
- list(APPEND ARROW_LINK_LIBS utf8proc::utf8proc)
- list(APPEND ARROW_STATIC_LINK_LIBS utf8proc::utf8proc)
+ list(APPEND ARROW_LINK_LIBS utf8proc)
+ list(APPEND ARROW_STATIC_LINK_LIBS utf8proc)
if(utf8proc_SOURCE STREQUAL "SYSTEM")
- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS utf8proc::utf8proc)
+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS utf8proc)
endif()
endif()
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index f070323..290b5a7 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
@ -48,33 +87,45 @@ index f070323..290b5a7 100644
else()
set(PACKAGE_NAME ${DEPENDENCY_NAME})
endif()
@@ -1129,10 +1132,16 @@ macro(build_brotli)
@@ -1061,7 +1064,21 @@ endmacro()
if(ARROW_WITH_SNAPPY)
resolve_dependency(Snappy PC_PACKAGE_NAMES snappy)
if(${Snappy_SOURCE} STREQUAL "SYSTEM" AND NOT snappy_PC_FOUND)
+ get_target_property(SNAPPY_IMPLIB_DEBUG Snappy::snappy IMPORTED_IMPLIB_DEBUG)
+ get_target_property(SNAPPY_LIB_DEBUG Snappy::snappy IMPORTED_LOCATION_DEBUG)
+ get_target_property(SNAPPY_IMPLIB_RELEASE Snappy::snappy IMPORTED_IMPLIB_RELEASE)
+ get_target_property(SNAPPY_LIB_RELEASE Snappy::snappy IMPORTED_LOCATION_RELEASE)
+ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND SNAPPY_IMPLIB_DEBUG)
+ set(SNAPPY_LIB "${SNAPPY_IMPLIB_DEBUG}")
+ elseif(CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND SNAPPY_LIB_DEBUG)
+ set(SNAPPY_LIB "${SNAPPY_LIB_DEBUG}")
+ elseif(CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND SNAPPY_IMPLIB_RELEASE)
+ set(SNAPPY_LIB "${SNAPPY_IMPLIB_RELEASE}")
+ elseif(CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND SNAPPY_LIB_RELEASE)
+ set(SNAPPY_LIB "${SNAPPY_LIB_RELEASE}")
+ else()
get_target_property(SNAPPY_LIB Snappy::snappy IMPORTED_LOCATION)
+ endif()
string(APPEND ARROW_PC_LIBS_PRIVATE " ${SNAPPY_LIB}")
endif()
# TODO: Don't use global includes but rather target_include_directories
@@ -1129,10 +1132,14 @@ macro(build_brotli)
endmacro()
if(ARROW_WITH_BROTLI)
- resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc)
+ set(Brotli_SOURCE SYSTEM)
+ resolve_dependency(unofficial-brotli USE_CONFIG TRUE PC_PACKAGE_NAMES libbrotlidec libbrotlienc)
+ add_library(Brotli::brotlicommon ALIAS unofficial::brotli::brotlicommon)
+ add_library(Brotli::brotlienc ALIAS unofficial::brotli::brotlienc)
+ add_library(Brotli::brotlidec ALIAS unofficial::brotli::brotlidec)
+ get_target_property(BROTLI_INCLUDE_DIR unofficial::brotli::brotlicommon-static INTERFACE_INCLUDE_DIRECTORIES)
# TODO: Don't use global includes but rather target_include_directories
+ if(NOT BROTLI_INCLUDE_DIR)
get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon
- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon
+ get_target_property(BROTLI_INCLUDE_DIR unofficial::brotli::brotlicommon
INTERFACE_INCLUDE_DIRECTORIES)
+ if(NOT BROTLI_INCLUDE_DIR)
+ get_target_property(BROTLI_INCLUDE_DIR unofficial::brotli::brotlicommon-static INTERFACE_INCLUDE_DIRECTORIES)
+ endif()
include_directories(SYSTEM ${BROTLI_INCLUDE_DIR})
endif()
@@ -1249,7 +1261,7 @@ macro(build_glog)
endmacro()
if(ARROW_USE_GLOG)
- resolve_dependency(GLOG PC_PACKAGE_NAMES libglog)
+ resolve_dependency(glog USE_CONFIG TRUE PC_PACKAGE_NAMES libglog)
# 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})
@@ -1434,6 +1446,13 @@ if(ARROW_WITH_THRIFT)
# TODO: Don't use global includes but rather target_include_directories
include_directories(SYSTEM ${THRIFT_INCLUDE_DIR})
@ -98,40 +149,51 @@ index f070323..290b5a7 100644
if(NOT Protobuf_USE_STATIC_LIBS AND MSVC_TOOLCHAIN)
add_definitions(-DPROTOBUF_USE_DLLS)
@@ -2121,8 +2142,6 @@ endmacro()
if(ARROW_WITH_RAPIDJSON)
set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0")
resolve_dependency(RapidJSON
- HAVE_ALT
- TRUE
REQUIRED_VERSION
${ARROW_RAPIDJSON_REQUIRED_VERSION}
IS_RUNTIME_DEPENDENCY
@@ -2260,7 +2279,8 @@ macro(build_lz4)
@@ -2260,10 +2276,11 @@ macro(build_lz4)
endmacro()
if(ARROW_WITH_LZ4)
- resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4)
+ set(Lz4_SOURCE SYSTEM)
+ resolve_dependency(lz4 USE_CONFIG TRUE PC_PACKAGE_NAMES liblz4)
+ add_library(LZ4::lz4 ALIAS lz4::lz4)
# TODO: Don't use global includes but rather target_include_directories
get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES)
@@ -2517,11 +2537,10 @@ macro(build_utf8proc)
- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES)
+ get_target_property(LZ4_INCLUDE_DIR lz4::lz4 INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${LZ4_INCLUDE_DIR})
endif()
@@ -2517,9 +2534,8 @@ macro(build_utf8proc)
endmacro()
if(ARROW_WITH_UTF8PROC)
- resolve_dependency(utf8proc
- REQUIRED_VERSION
- "2.2.0"
+ set(utf8proc_SOURCE SYSTEM)
+ resolve_dependency(unofficial-utf8proc
PC_PACKAGE_NAMES
libutf8proc)
+ add_library(utf8proc::utf8proc ALIAS utf8proc)
add_definitions(-DARROW_WITH_UTF8PROC)
@@ -2527,7 +2543,7 @@ if(ARROW_WITH_UTF8PROC)
@@ -3719,6 +3738,9 @@ if(ARROW_WITH_GRPC)
# TODO: Don't use global definitions but rather
# target_compile_definitions or target_link_libraries
- get_target_property(UTF8PROC_COMPILER_DEFINITIONS utf8proc::utf8proc
+ get_target_property(UTF8PROC_COMPILER_DEFINITIONS utf8proc
INTERFACE_COMPILER_DEFINITIONS)
if(UTF8PROC_COMPILER_DEFINITIONS)
add_definitions(-D${UTF8PROC_COMPILER_DEFINITIONS})
@@ -2535,7 +2551,7 @@ if(ARROW_WITH_UTF8PROC)
# TODO: Don't use global includes but rather
# target_include_directories or target_link_libraries
- get_target_property(UTF8PROC_INCLUDE_DIR utf8proc::utf8proc
+ get_target_property(UTF8PROC_INCLUDE_DIR utf8proc
INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${UTF8PROC_INCLUDE_DIR})
endif()
@@ -3719,6 +3735,9 @@ 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})
@ -141,3 +203,16 @@ index f070323..290b5a7 100644
if(GRPC_VENDORED)
set(GRPCPP_PP_INCLUDE TRUE)
diff --git a/cpp/src/arrow/adapters/orc/CMakeLists.txt b/cpp/src/arrow/adapters/orc/CMakeLists.txt
index b1b6847..444a45e 100644
--- a/cpp/src/arrow/adapters/orc/CMakeLists.txt
+++ b/cpp/src/arrow/adapters/orc/CMakeLists.txt
@@ -30,7 +30,7 @@ set(ORC_MIN_TEST_LIBS
GTest::gtest_main
GTest::gtest
Snappy::snappy
- LZ4::lz4
+ lz4::lz4
ZLIB::ZLIB)
if(ARROW_BUILD_STATIC)

View File

@ -1,13 +1,14 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/arrow
REF apache-arrow-8.0.0
SHA512 08b6ab4a3c5e0dd9c46402da8e7b9ef9f918eea177413cb31695192dfdb5a472ebbfef255b8343fe775d81e8b5eb268c3428a699fac48b36bf808f5b81e83a64
REF apache-arrow-8.0.1
SHA512 b32f5a3666de7d6d16ea828697bb42e1b6605f58719c42e670c9ec0a8782057dac933f6e14e97b46f82802fc38cc7f4cc825794a4a95ac641593c2ee26ac5bbe
HEAD_REF master
PATCHES
vs-2022-fixes.patch
all.patch
msvc-static-name.patch
fix-ThirdPartyToolchain.patch
static-link-libs.patch # https://github.com/apache/arrow/pull/13707
)
file(REMOVE "${SOURCE_PATH}/cpp/cmake_modules/Findzstd.cmake"
"${SOURCE_PATH}/cpp/cmake_modules/FindBrotli.cmake"
@ -87,32 +88,39 @@ vcpkg_cmake_configure(
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
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")
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
if("parquet" IN_LIST FEATURES)
file(GLOB PARQUET_FILES "${CURRENT_PACKAGES_DIR}/share/${PORT}/Parquet*")
file(COPY ${PARQUET_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/share/parquet")
file(REMOVE_RECURSE ${PARQUET_FILES})
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/FindParquet.cmake" "${CURRENT_PACKAGES_DIR}/share/parquet/FindParquet.cmake")
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-parquet" usage-parquet)
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-parquet}")
else()
file(REMOVE "${CURRENT_PACKAGES_DIR}/share/${PORT}/FindParquet.cmake")
endif()
file(GLOB PARQUET_FILES ${CURRENT_PACKAGES_DIR}/share/${PORT}/Parquet*)
file(COPY ${PARQUET_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/share/parquet")
file(REMOVE_RECURSE ${PARQUET_FILES})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/FindParquet.cmake ${CURRENT_PACKAGES_DIR}/share/parquet/FindParquet.cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if("example" IN_LIST FEATURES)
file(INSTALL "${SOURCE_PATH}/cpp/examples/minimal_build/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/example")
endif()
if ("plasma" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES plasma-store-server AUTO_CLEAN)
endif ()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}" @ONLY)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt" "${SOURCE_PATH}/NOTICE.txt")

View File

@ -0,0 +1,12 @@
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index 690c51a..2f7d26b 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -570,6 +570,7 @@ add_arrow_lib(arrow
${ARROW_SHARED_PRIVATE_LINK_LIBS}
STATIC_LINK_LIBS
${ARROW_STATIC_LINK_LIBS}
+ STATIC_INSTALL_INTERFACE_LIBS
${ARROW_STATIC_INSTALL_INTERFACE_LIBS}
SHARED_INSTALL_INTERFACE_LIBS
${ARROW_SHARED_INSTALL_INTERFACE_LIBS})

View File

@ -2,6 +2,3 @@ The package arrow provides CMake targets:
find_package(Arrow CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${ARROW_LIBRARIES})
find_package(Parquet CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${PARQUET_LIBRARIES})

View File

@ -0,0 +1,3 @@
find_package(Parquet CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${PARQUET_LIBRARIES})

View File

@ -1,6 +1,6 @@
{
"name": "arrow",
"version": "8.0.0",
"version": "8.0.1",
"description": "Cross-language development platform for in-memory analytics",
"homepage": "https://arrow.apache.org",
"license": "Apache-2.0",
@ -12,7 +12,6 @@
"brotli",
"bzip2",
"gflags",
"glog",
"lz4",
"openssl",
"re2",
@ -49,6 +48,9 @@
"dataset": {
"description": "Dataset support"
},
"example": {
"description": "Install the minimal example (source code)"
},
"filesystem": {
"description": "Filesystem support"
},

View File

@ -1253,6 +1253,11 @@ cmake-user:x64-windows-static-md=pass
cmake-user:x64-windows-static=pass
cmake-user:x64-windows=pass
cmake-user:x86-windows=pass
vcpkg-ci-arrow:x64-windows=pass
vcpkg-ci-arrow:x64-windows-static=pass
vcpkg-ci-arrow:x64-windows-static-md=pass
vcpkg-ci-arrow:x64-osx=pass
vcpkg-ci-arrow:x64-linux=pass
vcpkg-ci-boost:x64-linux=pass
vcpkg-ci-boost:x64-windows-static-md=pass
vcpkg-ci-boost:x64-windows-static=pass

View File

@ -0,0 +1,10 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ARROW_LINK_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${CURRENT_INSTALLED_DIR}/share/arrow/example"
OPTIONS
-DARROW_LINK_SHARED=${ARROW_LINK_SHARED}
)
vcpkg_cmake_build()

View File

@ -0,0 +1,20 @@
{
"name": "vcpkg-ci-arrow",
"version-date": "2022-07-25",
"description": "Builds an example app in order to validate the arrow port.",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "arrow",
"default-features": false,
"features": [
"csv",
"example"
]
}
]
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6935bb6b1a309931f2f85bd8da334b9777d51a4a",
"version": "8.0.1",
"port-version": 0
},
{
"git-tree": "4334074d163357f9002145ca722dc8dbcc546dbc",
"version": "8.0.0",

View File

@ -177,7 +177,7 @@
"port-version": 0
},
"arrow": {
"baseline": "8.0.0",
"baseline": "8.0.1",
"port-version": 0
},
"ashes": {