Skip to content

Commit 25060ef

Browse files
committed
[gdal] 3.11.4
1 parent 1ceaf12 commit 25060ef

File tree

5 files changed

+82
-22
lines changed

5 files changed

+82
-22
lines changed

vcpkg_overlay/ports/gdal/cmake-project-include.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ if(GDAL_USE_ARROW)
1616
find_package(Arrow REQUIRED)
1717
set(ARROW_USE_STATIC_LIBRARIES "${ARROW_BUILD_STATIC}" CACHE BOOL "")
1818
endif()
19+
20+
if(GDAL_USE_SQLITE3)
21+
# CMake find module with vcpkg cmake wrapper
22+
find_package(SQLite3 REQUIRED)
23+
# .. and inject into GDAL's FindSQLite3.cmake
24+
set(SQLite3_LIBRARY "${SQLite3_LIBRARIES}")
25+
set(SQLite3_FOUND FALSE)
26+
set(SQLITE3_FOUND FALSE)
27+
endif()

vcpkg_overlay/ports/gdal/portfile.cmake

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ vcpkg_from_github(
22
OUT_SOURCE_PATH SOURCE_PATH
33
REPO OSGeo/gdal
44
REF "v${VERSION}"
5-
SHA512 02dfa7d57c37b0f0c5994cae6632286a8671039b5aa9853360c08df8210d93227e42b0f22e74e167dc888761e8118b1b2dd2fe365bdc6c75daf7283c4be89b4c
5+
SHA512 84a9bd58e9992d2d447788727228410184ef31e881026aee1f48766ed8b25039ab1b09afe95c97b66d3a0751bab524dc9bb57ab2c78af53632b52ec8dcd6f4ad
66
HEAD_REF master
77
PATCHES
88
find-link-libraries.patch
99
fix-gdal-target-interfaces.patch
1010
libkml.patch
11+
sqlite3.diff
1112
target-is-valid.patch
1213
)
1314
# `vcpkg clean` stumbles over one subdir
@@ -27,6 +28,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2728
cfitsio GDAL_USE_CFITSIO
2829
curl GDAL_USE_CURL
2930
expat GDAL_USE_EXPAT
31+
expat OGR_ENABLE_DRIVER_XLSX
3032
freexl GDAL_USE_FREEXL
3133
geos GDAL_USE_GEOS
3234
core GDAL_USE_GEOTIFF
@@ -42,6 +44,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
4244
libxml2 GDAL_USE_LIBXML2
4345
mysql-libmariadb GDAL_USE_MYSQL
4446
netcdf GDAL_USE_NETCDF
47+
netcdf GDAL_ENABLE_DRIVER_NETCDF
48+
pcraster GDAL_ENABLE_DRIVER_PCRASTER
4549
odbc GDAL_USE_ODBC
4650
openjpeg GDAL_USE_OPENJPEG
4751
openssl GDAL_USE_OPENSSL
@@ -55,6 +59,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
5559
core GDAL_USE_SHAPELIB_INTERNAL
5660
libspatialite GDAL_USE_SPATIALITE
5761
sqlite3 GDAL_USE_SQLITE3
62+
sqlite3 OGR_ENABLE_DRIVER_GPKG
5863
core GDAL_USE_TIFF
5964
webp GDAL_USE_WEBP
6065
core GDAL_USE_ZLIB
@@ -88,15 +93,19 @@ vcpkg_cmake_configure(
8893
-DCMAKE_DISABLE_FIND_PACKAGE_SWIG=ON
8994
-DGDAL_USE_INTERNAL_LIBS=OFF
9095
-DGDAL_USE_EXTERNAL_LIBS=OFF
91-
-DGDAL_BUILD_OPTIONAL_DRIVERS=ON
92-
-DOGR_BUILD_OPTIONAL_DRIVERS=ON
96+
-DGDAL_BUILD_OPTIONAL_DRIVERS=OFF
97+
-DOGR_BUILD_OPTIONAL_DRIVERS=OFF
98+
-DGDAL_ENABLE_DRIVER_AAIGRID=ON
99+
-DOGR_ENABLE_DRIVER_CSV=ON
93100
-DFIND_PACKAGE2_KEA_ENABLED=OFF
94101
-DGDAL_CHECK_PACKAGE_MySQL_NAMES=unofficial-libmariadb
95102
-DGDAL_CHECK_PACKAGE_MySQL_TARGETS=unofficial::libmariadb
96103
-DMYSQL_LIBRARIES=unofficial::libmariadb
97104
-DGDAL_CHECK_PACKAGE_NetCDF_NAMES=netCDF
98105
-DGDAL_CHECK_PACKAGE_NetCDF_TARGETS=netCDF::netcdf
99106
-DGDAL_CHECK_PACKAGE_QHULL_NAMES=Qhull
107+
-DGDAL_CHECK_PACKAGE_ZSTD_NAMES=zstd
108+
-DGDAL_CHECK_PACKAGE_ZSTD_TARGETS=zstd::libzstd
100109
"-DGDAL_CHECK_PACKAGE_QHULL_TARGETS=${qhull_target}"
101110
"-DQHULL_LIBRARY=${qhull_target}"
102111
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
@@ -120,6 +129,7 @@ list(APPEND CMAKE_PROGRAM_PATH \"\${vcpkg_host_prefix}/tools/pkgconf\")"
120129
if (BUILD_APPS)
121130
vcpkg_copy_tools(
122131
TOOL_NAMES
132+
gdal
123133
gdal_contour
124134
gdal_create
125135
gdal_footprint
@@ -172,6 +182,3 @@ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/cpl_config.h" "#define GDA
172182
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
173183
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
174184
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.TXT")
175-
176-
# does not properly support multi config
177-
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/packages/FindSQLite3.cmake")
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
diff --git a/cmake/modules/packages/FindSQLite3.cmake b/cmake/modules/packages/FindSQLite3.cmake
2+
index 903465b3c9..5d3a067e50 100644
3+
--- a/cmake/modules/packages/FindSQLite3.cmake
4+
+++ b/cmake/modules/packages/FindSQLite3.cmake
5+
@@ -77,7 +77,7 @@ if(SQLite3_INCLUDE_DIR AND SQLite3_LIBRARY)
6+
cmake_push_check_state(RESET)
7+
# check column metadata
8+
set(CMAKE_REQUIRED_INCLUDES ${SQLite3_INCLUDE_DIR})
9+
- if( ${SQLite3_LIBRARY} MATCHES "libsqlite3.a")
10+
+ if(0)
11+
if(PC_SQLITE3_STATIC_LDFLAGS)
12+
set(CMAKE_REQUIRED_LIBRARIES ${PC_SQLITE3_STATIC_LDFLAGS})
13+
else()
14+
@@ -111,15 +111,10 @@ if(SQLite3_INCLUDE_DIR AND SQLite3_LIBRARY)
15+
endif()
16+
else()
17+
set(CMAKE_REQUIRED_LIBRARIES ${SQLite3_LIBRARY})
18+
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
19+
+ list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} "")
20+
endif()
21+
22+
- # Trick to force CMake to re-run if SQLite3_LIBRARY changes
23+
- # Useful in development situations when switching/refreshing the library
24+
- set_property(
25+
- DIRECTORY
26+
- APPEND
27+
- PROPERTY CMAKE_CONFIGURE_DEPENDS "${SQLite3_LIBRARY}"
28+
- )
29+
# Invalidate cached variables if SQLite3_LIBRARY changes
30+
file(TIMESTAMP "${SQLite3_LIBRARY}" SQLite3_LIBRARY_TIMESTAMP)
31+
if( SQLite3_LIBRARY_TIMESTAMP_OLD_VAL AND
32+
@@ -179,6 +174,7 @@ if(SQLite3_FOUND)
33+
INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIRS}"
34+
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
35+
IMPORTED_LOCATION "${SQLite3_LIBRARY}")
36+
+ endif()
37+
if(SQLite3_HAS_COLUMN_METADATA)
38+
set_property(TARGET SQLite::SQLite3 APPEND PROPERTY
39+
INTERFACE_COMPILE_DEFINITIONS "SQLite3_HAS_COLUMN_METADATA")
40+
@@ -187,5 +183,9 @@ if(SQLite3_FOUND)
41+
set_property(TARGET SQLite::SQLite3 APPEND PROPERTY
42+
INTERFACE_COMPILE_DEFINITIONS "SQLite3_HAS_RTREE")
43+
endif()
44+
+ get_target_property(definitions SQLite::SQLite3 INTERFACE_COMPILE_DEFINITIONS)
45+
+ if(definitions)
46+
+ list(REMOVE_DUPLICATES definitions)
47+
+ set_target_properties(SQLite::SQLite3 PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${definitions}")
48+
endif()
49+
endif()

vcpkg_overlay/ports/gdal/vcpkg.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gdal",
3-
"version-semver": "3.10.3",
3+
"version-semver": "3.11.4",
44
"description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data",
55
"homepage": "https://gdal.org",
66
"license": null,
@@ -53,7 +53,7 @@
5353
"lzma",
5454
{
5555
"name": "netcdf",
56-
"platform": "!uwp & !(windows & arm64) & !android & !ios"
56+
"platform": "!android & !ios & !(windows & arm64) & !uwp"
5757
},
5858
"openjpeg",
5959
"openssl",
@@ -93,6 +93,7 @@
9393
},
9494
"cfitsio": {
9595
"description": "Enable cfitsio support",
96+
"supports": "!(android & arm32)",
9697
"dependencies": [
9798
"cfitsio"
9899
]
@@ -182,7 +183,10 @@
182183
"libspatialite": {
183184
"description": "Create or update SpatiaLite databases using libspatialite",
184185
"dependencies": [
185-
"libspatialite"
186+
{
187+
"name": "libspatialite",
188+
"default-features": false
189+
}
186190
]
187191
},
188192
"libxml2": {
@@ -312,10 +316,6 @@
312316
}
313317
]
314318
},
315-
"system-libraries": {
316-
"$supports": "!windows",
317-
"description": "This feature does nothing. It is retained for compatibility."
318-
},
319319
"tools": {
320320
"description": "Builds gdal and ogr executables"
321321
},
@@ -330,6 +330,9 @@
330330
"dependencies": [
331331
"zstd"
332332
]
333+
},
334+
"pcraster": {
335+
"description": "Pcraster driver"
333336
}
334337
}
335338
}

