commit: ab4e4668cb945f5dab1cdb3f31daf6deda35b552 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Tue Sep 9 21:57:48 2025 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Tue Sep 9 22:34:38 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab4e4668
dev-db/spatialite: Fix build with >=dev-libs/libxml2-2.14 Patch taken from: https://www.gaia-gis.it/fossil/libspatialite/tktview?name=ac85f0fca3 Closes: https://bugs.gentoo.org/955675 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> .../files/spatialite-5.1.0-libxml2-2.14.patch | 52 ++++++++++++++++++++++ dev-db/spatialite/spatialite-5.1.0-r3.ebuild | 5 ++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/dev-db/spatialite/files/spatialite-5.1.0-libxml2-2.14.patch b/dev-db/spatialite/files/spatialite-5.1.0-libxml2-2.14.patch new file mode 100644 index 000000000000..d45897aac781 --- /dev/null +++ b/dev-db/spatialite/files/spatialite-5.1.0-libxml2-2.14.patch @@ -0,0 +1,52 @@ +Source: https://www.gaia-gis.it/fossil/libspatialite/tktview?name=ac85f0fca3 + +Index: spatialite-5.1.0/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -61,6 +61,8 @@ AH_TEMPLATE([OMIT_FREEXL], + [Should be defined in order to disable FREEXL support.]) + AH_TEMPLATE([ENABLE_LIBXML2], + [Should be defined in order to enable LIBXML2 support.]) ++AH_TEMPLATE([ENABLE_LIBXML2_NANOHTTP], ++ [Should be defined in order to enable LIBXML2 HTTP support.]) + AH_TEMPLATE([ENABLE_MINIZIP], + [Should be defined in order to enable MiniZIP support.]) + AH_TEMPLATE([ENABLE_GEOPACKAGE], +@@ -441,6 +443,7 @@ if test x"$enable_libxml2" != "xno"; the + AC_SUBST(LIBXML2_CFLAGS) + AC_SUBST(LIBXML2_LIBS) + AC_DEFINE(ENABLE_LIBXML2) ++ AC_SEARCH_LIBS(xmlNanoHTTPCleanup,xml2,AC_DEFINE(ENABLE_LIBXML2_NANOHTTP),,) + fi + + #----------------------------------------------------------------------- +Index: spatialite-5.1.0/src/wfs/wfs_in.c +=================================================================== +--- a/src/wfs/wfs_in.c ++++ b/src/wfs/wfs_in.c +@@ -76,7 +76,10 @@ Regione Toscana - Settore Sistema Inform + #ifdef ENABLE_LIBXML2 /* LIBXML2 enabled: supporting XML documents */ + + #include <libxml/parser.h> ++ ++#ifdef ENABLE_LIBXML2_NANOHTTP + #include <libxml/nanohttp.h> ++#endif + + #define MAX_GTYPES 28 + +@@ -4636,8 +4639,13 @@ get_wfs_schema_column_info (gaiaWFScolum + SPATIALITE_DECLARE void + reset_wfs_http_connection (void) + { ++#ifdef ENABLE_LIBXML2_NANOHTTP + /* Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings */ + xmlNanoHTTPCleanup (); ++#else ++/* LIBXML2 doesn't have HTTP support: does absolutely nothing */ ++ return; ++#endif + } + + #else /* LIBXML2 isn't enabled */ diff --git a/dev-db/spatialite/spatialite-5.1.0-r3.ebuild b/dev-db/spatialite/spatialite-5.1.0-r3.ebuild index dce860a3c2a2..ad29c2aaa680 100644 --- a/dev-db/spatialite/spatialite-5.1.0-r3.ebuild +++ b/dev-db/spatialite/spatialite-5.1.0-r3.ebuild @@ -32,7 +32,10 @@ RDEPEND=" " DEPEND="${RDEPEND}" -PATCHES=( "${FILESDIR}/${P}-macro-surgery.patch" ) +PATCHES=( + "${FILESDIR}/${P}-macro-surgery.patch" + "${FILESDIR}/${P}-libxml2-2.14.patch" # bug 955675 +) src_prepare() { default
