summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-11-21 21:22:07 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2023-11-21 23:19:57 +0100
commit34ed053b36d0d8f3985ff95d1052bbe9effffed3 (patch)
tree24c9c54709c773bc4ef332d42f7dbca192585c9e /sci-libs
parentmedia-gfx/exiv2: drop 0.28.1 (diff)
downloadgentoo-34ed053b36d0d8f3985ff95d1052bbe9effffed3.tar.gz
gentoo-34ed053b36d0d8f3985ff95d1052bbe9effffed3.tar.bz2
gentoo-34ed053b36d0d8f3985ff95d1052bbe9effffed3.zip
sci-libs/gdal: Fix build with dev-libs/libxml2-2.12.0
Closes: https://bugs.gentoo.org/917564 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/gdal/files/gdal-3.8.0-libxml2-2.12-1.patch22
-rw-r--r--sci-libs/gdal/files/gdal-3.8.0-libxml2-2.12-2.patch27
-rw-r--r--sci-libs/gdal/gdal-3.8.0.ebuild1
3 files changed, 50 insertions, 0 deletions
diff --git a/sci-libs/gdal/files/gdal-3.8.0-libxml2-2.12-1.patch b/sci-libs/gdal/files/gdal-3.8.0-libxml2-2.12-1.patch
new file mode 100644
index 000000000000..606dc3e05089
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-3.8.0-libxml2-2.12-1.patch
@@ -0,0 +1,22 @@
+From cbed9fc91dffba30d0f9a6a06a412a04d9cd36fa Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sat, 18 Nov 2023 15:38:46 +0100
+Subject: [PATCH] Fix build error with libxml2 2.12
+
+---
+ port/cpl_xml_validate.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/port/cpl_xml_validate.cpp b/port/cpl_xml_validate.cpp
+index 7eb49ff40c90..29070d957b65 100644
+--- a/port/cpl_xml_validate.cpp
++++ b/port/cpl_xml_validate.cpp
+@@ -914,7 +914,7 @@ static void CPLLibXMLWarningErrorCallback(void *ctx, const char *msg, ...)
+
+ if (strstr(pszStr, "since this namespace was already imported") == nullptr)
+ {
+- xmlErrorPtr pErrorPtr = xmlGetLastError();
++ const xmlError *pErrorPtr = xmlGetLastError();
+ const char *pszFilename = static_cast<char *>(ctx);
+ char *pszStrDup = CPLStrdup(pszStr);
+ int nLen = static_cast<int>(strlen(pszStrDup));
diff --git a/sci-libs/gdal/files/gdal-3.8.0-libxml2-2.12-2.patch b/sci-libs/gdal/files/gdal-3.8.0-libxml2-2.12-2.patch
new file mode 100644
index 000000000000..410b79e2ec15
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-3.8.0-libxml2-2.12-2.patch
@@ -0,0 +1,27 @@
+From ec33f6d6dfe944f59dc5454d01b4d000d9479c02 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sat, 18 Nov 2023 16:33:25 +0100
+Subject: [PATCH] Fix build error with libxml2 2.12 (cont'd)
+
+---
+ gcore/gdaljp2metadatagenerator.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/gcore/gdaljp2metadatagenerator.cpp b/gcore/gdaljp2metadatagenerator.cpp
+index b6caa2db9def..751fa3d5e9dd 100644
+--- a/gcore/gdaljp2metadatagenerator.cpp
++++ b/gcore/gdaljp2metadatagenerator.cpp
+@@ -357,7 +357,12 @@ static CPLString GDALGMLJP2EvalExpr(const CPLString &osTemplate,
+ /************************************************************************/
+
+ static void GDALGMLJP2XPathErrorHandler(void * /* userData */,
+- xmlErrorPtr error)
++#if LIBXML_VERSION >= 21200
++ const xmlError *error
++#else
++ xmlErrorPtr error
++#endif
++)
+ {
+ if (error->domain == XML_FROM_XPATH && error->str1 != nullptr &&
+ error->int1 < static_cast<int>(strlen(error->str1)))
diff --git a/sci-libs/gdal/gdal-3.8.0.ebuild b/sci-libs/gdal/gdal-3.8.0.ebuild
index 8c8c20bcd12e..97cfa8eb4057 100644
--- a/sci-libs/gdal/gdal-3.8.0.ebuild
+++ b/sci-libs/gdal/gdal-3.8.0.ebuild
@@ -101,6 +101,7 @@ QA_CONFIG_IMPL_DECL_SKIP=(
PATCHES=(
"${FILESDIR}"/${PN}-3.6.4-abseil-cpp-20230125.2-c++17.patch
"${FILESDIR}"/${PN}-3.7.0-zlib-OF.patch
+ "${FILESDIR}"/${P}-libxml2-2.12-{1,2}.patch # bug 917564
)
pkg_setup() {