This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new 064d53b feat: Add support for Meson build system (#233)
064d53b is described below
commit 064d53bfe5f51d6a03fd14d15dbe95de1e2a0118
Author: William Ayd <[email protected]>
AuthorDate: Wed Oct 15 04:09:40 2025 -0400
feat: Add support for Meson build system (#233)
closes https://github.com/apache/iceberg-cpp/issues/228
@wgtmac
---
.github/.licenserc.yaml | 1 +
.github/workflows/test.yml | 33 ++++
.gitignore | 6 +
.pre-commit-config.yaml | 12 ++
CMakeLists.txt | 3 +-
cmake_modules/IcebergBuildUtils.cmake | 24 +--
cmake_modules/IcebergThirdpartyToolchain.cmake | 2 +-
dev/release/rat_exclude_files.txt | 1 +
example/CMakeLists.txt | 6 +-
.github/.licenserc.yaml => meson.build | 35 ++--
meson.options | 39 +++++
requirements.txt | 2 +
src/iceberg/CMakeLists.txt | 48 +++---
.../iceberg/catalog/memory/meson.build | 12 +-
.gitignore => src/iceberg/catalog/meson.build | 14 +-
src/iceberg/catalog/rest/CMakeLists.txt | 8 +-
src/iceberg/catalog/rest/iceberg_rest_export.h | 34 ++++
src/iceberg/catalog/rest/meson.build | 49 ++++++
.gitignore => src/iceberg/expression/meson.build | 12 +-
...bergConfig.cmake.in => iceberg-config.cmake.in} | 40 ++---
src/iceberg/iceberg_bundle_export.h | 34 ++++
src/iceberg/iceberg_export.h | 34 ++++
src/iceberg/json_internal.h | 85 ++++++----
src/iceberg/meson.build | 188 +++++++++++++++++++++
src/iceberg/name_mapping.h | 4 +-
.gitignore => src/iceberg/row/meson.build | 15 +-
src/iceberg/test/CMakeLists.txt | 2 +-
src/iceberg/test/meson.build | 103 +++++++++++
src/iceberg/util/decimal.h | 16 +-
.../iceberg/util/meson.build | 36 ++--
.gitignore => src/meson.build | 12 +-
.../cpp-httplib.wrap | 26 +--
.github/.licenserc.yaml => subprojects/cpr.wrap | 29 ++--
.../.licenserc.yaml => subprojects/croaring.wrap | 29 ++--
.github/.licenserc.yaml => subprojects/curl.wrap | 29 ++--
.github/.licenserc.yaml => subprojects/gtest.wrap | 32 ++--
.../.licenserc.yaml => subprojects/nanoarrow.wrap | 26 +--
.../nlohmann_json.wrap | 27 ++-
.github/.licenserc.yaml => subprojects/spdlog.wrap | 29 ++--
.github/.licenserc.yaml => subprojects/zlib.wrap | 29 ++--
40 files changed, 807 insertions(+), 359 deletions(-)
diff --git a/.github/.licenserc.yaml b/.github/.licenserc.yaml
index 9a18559..4f748bb 100644
--- a/.github/.licenserc.yaml
+++ b/.github/.licenserc.yaml
@@ -28,6 +28,7 @@ header:
- '.github/**'
- 'LICENSE'
- 'NOTICE'
+ - 'requirements.txt'
- 'src/iceberg/expected.h'
- 'src/iceberg/util/murmurhash3_internal.*'
- 'src/iceberg/test/resources/**'
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 15daa87..42181e2 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -99,3 +99,36 @@ jobs:
run: |
call "C:\Program Files\Microsoft Visual
Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
bash -c "ci/scripts/build_example.sh $(pwd)/example"
+ meson:
+ name: Meson - ${{ matrix.title }}
+ runs-on: ${{ matrix.runs-on }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - title: AMD64 Ubuntu 24.04
+ runs-on: ubuntu-24.04
+ - title: AMD64 Windows 2025
+ runs-on: windows-2025
+ meson-setup-args: --vsenv
+ - title: AArch64 macOS 15
+ runs-on: macos-15
+ steps:
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.x'
+ - name: Checkout iceberg-cpp
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #
v5.0.0
+ with:
+ fetch-depth: 0
+ - name: Install build dependencies
+ run: |
+ python3 -m pip install --upgrade pip
+ python3 -m pip install -r requirements.txt
+ - name: Build Iceberg
+ run: |
+ meson setup builddir ${{ matrix.meson-setup-args || '' }}
+ meson compile -C builddir
+ - name: Test Iceberg
+ run: |
+ meson test -C builddir
diff --git a/.gitignore b/.gitignore
index 74df5bd..8cd4f4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,9 @@ cmake-build-release/
# vscode files
.vscode
+
+# meson subprojects - wrap files need to be kept to let meson download
+# dependencies as needed, but dependencies themselves should not be versioned
+/subprojects/*
+!/subprojects/packagefiles
+!/subprojects/*.wrap
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 193d69a..4ee4a0b 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -39,3 +39,15 @@ repos:
rev: v0.6.10
hooks:
- id: cmake-format
+
+ - repo: https://github.com/trim21/pre-commit-mirror-meson
+ rev: v1.9.0
+ hooks:
+ - id: meson-fmt
+ alias: cpp
+ args: ['--inplace']
+ files: >-
+ (
+ ?.*meson\.build$|
+ ?.*meson\.options$|
+ )
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dea6b46..0d6f380 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ set(ICEBERG_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
set(ICEBERG_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}")
set(ICEBERG_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
set(ICEBERG_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake")
-set(ICEBERG_INSTALL_DOCDIR "share/doc/Iceberg")
+set(ICEBERG_INSTALL_DOCDIR "share/doc/iceberg")
if(WIN32 AND NOT MINGW)
set(MSVC_TOOLCHAIN TRUE)
@@ -64,7 +64,6 @@ include(CMakeParseArguments)
include(IcebergBuildUtils)
include(IcebergSanitizer)
include(IcebergThirdpartyToolchain)
-include(GenerateExportHeader)
if(ICEBERG_BUILD_TESTS)
enable_testing()
diff --git a/cmake_modules/IcebergBuildUtils.cmake
b/cmake_modules/IcebergBuildUtils.cmake
index 8b89259..edcb1d9 100644
--- a/cmake_modules/IcebergBuildUtils.cmake
+++ b/cmake_modules/IcebergBuildUtils.cmake
@@ -21,18 +21,18 @@
include(CMakePackageConfigHelpers)
function(iceberg_install_cmake_package PACKAGE_NAME EXPORT_NAME)
- set(CONFIG_CMAKE "${PACKAGE_NAME}Config.cmake")
+ set(CONFIG_CMAKE "${PACKAGE_NAME}-config.cmake")
set(BUILT_CONFIG_CMAKE "${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_CMAKE}")
configure_package_config_file("${CONFIG_CMAKE}.in" "${BUILT_CONFIG_CMAKE}"
INSTALL_DESTINATION
"${ICEBERG_INSTALL_CMAKEDIR}/${PACKAGE_NAME}"
)
- set(CONFIG_VERSION_CMAKE "${PACKAGE_NAME}ConfigVersion.cmake")
+ set(CONFIG_VERSION_CMAKE "${PACKAGE_NAME}config-version.cmake")
set(BUILT_CONFIG_VERSION_CMAKE
"${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_VERSION_CMAKE}")
write_basic_package_version_file("${BUILT_CONFIG_VERSION_CMAKE}"
COMPATIBILITY SameMajorVersion)
install(FILES "${BUILT_CONFIG_CMAKE}" "${BUILT_CONFIG_VERSION_CMAKE}"
DESTINATION "${ICEBERG_INSTALL_CMAKEDIR}/${PACKAGE_NAME}")
- set(TARGETS_CMAKE "${PACKAGE_NAME}Targets.cmake")
+ set(TARGETS_CMAKE "${PACKAGE_NAME}-targets.cmake")
install(EXPORT ${EXPORT_NAME}
DESTINATION "${ICEBERG_INSTALL_CMAKEDIR}/${PACKAGE_NAME}"
NAMESPACE "${PACKAGE_NAME}::"
@@ -150,6 +150,9 @@ function(add_iceberg_lib LIB_NAME)
target_link_libraries(${LIB_NAME}_shared
PUBLIC "$<BUILD_INTERFACE:iceberg_sanitizer_flags>")
+ string(TOUPPER ${LIB_NAME} VISIBILITY_NAME)
+ target_compile_definitions(${LIB_NAME}_shared PRIVATE
${VISIBILITY_NAME}_EXPORTING)
+
install(TARGETS ${LIB_NAME}_shared
EXPORT iceberg_targets
ARCHIVE DESTINATION ${INSTALL_ARCHIVE_DIR}
@@ -208,6 +211,9 @@ function(add_iceberg_lib LIB_NAME)
target_link_libraries(${LIB_NAME}_static
PUBLIC "$<BUILD_INTERFACE:iceberg_sanitizer_flags>")
+ string(TOUPPER ${LIB_NAME} VISIBILITY_NAME)
+ target_compile_definitions(${LIB_NAME}_static PUBLIC
${VISIBILITY_NAME}_STATIC)
+
install(TARGETS ${LIB_NAME}_static
EXPORT iceberg_targets
ARCHIVE DESTINATION ${INSTALL_ARCHIVE_DIR}
@@ -217,18 +223,6 @@ function(add_iceberg_lib LIB_NAME)
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
- # generate export header file
- if(BUILD_SHARED)
- generate_export_header(${LIB_NAME}_shared BASE_NAME ${LIB_NAME})
- if(BUILD_STATIC)
- string(TOUPPER ${LIB_NAME} LIB_NAME_UPPER)
- target_compile_definitions(${LIB_NAME}_static
- PUBLIC ${LIB_NAME_UPPER}_STATIC_DEFINE)
- endif()
- elseif(BUILD_STATIC)
- generate_export_header(${LIB_NAME}_static BASE_NAME ${LIB_NAME})
- endif()
-
# Modify variable in calling scope
if(ARG_OUTPUTS)
set(${ARG_OUTPUTS}
diff --git a/cmake_modules/IcebergThirdpartyToolchain.cmake
b/cmake_modules/IcebergThirdpartyToolchain.cmake
index 793af7f..af71439 100644
--- a/cmake_modules/IcebergThirdpartyToolchain.cmake
+++ b/cmake_modules/IcebergThirdpartyToolchain.cmake
@@ -461,7 +461,7 @@ function(resolve_cpr_dependency)
set(CPR_VENDORED TRUE)
set_target_properties(cpr PROPERTIES OUTPUT_NAME "iceberg_vendored_cpr"
POSITION_INDEPENDENT_CODE ON)
- add_library(Iceberg::cpr ALIAS cpr)
+ add_library(iceberg::cpr ALIAS cpr)
install(TARGETS cpr
EXPORT iceberg_targets
RUNTIME DESTINATION "${ICEBERG_INSTALL_BINDIR}"
diff --git a/dev/release/rat_exclude_files.txt
b/dev/release/rat_exclude_files.txt
index 6b15545..a20621c 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -21,6 +21,7 @@ NOTICE
build/**
dist/**
.git/**
+requirements.txt
test/resources/**
*.avro
*.json
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index d120d50..837ed7d 100644
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -22,9 +22,9 @@ project(example)
set(CMAKE_CXX_STANDARD 23)
-find_package(Iceberg CONFIG REQUIRED)
+find_package(iceberg CONFIG REQUIRED)
add_executable(demo_example demo_example.cc)
-target_link_libraries(demo_example PRIVATE Iceberg::iceberg_bundle_static
- Iceberg::iceberg_rest_static)
+target_link_libraries(demo_example PRIVATE iceberg::iceberg_bundle_static
+ iceberg::iceberg_rest_static)
diff --git a/.github/.licenserc.yaml b/meson.build
similarity index 64%
copy from .github/.licenserc.yaml
copy to meson.build
index 9a18559..eaeeda4 100644
--- a/.github/.licenserc.yaml
+++ b/meson.build
@@ -15,21 +15,24 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+project(
+ 'iceberg',
+ 'cpp',
+ version: '0.2.0',
+ license: 'Apache-2.0',
+ meson_version: '>=1.3.0',
+ default_options: [
+ 'cpp_std=c++23,c++latest',
+ 'warning_level=2',
+ # Don't build any tests for curl
+ 'curl:tests=disabled',
+ 'curl:unittests=disabled',
+ ],
+)
- paths:
- - '**'
+subdir('src')
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+install_data(
+ ['LICENSE', 'NOTICE'],
+ install_dir: get_option('datadir') / 'doc/iceberg',
+)
diff --git a/meson.options b/meson.options
new file mode 100644
index 0000000..943f1e4
--- /dev/null
+++ b/meson.options
@@ -0,0 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Many of the options that CMake provides do not need to be implemented
+# in this configuration, as Meson offers built-in support for them.
+# For instance, instead of ICEBERG_BUILD_STATIC and ICEBERG_BUILD_SHARED
+# you can pass the `--default_library=<option>` to the meson setup command,
+# where <option> is one of "shared", "static", or "both"
+#
+# ICEBERG_ENABLE_ASAN / ICEBERG_ENABLE_UBSAN can be specified with
+# the -Db_sanitize=address,undefined option. Starting in Meson 1.8,
+# you can provide any array of sanitizers to that same argument,
+# including for example the "fuzzing" option
+#
+# ICEBERG_INSTALL_LIBDIR / ICEBERG_INSTALL_BINDIR / ICEBERG_INSTALL_INCLUDEDIR
+# and ICEBERG_INSTALL_DOCDIR correspond to Meson's --libdir / --bindir /
+# --includedir / --datadir arguments, respectively
+
+option(
+ 'rest',
+ type: 'feature',
+ description: 'Build rest catalog client',
+ value: 'enabled',
+)
+option('tests', type: 'feature', description: 'Build tests', value: 'enabled')
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..207d8a3
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+meson==1.3.0
+ninja==1.13.0
diff --git a/src/iceberg/CMakeLists.txt b/src/iceberg/CMakeLists.txt
index 8327b59..8c9d6a9 100644
--- a/src/iceberg/CMakeLists.txt
+++ b/src/iceberg/CMakeLists.txt
@@ -83,16 +83,16 @@ list(APPEND
ZLIB::ZLIB)
list(APPEND
ICEBERG_STATIC_INSTALL_INTERFACE_LIBS
-
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,Iceberg::nanoarrow_static,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_static>,nanoarrow::nanoarrow_static,nanoarrow::nanoarrow_shared>>"
-
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,Iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
- "$<IF:$<BOOL:${CROARING_VENDORED}>,Iceberg::roaring,roaring::roaring>"
- "$<IF:$<BOOL:${SPDLOG_VENDORED}>,Iceberg::spdlog,spdlog::spdlog>")
+
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,iceberg::nanoarrow_static,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_static>,nanoarrow::nanoarrow_static,nanoarrow::nanoarrow_shared>>"
+
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
+ "$<IF:$<BOOL:${CROARING_VENDORED}>,iceberg::roaring,roaring::roaring>"
+ "$<IF:$<BOOL:${SPDLOG_VENDORED}>,iceberg::spdlog,spdlog::spdlog>")
list(APPEND
ICEBERG_SHARED_INSTALL_INTERFACE_LIBS
-
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,Iceberg::nanoarrow_shared,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_shared>,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>"
-
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,Iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
- "$<IF:$<BOOL:${CROARING_VENDORED}>,Iceberg::roaring,roaring::roaring>"
- "$<IF:$<BOOL:${SPDLOG_VENDORED}>,Iceberg::spdlog,spdlog::spdlog>")
+
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,iceberg::nanoarrow_shared,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_shared>,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>"
+
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
+ "$<IF:$<BOOL:${CROARING_VENDORED}>,iceberg::roaring,roaring::roaring>"
+ "$<IF:$<BOOL:${SPDLOG_VENDORED}>,iceberg::spdlog,spdlog::spdlog>")
add_iceberg_lib(iceberg
SOURCES
@@ -106,7 +106,9 @@ add_iceberg_lib(iceberg
STATIC_INSTALL_INTERFACE_LIBS
${ICEBERG_STATIC_INSTALL_INTERFACE_LIBS}
SHARED_INSTALL_INTERFACE_LIBS
- ${ICEBERG_SHARED_INSTALL_INTERFACE_LIBS})
+ ${ICEBERG_SHARED_INSTALL_INTERFACE_LIBS}
+ OUTPUTS
+ ICEBERG_LIBRARIES)
iceberg_install_all_headers(iceberg)
@@ -115,9 +117,6 @@ add_subdirectory(expression)
add_subdirectory(row)
add_subdirectory(util)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iceberg_export.h
- DESTINATION ${ICEBERG_INSTALL_INCLUDEDIR}/iceberg)
-
if(ICEBERG_BUILD_BUNDLE)
set(ICEBERG_BUNDLE_SOURCES
arrow/arrow_fs_file_io.cc
@@ -156,17 +155,17 @@ if(ICEBERG_BUILD_BUNDLE)
list(APPEND
ICEBERG_BUNDLE_STATIC_INSTALL_INTERFACE_LIBS
-
"$<IF:$<TARGET_EXISTS:Iceberg::iceberg_static>,Iceberg::iceberg_static,Iceberg::iceberg_shared>"
-
"$<IF:$<BOOL:${ARROW_VENDORED}>,Iceberg::arrow_static,$<IF:$<TARGET_EXISTS:Arrow::arrow_static>,Arrow::arrow_static,Arrow::arrow_shared>>"
-
"$<IF:$<BOOL:${ARROW_VENDORED}>,Iceberg::parquet_static,$<IF:$<TARGET_EXISTS:Parquet::parquet_static>,Parquet::parquet_static,Parquet::parquet_shared>>"
-
"$<IF:$<BOOL:${AVRO_VENDORED}>,Iceberg::avrocpp_s,$<IF:$<TARGET_EXISTS:avro-cpp::avrocpp_static>,avro-cpp::avrocpp_static,avro-cpp::avrocpp_shared>>"
+
"$<IF:$<TARGET_EXISTS:iceberg::iceberg_static>,iceberg::iceberg_static,iceberg::iceberg_shared>"
+
"$<IF:$<BOOL:${ARROW_VENDORED}>,iceberg::arrow_static,$<IF:$<TARGET_EXISTS:Arrow::arrow_static>,Arrow::arrow_static,Arrow::arrow_shared>>"
+
"$<IF:$<BOOL:${ARROW_VENDORED}>,iceberg::parquet_static,$<IF:$<TARGET_EXISTS:Parquet::parquet_static>,Parquet::parquet_static,Parquet::parquet_shared>>"
+
"$<IF:$<BOOL:${AVRO_VENDORED}>,iceberg::avrocpp_s,$<IF:$<TARGET_EXISTS:avro-cpp::avrocpp_static>,avro-cpp::avrocpp_static,avro-cpp::avrocpp_shared>>"
)
list(APPEND
ICEBERG_BUNDLE_SHARED_INSTALL_INTERFACE_LIBS
-
"$<IF:$<TARGET_EXISTS:Iceberg::iceberg_shared>,Iceberg::iceberg_shared,Iceberg::iceberg_static>"
-
"$<IF:$<BOOL:${ARROW_VENDORED}>,Iceberg::arrow_static,$<IF:$<TARGET_EXISTS:Arrow::arrow_shared>,Arrow::arrow_shared,Arrow::arrow_static>>"
-
"$<IF:$<BOOL:${ARROW_VENDORED}>,Iceberg::parquet_static,$<IF:$<TARGET_EXISTS:Parquet::parquet_shared>,Parquet::parquet_shared,Parquet::parquet_static>>"
-
"$<IF:$<BOOL:${AVRO_VENDORED}>,Iceberg::avrocpp_s,$<IF:$<TARGET_EXISTS:avro-cpp::avrocpp_shared>,avro-cpp::avrocpp_shared,avro-cpp::avrocpp_static>>"
+
"$<IF:$<TARGET_EXISTS:iceberg::iceberg_shared>,iceberg::iceberg_shared,iceberg::iceberg_static>"
+
"$<IF:$<BOOL:${ARROW_VENDORED}>,iceberg::arrow_static,$<IF:$<TARGET_EXISTS:Arrow::arrow_shared>,Arrow::arrow_shared,Arrow::arrow_static>>"
+
"$<IF:$<BOOL:${ARROW_VENDORED}>,iceberg::parquet_static,$<IF:$<TARGET_EXISTS:Parquet::parquet_shared>,Parquet::parquet_shared,Parquet::parquet_static>>"
+
"$<IF:$<BOOL:${AVRO_VENDORED}>,iceberg::avrocpp_s,$<IF:$<TARGET_EXISTS:avro-cpp::avrocpp_shared>,avro-cpp::avrocpp_shared,avro-cpp::avrocpp_static>>"
)
add_iceberg_lib(iceberg_bundle
@@ -179,17 +178,16 @@ if(ICEBERG_BUILD_BUNDLE)
STATIC_INSTALL_INTERFACE_LIBS
${ICEBERG_BUNDLE_STATIC_INSTALL_INTERFACE_LIBS}
SHARED_INSTALL_INTERFACE_LIBS
- ${ICEBERG_BUNDLE_SHARED_INSTALL_INTERFACE_LIBS})
+ ${ICEBERG_BUNDLE_SHARED_INSTALL_INTERFACE_LIBS}
+ OUTPUTS
+ ICEBERG_BUNDLE_LIBRARIES)
add_subdirectory(arrow)
add_subdirectory(avro)
add_subdirectory(parquet)
-
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iceberg_bundle_export.h
- DESTINATION ${ICEBERG_INSTALL_INCLUDEDIR}/iceberg)
endif()
-iceberg_install_cmake_package(Iceberg iceberg_targets)
+iceberg_install_cmake_package(iceberg iceberg_targets)
if(ICEBERG_BUILD_TESTS)
add_subdirectory(test)
diff --git a/.gitignore b/src/iceberg/catalog/memory/meson.build
similarity index 88%
copy from .gitignore
copy to src/iceberg/catalog/memory/meson.build
index 74df5bd..737d4a8 100644
--- a/.gitignore
+++ b/src/iceberg/catalog/memory/meson.build
@@ -15,14 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-build/
-cmake-build-debug/
-cmake-build-release/
-.DS_Store
-
-
-# intellij files
-.idea
-
-# vscode files
-.vscode
+install_headers(['in_memory_catalog.h'], subdir: 'iceberg/catalog/memory')
diff --git a/.gitignore b/src/iceberg/catalog/meson.build
similarity index 88%
copy from .gitignore
copy to src/iceberg/catalog/meson.build
index 74df5bd..f19d673 100644
--- a/.gitignore
+++ b/src/iceberg/catalog/meson.build
@@ -15,14 +15,8 @@
# specific language governing permissions and limitations
# under the License.
-build/
-cmake-build-debug/
-cmake-build-release/
-.DS_Store
+subdir('memory')
-
-# intellij files
-.idea
-
-# vscode files
-.vscode
+if get_option('rest').enabled()
+ subdir('rest')
+endif
diff --git a/src/iceberg/catalog/rest/CMakeLists.txt
b/src/iceberg/catalog/rest/CMakeLists.txt
index f18859c..2f9c2f0 100644
--- a/src/iceberg/catalog/rest/CMakeLists.txt
+++ b/src/iceberg/catalog/rest/CMakeLists.txt
@@ -28,12 +28,12 @@ list(APPEND ICEBERG_REST_SHARED_BUILD_INTERFACE_LIBS
"$<IF:$<TARGET_EXISTS:iceberg_shared>,iceberg_shared,iceberg_static>"
cpr::cpr)
list(APPEND
ICEBERG_REST_STATIC_INSTALL_INTERFACE_LIBS
-
"$<IF:$<TARGET_EXISTS:Iceberg::iceberg_static>,Iceberg::iceberg_static,Iceberg::iceberg_shared>"
- "$<IF:$<BOOL:${CPR_VENDORED}>,Iceberg::cpr,cpr::cpr>")
+
"$<IF:$<TARGET_EXISTS:iceberg::iceberg_static>,iceberg::iceberg_static,iceberg::iceberg_shared>"
+ "$<IF:$<BOOL:${CPR_VENDORED}>,iceberg::cpr,cpr::cpr>")
list(APPEND
ICEBERG_REST_SHARED_INSTALL_INTERFACE_LIBS
-
"$<IF:$<TARGET_EXISTS:Iceberg::iceberg_shared>,Iceberg::iceberg_shared,Iceberg::iceberg_static>"
- "$<IF:$<BOOL:${CPR_VENDORED}>,Iceberg::cpr,cpr::cpr>")
+
"$<IF:$<TARGET_EXISTS:iceberg::iceberg_shared>,iceberg::iceberg_shared,iceberg::iceberg_static>"
+ "$<IF:$<BOOL:${CPR_VENDORED}>,iceberg::cpr,cpr::cpr>")
add_iceberg_lib(iceberg_rest
SOURCES
diff --git a/src/iceberg/catalog/rest/iceberg_rest_export.h
b/src/iceberg/catalog/rest/iceberg_rest_export.h
new file mode 100644
index 0000000..7e8836f
--- /dev/null
+++ b/src/iceberg/catalog/rest/iceberg_rest_export.h
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+# ifdef ICEBERG_REST_STATIC
+# define ICEBERG_REST_EXPORT
+# elif defined(ICEBERG_REST_EXPORTING)
+# define ICEBERG_REST_EXPORT __declspec(dllexport)
+# else
+# define ICEBERG_REST_EXPORT __declspec(dllimport)
+# endif
+#else // Not Windows
+# ifndef ICEBERG_REST_EXPORT
+# define ICEBERG_REST_EXPORT __attribute__((visibility("default")))
+# endif
+#endif
diff --git a/src/iceberg/catalog/rest/meson.build
b/src/iceberg/catalog/rest/meson.build
new file mode 100644
index 0000000..0c32cb6
--- /dev/null
+++ b/src/iceberg/catalog/rest/meson.build
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+iceberg_rest_sources = files('rest_catalog.cc')
+# cpr does not export symbols, so on Windows it must
+# be used as a static lib
+cpr_needs_static = (
+ get_option('default_library') == 'static' or
+ host_machine.system() == 'windows'
+)
+cpr_dep = dependency('cpr', static: cpr_needs_static)
+
+iceberg_rest_build_deps = [iceberg_dep, cpr_dep]
+iceberg_rest_lib = library(
+ 'iceberg_rest',
+ sources: iceberg_rest_sources,
+ dependencies: iceberg_rest_build_deps,
+ gnu_symbol_visibility: 'hidden',
+ cpp_shared_args: ['-DICEBERG_REST_EXPORTING'],
+ cpp_static_args: ['-DICEBERG_REST_STATIC'],
+)
+
+iceberg_rest_compile_args = []
+if get_option('default_library') == 'static'
+ iceberg_rest_compile_args += ['-DICEBERG_REST_STATIC']
+endif
+iceberg_rest_dep = declare_dependency(
+ link_with: [iceberg_rest_lib],
+ dependencies: iceberg_rest_build_deps,
+ compile_args: iceberg_rest_compile_args,
+)
+meson.override_dependency('iceberg-rest', iceberg_rest_dep)
+pkg.generate(iceberg_rest_lib)
+
+install_headers(['rest_catalog.h'], subdir: 'iceberg/catalog/rest')
diff --git a/.gitignore b/src/iceberg/expression/meson.build
similarity index 88%
copy from .gitignore
copy to src/iceberg/expression/meson.build
index 74df5bd..722057c 100644
--- a/.gitignore
+++ b/src/iceberg/expression/meson.build
@@ -15,14 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-build/
-cmake-build-debug/
-cmake-build-release/
-.DS_Store
-
-
-# intellij files
-.idea
-
-# vscode files
-.vscode
+install_headers(['expression.h', 'literal.h'], subdir: 'iceberg/expression')
diff --git a/src/iceberg/IcebergConfig.cmake.in
b/src/iceberg/iceberg-config.cmake.in
similarity index 77%
rename from src/iceberg/IcebergConfig.cmake.in
rename to src/iceberg/iceberg-config.cmake.in
index 5858566..dd6e3a5 100644
--- a/src/iceberg/IcebergConfig.cmake.in
+++ b/src/iceberg/iceberg-config.cmake.in
@@ -22,12 +22,12 @@
#
# This config sets the following targets (if built) in your project::
#
-# Iceberg::iceberg_shared
-# Iceberg::iceberg_static
-# Iceberg::iceberg_bundle_shared
-# Iceberg::iceberg_bundle_static
-# Iceberg::iceberg_rest_shared
-# Iceberg::iceberg_rest_static
+# iceberg::iceberg_shared
+# iceberg::iceberg_static
+# iceberg::iceberg_bundle_shared
+# iceberg::iceberg_bundle_static
+# iceberg::iceberg_rest_shared
+# iceberg::iceberg_rest_static
@PACKAGE_INIT@
@@ -59,12 +59,12 @@ endmacro()
macro(iceberg_find_components components)
foreach(comp ${components})
string(TOLOWER "${comp}" _comp_lower_case)
- if(TARGET "Iceberg::iceberg_${_comp_lower_case}_shared" OR
- TARGET "Iceberg::iceberg_${_comp_lower_case}_static")
- set(Iceberg_${comp}_FOUND TRUE)
+ if(TARGET "iceberg::iceberg_${_comp_lower_case}_shared" OR
+ TARGET "iceberg::iceberg_${_comp_lower_case}_static")
+ set(iceberg_${comp}_FOUND TRUE)
else()
- set(Iceberg_${comp}_FOUND FALSE)
- set(Iceberg_NOT_FOUND_MESSAGE "Component ${comp} was not installed")
+ set(iceberg_${comp}_FOUND FALSE)
+ set(iceberg_NOT_FOUND_MESSAGE "Component ${comp} was not installed")
endif()
endforeach()
endmacro()
@@ -85,17 +85,17 @@ if(NOT TARGET CURL::libcurl)
add_library(CURL::libcurl INTERFACE IMPORTED)
endif()
-include("${CMAKE_CURRENT_LIST_DIR}/IcebergTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/iceberg-targets.cmake")
-if(TARGET Iceberg::arrow_static)
- add_library(Arrow::arrow_static ALIAS Iceberg::arrow_static)
+if(TARGET iceberg::arrow_static)
+ add_library(Arrow::arrow_static ALIAS iceberg::arrow_static)
add_library(Arrow::arrow_bundled_dependencies STATIC IMPORTED)
- get_target_property(arrow_static_configurations Iceberg::arrow_static
+ get_target_property(arrow_static_configurations iceberg::arrow_static
IMPORTED_CONFIGURATIONS)
foreach(CONFIGURATION ${arrow_static_configurations})
string(TOUPPER "${CONFIGURATION}" CONFIGURATION)
- get_target_property(arrow_static_location Iceberg::arrow_static
+ get_target_property(arrow_static_location iceberg::arrow_static
LOCATION_${CONFIGURATION})
get_filename_component(arrow_lib_dir "${arrow_static_location}" DIRECTORY)
set_property(TARGET Arrow::arrow_bundled_dependencies
@@ -108,11 +108,11 @@ if(TARGET Iceberg::arrow_static)
endforeach()
endif()
-if(TARGET Iceberg::parquet_static)
- add_library(Parquet::parquet_static ALIAS Iceberg::parquet_static)
+if(TARGET iceberg::parquet_static)
+ add_library(Parquet::parquet_static ALIAS iceberg::parquet_static)
endif()
# Find required components
-iceberg_find_components("${Iceberg_FIND_COMPONENTS}")
+iceberg_find_components("${iceberg_FIND_COMPONENTS}")
-check_required_components(Iceberg)
+check_required_components(iceberg)
diff --git a/src/iceberg/iceberg_bundle_export.h
b/src/iceberg/iceberg_bundle_export.h
new file mode 100644
index 0000000..c63f881
--- /dev/null
+++ b/src/iceberg/iceberg_bundle_export.h
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+# ifdef ICEBERG_BUNDLE_STATIC
+# define ICEBERG_BUNDLE_EXPORT
+# elif defined(ICEBERG_BUNDLE_EXPORTING)
+# define ICEBERG_BUNDLE_EXPORT __declspec(dllexport)
+# else
+# define ICEBERG_BUNDLE_EXPORT __declspec(dllimport)
+# endif
+#else // Not Windows
+# ifndef ICEBERG_BUNDLE_EXPORT
+# define ICEBERG_BUNDLE_EXPORT __attribute__((visibility("default")))
+# endif
+#endif
diff --git a/src/iceberg/iceberg_export.h b/src/iceberg/iceberg_export.h
new file mode 100644
index 0000000..64ed7df
--- /dev/null
+++ b/src/iceberg/iceberg_export.h
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma once
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+# ifdef ICEBERG_STATIC
+# define ICEBERG_EXPORT
+# elif defined(ICEBERG_EXPORTING)
+# define ICEBERG_EXPORT __declspec(dllexport)
+# else
+# define ICEBERG_EXPORT __declspec(dllimport)
+# endif
+#else // Not Windows
+# ifndef ICEBERG_EXPORT
+# define ICEBERG_EXPORT __attribute__((visibility("default")))
+# endif
+#endif
diff --git a/src/iceberg/json_internal.h b/src/iceberg/json_internal.h
index 4479a31..7d13459 100644
--- a/src/iceberg/json_internal.h
+++ b/src/iceberg/json_internal.h
@@ -38,7 +38,7 @@ namespace iceberg {
///
/// \param sort_field The `SortField` object to be serialized.
/// \return A JSON object representing the `SortField` in the form of
key-value pairs.
-nlohmann::json ToJson(const SortField& sort_field);
+ICEBERG_EXPORT nlohmann::json ToJson(const SortField& sort_field);
/// \brief Deserializes a JSON object into a `SortField` object.
///
@@ -49,7 +49,8 @@ nlohmann::json ToJson(const SortField& sort_field);
/// \param json The JSON object representing a `SortField`.
/// \return An `expected` value containing either a `SortField` object or an
error. If the
/// JSON is malformed or missing expected fields, an error will be returned.
-Result<std::unique_ptr<SortField>> SortFieldFromJson(const nlohmann::json&
json);
+ICEBERG_EXPORT Result<std::unique_ptr<SortField>> SortFieldFromJson(
+ const nlohmann::json& json);
/// \brief Serializes a `SortOrder` object to JSON.
///
@@ -59,7 +60,7 @@ Result<std::unique_ptr<SortField>> SortFieldFromJson(const
nlohmann::json& json)
///
/// \param sort_order The `SortOrder` object to be serialized.
/// \return A JSON object representing the `SortOrder` with its order ID and
fields array.
-nlohmann::json ToJson(const SortOrder& sort_order);
+ICEBERG_EXPORT nlohmann::json ToJson(const SortOrder& sort_order);
/// \brief Deserializes a JSON object into a `SortOrder` object.
///
@@ -70,43 +71,45 @@ nlohmann::json ToJson(const SortOrder& sort_order);
/// \param json The JSON object representing a `SortOrder`.
/// \return An `expected` value containing either a `SortOrder` object or an
error. If the
/// JSON is malformed or missing expected fields, an error will be returned.
-Result<std::unique_ptr<SortOrder>> SortOrderFromJson(const nlohmann::json&
json);
+ICEBERG_EXPORT Result<std::unique_ptr<SortOrder>> SortOrderFromJson(
+ const nlohmann::json& json);
/// \brief Convert an Iceberg Schema to JSON.
///
/// \param[in] schema The Iceberg schema to convert.
/// \return The JSON representation of the schema.
-nlohmann::json ToJson(const Schema& schema);
+ICEBERG_EXPORT nlohmann::json ToJson(const Schema& schema);
/// \brief Convert JSON to an Iceberg Schema.
///
/// \param[in] json The JSON representation of the schema.
/// \return The Iceberg schema or an error if the conversion fails.
-Result<std::unique_ptr<Schema>> SchemaFromJson(const nlohmann::json& json);
+ICEBERG_EXPORT Result<std::unique_ptr<Schema>> SchemaFromJson(const
nlohmann::json& json);
/// \brief Convert an Iceberg Type to JSON.
///
/// \param[in] type The Iceberg type to convert.
/// \return The JSON representation of the type.
-nlohmann::json ToJson(const Type& type);
+ICEBERG_EXPORT nlohmann::json ToJson(const Type& type);
/// \brief Convert JSON to an Iceberg Type.
///
/// \param[in] json The JSON representation of the type.
/// \return The Iceberg type or an error if the conversion fails.
-Result<std::unique_ptr<Type>> TypeFromJson(const nlohmann::json& json);
+ICEBERG_EXPORT Result<std::unique_ptr<Type>> TypeFromJson(const
nlohmann::json& json);
/// \brief Convert an Iceberg SchemaField to JSON.
///
/// \param[in] field The Iceberg field to convert.
/// \return The JSON representation of the field.
-nlohmann::json ToJson(const SchemaField& field);
+ICEBERG_EXPORT nlohmann::json ToJson(const SchemaField& field);
/// \brief Convert JSON to an Iceberg SchemaField.
///
/// \param[in] json The JSON representation of the field.
/// \return The Iceberg field or an error if the conversion fails.
-Result<std::unique_ptr<SchemaField>> FieldFromJson(const nlohmann::json& json);
+ICEBERG_EXPORT Result<std::unique_ptr<SchemaField>> FieldFromJson(
+ const nlohmann::json& json);
/// \brief Serializes a `PartitionField` object to JSON.
///
@@ -117,7 +120,7 @@ Result<std::unique_ptr<SchemaField>> FieldFromJson(const
nlohmann::json& json);
/// \param partition_field The `PartitionField` object to be serialized.
/// \return A JSON object representing the `PartitionField` in the form of
key-value
/// pairs.
-nlohmann::json ToJson(const PartitionField& partition_field);
+ICEBERG_EXPORT nlohmann::json ToJson(const PartitionField& partition_field);
/// \brief Deserializes a JSON object into a `PartitionField` object.
///
@@ -130,7 +133,7 @@ nlohmann::json ToJson(const PartitionField&
partition_field);
/// happen when deserializing partition fields from V1 metadata files.
/// \return An `expected` value containing either a `PartitionField` object or
an error.
/// If the JSON is malformed or missing expected fields, an error will be
returned.
-Result<std::unique_ptr<PartitionField>> PartitionFieldFromJson(
+ICEBERG_EXPORT Result<std::unique_ptr<PartitionField>> PartitionFieldFromJson(
const nlohmann::json& json, bool allow_field_id_missing = false);
/// \brief Serializes a `PartitionSpec` object to JSON.
@@ -143,7 +146,7 @@ Result<std::unique_ptr<PartitionField>>
PartitionFieldFromJson(
/// \param partition_spec The `PartitionSpec` object to be serialized.
/// \return A JSON object representing the `PartitionSpec` with its order ID
and fields
/// array.
-nlohmann::json ToJson(const PartitionSpec& partition_spec);
+ICEBERG_EXPORT nlohmann::json ToJson(const PartitionSpec& partition_spec);
/// \brief Deserializes a JSON object into a `PartitionSpec` object.
///
@@ -155,141 +158,149 @@ nlohmann::json ToJson(const PartitionSpec&
partition_spec);
/// \param json The JSON object representing a `PartitionSpec`.
/// \return An `expected` value containing either a `PartitionSpec` object or
an error. If
/// the JSON is malformed or missing expected fields, an error will be
returned.
-Result<std::unique_ptr<PartitionSpec>> PartitionSpecFromJson(
+ICEBERG_EXPORT Result<std::unique_ptr<PartitionSpec>> PartitionSpecFromJson(
const std::shared_ptr<Schema>& schema, const nlohmann::json& json);
/// \brief Serializes a `SnapshotRef` object to JSON.
///
/// \param[in] snapshot_ref The `SnapshotRef` object to be serialized.
/// \return A JSON object representing the `SnapshotRef`.
-nlohmann::json ToJson(const SnapshotRef& snapshot_ref);
+ICEBERG_EXPORT nlohmann::json ToJson(const SnapshotRef& snapshot_ref);
/// \brief Deserializes a JSON object into a `SnapshotRef` object.
///
/// \param[in] json The JSON object representing a `SnapshotRef`.
/// \return A `SnapshotRef` object or an error if the conversion fails.
-Result<std::unique_ptr<SnapshotRef>> SnapshotRefFromJson(const nlohmann::json&
json);
+ICEBERG_EXPORT Result<std::unique_ptr<SnapshotRef>> SnapshotRefFromJson(
+ const nlohmann::json& json);
/// \brief Serializes a `Snapshot` object to JSON.
///
/// \param[in] snapshot The `Snapshot` object to be serialized.
/// \return A JSON object representing the `snapshot`.
-nlohmann::json ToJson(const Snapshot& snapshot);
+ICEBERG_EXPORT nlohmann::json ToJson(const Snapshot& snapshot);
/// \brief Deserializes a JSON object into a `Snapshot` object.
///
/// \param[in] json The JSON representation of the snapshot.
/// \return A `Snapshot` object or an error if the conversion fails.
-Result<std::unique_ptr<Snapshot>> SnapshotFromJson(const nlohmann::json& json);
+ICEBERG_EXPORT Result<std::unique_ptr<Snapshot>> SnapshotFromJson(
+ const nlohmann::json& json);
/// \brief Serializes a `StatisticsFile` object to JSON.
///
/// \param statistics_file The `StatisticsFile` object to be serialized.
/// \return A JSON object representing the `StatisticsFile`.
-nlohmann::json ToJson(const StatisticsFile& statistics_file);
+ICEBERG_EXPORT nlohmann::json ToJson(const StatisticsFile& statistics_file);
/// \brief Deserializes a JSON object into a `StatisticsFile` object.
///
/// \param json The JSON object representing a `StatisticsFile`.
/// \return A `StatisticsFile` object or an error if the conversion fails.
-Result<std::unique_ptr<StatisticsFile>> StatisticsFileFromJson(
+ICEBERG_EXPORT Result<std::unique_ptr<StatisticsFile>> StatisticsFileFromJson(
const nlohmann::json& json);
/// \brief Serializes a `PartitionStatisticsFile` object to JSON.
///
/// \param partition_statistics_file The `PartitionStatisticsFile` object to be
/// serialized. \return A JSON object representing the
`PartitionStatisticsFile`.
-nlohmann::json ToJson(const PartitionStatisticsFile&
partition_statistics_file);
+ICEBERG_EXPORT nlohmann::json ToJson(
+ const PartitionStatisticsFile& partition_statistics_file);
/// \brief Deserializes a JSON object into a `PartitionStatisticsFile` object.
///
/// \param json The JSON object representing a `PartitionStatisticsFile`.
/// \return A `PartitionStatisticsFile` object or an error if the conversion
fails.
-Result<std::unique_ptr<PartitionStatisticsFile>>
PartitionStatisticsFileFromJson(
- const nlohmann::json& json);
+ICEBERG_EXPORT Result<std::unique_ptr<PartitionStatisticsFile>>
+PartitionStatisticsFileFromJson(const nlohmann::json& json);
/// \brief Serializes a `SnapshotLogEntry` object to JSON.
///
/// \param snapshot_log_entry The `SnapshotLogEntry` object to be serialized.
/// \return A JSON object representing the `SnapshotLogEntry`.
-nlohmann::json ToJson(const SnapshotLogEntry& snapshot_log_entry);
+ICEBERG_EXPORT nlohmann::json ToJson(const SnapshotLogEntry&
snapshot_log_entry);
/// \brief Deserializes a JSON object into a `SnapshotLogEntry` object.
///
/// \param json The JSON object representing a `SnapshotLogEntry`.
/// \return A `SnapshotLogEntry` object or an error if the conversion fails.
-Result<SnapshotLogEntry> SnapshotLogEntryFromJson(const nlohmann::json& json);
+ICEBERG_EXPORT Result<SnapshotLogEntry> SnapshotLogEntryFromJson(
+ const nlohmann::json& json);
/// \brief Serializes a `MetadataLogEntry` object to JSON.
///
/// \param metadata_log_entry The `MetadataLogEntry` object to be serialized.
/// \return A JSON object representing the `MetadataLogEntry`.
-nlohmann::json ToJson(const MetadataLogEntry& metadata_log_entry);
+ICEBERG_EXPORT nlohmann::json ToJson(const MetadataLogEntry&
metadata_log_entry);
/// \brief Deserializes a JSON object into a `MetadataLogEntry` object.
///
/// \param json The JSON object representing a `MetadataLogEntry`.
/// \return A `MetadataLogEntry` object or an error if the conversion fails.
-Result<MetadataLogEntry> MetadataLogEntryFromJson(const nlohmann::json& json);
+ICEBERG_EXPORT Result<MetadataLogEntry> MetadataLogEntryFromJson(
+ const nlohmann::json& json);
/// \brief Serializes a `TableMetadata` object to JSON.
///
/// \param table_metadata The `TableMetadata` object to be serialized.
/// \return A JSON object representing the `TableMetadata`.
-nlohmann::json ToJson(const TableMetadata& table_metadata);
+ICEBERG_EXPORT nlohmann::json ToJson(const TableMetadata& table_metadata);
/// \brief Deserializes a JSON object into a `TableMetadata` object.
///
/// \param json The JSON object representing a `TableMetadata`.
/// \return A `TableMetadata` object or an error if the conversion fails.
-Result<std::unique_ptr<TableMetadata>> TableMetadataFromJson(const
nlohmann::json& json);
+ICEBERG_EXPORT Result<std::unique_ptr<TableMetadata>> TableMetadataFromJson(
+ const nlohmann::json& json);
/// \brief Deserialize a JSON string into a `nlohmann::json` object.
///
/// \param json_string The JSON string to deserialize.
/// \return A `nlohmann::json` object or an error if the deserialization fails.
-Result<nlohmann::json> FromJsonString(const std::string& json_string);
+ICEBERG_EXPORT Result<nlohmann::json> FromJsonString(const std::string&
json_string);
/// \brief Serialize a `nlohmann::json` object into a JSON string.
///
/// \param json The `nlohmann::json` object to serialize.
/// \return A JSON string or an error if the serialization fails.
-Result<std::string> ToJsonString(const nlohmann::json& json);
+ICEBERG_EXPORT Result<std::string> ToJsonString(const nlohmann::json& json);
/// \brief Serializes a `MappedField` object to JSON.
///
/// \param[in] field The `MappedField` object to be serialized.
/// \return A JSON object representing the `MappedField`.
-nlohmann::json ToJson(const MappedField& field);
+ICEBERG_EXPORT nlohmann::json ToJson(const MappedField& field);
/// \brief Deserializes a JSON object into a `MappedField` object.
///
/// \param[in] json The JSON object representing a `MappedField`.
/// \return A `MappedField` object or an error if the conversion fails.
-Result<MappedField> MappedFieldFromJson(const nlohmann::json& json);
+ICEBERG_EXPORT Result<MappedField> MappedFieldFromJson(const nlohmann::json&
json);
/// \brief Serializes a `MappedFields` object to JSON.
///
/// \param[in] mapped_fields The `MappedFields` object to be serialized.
/// \return A JSON object representing the `MappedFields`.
-nlohmann::json ToJson(const MappedFields& mapped_fields);
+ICEBERG_EXPORT nlohmann::json ToJson(const MappedFields& mapped_fields);
/// \brief Deserializes a JSON object into a `MappedFields` object.
///
/// \param[in] json The JSON object representing a `MappedFields`.
/// \return A `MappedFields` object or an error if the conversion fails.
-Result<std::unique_ptr<MappedFields>> MappedFieldsFromJson(const
nlohmann::json& json);
+ICEBERG_EXPORT Result<std::unique_ptr<MappedFields>> MappedFieldsFromJson(
+ const nlohmann::json& json);
/// \brief Serializes a `NameMapping` object to JSON.
///
/// \param[in] name_mapping The `NameMapping` object to be serialized.
/// \return A JSON object representing the `NameMapping`.
-nlohmann::json ToJson(const NameMapping& name_mapping);
+ICEBERG_EXPORT nlohmann::json ToJson(const NameMapping& name_mapping);
/// \brief Deserializes a JSON object into a `NameMapping` object.
///
/// \param[in] json The JSON object representing a `NameMapping`.
/// \return A `NameMapping` object or an error if the conversion fails.
-Result<std::unique_ptr<NameMapping>> NameMappingFromJson(const nlohmann::json&
json);
+ICEBERG_EXPORT Result<std::unique_ptr<NameMapping>> NameMappingFromJson(
+ const nlohmann::json& json);
} // namespace iceberg
diff --git a/src/iceberg/meson.build b/src/iceberg/meson.build
new file mode 100644
index 0000000..318c055
--- /dev/null
+++ b/src/iceberg/meson.build
@@ -0,0 +1,188 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+conf_data = configuration_data()
+version = meson.project_version()
+components = version.split('.')
+assert(
+ components.length() >= 3,
+ 'The version does not contain major, minor and patch',
+)
+ver_major = components[0]
+ver_minor = components[1]
+ver_patch = components[2]
+conf_data.set('PROJECT_VERSION_MAJOR', ver_major)
+conf_data.set('PROJECT_VERSION_MINOR', ver_minor)
+conf_data.set('PROJECT_VERSION_PATCH', ver_patch)
+conf_data.set('PROJECT_VERSION', version)
+conf_data.set('PROJECT_NAME', meson.project_name())
+configure_file(
+ input: 'version.h.in',
+ output: 'version.h',
+ configuration: conf_data,
+ install: true,
+ install_dir: get_option('includedir') / 'iceberg',
+)
+
+iceberg_include_dir = include_directories('..')
+iceberg_sources = files(
+ 'arrow_c_data_guard_internal.cc',
+ 'catalog/memory/in_memory_catalog.cc',
+ 'expression/expression.cc',
+ 'expression/expressions.cc',
+ 'expression/literal.cc',
+ 'expression/predicate.cc',
+ 'expression/term.cc',
+ 'file_reader.cc',
+ 'file_writer.cc',
+ 'inheritable_metadata.cc',
+ 'json_internal.cc',
+ 'manifest_entry.cc',
+ 'manifest_list.cc',
+ 'manifest_reader.cc',
+ 'manifest_reader_internal.cc',
+ 'manifest_writer.cc',
+ 'metadata_columns.cc',
+ 'name_mapping.cc',
+ 'partition_field.cc',
+ 'partition_spec.cc',
+ 'row/arrow_array_wrapper.cc',
+ 'row/manifest_wrapper.cc',
+ 'schema.cc',
+ 'schema_field.cc',
+ 'schema_internal.cc',
+ 'schema_util.cc',
+ 'snapshot.cc',
+ 'sort_field.cc',
+ 'sort_order.cc',
+ 'statistics_file.cc',
+ 'table.cc',
+ 'table_metadata.cc',
+ 'table_properties.cc',
+ 'table_scan.cc',
+ 'transform.cc',
+ 'transform_function.cc',
+ 'type.cc',
+ 'util/conversions.cc',
+ 'util/decimal.cc',
+ 'util/gzip_internal.cc',
+ 'util/murmurhash3_internal.cc',
+ 'util/timepoint.cc',
+ 'util/uuid.cc',
+)
+
+# CRoaring does not export symbols, so on Windows it must
+# be used as a static lib
+croaring_needs_static = (
+ get_option('default_library') == 'static' or
+ host_machine.system() == 'windows'
+)
+croaring_dep = dependency('croaring', static: croaring_needs_static)
+nanoarrow_dep = dependency('nanoarrow')
+nlohmann_json_dep = dependency('nlohmann_json')
+spdlog_dep = dependency('spdlog')
+zlib_dep = dependency('zlib')
+
+iceberg_deps = [
+ croaring_dep,
+ nanoarrow_dep,
+ nlohmann_json_dep,
+ spdlog_dep,
+ zlib_dep,
+]
+
+iceberg_lib = library(
+ 'iceberg',
+ sources: iceberg_sources,
+ dependencies: iceberg_deps,
+ include_directories: iceberg_include_dir,
+ install: true,
+ gnu_symbol_visibility: 'inlineshidden',
+ cpp_shared_args: ['-DICEBERG_EXPORTING'],
+ cpp_static_args: ['-DICEBERG_STATIC'],
+)
+
+iceberg_interface_args = []
+if get_option('default_library') != 'shared'
+ iceberg_interface_args += ['-DICEBERG_STATIC']
+endif
+
+iceberg_dep = declare_dependency(
+ link_with: iceberg_lib,
+ dependencies: iceberg_deps,
+ include_directories: iceberg_include_dir,
+ compile_args: iceberg_interface_args,
+)
+meson.override_dependency('iceberg', iceberg_dep)
+pkg = import('pkgconfig')
+pkg.generate(iceberg_lib)
+
+install_headers(
+ [
+ 'arrow_c_data.h',
+ 'catalog.h',
+ 'constants.h',
+ 'exception.h',
+ 'file_format.h',
+ 'file_io.h',
+ 'file_reader.h',
+ 'file_writer.h',
+ 'iceberg_export.h',
+ 'inheritable_metadata.h',
+ 'location_provider.h',
+ 'manifest_adapter.h',
+ 'manifest_entry.h',
+ 'manifest_list.h',
+ 'manifest_reader.h',
+ 'manifest_writer.h',
+ 'metadata_columns.h',
+ 'metrics.h',
+ 'name_mapping.h',
+ 'partition_field.h',
+ 'partition_spec.h',
+ 'result.h',
+ 'schema_field.h',
+ 'schema.h',
+ 'schema_util.h',
+ 'snapshot.h',
+ 'sort_field.h',
+ 'sort_order.h',
+ 'statistics_file.h',
+ 'table.h',
+ 'table_identifier.h',
+ 'table_metadata.h',
+ 'table_scan.h',
+ 'transaction.h',
+ 'transform_function.h',
+ 'transform.h',
+ 'type_fwd.h',
+ 'type.h',
+ 'v1_metadata.h',
+ 'v2_metadata.h',
+ 'v3_metadata.h',
+ ],
+ subdir: 'iceberg',
+)
+
+subdir('catalog')
+subdir('expression')
+subdir('row')
+subdir('util')
+
+if get_option('tests').enabled()
+ subdir('test')
+endif
diff --git a/src/iceberg/name_mapping.h b/src/iceberg/name_mapping.h
index 3a66be0..41ff2d1 100644
--- a/src/iceberg/name_mapping.h
+++ b/src/iceberg/name_mapping.h
@@ -75,7 +75,7 @@ class ICEBERG_EXPORT MappedFields {
/// \brief Get the list of field mappings.
std::span<const MappedField> fields() const;
- friend bool operator==(const MappedFields& lhs, const MappedFields& rhs);
+ ICEBERG_EXPORT friend bool operator==(const MappedFields& lhs, const
MappedFields& rhs);
private:
explicit MappedFields(std::vector<MappedField> fields);
@@ -115,7 +115,7 @@ class ICEBERG_EXPORT NameMapping {
/// \brief Get the underlying MappedFields instance.
const MappedFields& AsMappedFields() const;
- friend bool operator==(const NameMapping& lhs, const NameMapping& rhs);
+ ICEBERG_EXPORT friend bool operator==(const NameMapping& lhs, const
NameMapping& rhs);
private:
explicit NameMapping(std::unique_ptr<MappedFields> mapping);
diff --git a/.gitignore b/src/iceberg/row/meson.build
similarity index 87%
copy from .gitignore
copy to src/iceberg/row/meson.build
index 74df5bd..c7248d1 100644
--- a/.gitignore
+++ b/src/iceberg/row/meson.build
@@ -15,14 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-build/
-cmake-build-debug/
-cmake-build-release/
-.DS_Store
-
-
-# intellij files
-.idea
-
-# vscode files
-.vscode
+install_headers(
+ ['arrow_array_wrapper.h', 'manifest_wrapper.h', 'struct_like.h'],
+ subdir: 'iceberg/row',
+)
diff --git a/src/iceberg/test/CMakeLists.txt b/src/iceberg/test/CMakeLists.txt
index 0a54a57..e687f97 100644
--- a/src/iceberg/test/CMakeLists.txt
+++ b/src/iceberg/test/CMakeLists.txt
@@ -48,7 +48,7 @@ function(add_iceberg_test test_name)
${ARGN})
add_executable(${test_name})
- target_include_directories(${test_name} PRIVATE "${CMAKE_BINARY_DIR}")
+ target_include_directories(${test_name} PRIVATE
"${CMAKE_BINARY_DIR}/iceberg/test/")
target_sources(${test_name} PRIVATE ${ARG_SOURCES})
diff --git a/src/iceberg/test/meson.build b/src/iceberg/test/meson.build
new file mode 100644
index 0000000..dd3bd05
--- /dev/null
+++ b/src/iceberg/test/meson.build
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+gmock_main_dep = dependency('gmock_main')
+
+conf_data = configuration_data()
+conf_data.set('ICEBERG_TEST_RESOURCES', meson.current_source_dir() /
'resources')
+configure_file(
+ input: 'test_config.h.in',
+ output: 'test_config.h',
+ configuration: conf_data,
+ install: true,
+ install_dir: get_option('includedir') / 'iceberg/test',
+)
+
+iceberg_tests = {
+ 'schema_test': {
+ 'sources': files(
+ 'name_mapping_test.cc',
+ 'partition_field_test.cc',
+ 'partition_spec_test.cc',
+ 'schema_field_test.cc',
+ 'schema_test.cc',
+ 'schema_util_test.cc',
+ 'snapshot_test.cc',
+ 'sort_field_test.cc',
+ 'sort_order_test.cc',
+ 'transform_test.cc',
+ 'type_test.cc',
+ ),
+ },
+ 'table_test': {
+ 'sources': files(
+ 'json_internal_test.cc',
+ 'schema_json_test.cc',
+ 'table_test.cc',
+ 'test_common.cc',
+ ),
+ },
+ 'expression_test': {
+ 'sources': files(
+ 'expression_test.cc',
+ 'literal_test.cc',
+ 'predicate_test.cc',
+ ),
+ },
+ 'json_serde_test': {
+ 'sources': files(
+ 'json_internal_test.cc',
+ 'metadata_serde_test.cc',
+ 'schema_json_test.cc',
+ 'test_common.cc',
+ ),
+ },
+ 'util_test': {
+ 'sources': files(
+ 'config_test.cc',
+ 'decimal_test.cc',
+ 'endian_test.cc',
+ 'formatter_test.cc',
+ 'string_util_test.cc',
+ 'uuid_test.cc',
+ 'visit_type_test.cc',
+ ),
+ },
+ 'roaring_test': {'sources': files('roaring_test.cc')},
+}
+
+if get_option('rest').enabled()
+ cpp_httplib_dep = dependency('cpp-httplib')
+ iceberg_tests += {
+ 'rest_catalog_test': {
+ 'sources': files('rest_catalog_test.cc'),
+ 'dependencies': [iceberg_rest_dep, cpp_httplib_dep],
+ },
+ }
+endif
+
+foreach test_name, values : iceberg_tests
+ exc = executable(
+ test_name,
+ sources: values['sources'],
+ dependencies: [iceberg_dep, gmock_main_dep] + values.get(
+ 'dependencies',
+ [],
+ ),
+ )
+ test(test_name, exc)
+endforeach
diff --git a/src/iceberg/util/decimal.h b/src/iceberg/util/decimal.h
index f118bde..7e9cd7c 100644
--- a/src/iceberg/util/decimal.h
+++ b/src/iceberg/util/decimal.h
@@ -203,14 +203,14 @@ class ICEBERG_EXPORT Decimal : public util::Formattable {
return lhs.data_ != rhs.data_;
}
- friend Decimal operator-(const Decimal& operand);
- friend Decimal operator~(const Decimal& operand);
-
- friend Decimal operator+(const Decimal& lhs, const Decimal& rhs);
- friend Decimal operator-(const Decimal& lhs, const Decimal& rhs);
- friend Decimal operator*(const Decimal& lhs, const Decimal& rhs);
- friend Decimal operator/(const Decimal& lhs, const Decimal& rhs);
- friend Decimal operator%(const Decimal& lhs, const Decimal& rhs);
+ ICEBERG_EXPORT friend Decimal operator-(const Decimal& operand);
+ ICEBERG_EXPORT friend Decimal operator~(const Decimal& operand);
+
+ ICEBERG_EXPORT friend Decimal operator+(const Decimal& lhs, const Decimal&
rhs);
+ ICEBERG_EXPORT friend Decimal operator-(const Decimal& lhs, const Decimal&
rhs);
+ ICEBERG_EXPORT friend Decimal operator*(const Decimal& lhs, const Decimal&
rhs);
+ ICEBERG_EXPORT friend Decimal operator/(const Decimal& lhs, const Decimal&
rhs);
+ ICEBERG_EXPORT friend Decimal operator%(const Decimal& lhs, const Decimal&
rhs);
private:
int128_t data_{0};
diff --git a/.github/.licenserc.yaml b/src/iceberg/util/meson.build
similarity index 68%
copy from .github/.licenserc.yaml
copy to src/iceberg/util/meson.build
index 9a18559..06984a4 100644
--- a/.github/.licenserc.yaml
+++ b/src/iceberg/util/meson.build
@@ -15,21 +15,21 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
-
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+install_headers(
+ [
+ 'checked_cast.h',
+ 'config.h',
+ 'decimal.h',
+ 'endian.h',
+ 'formattable.h',
+ 'formatter.h',
+ 'int128.h',
+ 'macros.h',
+ 'string_util.h',
+ 'timepoint.h',
+ 'truncate_util.h',
+ 'visitor_generate.h',
+ 'visit_type.h',
+ ],
+ subdir: 'iceberg/util',
+)
diff --git a/.gitignore b/src/meson.build
similarity index 88%
copy from .gitignore
copy to src/meson.build
index 74df5bd..c96ab2c 100644
--- a/.gitignore
+++ b/src/meson.build
@@ -15,14 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-build/
-cmake-build-debug/
-cmake-build-release/
-.DS_Store
-
-
-# intellij files
-.idea
-
-# vscode files
-.vscode
+subdir('iceberg')
diff --git a/.github/.licenserc.yaml b/subprojects/cpp-httplib.wrap
similarity index 64%
copy from .github/.licenserc.yaml
copy to subprojects/cpp-httplib.wrap
index 9a18559..02abaa0 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/cpp-httplib.wrap
@@ -15,21 +15,13 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = cpp-httplib-0.26.0
+source_url =
https://github.com/yhirose/cpp-httplib/archive/refs/tags/v0.26.0.tar.gz
+source_filename = cpp-httplib-0.26.0.tar.gz
+source_hash = a66f908f50ccb119769adce44fe1eac75f81b6ffab7c4ac0211bb663ffeb2688
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/cpp-httplib_0.26.0-1/cpp-httplib-0.26.0.tar.gz
+wrapdb_version = 0.26.0-1
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+dependency_names = cpp-httplib
diff --git a/.github/.licenserc.yaml b/subprojects/cpr.wrap
similarity index 58%
copy from .github/.licenserc.yaml
copy to subprojects/cpr.wrap
index 9a18559..a52ebad 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/cpr.wrap
@@ -15,21 +15,16 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = cpr-1.12.0
+source_url = https://github.com/libcpr/cpr/archive/1.12.0.tar.gz
+source_filename = cpr-1.12.0.tar.gz
+source_hash = f64b501de66e163d6a278fbb6a95f395ee873b7a66c905dd785eae107266a709
+patch_filename = cpr_1.12.0-1_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/cpr_1.12.0-1/get_patch
+patch_hash = 16404431dd8b2dbb49afc78a07b3bbe3c84c9f83ce1f45c3510934fadab99e72
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/cpr_1.12.0-1/cpr-1.12.0.tar.gz
+wrapdb_version = 1.12.0-1
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+cpr = cpr_dep
diff --git a/.github/.licenserc.yaml b/subprojects/croaring.wrap
similarity index 55%
copy from .github/.licenserc.yaml
copy to subprojects/croaring.wrap
index 9a18559..47a853a 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/croaring.wrap
@@ -15,21 +15,16 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = CRoaring-4.3.11
+source_url =
https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.3.11.tar.gz
+source_filename = CRoaring-4.3.11.tar.gz
+source_hash = acd3a17e6c95acf3154d60c38c90e927e6c531805bc740a040fa111819af380e
+patch_filename = croaring_4.3.11-1_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/croaring_4.3.11-1/get_patch
+patch_hash = ff26efa0b7e7bc24963e169ab1a4e15598fdfcb5f0b6db9f28eca9e26c22bb4a
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/croaring_4.3.11-1/CRoaring-4.3.11.tar.gz
+wrapdb_version = 4.3.11-1
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+dependency_names = croaring
diff --git a/.github/.licenserc.yaml b/subprojects/curl.wrap
similarity index 56%
copy from .github/.licenserc.yaml
copy to subprojects/curl.wrap
index 9a18559..ccff3bb 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/curl.wrap
@@ -15,21 +15,16 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = curl-8.10.1
+source_url =
https://github.com/curl/curl/releases/download/curl-8_10_1/curl-8.10.1.tar.xz
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/curl_8.10.1-1/curl-8.10.1.tar.xz
+source_filename = curl-8.10.1.tar.xz
+source_hash = 73a4b0e99596a09fa5924a4fb7e4b995a85fda0d18a2c02ab9cf134bebce04ee
+patch_filename = curl_8.10.1-1_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.10.1-1/get_patch
+patch_hash = 707c28f35fc9b0e8d68c0c2800712007612f922a31da9637ce706a2159f3ddd8
+wrapdb_version = 8.10.1-1
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+dependency_names = libcurl
diff --git a/.github/.licenserc.yaml b/subprojects/gtest.wrap
similarity index 53%
copy from .github/.licenserc.yaml
copy to subprojects/gtest.wrap
index 9a18559..e6ecdda 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/gtest.wrap
@@ -15,21 +15,19 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = googletest-1.17.0
+source_url =
https://github.com/google/googletest/archive/refs/tags/v1.17.0.tar.gz
+source_filename = googletest-1.17.0.tar.gz
+source_hash = 65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c
+patch_filename = gtest_1.17.0-4_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.17.0-4/get_patch
+patch_hash = 3abf7662d09db706453a5b064a1e914678c74b9d9b0b19382747ca561d0d8750
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/gtest_1.17.0-4/googletest-1.17.0.tar.gz
+wrapdb_version = 1.17.0-4
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+gtest = gtest_dep
+gtest_main = gtest_main_dep
+gmock = gmock_dep
+gmock_main = gmock_main_dep
diff --git a/.github/.licenserc.yaml b/subprojects/nanoarrow.wrap
similarity index 59%
copy from .github/.licenserc.yaml
copy to subprojects/nanoarrow.wrap
index 9a18559..407d245 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/nanoarrow.wrap
@@ -15,21 +15,13 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = apache-arrow-nanoarrow-0.7.0
+source_url =
https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/apache-arrow-nanoarrow-0.7.0/apache-arrow-nanoarrow-0.7.0.tar.gz
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/nanoarrow_0.7.0-1/apache-arrow-nanoarrow-0.7.0.tar.gz
+source_filename = apache-arrow-nanoarrow-0.7.0.tar.gz
+source_hash = d60b49dfaa5a27614075c6c61ec2fdea3bc70f5e52aefce592f994d2ee6330ea
+wrapdb_version = 0.7.0-1
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+nanoarrow = nanoarrow_dep
diff --git a/.github/.licenserc.yaml b/subprojects/nlohmann_json.wrap
similarity index 62%
copy from .github/.licenserc.yaml
copy to subprojects/nlohmann_json.wrap
index 9a18559..3c6ccb6 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/nlohmann_json.wrap
@@ -15,21 +15,14 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = nlohmann_json-3.12.0
+lead_directory_missing = true
+source_url =
https://github.com/nlohmann/json/releases/download/v3.12.0/include.zip
+source_filename = nlohmann_json-3.12.0.zip
+source_hash = b8cb0ef2dd7f57f18933997c9934bb1fa962594f701cd5a8d3c2c80541559372
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/nlohmann_json_3.12.0-1/nlohmann_json-3.12.0.zip
+wrapdb_version = 3.12.0-1
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+nlohmann_json = nlohmann_json_dep
diff --git a/.github/.licenserc.yaml b/subprojects/spdlog.wrap
similarity index 56%
copy from .github/.licenserc.yaml
copy to subprojects/spdlog.wrap
index 9a18559..f17351f 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/spdlog.wrap
@@ -15,21 +15,16 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = spdlog-1.15.3
+source_url = https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.tar.gz
+source_filename = spdlog-1.15.3.tar.gz
+source_hash = 15a04e69c222eb6c01094b5c7ff8a249b36bb22788d72519646fb85feb267e67
+patch_filename = spdlog_1.15.3-4_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/spdlog_1.15.3-4/get_patch
+patch_hash = ccdc72f3d965980d5edd1a56129a9b7fa5f7c86f31e4ecf2dba6a6068829d4e2
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/spdlog_1.15.3-4/spdlog-1.15.3.tar.gz
+wrapdb_version = 1.15.3-4
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+spdlog = spdlog_dep
diff --git a/.github/.licenserc.yaml b/subprojects/zlib.wrap
similarity index 58%
copy from .github/.licenserc.yaml
copy to subprojects/zlib.wrap
index 9a18559..d6ae82d 100644
--- a/.github/.licenserc.yaml
+++ b/subprojects/zlib.wrap
@@ -15,21 +15,16 @@
# specific language governing permissions and limitations
# under the License.
-header:
- license:
- spdx-id: Apache-2.0
- copyright-owner: Apache Software Foundation
+[wrap-file]
+directory = zlib-1.3.1
+source_url = http://zlib.net/fossils/zlib-1.3.1.tar.gz
+source_fallback_url =
https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.1-2/zlib-1.3.1.tar.gz
+source_filename = zlib-1.3.1.tar.gz
+source_hash = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
+patch_filename = zlib_1.3.1-2_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-2/get_patch
+patch_hash = 9cacea02e1119964bc51e92dd2359b14df723a36cfe0df1c78d55d9c9f2763ae
+wrapdb_version = 1.3.1-2
- paths:
- - '**'
-
- paths-ignore:
- - '**/.gitignore'
- - '.github/**'
- - 'LICENSE'
- - 'NOTICE'
- - 'src/iceberg/expected.h'
- - 'src/iceberg/util/murmurhash3_internal.*'
- - 'src/iceberg/test/resources/**'
-
- comment: on-failure
+[provide]
+zlib = zlib_dep