vcpkg_overlay/vcpkg.just

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# detect the vcpkg triplet based on the system information
22
windows_triplet := "x64-windows-static"
3-
vcpkg_version := "2025-09-03"
4-
vcpkg_tool_url := if os_family() == "windows" {
5-
"https://github.com/microsoft/vcpkg-tool/releases/download/" + vcpkg_version + "/vcpkg.exe"
6-
} else if os() == "macos" {
7-
"https://github.com/microsoft/vcpkg-tool/releases/download/" + vcpkg_version + "/vcpkg-macos"
8-
} else {
9-
"https://github.com/microsoft/vcpkg-tool/releases/download/" + vcpkg_version + "/vcpkg-muslc"
10-
}
113

124
VCPKG_DEFAULT_TRIPLET := if os_family() == "windows" {
135
windows_triplet
@@ -27,7 +19,7 @@ in_git_repo := path_exists(join(justfile_directory(), ".git"))
2719

2820
clone_vcpkg:
2921
- rm -rf '{{join(justfile_directory(), "build", "vcpkg")}}'
30-
mkdir '{{join(justfile_directory(), "build")}}'
22+
mkdir -p '{{join(justfile_directory(), "build")}}'
3123
git clone --depth 1 https://github.com/microsoft/vcpkg.git '{{join(justfile_directory(), "build", "vcpkg")}}'
3224

3325

0 commit comments

Comments
 (0)