Skip to content

Commit 80f9bcf

Browse files
authored
[nanoarrow] Added support for IPC extension (#51234)
1 parent fd18e07 commit 80f9bcf

9 files changed

Lines changed: 65 additions & 21 deletions

File tree

ports/flatcc/fix_install_dir.patch

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
diff --git a/src/runtime/CMakeLists.txt b/src/runtime/CMakeLists.txt
2-
index 127e2a4..f827a79 100644
3-
--- a/src/runtime/CMakeLists.txt
4-
+++ b/src/runtime/CMakeLists.txt
5-
@@ -12,5 +12,8 @@ add_library(flatccrt
6-
)
7-
8-
if (FLATCC_INSTALL)
9-
- install(TARGETS flatccrt DESTINATION ${lib_dir})
10-
+ install(TARGETS flatccrt
11-
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
12-
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
13-
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
14-
endif()
1+
diff --git a/src/runtime/CMakeLists.txt b/src/runtime/CMakeLists.txt
2+
index 68c0feb..925da41 100644
3+
--- a/src/runtime/CMakeLists.txt
4+
+++ b/src/runtime/CMakeLists.txt
5+
@@ -11,5 +11,8 @@ target_include_directories(flatccrt PUBLIC
6+
"${PROJECT_SOURCE_DIR}/include")
7+
8+
if (FLATCC_INSTALL)
9+
- install(TARGETS flatccrt DESTINATION ${lib_dir})
10+
+ install(TARGETS flatccrt
11+
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
12+
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
13+
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
14+
endif()

ports/flatcc/portfile.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ endif()
55
vcpkg_from_github(
66
OUT_SOURCE_PATH SOURCE_PATH
77
REPO dvidelabs/flatcc
8-
REF "v${VERSION}"
9-
SHA512 46ba5ca75facc7d3360dba797d24ae7bfe539a854a48831e1c7b96528cf9594d8bea22b267678fd7c6d742b6636d9e52930987119b4c6b2e38d4abe89b990cae
8+
REF 29201734bf2d12713a7a1a035d31e5123aac9c93
9+
SHA512 8c69259b3f314b9ce63e8930f4de9bcd38b164b96d77ad57c748a73510a606749ef40d2b5115c494f7806f8fe86c31b68e5fc3c476f7bca8d7fd70cfcefbe9ce
1010
HEAD_REF master
1111
PATCHES
1212
fix_install_dir.patch
@@ -20,6 +20,7 @@ vcpkg_cmake_configure(
2020
-DFLATCC_TEST=OFF
2121
-DFLATCC_CXX_TEST=OFF
2222
-DFLATCC_RTONLY=ON
23+
-DFLATCC_DEBUG_CLANG_SANITIZE=OFF
2324
${EXTRA_OPTIONS}
2425
)
2526

ports/flatcc/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flatcc",
3-
"version": "0.6.1",
3+
"version": "0.6.2-pre-29201734bf2d12713a7a1a035d31e5123aac9c93",
44
"description": "FlatBuffers Compiler and Library in C for C",
55
"homepage": "https://github.com/dvidelabs/flatcc",
66
"license": "Apache-2.0",
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 2d80849..c414865 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -229,8 +229,10 @@ if(NANOARROW_IPC)
6+
set(NANOARROW_FLATCC_INCLUDE_DIR "${NANOARROW_FLATCC_ROOT_DIR}/include")
7+
add_library(flatccrt STATIC IMPORTED)
8+
set_target_properties(flatccrt
9+
- PROPERTIES IMPORTED_LOCATION
10+
- "${NANOARROW_FLATCC_ROOT_DIR}/lib/libflatccrt.a"
11+
+ PROPERTIES IMPORTED_LOCATION_DEBUG
12+
+ "${NANOARROW_FLATCC_ROOT_DIR}/debug/lib/${CMAKE_STATIC_LIBRARY_PREFIX}flatccrt_d${CMAKE_STATIC_LIBRARY_SUFFIX}"
13+
+ IMPORTED_LOCATION_RELEASE
14+
+ "${NANOARROW_FLATCC_ROOT_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}flatccrt${CMAKE_STATIC_LIBRARY_SUFFIX}"
15+
INTERFACE_INCLUDE_DIRECTORIES
16+
"${NANOARROW_FLATCC_INCLUDE_DIR}")
17+
endif()

ports/nanoarrow/portfile.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,25 @@ vcpkg_download_distfile(ARCHIVE
88
vcpkg_extract_source_archive(
99
SOURCE_PATH
1010
ARCHIVE "${ARCHIVE}"
11+
PATCHES fix-flatccrt-name.patch
1112
)
1213

1314
file(REMOVE_RECURSE "${SOURCE_PATH}/thirdparty")
1415

1516
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" NANOARROW_INSTALL_SHARED)
1617

18+
if ("ipc" IN_LIST FEATURES)
19+
set(FEATURE_OPTIONS "-DNANOARROW_IPC=ON")
20+
set(FLATCCRT_OPTIONS "-DNANOARROW_FLATCC_ROOT_DIR=${CURRENT_INSTALLED_DIR}")
21+
endif()
22+
1723
vcpkg_cmake_configure(
1824
SOURCE_PATH "${SOURCE_PATH}"
1925
OPTIONS
2026
-DNANOARROW_INSTALL_SHARED=${NANOARROW_INSTALL_SHARED}
2127
-DNANOARROW_DEBUG_EXTRA_WARNINGS=OFF
28+
${FEATURE_OPTIONS}
29+
${FLATCCRT_OPTIONS}
2230
)
2331

2432
vcpkg_cmake_install()

ports/nanoarrow/vcpkg.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nanoarrow",
33
"version": "0.8.0",
4-
"port-version": 1,
4+
"port-version": 2,
55
"description": "Helpers for Arrow C Data & Arrow C Stream interfaces",
66
"homepage": "https://arrow.apache.org/nanoarrow",
77
"license": "Apache-2.0",
@@ -14,5 +14,13 @@
1414
"name": "vcpkg-cmake-config",
1515
"host": true
1616
}
17-
]
17+
],
18+
"features": {
19+
"ipc": {
20+
"description": "IPC support",
21+
"dependencies": [
22+
"flatcc"
23+
]
24+
}
25+
}
1826
}

versions/baseline.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3081,7 +3081,7 @@
30813081
"port-version": 0
30823082
},
30833083
"flatcc": {
3084-
"baseline": "0.6.1",
3084+
"baseline": "0.6.2-pre-29201734bf2d12713a7a1a035d31e5123aac9c93",
30853085
"port-version": 0
30863086
},
30873087
"flecs": {
@@ -6806,7 +6806,7 @@
68066806
},
68076807
"nanoarrow": {
68086808
"baseline": "0.8.0",
6809-
"port-version": 1
6809+
"port-version": 2
68106810
},
68116811
"nanobench": {
68126812
"baseline": "4.3.11",

versions/f-/flatcc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "c7f6939cd46d01746a51baecc77c725b5fdf7491",
5+
"version": "0.6.2-pre-29201734bf2d12713a7a1a035d31e5123aac9c93",
6+
"port-version": 0
7+
},
38
{
49
"git-tree": "28d1a0bee8befc0e62a445d01923d96ae800d19e",
510
"version": "0.6.1",

versions/n-/nanoarrow.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "d377a0f822e3932778415133cff512d00c74b17a",
5+
"version": "0.8.0",
6+
"port-version": 2
7+
},
38
{
49
"git-tree": "9c1146b9c9360cc05905f6ecd1bff7ba0fb9cf73",
510
"version": "0.8.0",

0 commit comments

Comments
 (0)