Skip to content

Commit 49b44e8

Browse files
[libspatialite] Build v5.1.0 (#10438)
* [libspatialite] Build v5.1.0 * update source url * try gcc 8 for better libxml handling * add openssl * bump to geos with riscv * drop excess mingw patch * add patch for libxml http deprecation * drop unnecessary Darwin patch * fix mod_spatialite renaming * retrigger build * ensure aarch freebsd gets picked up (?)
1 parent d1226ad commit 49b44e8

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

L/libspatialite/build_tarballs.jl

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
# Note that this script can accept some limited command-line arguments, run
22
# `julia build_tarballs.jl --help` to see a usage message.
33
using BinaryBuilder, Pkg
4+
using BinaryBuilderBase: get_addable_spec
45

56
name = "libspatialite"
6-
version = v"5.0.1"
7+
version = v"5.1.0"
78

89
# Collection of sources required to complete build
910
sources = [
10-
ArchiveSource("http://www.gaia-gis.it/gaia-sins/libspatialite-$(version).tar.gz", "eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98"),
11+
ArchiveSource("http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-$(version).tar.gz", "43be2dd349daffe016dd1400c5d11285828c22fea35ca5109f21f3ed50605080"),
1112
DirectorySource("./bundled")
1213
]
1314

1415
# Bash recipe for building across all platforms
1516
script = raw"""
1617
cd $WORKSPACE/srcdir/libspatialite-*
1718
19+
# Since libxml2 no longer supports HTTP, we removed that reference from libspatialite.
20+
atomic_patch -p1 ../patches/libxml2-http-deprecated.patch
21+
1822
# Detection of MinGW and macOS is totally wrong: `target_alias` is empty. We
1923
# could use `host_alias` (why not `host`?), but we should do regex matching,
2024
# which doesn't work very well with Alpine's (da)sh, easiest thing is to check
@@ -27,11 +31,6 @@ autoreconf -vi
2731
if [[ ${target} == *-linux-musl* ]] || [[ ${target} == *-freebsd* ]]; then
2832
#help find sqlite.h header usually
2933
export CPPFLAGS="-I${includedir}"
30-
31-
elif [[ "${target}" == *-mingw* ]]; then
32-
33-
atomic_patch -p1 ${WORKSPACE}/srcdir/patches/mingw-lowercase-include.patch
34-
3534
fi
3635
3736
./configure \
@@ -67,9 +66,9 @@ make install
6766
if [[ "${target}" == *-darwin* ]]; then
6867
# I have no idea how they managed to get the extension wrong only for mod_spatialite,
6968
# but they did. Let's rename everything manually, sigh.
70-
mv "${libdir}/mod_spatialite.7.so" "${libdir}/mod_spatialite.7.${dlext}"
69+
mv "${libdir}/mod_spatialite.8.so" "${libdir}/mod_spatialite.8.${dlext}"
7170
rm "${libdir}/mod_spatialite.so"
72-
ln -s "mod_spatialite.7.${dlext}" "${libdir}/mod_spatialite.${dlext}"
71+
ln -s "mod_spatialite.8.${dlext}" "${libdir}/mod_spatialite.${dlext}"
7372
sed -i "s/\.so/.${dlext}/g" ${libdir}/mod_spatialite.la
7473
fi
7574
"""
@@ -78,7 +77,6 @@ fi
7877
# platforms are passed in on the command line
7978
platforms = expand_cxxstring_abis(supported_platforms())
8079

81-
8280
# The products that we will ensure are always built
8381
products = [
8482
LibraryProduct("mod_spatialite", :mod_spatialite),
@@ -88,13 +86,14 @@ products = [
8886
# Dependencies that must be installed before this package can be built
8987
dependencies = [
9088
Dependency("SQLite_jll")
91-
Dependency("GEOS_jll"; compat="~3.9")
92-
Dependency(PackageSpec(name="PROJ_jll", uuid="58948b4f-47e0-5654-a9ad-f609743f8632"))
89+
Dependency("GEOS_jll"; compat="~3.13.1")
90+
Dependency(get_addable_spec("PROJ_jll", v"902.500.100+1"); compat="902.500.100")
9391
Dependency(PackageSpec(name="Libiconv_jll", uuid="94ce4f54-9a6c-5748-9c1c-f9c7231a4531"))
9492
Dependency(PackageSpec(name="Zlib_jll", uuid="83775a58-1f1d-513f-b197-d71354ab007a"))
9593
Dependency(PackageSpec(name="XML2_jll", uuid="02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"))
94+
Dependency(get_addable_spec("OpenSSL_jll", v"3.0.15+2"); compat="3.0.15", platforms=filter(p -> !(Sys.iswindows(p) || Sys.isapple(p)), platforms))
9695
]
9796

9897
# Build the tarballs, and possibly a `build.jl` as well.
9998
#GEOS uses preferred of 6, so match that here
100-
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version = v"6")
99+
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version = v"8")
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/wfs/wfs_in.c b/src/wfs/wfs_in.c
2+
index fe07a0d..c9cfac5 100644
3+
--- a/src/wfs/wfs_in.c
4+
+++ b/src/wfs/wfs_in.c
5+
@@ -4637,7 +4637,7 @@ SPATIALITE_DECLARE void
6+
reset_wfs_http_connection (void)
7+
{
8+
/* Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings */
9+
- xmlNanoHTTPCleanup ();
10+
+ return;
11+
}
12+
13+
#else /* LIBXML2 isn't enabled */

L/libspatialite/bundled/patches/mingw-lowercase-include.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)