Support for arrow-adbc, duckdb and oracle

This commit is contained in:
Matthias Kuhn 2025-03-16 12:33:51 +01:00
parent b9ac09312f
commit c8751606f5
9 changed files with 100 additions and 9 deletions

View File

@ -90,6 +90,7 @@ jobs:
-D BUILD_WITH_QT6=ON \
-D WITH_QTWEBKIT=OFF \
-D WITH_BINDINGS=ON \
-D WITH_ORACLE=ON \
-D VCPKG_TARGET_TRIPLET="${{ matrix.triplet }}" \
-D VCPKG_HOST_TRIPLET="${{ matrix.triplet }}" \
-D VCPKG_INSTALL_OPTIONS="--only-binarycaching" \

View File

@ -24,6 +24,7 @@ set (WITH_3D TRUE CACHE BOOL "Determines whether QGIS 3D library should be built
set (WITH_QGIS_PROCESS TRUE CACHE BOOL "Determines whether the standalone \"qgis_process\" tool should be built")
set (WITH_DESKTOP TRUE CACHE BOOL "Determines whether QGIS desktop should be built")
set (WITH_GUI TRUE CACHE BOOL "Determines whether QGIS GUI library should be built")
set (WITH_ORACLE FALSE CACHE BOOL "Determines whether Oracle support should be built")
set(WITH_VCPKG FALSE CACHE BOOL "Use the vcpkg submodule for dependency management.")
set(SDK_PATH "" CACHE STRING "Build with VCPKG SDK")
@ -335,7 +336,6 @@ if(WITH_CORE)
set (WITH_QSPATIALITE FALSE CACHE BOOL "Determines whether QSPATIALITE sql driver should be built")
endif()
set (WITH_ORACLE FALSE CACHE BOOL "Determines whether Oracle support should be built")
if(WITH_ORACLE)
set(HAVE_ORACLE TRUE)
set(ORACLE_INCLUDEDIR "" CACHE STRING "Path to OCI headers")

View File

@ -11,6 +11,9 @@ endif()
if(WITH_GUI)
list(APPEND VCPKG_MANIFEST_FEATURES "gui")
endif()
if(WITH_ORACLE)
list(APPEND VCPKG_MANIFEST_FEATURES "oracle")
endif()
# Binarycache can only be used on Windows or if mono is available.
find_program(_VCPKG_MONO mono)

View File

@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OSGeo/gdal
REF "v${VERSION}"
SHA512 fccdcf484bdc833dc5f0d6ad1fce9d152fa8b861cf23b634400d8bf7fd97d2c33a6b87050538c5a6c896d4ba870469134521cc44fdad3e071adffbf29329cb9b
REF "bb4e0ed67154d70ab17fad6752f23af6e161bc56" # pre-gdal 3.11 release for adbc support
SHA512 cdf86e9b5f20ffc4f6fac39badb46d7aa0db4c6fb115d60433ca0f0fb1866b41d7f617da11580ce94eb4b5e5613e93a7ee094f9d3cb3dbc6e583042f58dce3e5
HEAD_REF master
PATCHES
find-link-libraries.patch
@ -22,6 +22,7 @@ vcpkg_replace_string("${SOURCE_PATH}/ogr/ogrsf_frmts/flatgeobuf/flatbuffers/base
# "core" is used for a dependency which must be enabled to avoid vendored lib.
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
arrow-adbc GDAL_USE_ADBCDRIVERMANAGER
cfitsio GDAL_USE_CFITSIO
curl GDAL_USE_CURL
expat GDAL_USE_EXPAT

View File

@ -1,7 +1,7 @@
diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake
index f5c920a..53494c9 100644
--- a/cmake/helpers/CheckDependentLibraries.cmake
+++ b/cmake/helpers/CheckDependentLibraries.cmake
diff --git a/cmake/helpers/CheckDependentLibrariesCommon.cmake b/cmake/helpers/CheckDependentLibrariesCommon.cmake
index ebb3538..a4a6d69 100644
--- a/cmake/helpers/CheckDependentLibrariesCommon.cmake
+++ b/cmake/helpers/CheckDependentLibrariesCommon.cmake
@@ -41,6 +41,7 @@ endif()
# https://github.com/OSGeo/gdal/issues/5324
function (gdal_check_target_is_valid target res_var)

View File

@ -41,6 +41,12 @@
"default-features"
],
"features": {
"arrow-adbc": {
"description": "Arrow adbc support",
"dependencies": [
"arrow-adbc"
]
},
"aws-ec2-windows": {
"description": "Optimized detection of AWS EC2 Windows hosts",
"dependencies": [

View File

@ -0,0 +1,66 @@
if(VCPKG_TARGET_IS_OSX)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
vcpkg_download_distfile(BASIC_PACKAGE
URLS https://download.oracle.com/otn_software/mac/instantclient/233023/instantclient-basic-macos.arm64-${VERSION}-1.dmg
FILENAME instantclient-basic-arm.dmg
SHA512 beb9ed7c3bf61721eff4c6cd375aeb0deaf5941e9297ca8b4c5efd9d5e154a9052445e0f3612ff2b5ddfa50cd40c83eda6ead8159b98810ae644ec60f41ef82c
)
vcpkg_download_distfile(SDK_PACKAGE
URLS https://download.oracle.com/otn_software/mac/instantclient/233023/instantclient-sdk-macos.arm64-${VERSION}.dmg
FILENAME instantclient-sdk-arm.dmg
SHA512 bb8e9e7b7f11281b7897271ae92a7e2fa485075c9b027e18823e639dd419f3ebddcfcdfa2df62bed9ae92d908cae622d51dfc86ca93e6242c74cae49e2b7b34a
)
else()
# 19.16.0.0.0 is the latest release for x86 at the moment on https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html
vcpkg_download_distfile(BASIC_PACKAGE
URLS https://download.oracle.com/otn_software/mac/instantclient/1916000/instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg
FILENAME instantclient-basic-x64.dmg
SHA512 91deb1c0f12d14cf0217567c3018aa2f922b248afb948858075bd9175115aa077cc797a4c5698b52c01b14aa8d205424f25e295e1845b94adab7c3d6e2e9364c
)
vcpkg_download_distfile(SDK_PACKAGE
URLS https://download.oracle.com/otn_software/mac/instantclient/1916000/instantclient-sdk-macos.x64-19.16.0.0.0dbru.dmg
FILENAME instantclient-sdk-x64.dmg
SHA512 c910b764003bccd6f61cbf740d74865dbec0f9ab67898f78947e779ef5ee913e20f975b967b7bc31f31c78a0b8c63414c632de51c4f1c51746f0c4f3054a02c9
)
endif()
vcpkg_execute_required_process(
COMMAND "hdiutil" "mount" "${BASIC_PACKAGE}" "-mountpoint" "${CURRENT_BUILDTREES_DIR}/instantclient-basic"
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}
LOGNAME hdiutil-mount-basic
)
vcpkg_execute_required_process(
COMMAND "hdiutil" "mount" "${SDK_PACKAGE}" "-mountpoint" "${CURRENT_BUILDTREES_DIR}/instantclient-sdk"
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}
LOGNAME hdiutil-mount-sdk
)
endif()
file(INSTALL
"${CURRENT_BUILDTREES_DIR}/instantclient-basic/libocci.dylib"
"${CURRENT_BUILDTREES_DIR}/instantclient-basic/libclntsh.dylib"
DESTINATION
"${CURRENT_PACKAGES_DIR}/lib"
FOLLOW_SYMLINK_CHAIN
)
file(INSTALL
"${CURRENT_BUILDTREES_DIR}/instantclient-sdk/sdk/include"
DESTINATION
"${CURRENT_PACKAGES_DIR}/"
)
# Handle copyright
file(INSTALL "${CURRENT_BUILDTREES_DIR}/instantclient-basic/BASIC_LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_execute_required_process(
COMMAND "hdiutil" "detach" "${CURRENT_BUILDTREES_DIR}/instantclient-basic"
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}
LOGNAME hdiutil-detach-basic
)
vcpkg_execute_required_process(
COMMAND "hdiutil" "detach" "${CURRENT_BUILDTREES_DIR}/instantclient-sdk"
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}
LOGNAME hdiutil-detach-sdk
)

