Skip to content

Commit 3303f02

Browse files
GDAL: New version 3.10.2 (#10798)
* [GDAL] Bump v3.10.2 * build for more platforms * bump libraries to riscv supported versions, where available * Bump NetCDF and libpq * reactivate hdf4 * GDAL: Update compat entries * GDAL: Switch back to Arrow 18 * GDAL: Install license * GDAL: Arrow is not available on riscv64 * GDAL: Correct syntax error * GDAL: Remove PCRE2 compat bound --------- Co-authored-by: Jeremiah <[email protected]>
1 parent 24d3985 commit 3303f02

File tree

1 file changed

+48
-67
lines changed

1 file changed

+48
-67
lines changed

G/GDAL/build_tarballs.jl

+48-67
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using BinaryBuilder, Pkg
44

55
name = "GDAL"
6-
upstream_version = v"3.10.1"
6+
upstream_version = v"3.10.2"
77
# The version offset is used for two purposes:
88
# - If we need to release multiple jll packages for the same GDAL
99
# library (usually for weird packaging reasons) then we increase the
@@ -19,7 +19,7 @@ version = VersionNumber(upstream_version.major * 100 + version_offset.major,
1919
# Collection of sources required to build GDAL
2020
sources = [
2121
GitSource("https://github.com/OSGeo/gdal.git",
22-
"9b7a7c8ffa7b7aff696974c432d4254a809b3efe"),
22+
"e31053b64d9db2e0dc6f8eec0982908a2087eedf"),
2323
ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz",
2424
"2408d07df7f324d3beea818585a6d990ba99587c218a3969f924dfcc4de93b62"),
2525
DirectorySource("./bundled")
@@ -54,10 +54,6 @@ if [[ "${target}" == x86_64-apple-darwin* ]]; then
5454
popd
5555
fi
5656
57-
# We cannot enable HDF4. Our HDF4_jll package provides a file `netcdf.h` that conflicts with NetCDF_jll.
58-
# -DGDAL_ENABLE_DRIVER_HDF4=ON
59-
# -DGDAL_USE_HDF4=ON
60-
6157
CMAKE_FLAGS=(
6258
-B build
6359
-DCMAKE_INSTALL_PREFIX=${prefix}
@@ -68,20 +64,21 @@ CMAKE_FLAGS=(
6864
-DBUILD_CSHARP_BINDINGS=OFF
6965
-DBUILD_JAVA_BINDINGS=OFF
7066
-DBUILD_PYTHON_BINDINGS=OFF
71-
-DGDAL_USE_ARROW=ON
67+
-DGDAL_ENABLE_DRIVER_HDF4=ON
7268
-DGDAL_USE_BLOSC=ON
7369
-DGDAL_USE_CURL=ON
7470
-DGDAL_USE_EXPAT=ON
71+
-DGDAL_USE_HDF4=ON
7572
-DGDAL_USE_GEOS=ON
7673
-DGDAL_USE_GEOTIFF=ON
77-
# TODO: Disable gif only on Windows
78-
-DGDAL_USE_GIF=OFF # Would break GDAL on Windows as of Giflib_jll v5.2.2 (#8781)
74+
-DGDAL_USE_HDF4=ON
75+
-DGDAL_USE_HDF5=ON
7976
-DGDAL_USE_LERC=ON
8077
-DGDAL_USE_LIBLZMA=ON
8178
-DGDAL_USE_LIBXML2=ON
8279
-DGDAL_USE_LZ4=ON
80+
-DGDAL_USE_NETCDF=ON
8381
-DGDAL_USE_OPENJPEG=ON
84-
-DGDAL_USE_PARQUET=ON
8582
-DGDAL_USE_PNG=ON
8683
-DGDAL_USE_POSTGRESQL=ON
8784
-DGDAL_USE_QHULL=ON
@@ -97,35 +94,29 @@ CMAKE_FLAGS=(
9794
-DPostgreSQL_LIBRARY=${libdir}/libpq.${dlext}
9895
)
9996
100-
# NetCDF is the most restrictive dependency as far as platform availability, so we'll use it where applicable but disable it otherwise
101-
if ! find ${libdir} -name "libnetcdf*.${dlext}" -exec false '{}' +; then
102-
CMAKE_FLAGS+=(-DGDAL_USE_NETCDF=ON)
103-
else
104-
echo "Disabling NetCDF support"
105-
CMAKE_FLAGS+=(-DGDAL_USE_NETCDF=OFF)
97+
# Use Arrow only if available
98+
if [ -e "${libdir}/libarrow.${dlext}" ]; then
99+
CMAKE_FLAGS+=(
100+
-DGDAL_USE_ARROW=ON
101+
-DGDAL_USE_PARQUET=ON
102+
)
106103
fi
107104
108-
# HDF5 is also a restrictive dependency as far as platform availability, so we'll use it where applicable but disable it otherwise
109-
if ! find ${libdir} -name "libhdf5*.${dlext}" -exec false '{}' +; then
110-
CMAKE_FLAGS+=(-DGDAL_USE_HDF5=ON)
111-
else
112-
echo "Disabling HDF5 support"
113-
CMAKE_FLAGS+=(-DGDAL_USE_HDF5=OFF)
105+
# Disable gif on Windows
106+
if [[ "${target}" == *mingw* ]]; then
107+
CMAKE_FLAGS+=(-DGDAL_USE_GIF=OFF) # Would break GDAL on Windows as of Giflib_jll v5.2.2 (#8781)
114108
fi
115109
116110
cmake ${CMAKE_FLAGS[@]}
117111
cmake --build build --parallel ${nproc}
118112
cmake --install build
113+
114+
install_license LICENSE.TXT
119115
"""
120116

121117
# These are the platforms we will build for by default, unless further
122118
# platforms are passed in on the command line
123119
platforms = expand_cxxstring_abis(supported_platforms())
124-
# Disable until the dependencies are available for this platform
125-
filter!(p -> !(Sys.isfreebsd(p) && arch(p) == "aarch64"), platforms)
126-
127-
# Disable riscv for now
128-
platforms = filter!(p -> arch(p) != "riscv64", platforms)
129120

130121
# The products that we will ensure are always built
131122
products = [
@@ -183,50 +174,40 @@ products = [
183174
ExecutableProduct("ogrtindex", :ogrtindex_path),
184175
]
185176

186-
hdf5_platforms = [
187-
Platform("x86_64", "linux"),
188-
Platform("aarch64", "linux"),
189-
Platform("armv6l", "linux"),
190-
Platform("armv7l", "linux"),
191-
Platform("i686", "linux"),
192-
Platform("powerpc64le", "linux"),
193-
Platform("x86_64", "macos"),
194-
Platform("aarch64", "macos"),
195-
Platform("x86_64", "windows"),
196-
Platform("i686", "windows"),
197-
]
198-
hdf5_platforms = expand_cxxstring_abis(hdf5_platforms)
199-
200177
# Dependencies that must be installed before this package can be built
201178
dependencies = [
202-
BuildDependency(PackageSpec(; name="OpenMPI_jll", version=v"4.1.6"); platforms=filter(p -> nbits(p)==32, platforms)),
203-
Dependency("Arrow_jll"; compat="18.1.0"),
204-
Dependency("Blosc_jll"; compat="1.21.1"),
205-
Dependency("Expat_jll"; compat="2.2.10"),
206-
Dependency("GEOS_jll"; compat="3.11.2"),
207-
# Dependency("HDF4_jll"; compat="4.3.0"),
208-
# We had to restrict compat with HDF5 because of ABI breakage:
209-
# https://github.com/JuliaPackaging/Yggdrasil/pull/10347#issuecomment-2662923973
210-
# Updating to a newer HDF5 version is likely possible without problems but requires rebuilding this package
211-
Dependency("HDF5_jll"; compat="=1.14.3", platforms=hdf5_platforms),
212-
Dependency("LERC_jll"; compat="4"),
179+
BuildDependency(PackageSpec(; name="OpenMPI_jll", version=v"4.1.8"); platforms=filter(p -> nbits(p)==32, platforms)),
180+
# We cannot build with Arrow 19.0.0. There are undefined
181+
# references to many GLIBC symbols from Arrow_jll. It might be
182+
# that we would need to switch to a newer GCC when building;
183+
# Arrow_jll uses GCC 11.1
184+
# Dependency("Arrow_jll"; compat="19.0.0"),
185+
Dependency("Arrow_jll"; compat="18.1.1"),
186+
Dependency("Blosc_jll"; compat="1.21.7"),
187+
Dependency("Expat_jll"; compat="2.6.5"),
188+
Dependency("GEOS_jll"; compat="3.13.1"),
189+
Dependency("HDF4_jll"; compat="4.3.1"),
190+
Dependency("HDF5_jll"; compat="~1.14.6"),
191+
Dependency("LERC_jll"; compat="4.0.1"),
213192
Dependency("LibCURL_jll"; compat="7.73,8"),
214-
Dependency("LibPQ_jll"; compat="16"),
215-
Dependency("Libtiff_jll"; compat="4.7"),
216-
Dependency("Lz4_jll"; compat="1.9.3"),
217-
Dependency("NetCDF_jll"; compat="400.902.210", platforms=hdf5_platforms),
218-
Dependency("OpenJpeg_jll"; compat="2.5"),
219-
Dependency("PCRE2_jll"; compat="10.35.0"),
220-
Dependency("PROJ_jll"; compat="902.500"),
221-
Dependency("Qhull_jll"; compat="8.0.999"),
222-
Dependency("SQLite_jll"; compat="3.45"),
223-
Dependency("XML2_jll"; compat="2.9.11"),
224-
Dependency("XZ_jll"; compat="5.2.5"),
193+
Dependency("LibPQ_jll"; compat="16.8"),
194+
Dependency("Libtiff_jll"; compat="4.7.1"),
195+
Dependency("Lz4_jll"; compat="1.10.1"),
196+
Dependency("NetCDF_jll"; compat="401.900.300"),
197+
Dependency("OpenJpeg_jll"; compat="2.5.4"),
198+
# No compat bound so that things work for riscv64
199+
# Dependency("PCRE2_jll"; compat="10.35.0"),
200+
Dependency("PCRE2_jll"),
201+
Dependency("PROJ_jll"; compat="902.500.100"),
202+
Dependency("Qhull_jll"; compat="10008.0.1004"),
203+
Dependency("SQLite_jll"; compat="3.48.0"),
204+
Dependency("XML2_jll"; compat="2.13.6"),
205+
Dependency("XZ_jll"; compat="5.6.4"),
225206
Dependency("Zlib_jll"; compat="1.2.12"),
226-
Dependency("Zstd_jll"; compat="1.5.6"),
227-
Dependency("libgeotiff_jll"; compat="100.702.300"),
228-
Dependency("libpng_jll"; compat="1.6.38"),
229-
Dependency("libwebp_jll"; compat="1.2.4"),
207+
Dependency("Zstd_jll"; compat="1.5.7"),
208+
Dependency("libgeotiff_jll"; compat="100.702.400"),
209+
Dependency("libpng_jll"; compat="1.6.47"),
210+
Dependency("libwebp_jll"; compat="1.5.0"),
230211
]
231212

232213
# Build the tarballs, and possibly a `build.jl` as well.

0 commit comments

Comments
 (0)