View File

@ -0,0 +1,6 @@
{
"name": "oracle-instantclient",
"description": "Oracle Instant Client",
"homepage": "https://www.oracle.com/database/technologies/instant-client.html",
"version-string": "23.3.0.23.09xx"
}

View File

@ -2,13 +2,13 @@
"vcpkg-configuration": {
"default-registry": {
"kind": "git",
"baseline": "80d54ff62d528339c626a6fbc3489a7f25956ade",
"baseline": "782ccc18d8b819cdef6794a6c03eb3d9f7cd04aa",
"repository": "https://github.com/microsoft/vcpkg"
},
"registries": [
{
"kind": "git",
"baseline": "e494c9c25f3b0139c6274ece17f5c15374f9241f",
"baseline": "192194b251512ea908bde2d1ae8f03642ea1b7d9",
"repository": "https://github.com/open-vcpkg/python-registry",
"packages": [
"python3",
@ -33,6 +33,7 @@
"description": "QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)",
"homepage": "https://qgis.org",
"dependencies": [
"duckdb",
{
"name": "exiv2",
"features": [
@ -43,6 +44,7 @@
{
"name": "gdal",
"features": [
"arrow-adbc",
"freexl",
"kea",
"poppler"
@ -140,6 +142,12 @@
"opencl"
]
},
"oracle": {
"description": "Build with oracle support",
"dependencies": [
"oracle-instantclient"
]
},
"server": {
"description": "Determines whether QGIS server should be built",
"dependencies": [