Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] libxml2: update to 2.12.5.
@ 2024-02-19  5:20 oreo639
  2024-02-19  5:26 ` oreo639
                   ` (30 more replies)
  0 siblings, 31 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  5:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

There is a new pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
The only other build failure not addressed is vtk, which I am making an update pr for.
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 19451 bytes --]

From fe9f34bc772f74b5f1b787f651d96a4f21bc03f6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 01/10] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..270753e103cee1 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 16163aa0eb109586bb625c46925b79e7af67026a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:34:20 -0800
Subject: [PATCH 02/10] collectd: update tarballs location

---
 srcpkgs/collectd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/collectd/template b/srcpkgs/collectd/template
index 0cbb7c457fb9ec..1b0b1d192ce8cd 100644
--- a/srcpkgs/collectd/template
+++ b/srcpkgs/collectd/template
@@ -20,7 +20,7 @@ short_desc="Daemon which collects system performance statistics periodically"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only, MIT"
 homepage="https://collectd.org"
-distfiles="https://collectd.org/files/${pkgname}-${version}.tar.bz2"
+distfiles="https://storage.googleapis.com/collectd-tarballs/${pkgname}-${version}.tar.bz2"
 checksum=5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6
 LDFLAGS="-lgcrypt"
 

From 4baf80f8e2e2cc6f5fe83cfbbdfad78055ab88d7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 17:50:25 -0800
Subject: [PATCH 03/10] zabbix: update distfiles url

---
 srcpkgs/zabbix/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/zabbix/template b/srcpkgs/zabbix/template
index aa2615c12dc4bb..707b48567e87ec 100644
--- a/srcpkgs/zabbix/template
+++ b/srcpkgs/zabbix/template
@@ -15,7 +15,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://www.zabbix.com"
 changelog="https://www.zabbix.com/rn/rn${version}"
-distfiles="https://cdn.zabbix.com/zabbix/sources/stable/${version%.*}/zabbix-${version}.tar.gz"
+distfiles="https://cdn.zabbix.com/zabbix/sources/oldstable/${version%.*}/zabbix-${version}.tar.gz"
 checksum=f0e7a9abb0f65d700f531253b91c31165077a9c94769cc8d238a423ada852773
 conf_files="/etc/zabbix_server.conf"
 system_accounts="_zabbix_server"

From 63cd00f39109e021f5b1fa54c44815c201f3d7d4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 04/10] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..dc5b0f53460c9a
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 0323f4f070853f99406d0cd106063364006b2274 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 05/10] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..eb8c8eb7709a87
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From 1a312009eb9f79ae0514544de4459fe8d29b4702 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 15:13:02 -0800
Subject: [PATCH 06/10] libgdal: update to 3.8.4.

---
 common/shlibs                          |  2 +-
 srcpkgs/libgdal/patches/10-atoll.patch | 34 --------------------------
 srcpkgs/libgdal/template               |  6 ++---
 3 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/10-atoll.patch

diff --git a/common/shlibs b/common/shlibs
index 3cf507d8ada879..f5b32693cae681 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2459,7 +2459,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.31 libgdal-3.5.3_1
+libgdal.so.34 libgdal-3.8.4_1
 libosgViewer.so.161 osg-3.6.5_1
 libosgShadow.so.161 osg-3.6.5_1
 libosgParticle.so.161 osg-3.6.5_1
diff --git a/srcpkgs/libgdal/patches/10-atoll.patch b/srcpkgs/libgdal/patches/10-atoll.patch
deleted file mode 100644
index a114098612c522..00000000000000
--- a/srcpkgs/libgdal/patches/10-atoll.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Holger Jaekel <holger.jaekel@gmx.de>
-Summary: musl atoll() doesn't return ERANGE in case of overflow
-----
-
---- a/port/cpl_conv.cpp
-+++ b/port/cpl_conv.cpp
-@@ -1011,8 +1011,6 @@
- #endif
- }
- 
--#if defined(__MINGW32__) || defined(__sun__)
--
- // mingw atoll() doesn't return ERANGE in case of overflow
- static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
- {
-@@ -1035,8 +1033,6 @@
-     return strcmp(szBuffer, pszString) != 0;
- }
- 
--#endif
--
- /************************************************************************/
- /*                          CPLAtoGIntBigEx()                           */
- /************************************************************************/
-@@ -1065,9 +1061,7 @@
-     GIntBig nVal = atol(pszString);
- #endif
-     if( errno == ERANGE
--#if defined(__MINGW32__) || defined(__sun__)
-         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
--#endif
-         )
-     {
-         if( pbOverflow )
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d5850fb768f669..93d916099045c0 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.5.3
-revision=12
+version=3.8.4
+revision=1
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON
@@ -21,7 +21,7 @@ license="MIT"
 homepage="https://www.gdal.org"
 changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
 distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
+checksum=0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce
 python_version=3
 
 if [ -z "$CROSS_BUILD" ]; then

From 208a4d06fe55943a5536ed757cc98e5786fa1214 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 07/10] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f288ce9a66b098
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 0f056abc27e7f28666bc78c004abd3a5281ca43e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:59:44 -0800
Subject: [PATCH 08/10] 0ad: fix build for gcc 13

---
 srcpkgs/0ad/patches/fix-gcc13.patch | 48 +++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 srcpkgs/0ad/patches/fix-gcc13.patch

diff --git a/srcpkgs/0ad/patches/fix-gcc13.patch b/srcpkgs/0ad/patches/fix-gcc13.patch
new file mode 100644
index 00000000000000..ad40bceffc7cbc
--- /dev/null
+++ b/srcpkgs/0ad/patches/fix-gcc13.patch
@@ -0,0 +1,48 @@
+From 093e1eb23519ab4a4633a999a555a58e4fd5343e Mon Sep 17 00:00:00 2001
+From: Stan <Stan@3db68df2-c116-0410-a063-a993310a9797>
+Date: Sat, 13 May 2023 12:08:23 +0000
+Subject: [PATCH] Fix compilation with GCC 13.
+
+gcc-13 less often includes cstdint so one might need to include it manually if needed.
+
+The headers already included in Message.h are included within namespace AtlasMessage which didn't break by chance, move them out and add cstdint.
+
+Patch by: @sera
+Reviewed by: @phosit
+Fixes: #6800
+Differential Revision: https://code.wildfiregames.com/D4997
+
+git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@27644 3db68df2-c116-0410-a063-a993310a9797
+---
+ source/tools/atlas/GameInterface/Messages.h | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/source/tools/atlas/GameInterface/Messages.h b/source/tools/atlas/GameInterface/Messages.h
+index 2fa47809213..a486d93a687 100644
+--- a/source/tools/atlas/GameInterface/Messages.h
++++ b/source/tools/atlas/GameInterface/Messages.h
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2022 Wildfire Games.
++/* Copyright (C) 2023 Wildfire Games.
+  * This file is part of 0 A.D.
+  *
+  * 0 A.D. is free software: you can redistribute it and/or modify
+@@ -18,13 +18,15 @@
+ #ifndef INCLUDED_MESSAGES
+ #define INCLUDED_MESSAGES
+ 
++#include <cstdint>
++#include <string>
++#include <vector>
++
++// Opens namespace AtlasMessage, closes it on second inclusion!
+ #ifndef MESSAGES_SKIP_SETUP
+ #include "MessagesSetup.h"
+ #endif
+ 
+-#include <vector>
+-#include <string>
+-
+ // TODO: organisation, documentation, etc
+ 
+ #ifdef _MSC_VER // (can't use MSC_VERSION here since this file is included by Atlas too)

From 37922b3645a6f460481b7ba7e58ec10b9f679061 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 21:00:02 -0800
Subject: [PATCH 09/10] openmsx: fix build for gcc 13

---
 srcpkgs/openmsx/patches/gcc13.patch | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/openmsx/patches/gcc13.patch

diff --git a/srcpkgs/openmsx/patches/gcc13.patch b/srcpkgs/openmsx/patches/gcc13.patch
new file mode 100644
index 00000000000000..8ab7880d127f98
--- /dev/null
+++ b/srcpkgs/openmsx/patches/gcc13.patch
@@ -0,0 +1,23 @@
+From b50d02069c09f11c687637c64ca1b459a5def28c Mon Sep 17 00:00:00 2001
+From: m9710797 <vermaelen.wouter@gmail.com>
+Date: Sat, 4 Feb 2023 16:37:39 +0100
+Subject: [PATCH] Added missing #include
+
+Thanks to 'musuruan' for reporting.
+https://github.com/openMSX/openMSX/issues/1487
+---
+ src/utils/hash_set.hh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/utils/hash_set.hh b/src/utils/hash_set.hh
+index fb4bb93933..c89883121e 100644
+--- a/src/utils/hash_set.hh
++++ b/src/utils/hash_set.hh
+@@ -11,6 +11,7 @@
+ #include "unreachable.hh"
+ #include "xrange.hh"
+ #include <cassert>
++#include <cstdint>
+ #include <cstdlib>
+ #include <functional>
+ #include <initializer_list>

From d60a07667dcdd0df3652f25bed89b83592f45d97 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 21:00:31 -0800
Subject: [PATCH 10/10] liblangtag: update to 0.6.7.

fixes build with gcc 13
---
 srcpkgs/liblangtag/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/liblangtag/template b/srcpkgs/liblangtag/template
index 63eb8794148d2d..c833c656b73586 100644
--- a/srcpkgs/liblangtag/template
+++ b/srcpkgs/liblangtag/template
@@ -1,6 +1,6 @@
 # Template file for 'liblangtag'
 pkgname=liblangtag
-version=0.6.4
+version=0.6.7
 revision=1
 build_style=gnu-configure
 build_helper=gir
@@ -13,7 +13,7 @@ license="LGPL-3.0-or-later, MPL-2.0"
 homepage="https://bitbucket.org/tagoh/liblangtag/src"
 changelog="https://bitbucket.org/tagoh/liblangtag/raw/main/NEWS"
 distfiles="https://bitbucket.org/tagoh/liblangtag/downloads/liblangtag-${version}.tar.bz2"
-checksum=5701062c17d3e73ddaa49956cbfa5d47d2f8221988dec561c0af2118c1c8a564
+checksum=5ed6bcd4ae3f3c05c912e62f216cd1a44123846147f729a49fb5668da51e030e
 
 build_options="gir"
 build_options_default="gir"

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
@ 2024-02-19  5:26 ` oreo639
  2024-02-19  5:30 ` oreo639
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  5:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951725491

Comment:
It was reported in #47473 that s3fs-fuse fails to build with libmxl2 2.12 but I can't reproduce this.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
  2024-02-19  5:26 ` oreo639
@ 2024-02-19  5:30 ` oreo639
  2024-02-19  5:51 ` [PR PATCH] [Updated] " oreo639
                   ` (28 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  5:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951725491

Comment:
It was reported in #47473 that s3fs-fuse fails to build with libmxl2 2.12 but I can't reproduce this with 2.12.5.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
  2024-02-19  5:26 ` oreo639
  2024-02-19  5:30 ` oreo639
@ 2024-02-19  5:51 ` oreo639
  2024-02-19  6:18 ` sgn
                   ` (27 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  5:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
The only other build failure not addressed is vtk, which is gcc 13 related.
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 20526 bytes --]

From fe9f34bc772f74b5f1b787f651d96a4f21bc03f6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 01/11] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 0000000000000..50a6da45513f8
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e..270753e103cee 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 16163aa0eb109586bb625c46925b79e7af67026a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:34:20 -0800
Subject: [PATCH 02/11] collectd: update tarballs location

---
 srcpkgs/collectd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/collectd/template b/srcpkgs/collectd/template
index 0cbb7c457fb9e..1b0b1d192ce8c 100644
--- a/srcpkgs/collectd/template
+++ b/srcpkgs/collectd/template
@@ -20,7 +20,7 @@ short_desc="Daemon which collects system performance statistics periodically"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only, MIT"
 homepage="https://collectd.org"
-distfiles="https://collectd.org/files/${pkgname}-${version}.tar.bz2"
+distfiles="https://storage.googleapis.com/collectd-tarballs/${pkgname}-${version}.tar.bz2"
 checksum=5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6
 LDFLAGS="-lgcrypt"
 

From 4baf80f8e2e2cc6f5fe83cfbbdfad78055ab88d7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 17:50:25 -0800
Subject: [PATCH 03/11] zabbix: update distfiles url

---
 srcpkgs/zabbix/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/zabbix/template b/srcpkgs/zabbix/template
index aa2615c12dc4b..707b48567e87e 100644
--- a/srcpkgs/zabbix/template
+++ b/srcpkgs/zabbix/template
@@ -15,7 +15,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://www.zabbix.com"
 changelog="https://www.zabbix.com/rn/rn${version}"
-distfiles="https://cdn.zabbix.com/zabbix/sources/stable/${version%.*}/zabbix-${version}.tar.gz"
+distfiles="https://cdn.zabbix.com/zabbix/sources/oldstable/${version%.*}/zabbix-${version}.tar.gz"
 checksum=f0e7a9abb0f65d700f531253b91c31165077a9c94769cc8d238a423ada852773
 conf_files="/etc/zabbix_server.conf"
 system_accounts="_zabbix_server"

From 63cd00f39109e021f5b1fa54c44815c201f3d7d4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 04/11] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..dc5b0f53460c9
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 0323f4f070853f99406d0cd106063364006b2274 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 05/11] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..eb8c8eb7709a8
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From 1a312009eb9f79ae0514544de4459fe8d29b4702 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 15:13:02 -0800
Subject: [PATCH 06/11] libgdal: update to 3.8.4.

---
 common/shlibs                          |  2 +-
 srcpkgs/libgdal/patches/10-atoll.patch | 34 --------------------------
 srcpkgs/libgdal/template               |  6 ++---
 3 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/10-atoll.patch

diff --git a/common/shlibs b/common/shlibs
index 3cf507d8ada87..f5b32693cae68 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2459,7 +2459,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.31 libgdal-3.5.3_1
+libgdal.so.34 libgdal-3.8.4_1
 libosgViewer.so.161 osg-3.6.5_1
 libosgShadow.so.161 osg-3.6.5_1
 libosgParticle.so.161 osg-3.6.5_1
diff --git a/srcpkgs/libgdal/patches/10-atoll.patch b/srcpkgs/libgdal/patches/10-atoll.patch
deleted file mode 100644
index a114098612c52..0000000000000
--- a/srcpkgs/libgdal/patches/10-atoll.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Holger Jaekel <holger.jaekel@gmx.de>
-Summary: musl atoll() doesn't return ERANGE in case of overflow
-----
-
---- a/port/cpl_conv.cpp
-+++ b/port/cpl_conv.cpp
-@@ -1011,8 +1011,6 @@
- #endif
- }
- 
--#if defined(__MINGW32__) || defined(__sun__)
--
- // mingw atoll() doesn't return ERANGE in case of overflow
- static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
- {
-@@ -1035,8 +1033,6 @@
-     return strcmp(szBuffer, pszString) != 0;
- }
- 
--#endif
--
- /************************************************************************/
- /*                          CPLAtoGIntBigEx()                           */
- /************************************************************************/
-@@ -1065,9 +1061,7 @@
-     GIntBig nVal = atol(pszString);
- #endif
-     if( errno == ERANGE
--#if defined(__MINGW32__) || defined(__sun__)
-         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
--#endif
-         )
-     {
-         if( pbOverflow )
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d5850fb768f66..93d916099045c 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.5.3
-revision=12
+version=3.8.4
+revision=1
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON
@@ -21,7 +21,7 @@ license="MIT"
 homepage="https://www.gdal.org"
 changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
 distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
+checksum=0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce
 python_version=3
 
 if [ -z "$CROSS_BUILD" ]; then

From 208a4d06fe55943a5536ed757cc98e5786fa1214 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 07/11] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..f288ce9a66b09
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 0f056abc27e7f28666bc78c004abd3a5281ca43e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:59:44 -0800
Subject: [PATCH 08/11] 0ad: fix build for gcc 13

---
 srcpkgs/0ad/patches/fix-gcc13.patch | 48 +++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 srcpkgs/0ad/patches/fix-gcc13.patch

diff --git a/srcpkgs/0ad/patches/fix-gcc13.patch b/srcpkgs/0ad/patches/fix-gcc13.patch
new file mode 100644
index 0000000000000..ad40bceffc7cb
--- /dev/null
+++ b/srcpkgs/0ad/patches/fix-gcc13.patch
@@ -0,0 +1,48 @@
+From 093e1eb23519ab4a4633a999a555a58e4fd5343e Mon Sep 17 00:00:00 2001
+From: Stan <Stan@3db68df2-c116-0410-a063-a993310a9797>
+Date: Sat, 13 May 2023 12:08:23 +0000
+Subject: [PATCH] Fix compilation with GCC 13.
+
+gcc-13 less often includes cstdint so one might need to include it manually if needed.
+
+The headers already included in Message.h are included within namespace AtlasMessage which didn't break by chance, move them out and add cstdint.
+
+Patch by: @sera
+Reviewed by: @phosit
+Fixes: #6800
+Differential Revision: https://code.wildfiregames.com/D4997
+
+git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@27644 3db68df2-c116-0410-a063-a993310a9797
+---
+ source/tools/atlas/GameInterface/Messages.h | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/source/tools/atlas/GameInterface/Messages.h b/source/tools/atlas/GameInterface/Messages.h
+index 2fa47809213..a486d93a687 100644
+--- a/source/tools/atlas/GameInterface/Messages.h
++++ b/source/tools/atlas/GameInterface/Messages.h
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2022 Wildfire Games.
++/* Copyright (C) 2023 Wildfire Games.
+  * This file is part of 0 A.D.
+  *
+  * 0 A.D. is free software: you can redistribute it and/or modify
+@@ -18,13 +18,15 @@
+ #ifndef INCLUDED_MESSAGES
+ #define INCLUDED_MESSAGES
+ 
++#include <cstdint>
++#include <string>
++#include <vector>
++
++// Opens namespace AtlasMessage, closes it on second inclusion!
+ #ifndef MESSAGES_SKIP_SETUP
+ #include "MessagesSetup.h"
+ #endif
+ 
+-#include <vector>
+-#include <string>
+-
+ // TODO: organisation, documentation, etc
+ 
+ #ifdef _MSC_VER // (can't use MSC_VERSION here since this file is included by Atlas too)

From 37922b3645a6f460481b7ba7e58ec10b9f679061 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 21:00:02 -0800
Subject: [PATCH 09/11] openmsx: fix build for gcc 13

---
 srcpkgs/openmsx/patches/gcc13.patch | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/openmsx/patches/gcc13.patch

diff --git a/srcpkgs/openmsx/patches/gcc13.patch b/srcpkgs/openmsx/patches/gcc13.patch
new file mode 100644
index 0000000000000..8ab7880d127f9
--- /dev/null
+++ b/srcpkgs/openmsx/patches/gcc13.patch
@@ -0,0 +1,23 @@
+From b50d02069c09f11c687637c64ca1b459a5def28c Mon Sep 17 00:00:00 2001
+From: m9710797 <vermaelen.wouter@gmail.com>
+Date: Sat, 4 Feb 2023 16:37:39 +0100
+Subject: [PATCH] Added missing #include
+
+Thanks to 'musuruan' for reporting.
+https://github.com/openMSX/openMSX/issues/1487
+---
+ src/utils/hash_set.hh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/utils/hash_set.hh b/src/utils/hash_set.hh
+index fb4bb93933..c89883121e 100644
+--- a/src/utils/hash_set.hh
++++ b/src/utils/hash_set.hh
+@@ -11,6 +11,7 @@
+ #include "unreachable.hh"
+ #include "xrange.hh"
+ #include <cassert>
++#include <cstdint>
+ #include <cstdlib>
+ #include <functional>
+ #include <initializer_list>

From d60a07667dcdd0df3652f25bed89b83592f45d97 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 21:00:31 -0800
Subject: [PATCH 10/11] liblangtag: update to 0.6.7.

fixes build with gcc 13
---
 srcpkgs/liblangtag/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/liblangtag/template b/srcpkgs/liblangtag/template
index 63eb8794148d2..c833c656b7358 100644
--- a/srcpkgs/liblangtag/template
+++ b/srcpkgs/liblangtag/template
@@ -1,6 +1,6 @@
 # Template file for 'liblangtag'
 pkgname=liblangtag
-version=0.6.4
+version=0.6.7
 revision=1
 build_style=gnu-configure
 build_helper=gir
@@ -13,7 +13,7 @@ license="LGPL-3.0-or-later, MPL-2.0"
 homepage="https://bitbucket.org/tagoh/liblangtag/src"
 changelog="https://bitbucket.org/tagoh/liblangtag/raw/main/NEWS"
 distfiles="https://bitbucket.org/tagoh/liblangtag/downloads/liblangtag-${version}.tar.bz2"
-checksum=5701062c17d3e73ddaa49956cbfa5d47d2f8221988dec561c0af2118c1c8a564
+checksum=5ed6bcd4ae3f3c05c912e62f216cd1a44123846147f729a49fb5668da51e030e
 
 build_options="gir"
 build_options_default="gir"

From 0c37d71e1b2e241fd6fe688c06b3482eafab0cbb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 21:50:14 -0800
Subject: [PATCH 11/11] vtk: fix build with gcc 13

---
 srcpkgs/vtk/patches/gcc13.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/vtk/patches/gcc13.patch

diff --git a/srcpkgs/vtk/patches/gcc13.patch b/srcpkgs/vtk/patches/gcc13.patch
new file mode 100644
index 0000000000000..d0ba2017b70ca
--- /dev/null
+++ b/srcpkgs/vtk/patches/gcc13.patch
@@ -0,0 +1,13 @@
+Source: https://src.fedoraproject.org/rpms/vtk/blob/1a12f28665b2f24537b98fcf4b3fb3a176fa7fba/f/vtk-include.patch
+
+diff -up VTK-9.2.5/IO/Image/vtkSEPReader.h.include VTK-9.2.5/IO/Image/vtkSEPReader.h
+--- VTK-9.2.5/IO/Image/vtkSEPReader.h.include	2023-01-05 08:51:35.000000000 -0700
++++ VTK-9.2.5/IO/Image/vtkSEPReader.h	2023-01-17 07:43:41.988095734 -0700
+@@ -26,6 +26,7 @@
+ #include "vtkNew.h" // for ivars
+ 
+ #include <array>  // for std::array
++#include <cstdint> // for std::uint8_t
+ #include <string> // for std::string
+ 
+ namespace details

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (2 preceding siblings ...)
  2024-02-19  5:51 ` [PR PATCH] [Updated] " oreo639
@ 2024-02-19  6:18 ` sgn
  2024-02-19  6:50 ` oreo639
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: sgn @ 2024-02-19  6:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951775473

Comment:
https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (3 preceding siblings ...)
  2024-02-19  6:18 ` sgn
@ 2024-02-19  6:50 ` oreo639
  2024-02-19  6:51 ` oreo639
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

php is C code, so casting away a const isn't an error in C (and it builds fine), but I will import the patch anyway. Thanks.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (4 preceding siblings ...)
  2024-02-19  6:50 ` oreo639
@ 2024-02-19  6:51 ` oreo639
  2024-02-19  6:51 ` oreo639
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

php is C code, and casting away a const isn't an error in C (and it builds fine), but I will import the patch anyway. Thanks.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (5 preceding siblings ...)
  2024-02-19  6:51 ` oreo639
@ 2024-02-19  6:51 ` oreo639
  2024-02-19  6:55 ` oreo639
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

php is C code, and implicitly casting away a const isn't an error in C (and it builds fine), but I will import the patch anyway. Thanks.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (6 preceding siblings ...)
  2024-02-19  6:51 ` oreo639
@ 2024-02-19  6:55 ` oreo639
  2024-02-19  6:55 ` oreo639
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

Seems like their tests compile with `-Werror` and casing away the const is a warning in clang. I can still import the patch

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (7 preceding siblings ...)
  2024-02-19  6:55 ` oreo639
@ 2024-02-19  6:55 ` oreo639
  2024-02-19  6:55 ` oreo639
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 381 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

Seems like their tests compile with `-Werror` and implicitly casing away a const is a warning in clang. I can still import the patch

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (8 preceding siblings ...)
  2024-02-19  6:55 ` oreo639
@ 2024-02-19  6:55 ` oreo639
  2024-02-19  6:56 ` oreo639
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

Seems like their tests compile with `-Werror` and implicitly casing away a const is a warning in clang (whereas it isn't in gcc). I can still import the patch

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (9 preceding siblings ...)
  2024-02-19  6:55 ` oreo639
@ 2024-02-19  6:56 ` oreo639
  2024-02-19  6:56 ` oreo639
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

Seems like their tests are configured with `--enable-werror`, which we don't do, and implicitly casing away a const is a warning in clang (whereas it isn't in gcc). I can still import the patch

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (10 preceding siblings ...)
  2024-02-19  6:56 ` oreo639
@ 2024-02-19  6:56 ` oreo639
  2024-02-19  6:57 ` oreo639
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

Seems like their tests are configured with `--enable-werror`, which we don't do, and implicitly casing away a const is a warning in clang (whereas no such warning exists in gcc). I can still import the patch

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (11 preceding siblings ...)
  2024-02-19  6:56 ` oreo639
@ 2024-02-19  6:57 ` oreo639
  2024-02-19  7:00 ` oreo639
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  6:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

Seems like their tests are configured with `--enable-werror`, which we don't do, and implicitly casing away a const is a warning in clang since 2015 (whereas no such warning exists in gcc). I can still import the patch

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (12 preceding siblings ...)
  2024-02-19  6:57 ` oreo639
@ 2024-02-19  7:00 ` oreo639
  2024-02-19  7:01 ` sgn
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  7:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951808204

Comment:
> [php/php-src@0a39890](https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082)

Seems like their tests are configured with `--enable-werror`, which we don't do, and implicitly casing away a const is a warning in clang since 2015 (whereas no such warning exists in gcc).

Should I import that patch?

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (13 preceding siblings ...)
  2024-02-19  7:00 ` oreo639
@ 2024-02-19  7:01 ` sgn
  2024-02-19  7:21 ` oreo639
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: sgn @ 2024-02-19  7:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951819100

Comment:
I would push all fixes first, instead of leave those commits sits in the pr.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (14 preceding siblings ...)
  2024-02-19  7:01 ` sgn
@ 2024-02-19  7:21 ` oreo639
  2024-02-19  7:22 ` oreo639
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  7:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951842308

Comment:
Regarding s3fs-fuse, seems like that was fixed by libxml2 upstream https://gitlab.gnome.org/GNOME/libxml2/-/issues/642

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (15 preceding siblings ...)
  2024-02-19  7:21 ` oreo639
@ 2024-02-19  7:22 ` oreo639
  2024-02-19  7:23 ` oreo639
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  7:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951842308

Comment:
Regarding s3fs-fuse, seems like that was fixed by libxml2 upstream for 2.12.2/2.12.3 https://gitlab.gnome.org/GNOME/libxml2/-/issues/642
(php8.1 also builds fine without any extra patching for example)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (16 preceding siblings ...)
  2024-02-19  7:22 ` oreo639
@ 2024-02-19  7:23 ` oreo639
  2024-02-19  7:37 ` [PR PATCH] [Updated] " oreo639
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  7:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48826#issuecomment-1951842308

Comment:
Regarding s3fs-fuse, seems like that was fixed by libxml2 upstream for 2.12.2/2.12.3 https://gitlab.gnome.org/GNOME/libxml2/-/issues/642
(php8.1 also builds fine without any extra patching for example, which I assume is also a result of them re-arranging the `#define` s)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (17 preceding siblings ...)
  2024-02-19  7:23 ` oreo639
@ 2024-02-19  7:37 ` oreo639
  2024-02-19 12:41 ` oreo639
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19  7:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 12847 bytes --]

From df29e1edfb763c6f990cfb6b9382b2f107cbc9aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 1/5] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 0000000000000..50a6da45513f8
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e..270753e103cee 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 6d535880a169896a3dd307ba70fa21298b78beb3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 2/5] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..dc5b0f53460c9
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 74d7a5cd59be1325c468a38ab0c505f2dab9464b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 3/5] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..eb8c8eb7709a8
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From 777ea0f588ae46bfdf2e8c6d158d40d273eb1f2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 15:13:02 -0800
Subject: [PATCH 4/5] libgdal: update to 3.8.4.

---
 common/shlibs                          |  2 +-
 srcpkgs/libgdal/patches/10-atoll.patch | 34 --------------------------
 srcpkgs/libgdal/template               |  6 ++---
 3 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/10-atoll.patch

diff --git a/common/shlibs b/common/shlibs
index 3cf507d8ada87..f5b32693cae68 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2459,7 +2459,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.31 libgdal-3.5.3_1
+libgdal.so.34 libgdal-3.8.4_1
 libosgViewer.so.161 osg-3.6.5_1
 libosgShadow.so.161 osg-3.6.5_1
 libosgParticle.so.161 osg-3.6.5_1
diff --git a/srcpkgs/libgdal/patches/10-atoll.patch b/srcpkgs/libgdal/patches/10-atoll.patch
deleted file mode 100644
index a114098612c52..0000000000000
--- a/srcpkgs/libgdal/patches/10-atoll.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Holger Jaekel <holger.jaekel@gmx.de>
-Summary: musl atoll() doesn't return ERANGE in case of overflow
-----
-
---- a/port/cpl_conv.cpp
-+++ b/port/cpl_conv.cpp
-@@ -1011,8 +1011,6 @@
- #endif
- }
- 
--#if defined(__MINGW32__) || defined(__sun__)
--
- // mingw atoll() doesn't return ERANGE in case of overflow
- static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
- {
-@@ -1035,8 +1033,6 @@
-     return strcmp(szBuffer, pszString) != 0;
- }
- 
--#endif
--
- /************************************************************************/
- /*                          CPLAtoGIntBigEx()                           */
- /************************************************************************/
-@@ -1065,9 +1061,7 @@
-     GIntBig nVal = atol(pszString);
- #endif
-     if( errno == ERANGE
--#if defined(__MINGW32__) || defined(__sun__)
-         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
--#endif
-         )
-     {
-         if( pbOverflow )
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d5850fb768f66..93d916099045c 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.5.3
-revision=12
+version=3.8.4
+revision=1
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON
@@ -21,7 +21,7 @@ license="MIT"
 homepage="https://www.gdal.org"
 changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
 distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
+checksum=0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce
 python_version=3
 
 if [ -z "$CROSS_BUILD" ]; then

From 4f0e9ccbeca1a32ace67d71fa0dd778e6efecea2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 5/5] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..f288ce9a66b09
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (18 preceding siblings ...)
  2024-02-19  7:37 ` [PR PATCH] [Updated] " oreo639
@ 2024-02-19 12:41 ` oreo639
  2024-02-19 12:59 ` oreo639
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19 12:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 15776 bytes --]

From df29e1edfb763c6f990cfb6b9382b2f107cbc9aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 1/6] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 0000000000000..50a6da45513f8
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e..270753e103cee 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 6d535880a169896a3dd307ba70fa21298b78beb3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 2/6] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..dc5b0f53460c9
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 74d7a5cd59be1325c468a38ab0c505f2dab9464b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 3/6] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..eb8c8eb7709a8
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From 777ea0f588ae46bfdf2e8c6d158d40d273eb1f2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 15:13:02 -0800
Subject: [PATCH 4/6] libgdal: update to 3.8.4.

---
 common/shlibs                          |  2 +-
 srcpkgs/libgdal/patches/10-atoll.patch | 34 --------------------------
 srcpkgs/libgdal/template               |  6 ++---
 3 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/10-atoll.patch

diff --git a/common/shlibs b/common/shlibs
index 3cf507d8ada87..f5b32693cae68 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2459,7 +2459,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.31 libgdal-3.5.3_1
+libgdal.so.34 libgdal-3.8.4_1
 libosgViewer.so.161 osg-3.6.5_1
 libosgShadow.so.161 osg-3.6.5_1
 libosgParticle.so.161 osg-3.6.5_1
diff --git a/srcpkgs/libgdal/patches/10-atoll.patch b/srcpkgs/libgdal/patches/10-atoll.patch
deleted file mode 100644
index a114098612c52..0000000000000
--- a/srcpkgs/libgdal/patches/10-atoll.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Holger Jaekel <holger.jaekel@gmx.de>
-Summary: musl atoll() doesn't return ERANGE in case of overflow
-----
-
---- a/port/cpl_conv.cpp
-+++ b/port/cpl_conv.cpp
-@@ -1011,8 +1011,6 @@
- #endif
- }
- 
--#if defined(__MINGW32__) || defined(__sun__)
--
- // mingw atoll() doesn't return ERANGE in case of overflow
- static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
- {
-@@ -1035,8 +1033,6 @@
-     return strcmp(szBuffer, pszString) != 0;
- }
- 
--#endif
--
- /************************************************************************/
- /*                          CPLAtoGIntBigEx()                           */
- /************************************************************************/
-@@ -1065,9 +1061,7 @@
-     GIntBig nVal = atol(pszString);
- #endif
-     if( errno == ERANGE
--#if defined(__MINGW32__) || defined(__sun__)
-         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
--#endif
-         )
-     {
-         if( pbOverflow )
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d5850fb768f66..93d916099045c 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.5.3
-revision=12
+version=3.8.4
+revision=1
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON
@@ -21,7 +21,7 @@ license="MIT"
 homepage="https://www.gdal.org"
 changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
 distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
+checksum=0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce
 python_version=3
 
 if [ -z "$CROSS_BUILD" ]; then

From 4f0e9ccbeca1a32ace67d71fa0dd778e6efecea2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 5/6] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..f288ce9a66b09
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 2368a935a60a62c31932afbbae401717ea57fad6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:41:36 -0800
Subject: [PATCH 6/6] webkit2gtk: fix build for libxml2 2.12

---
 .../webkit2gtk/patches/fix-libxml2-2.12.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..0529514ffe006
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,56 @@
+From 1bad176b2496579d760852c80cff3ad9fb7c3a4b Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Mon, 20 Nov 2023 07:42:30 -0800
+Subject: [PATCH] Build fails with libxml2 version 2.12.0 due to API change
+ https://bugs.webkit.org/show_bug.cgi?id=265128
+
+Reviewed by Philippe Normand.
+
+Starting with libxml2 2.12.0, the API has changed the const-ness of the
+xmlError pointers, which results in a build error due to a mismatched
+type in the parsing error callback. This papers over the difference by
+using preprocessor conditionals.
+
+* Source/WebCore/xml/XSLTProcessor.h: Use const when building against
+  libxml2 2.12.0 or newer.
+* Source/WebCore/xml/XSLTProcessorLibxslt.cpp:
+(WebCore::XSLTProcessor::parseErrorFunc): Ditto.
+
+Canonical link: https://commits.webkit.org/270977@main
+---
+ Source/WebCore/xml/XSLTProcessor.h          | 4 ++++
+ Source/WebCore/xml/XSLTProcessorLibxslt.cpp | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/Source/WebCore/xml/XSLTProcessor.h b/Source/WebCore/xml/XSLTProcessor.h
+index 21bb45b5cbe1..5cf20557918f 100644
+--- a/Source/WebCore/xml/XSLTProcessor.h
++++ b/Source/WebCore/xml/XSLTProcessor.h
+@@ -61,7 +61,11 @@ class XSLTProcessor : public RefCounted<XSLTProcessor> {
+ 
+     void reset();
+ 
++#if LIBXML_VERSION >= 21200
++    static void parseErrorFunc(void* userData, const xmlError*);
++#else
+     static void parseErrorFunc(void* userData, xmlError*);
++#endif
+     static void genericErrorFunc(void* userData, const char* msg, ...);
+     
+     // Only for libXSLT callbacks
+diff --git a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+index a65691087e3c..9f6b363dfc6c 100644
+--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
++++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+@@ -59,7 +59,11 @@ void XSLTProcessor::genericErrorFunc(void*, const char*, ...)
+     // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error)
++#else
+ void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
++#endif
+ {
+     PageConsoleClient* console = static_cast<PageConsoleClient*>(userData);
+     if (!console)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (19 preceding siblings ...)
  2024-02-19 12:41 ` oreo639
@ 2024-02-19 12:59 ` oreo639
  2024-02-19 14:32 ` oreo639
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19 12:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 16982 bytes --]

From df29e1edfb763c6f990cfb6b9382b2f107cbc9aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 1/7] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 0000000000000..50a6da45513f8
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e..270753e103cee 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 6d535880a169896a3dd307ba70fa21298b78beb3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 2/7] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..dc5b0f53460c9
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 74d7a5cd59be1325c468a38ab0c505f2dab9464b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 3/7] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..eb8c8eb7709a8
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From 777ea0f588ae46bfdf2e8c6d158d40d273eb1f2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 15:13:02 -0800
Subject: [PATCH 4/7] libgdal: update to 3.8.4.

---
 common/shlibs                          |  2 +-
 srcpkgs/libgdal/patches/10-atoll.patch | 34 --------------------------
 srcpkgs/libgdal/template               |  6 ++---
 3 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/10-atoll.patch

diff --git a/common/shlibs b/common/shlibs
index 3cf507d8ada87..f5b32693cae68 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2459,7 +2459,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.31 libgdal-3.5.3_1
+libgdal.so.34 libgdal-3.8.4_1
 libosgViewer.so.161 osg-3.6.5_1
 libosgShadow.so.161 osg-3.6.5_1
 libosgParticle.so.161 osg-3.6.5_1
diff --git a/srcpkgs/libgdal/patches/10-atoll.patch b/srcpkgs/libgdal/patches/10-atoll.patch
deleted file mode 100644
index a114098612c52..0000000000000
--- a/srcpkgs/libgdal/patches/10-atoll.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Holger Jaekel <holger.jaekel@gmx.de>
-Summary: musl atoll() doesn't return ERANGE in case of overflow
-----
-
---- a/port/cpl_conv.cpp
-+++ b/port/cpl_conv.cpp
-@@ -1011,8 +1011,6 @@
- #endif
- }
- 
--#if defined(__MINGW32__) || defined(__sun__)
--
- // mingw atoll() doesn't return ERANGE in case of overflow
- static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
- {
-@@ -1035,8 +1033,6 @@
-     return strcmp(szBuffer, pszString) != 0;
- }
- 
--#endif
--
- /************************************************************************/
- /*                          CPLAtoGIntBigEx()                           */
- /************************************************************************/
-@@ -1065,9 +1061,7 @@
-     GIntBig nVal = atol(pszString);
- #endif
-     if( errno == ERANGE
--#if defined(__MINGW32__) || defined(__sun__)
-         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
--#endif
-         )
-     {
-         if( pbOverflow )
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d5850fb768f66..93d916099045c 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.5.3
-revision=12
+version=3.8.4
+revision=1
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON
@@ -21,7 +21,7 @@ license="MIT"
 homepage="https://www.gdal.org"
 changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
 distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
+checksum=0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce
 python_version=3
 
 if [ -z "$CROSS_BUILD" ]; then

From 4f0e9ccbeca1a32ace67d71fa0dd778e6efecea2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 5/7] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..f288ce9a66b09
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 2368a935a60a62c31932afbbae401717ea57fad6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:41:36 -0800
Subject: [PATCH 6/7] webkit2gtk: fix build for libxml2 2.12

---
 .../webkit2gtk/patches/fix-libxml2-2.12.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..0529514ffe006
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,56 @@
+From 1bad176b2496579d760852c80cff3ad9fb7c3a4b Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Mon, 20 Nov 2023 07:42:30 -0800
+Subject: [PATCH] Build fails with libxml2 version 2.12.0 due to API change
+ https://bugs.webkit.org/show_bug.cgi?id=265128
+
+Reviewed by Philippe Normand.
+
+Starting with libxml2 2.12.0, the API has changed the const-ness of the
+xmlError pointers, which results in a build error due to a mismatched
+type in the parsing error callback. This papers over the difference by
+using preprocessor conditionals.
+
+* Source/WebCore/xml/XSLTProcessor.h: Use const when building against
+  libxml2 2.12.0 or newer.
+* Source/WebCore/xml/XSLTProcessorLibxslt.cpp:
+(WebCore::XSLTProcessor::parseErrorFunc): Ditto.
+
+Canonical link: https://commits.webkit.org/270977@main
+---
+ Source/WebCore/xml/XSLTProcessor.h          | 4 ++++
+ Source/WebCore/xml/XSLTProcessorLibxslt.cpp | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/Source/WebCore/xml/XSLTProcessor.h b/Source/WebCore/xml/XSLTProcessor.h
+index 21bb45b5cbe1..5cf20557918f 100644
+--- a/Source/WebCore/xml/XSLTProcessor.h
++++ b/Source/WebCore/xml/XSLTProcessor.h
+@@ -61,7 +61,11 @@ class XSLTProcessor : public RefCounted<XSLTProcessor> {
+ 
+     void reset();
+ 
++#if LIBXML_VERSION >= 21200
++    static void parseErrorFunc(void* userData, const xmlError*);
++#else
+     static void parseErrorFunc(void* userData, xmlError*);
++#endif
+     static void genericErrorFunc(void* userData, const char* msg, ...);
+     
+     // Only for libXSLT callbacks
+diff --git a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+index a65691087e3c..9f6b363dfc6c 100644
+--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
++++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+@@ -59,7 +59,11 @@ void XSLTProcessor::genericErrorFunc(void*, const char*, ...)
+     // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error)
++#else
+ void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
++#endif
+ {
+     PageConsoleClient* console = static_cast<PageConsoleClient*>(userData);
+     if (!console)

From acb196e951c4270950d3224a190b84a7ededdcf6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 7/7] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d37..0dfb40b1f1161 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (20 preceding siblings ...)
  2024-02-19 12:59 ` oreo639
@ 2024-02-19 14:32 ` oreo639
  2024-02-19 14:53 ` oreo639
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19 14:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 48197 bytes --]

From df29e1edfb763c6f990cfb6b9382b2f107cbc9aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 01/17] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..270753e103cee1 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 6d535880a169896a3dd307ba70fa21298b78beb3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 02/17] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..dc5b0f53460c9a
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 74d7a5cd59be1325c468a38ab0c505f2dab9464b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 03/17] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..eb8c8eb7709a87
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From 777ea0f588ae46bfdf2e8c6d158d40d273eb1f2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 15:13:02 -0800
Subject: [PATCH 04/17] libgdal: update to 3.8.4.

---
 common/shlibs                          |  2 +-
 srcpkgs/libgdal/patches/10-atoll.patch | 34 --------------------------
 srcpkgs/libgdal/template               |  6 ++---
 3 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/10-atoll.patch

diff --git a/common/shlibs b/common/shlibs
index 3cf507d8ada879..f5b32693cae681 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2459,7 +2459,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.31 libgdal-3.5.3_1
+libgdal.so.34 libgdal-3.8.4_1
 libosgViewer.so.161 osg-3.6.5_1
 libosgShadow.so.161 osg-3.6.5_1
 libosgParticle.so.161 osg-3.6.5_1
diff --git a/srcpkgs/libgdal/patches/10-atoll.patch b/srcpkgs/libgdal/patches/10-atoll.patch
deleted file mode 100644
index a114098612c522..00000000000000
--- a/srcpkgs/libgdal/patches/10-atoll.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Holger Jaekel <holger.jaekel@gmx.de>
-Summary: musl atoll() doesn't return ERANGE in case of overflow
-----
-
---- a/port/cpl_conv.cpp
-+++ b/port/cpl_conv.cpp
-@@ -1011,8 +1011,6 @@
- #endif
- }
- 
--#if defined(__MINGW32__) || defined(__sun__)
--
- // mingw atoll() doesn't return ERANGE in case of overflow
- static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
- {
-@@ -1035,8 +1033,6 @@
-     return strcmp(szBuffer, pszString) != 0;
- }
- 
--#endif
--
- /************************************************************************/
- /*                          CPLAtoGIntBigEx()                           */
- /************************************************************************/
-@@ -1065,9 +1061,7 @@
-     GIntBig nVal = atol(pszString);
- #endif
-     if( errno == ERANGE
--#if defined(__MINGW32__) || defined(__sun__)
-         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
--#endif
-         )
-     {
-         if( pbOverflow )
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d5850fb768f669..93d916099045c0 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.5.3
-revision=12
+version=3.8.4
+revision=1
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON
@@ -21,7 +21,7 @@ license="MIT"
 homepage="https://www.gdal.org"
 changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
 distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
+checksum=0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce
 python_version=3
 
 if [ -z "$CROSS_BUILD" ]; then

From 4f0e9ccbeca1a32ace67d71fa0dd778e6efecea2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 05/17] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f288ce9a66b098
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 2368a935a60a62c31932afbbae401717ea57fad6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:41:36 -0800
Subject: [PATCH 06/17] webkit2gtk: fix build for libxml2 2.12

---
 .../webkit2gtk/patches/fix-libxml2-2.12.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..0529514ffe0063
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,56 @@
+From 1bad176b2496579d760852c80cff3ad9fb7c3a4b Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Mon, 20 Nov 2023 07:42:30 -0800
+Subject: [PATCH] Build fails with libxml2 version 2.12.0 due to API change
+ https://bugs.webkit.org/show_bug.cgi?id=265128
+
+Reviewed by Philippe Normand.
+
+Starting with libxml2 2.12.0, the API has changed the const-ness of the
+xmlError pointers, which results in a build error due to a mismatched
+type in the parsing error callback. This papers over the difference by
+using preprocessor conditionals.
+
+* Source/WebCore/xml/XSLTProcessor.h: Use const when building against
+  libxml2 2.12.0 or newer.
+* Source/WebCore/xml/XSLTProcessorLibxslt.cpp:
+(WebCore::XSLTProcessor::parseErrorFunc): Ditto.
+
+Canonical link: https://commits.webkit.org/270977@main
+---
+ Source/WebCore/xml/XSLTProcessor.h          | 4 ++++
+ Source/WebCore/xml/XSLTProcessorLibxslt.cpp | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/Source/WebCore/xml/XSLTProcessor.h b/Source/WebCore/xml/XSLTProcessor.h
+index 21bb45b5cbe1..5cf20557918f 100644
+--- a/Source/WebCore/xml/XSLTProcessor.h
++++ b/Source/WebCore/xml/XSLTProcessor.h
+@@ -61,7 +61,11 @@ class XSLTProcessor : public RefCounted<XSLTProcessor> {
+ 
+     void reset();
+ 
++#if LIBXML_VERSION >= 21200
++    static void parseErrorFunc(void* userData, const xmlError*);
++#else
+     static void parseErrorFunc(void* userData, xmlError*);
++#endif
+     static void genericErrorFunc(void* userData, const char* msg, ...);
+     
+     // Only for libXSLT callbacks
+diff --git a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+index a65691087e3c..9f6b363dfc6c 100644
+--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
++++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+@@ -59,7 +59,11 @@ void XSLTProcessor::genericErrorFunc(void*, const char*, ...)
+     // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error)
++#else
+ void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
++#endif
+ {
+     PageConsoleClient* console = static_cast<PageConsoleClient*>(userData);
+     if (!console)

From acb196e951c4270950d3224a190b84a7ededdcf6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 07/17] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d374..0dfb40b1f1161d 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From 9f740a4c231f3b2f1216d6f4f8a877d4fec73e12 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 08/17] recoll: update to 1.37.4.

---
 srcpkgs/recoll/patches/musl.patch | 42 -------------------------------
 srcpkgs/recoll/template           |  8 +++---
 2 files changed, 4 insertions(+), 46 deletions(-)
 delete mode 100644 srcpkgs/recoll/patches/musl.patch

diff --git a/srcpkgs/recoll/patches/musl.patch b/srcpkgs/recoll/patches/musl.patch
deleted file mode 100644
index d633e92b9df118..00000000000000
--- a/srcpkgs/recoll/patches/musl.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/utils/fstreewalk.cpp b/utils/fstreewalk.cpp
-index fc43edc..5e28d6e 100644
---- a/utils/fstreewalk.cpp
-+++ b/utils/fstreewalk.cpp
-@@ -17,6 +17,7 @@
- 
- #include "autoconfig.h"
- 
-+#include <sys/types.h>
- #include <stdio.h>
- 
- #include <errno.h>
-diff --git a/utils/pxattr.cpp b/utils/pxattr.cpp
-index 3a1f8f5..dcb93fc 100644
---- a/utils/pxattr.cpp
-+++ b/utils/pxattr.cpp
-@@ -46,7 +46,7 @@
- 
- // Not exactly true for win32, but makes my life easier by avoiding ifdefs in recoll (the calls just
- // fail, which is expected)
--#if defined(__DragonFly__) || defined(__OpenBSD__) || defined(_WIN32)
-+#if defined(__DragonFly__) || defined(__OpenBSD__) || defined(_WIN32) || !defined(__GLIBC__)
- #define HAS_NO_XATTR
- #endif
-
-diff --git a/common/conf_post.h b/common/conf_post.h
-index 7093ead..0ecd56b 100644
---- a/common/conf_post.h
-+++ b/common/conf_post.h
-@@ -73,12 +73,4 @@ typedef int ssize_t;
- #define REAL_GCC   __GNUC__ // probably
- #endif
- 
--#ifdef REAL_GCC
--// Older gcc versions pretended to supply std::regex, but the resulting programs mostly crashed.
--#include <features.h>
--#if ! __GNUC_PREREQ(6,0)
--#define NO_STD_REGEX 1
--#endif
--#endif
--
- #endif /* INCLUDED */
diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e3..7b33d23df03a59 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 4a48c6a2019b6c5e7b94bc9631016bd14b2d754b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 09/17] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342a..e73856d05a1b80 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From 48bf4b366bfbd373c40d046211699271d057b9fb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:24:30 -0800
Subject: [PATCH 10/17] liferea: fix build for libxml2 2.12

---
 .../liferea/patches/fix-libxml2-2.12.patch    | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/liferea/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/liferea/patches/fix-libxml2-2.12.patch b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..abe1fb13766982
--- /dev/null
+++ b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,28 @@
+From be8ef494586d9ef73c04ec4ca058a9a158ae3562 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Sun, 31 Dec 2023 22:26:31 +0000
+Subject: [PATCH] src/node_type.h: add `#include <libxml/tree.h>` for
+ `xmlNodePtr` type
+
+Without the change build fails on `libxml2-2.12.3` as:
+
+    ../../src/node_type.h:62:64: error: unknown type name 'xmlNodePtr'; did you mean 'nodePtr'?
+       62 |         void            (*export)               (nodePtr node, xmlNodePtr cur, gboolean trusted);
+          |                                                                ^~~~~~~~~~
+          |                                                                nodePtr
+---
+ src/node_type.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/node_type.h b/src/node_type.h
+index fcd3e7223..a41ff52fc 100644
+--- a/src/node_type.h
++++ b/src/node_type.h
+@@ -23,6 +23,7 @@
+ 
+ #include "node.h"
+ 
++#include <libxml/tree.h>
+ #include <libxml/xmlmemory.h>
+ #include <gtk/gtk.h>
+ 

From fd648a092fe5e3f924d1a9c6d1a99076ac64ed3b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:31:24 -0800
Subject: [PATCH 11/17] gtkpod: fix build for libxml2 2.12

---
 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..58eab19153ee7f
--- /dev/null
+++ b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,12 @@
+Source: https://src.fedoraproject.org/rpms/gtkpod/blob/a3e1c785b5a43603ad46ef913b0644babbfc6a73/f/includes.patch
+
+--- a/libgtkpod/misc.c
++++ b/libgtkpod/misc.c
+@@ -39,6 +39,7 @@
+ #include <sys/wait.h>
+ #include <unistd.h>
+ #include <glib/gi18n-lib.h>
++#include <libxml/parser.h>
+ #include "charset.h"
+ #include "clientserver.h"
+ #include "misc.h"

From 777845f51a6a83d6ae34c6a672b80d01a91c6e4a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:43:29 -0800
Subject: [PATCH 12/17] swiften: fix build for libxml2 2.12

---
 srcpkgs/swiften/patches/fix-libxml2-2.12.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 srcpkgs/swiften/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/swiften/patches/fix-libxml2-2.12.patch b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..3e3e4d16352060
--- /dev/null
+++ b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,15 @@
+diff -rup Swiften/Parser/LibXMLParser.cpp.orig Swiften/Parser/LibXMLParser.cpp
+--- a/Swiften/Parser/LibXMLParser.cpp
++++ b/Swiften/Parser/LibXMLParser.cpp
+@@ -97,7 +97,11 @@ bool LibXMLParser::parse(const std::stri
+     if (xmlParseChunk(p->context_, data.c_str(), boost::numeric_cast<int>(data.size()), false) == XML_ERR_OK) {
+         return true;
+     }
++#if LIBXML_VERSION >= 21200
++    const xmlError* error = xmlCtxtGetLastError(p->context_);
++#else
+     xmlError* error = xmlCtxtGetLastError(p->context_);
++#endif
+     if (error->code == XML_WAR_NS_URI || error->code == XML_WAR_NS_URI_RELATIVE) {
+         xmlCtxtResetLastError(p->context_);
+         p->context_->errNo = XML_ERR_OK;

From 12b8965bf716469315d32db00da9a9ab109e4d38 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 13/17] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From ed0ff2df2014ae1ebf28fbb862ff80745e93f5d7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 14/17] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 46b59049e2a8ad8374607a23ea5f4050230c3613 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 15/17] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 00000000000000..0a00d1bdc502d3
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From 9e61a1e98b6674775611cef913e797628e69c498 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 16/17] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..628005774327e9
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

From 9e774ed48b5061de5f532d08a1bd965ae2092afa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:32:05 -0800
Subject: [PATCH 17/17] libreoffice: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 300 ++++++++++++++++++
 1 file changed, 300 insertions(+)
 create mode 100644 srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch b/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..d4c6083dd74589
--- /dev/null
+++ b/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,300 @@
+From c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos@collabora.com>
+Date: Mon, 27 Nov 2023 08:02:59 +0100
+Subject: [PATCH] tdf#158302 fix build against system-libxml-2.12
+
+Seen in a fedora:40 container, using --with-system-libcmis,
+--with-system-liblangtag and --with-system-xmlsec.
+
+Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980
+Tested-by: Jenkins
+Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
+---
+ drawinglayer/source/tools/primitive2dxmldump.cxx | 1 +
+ filter/source/xsltfilter/LibXSLTTransformer.cxx  | 2 +-
+ helpcompiler/source/HelpLinker.cxx               | 4 ++++
+ include/xmloff/xmltoken.hxx                      | 2 +-
+ sax/source/fastparser/fastparser.cxx             | 2 +-
+ sc/source/core/tool/interpr7.cxx                 | 1 +
+ sc/source/filter/xml/XMLExportDataPilot.cxx      | 2 +-
+ sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 2 +-
+ sc/source/filter/xml/xmlfilti.cxx                | 6 +++---
+ unoxml/source/dom/attr.cxx                       | 1 +
+ unoxml/source/dom/document.cxx                   | 1 +
+ unoxml/source/dom/documentbuilder.cxx            | 1 +
+ unoxml/source/dom/entity.cxx                     | 1 +
+ unoxml/source/xpath/xpathapi.cxx                 | 7 ++++++-
+ xmloff/source/core/xmltoken.cxx                  | 2 +-
+ xmloff/source/style/PageMasterStyleMap.cxx       | 2 +-
+ xmlsecurity/inc/xmlsec-wrapper.h                 | 1 +
+ xmlsecurity/inc/xmlsec/saxhelper.hxx             | 1 +
+ 18 files changed, 28 insertions(+), 11 deletions(-)
+
+diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
+index 76aefec902ead..f3b9ef1bc9193 100644
+--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
++++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
+@@ -15,6 +15,7 @@
+ 
+ #include <math.h>
+ #include <memory>
++#include <libxml/parser.h>
+ #include <sal/log.hxx>
+ 
+ #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
+index 1a7c34805f1b5..5e9a7c4bcd35e 100644
+--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
++++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
+@@ -333,7 +333,7 @@ namespace XSLT
+         }
+         else
+         {
+-            xmlErrorPtr lastErr = xmlGetLastError();
++            const xmlError* lastErr = xmlGetLastError();
+             OUString msg;
+             if (lastErr)
+                 msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
+diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
+index 3d52834dbe6bf..898a8b26392a9 100644
+--- a/helpcompiler/source/HelpLinker.cxx
++++ b/helpcompiler/source/HelpLinker.cxx
+@@ -815,7 +815,11 @@ static const HelpProcessingException* GpXMLParsingException = nullptr;
+ 
+ extern "C" {
+ 
++#if LIBXML_VERSION >= 21200
++static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, const xmlError* error)
++#else
+ static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, xmlErrorPtr error)
++#endif
+ {
+     std::string aErrorMsg = error->message;
+     std::string aXMLParsingFile;
+diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
+index 4e64418417740..ba42fae4d035a 100644
+--- a/include/xmloff/xmltoken.hxx
++++ b/include/xmloff/xmltoken.hxx
+@@ -744,7 +744,7 @@ namespace xmloff::token {
+         XML_EMBEDDED_VISIBLE_AREA,
+         XML_EMBOSSED,
+         XML_EMISSIVE_COLOR,
+-        XML_EMPTY,
++        XML_TOKEN_EMPTY,
+         XML_EMPTY_LINE_REFRESH,
+         XML_ENABLE_NUMBERING,
+         XML_ENABLED,
+diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
+index ec8065016a12d..e0338e053cf05 100644
+--- a/sax/source/fastparser/fastparser.cxx
++++ b/sax/source/fastparser/fastparser.cxx
+@@ -578,7 +578,7 @@ Event& Entity::getEvent( CallbackType aType )
+ OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemId, sal_Int32 nLine )
+ {
+     const char* pMessage;
+-    xmlErrorPtr error = xmlCtxtGetLastError( ctxt );
++    const xmlError* error = xmlCtxtGetLastError( ctxt );
+     if( error && error->message )
+         pMessage = error->message;
+     else
+diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
+index 352c7cf70e45d..ecb4ea346396b 100644
+--- a/sc/source/core/tool/interpr7.cxx
++++ b/sc/source/core/tool/interpr7.cxx
+@@ -31,6 +31,7 @@
+ #include <cstring>
+ #include <memory>
+ #include <string_view>
++#include <libxml/parser.h>
+ 
+ using namespace com::sun::star;
+ 
+diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
+index da65bec0dab75..bd5f16d828ff7 100644
+--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
++++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
+@@ -123,7 +123,7 @@ void ScXMLExportDataPilot::WriteDPCondition(const ScQueryEntry& aQueryEntry, boo
+ 
+     if (aQueryEntry.IsQueryByEmpty())
+     {
+-        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_EMPTY));
++        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_TOKEN_EMPTY));
+     }
+     else if (aQueryEntry.IsQueryByNonEmpty())
+     {
+diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+index 6905e02d651bc..e4307065bd92f 100644
+--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
++++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+@@ -376,7 +376,7 @@ class WriteDatabaseRange
+             case SC_EQUAL:
+             {
+                 if (rEntry.IsQueryByEmpty())
+-                    return GetXMLToken(XML_EMPTY);
++                    return GetXMLToken(XML_TOKEN_EMPTY);
+                 else if (rEntry.IsQueryByNonEmpty())
+                     return GetXMLToken(XML_NOEMPTY);
+ 
+diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
+index 7585ce0c50fa1..61f7cfe4a3495 100644
+--- a/sc/source/filter/xml/xmlfilti.cxx
++++ b/sc/source/filter/xml/xmlfilti.cxx
+@@ -370,7 +370,7 @@ void ScXMLConditionContext::GetOperator(
+         rEntry.eOp = SC_BOTPERC;
+     else if (IsXMLToken(aOpStr, XML_BOTTOM_VALUES))
+         rEntry.eOp = SC_BOTVAL;
+-    else if (IsXMLToken(aOpStr, XML_EMPTY))
++    else if (IsXMLToken(aOpStr, XML_TOKEN_EMPTY))
+         rEntry.SetQueryByEmpty();
+     else if (aOpStr == u">")
+         rEntry.eOp = SC_GREATER;
+@@ -422,7 +422,7 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
+     if (maQueryItems.empty())
+     {
+         ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
+-        if (IsXMLToken(sOperator, XML_EMPTY))
++        if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
+             return;
+         if (IsXMLToken(sDataType, XML_NUMBER))
+         {
+@@ -753,7 +753,7 @@ void SAL_CALL ScXMLDPConditionContext::endFastElement( sal_Int32 /*nElement*/ )
+     else
+         aFilterField.eConnect = SC_AND;
+     pFilterContext->SetIsCaseSensitive(bIsCaseSensitive);
+-    if (IsXMLToken(sOperator, XML_EMPTY))
++    if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
+         aFilterField.SetQueryByEmpty();
+     else if (IsXMLToken(sOperator, XML_NOEMPTY))
+         aFilterField.SetQueryByNonEmpty();
+diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
+index dd974d910edb1..d8d873cdf0555 100644
+--- a/unoxml/source/dom/attr.cxx
++++ b/unoxml/source/dom/attr.cxx
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ 
+ #include <memory>
++#include <libxml/entities.h>
+ 
+ #include <osl/diagnose.h>
+ #include <sal/log.hxx>
+diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
+index cb48bd1635f82..0825fc2cd7edd 100644
+--- a/unoxml/source/dom/document.cxx
++++ b/unoxml/source/dom/document.cxx
+@@ -41,6 +41,7 @@
+ #include <eventdispatcher.hxx>
+ 
+ #include <string.h>
++#include <libxml/xmlIO.h>
+ 
+ #include <osl/diagnose.h>
+ 
+diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
+index c3cd7663d2fc6..3898d58e4be4a 100644
+--- a/unoxml/source/dom/documentbuilder.cxx
++++ b/unoxml/source/dom/documentbuilder.cxx
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ 
+ #include <libxml/xmlerror.h>
++#include <libxml/parser.h>
+ 
+ #include <memory>
+ 
+diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx
+index ccc8a08724997..98909dfe8f123 100644
+--- a/unoxml/source/dom/entity.cxx
++++ b/unoxml/source/dom/entity.cxx
+@@ -22,6 +22,7 @@
+ #include <osl/diagnose.h>
+ 
+ #include <string.h>
++#include <libxml/entities.h>
+ 
+ using namespace css::uno;
+ using namespace css::xml::dom;
+diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
+index a60083983882e..c2b7537831766 100644
+--- a/unoxml/source/xpath/xpathapi.cxx
++++ b/unoxml/source/xpath/xpathapi.cxx
+@@ -26,6 +26,7 @@
+ #include <libxml/xmlerror.h>
+ #include <libxml/xpath.h>
+ #include <libxml/xpathInternals.h>
++#include <libxml/xmlIO.h>
+ 
+ #include <com/sun/star/xml/xpath/XPathException.hpp>
+ 
+@@ -217,7 +218,7 @@ namespace XPath
+         return selectSingleNode(contextNode, expr);
+     }
+ 
+-    static OUString make_error_message(xmlErrorPtr pError)
++    static OUString make_error_message(const xmlError* pError)
+     {
+         OUStringBuffer buf;
+         if (pError) {
+@@ -259,7 +260,11 @@ namespace XPath
+             SAL_WARN("unoxml", "libxml2 error: " << str);
+         }
+ 
++#if LIBXML_VERSION >= 21200
++        static void structured_error_func(void *, const xmlError* error)
++#else
+         static void structured_error_func(void *, xmlErrorPtr error)
++#endif
+         {
+             SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error));
+         }
+diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
+index 6879f37db2950..e11dc0d161119 100644
+--- a/xmloff/source/core/xmltoken.cxx
++++ b/xmloff/source/core/xmltoken.cxx
+@@ -756,7 +756,7 @@ namespace xmloff::token {
+         TOKEN( "embedded-visible-area",           XML_EMBEDDED_VISIBLE_AREA ),
+         TOKEN( "embossed",                        XML_EMBOSSED ),
+         TOKEN( "emissive-color",                  XML_EMISSIVE_COLOR ),
+-        TOKEN( "empty",                           XML_EMPTY ),
++        TOKEN( "empty",                           XML_TOKEN_EMPTY ),
+         TOKEN( "empty-line-refresh",              XML_EMPTY_LINE_REFRESH ),
+         TOKEN( "enable-numbering",                XML_ENABLE_NUMBERING ),
+         TOKEN( "enabled",                         XML_ENABLED ),
+diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
+index 7b2cab4751aa8..6f631289672b7 100644
+--- a/xmloff/source/style/PageMasterStyleMap.cxx
++++ b/xmloff/source/style/PageMasterStyleMap.cxx
+@@ -157,7 +157,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
+     PLMAP( PROP_FootnoteLineRelativeWidth, XML_NAMESPACE_STYLE,    XML__EMPTY,     XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM,    CTF_PM_FTN_LINE_WIDTH ),
+     PLMAP( PROP_FootnoteLineTextDistance, XML_NAMESPACE_STYLE,    XML__EMPTY,     XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM,    CTF_PM_FTN_LINE_DISTANCE ),
+     PLMAP( PROP_FootnoteLineWeight,        XML_NAMESPACE_STYLE,    XML_FOOTNOTE_SEP,    XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM,    CTF_PM_FTN_LINE_WEIGHT ),
+-    PLMAP( PROP_FootnoteLineStyle,     XML_NAMESPACE_STYLE,    XML_EMPTY,  XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM,  CTF_PM_FTN_LINE_STYLE ),
++    PLMAP( PROP_FootnoteLineStyle,     XML_NAMESPACE_STYLE,    XML_TOKEN_EMPTY,  XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM,  CTF_PM_FTN_LINE_STYLE ),
+     PLMAP_EXT(PROP_GutterMargin, XML_NAMESPACE_LO_EXT, XML_MARGIN_GUTTER, XML_TYPE_MEASURE, CTF_PM_MARGINGUTTER),
+ 
+     //////////////////////////////////////////////////////////////////////////
+diff --git a/xmlsecurity/inc/xmlsec-wrapper.h b/xmlsecurity/inc/xmlsec-wrapper.h
+index 7c6d267e8b739..3ad705400c52c 100644
+--- a/xmlsecurity/inc/xmlsec-wrapper.h
++++ b/xmlsecurity/inc/xmlsec-wrapper.h
+@@ -23,6 +23,7 @@
+ 
+ #include <sal/types.h>
+ 
++#include <libxml/parser.h>
+ #include <xmlsec/base64.h>
+ #include <xmlsec/bn.h>
+ #include <xmlsec/errors.h>
+diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx
+index a49ccef1894c6..a5863ffd0e2a0 100644
+--- a/xmlsecurity/inc/xmlsec/saxhelper.hxx
++++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx
+@@ -23,6 +23,7 @@
+ 
+ #include <string_view>
+ 
++#include <libxml/parser.h>
+ #include <libxml/tree.h>
+ 
+ #include <rtl/ustring.hxx>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (21 preceding siblings ...)
  2024-02-19 14:32 ` oreo639
@ 2024-02-19 14:53 ` oreo639
  2024-02-19 14:57 ` oreo639
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19 14:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 46623 bytes --]

From df29e1edfb763c6f990cfb6b9382b2f107cbc9aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 01/17] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..270753e103cee1 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 6d535880a169896a3dd307ba70fa21298b78beb3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 02/17] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..dc5b0f53460c9a
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 74d7a5cd59be1325c468a38ab0c505f2dab9464b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 03/17] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..eb8c8eb7709a87
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From 777ea0f588ae46bfdf2e8c6d158d40d273eb1f2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 15:13:02 -0800
Subject: [PATCH 04/17] libgdal: update to 3.8.4.

---
 common/shlibs                          |  2 +-
 srcpkgs/libgdal/patches/10-atoll.patch | 34 --------------------------
 srcpkgs/libgdal/template               |  6 ++---
 3 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/10-atoll.patch

diff --git a/common/shlibs b/common/shlibs
index 3cf507d8ada879..f5b32693cae681 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2459,7 +2459,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.31 libgdal-3.5.3_1
+libgdal.so.34 libgdal-3.8.4_1
 libosgViewer.so.161 osg-3.6.5_1
 libosgShadow.so.161 osg-3.6.5_1
 libosgParticle.so.161 osg-3.6.5_1
diff --git a/srcpkgs/libgdal/patches/10-atoll.patch b/srcpkgs/libgdal/patches/10-atoll.patch
deleted file mode 100644
index a114098612c522..00000000000000
--- a/srcpkgs/libgdal/patches/10-atoll.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Holger Jaekel <holger.jaekel@gmx.de>
-Summary: musl atoll() doesn't return ERANGE in case of overflow
-----
-
---- a/port/cpl_conv.cpp
-+++ b/port/cpl_conv.cpp
-@@ -1011,8 +1011,6 @@
- #endif
- }
- 
--#if defined(__MINGW32__) || defined(__sun__)
--
- // mingw atoll() doesn't return ERANGE in case of overflow
- static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
- {
-@@ -1035,8 +1033,6 @@
-     return strcmp(szBuffer, pszString) != 0;
- }
- 
--#endif
--
- /************************************************************************/
- /*                          CPLAtoGIntBigEx()                           */
- /************************************************************************/
-@@ -1065,9 +1061,7 @@
-     GIntBig nVal = atol(pszString);
- #endif
-     if( errno == ERANGE
--#if defined(__MINGW32__) || defined(__sun__)
-         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
--#endif
-         )
-     {
-         if( pbOverflow )
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d5850fb768f669..93d916099045c0 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.5.3
-revision=12
+version=3.8.4
+revision=1
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON
@@ -21,7 +21,7 @@ license="MIT"
 homepage="https://www.gdal.org"
 changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
 distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
+checksum=0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce
 python_version=3
 
 if [ -z "$CROSS_BUILD" ]; then

From 4f0e9ccbeca1a32ace67d71fa0dd778e6efecea2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 05/17] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f288ce9a66b098
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 2368a935a60a62c31932afbbae401717ea57fad6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:41:36 -0800
Subject: [PATCH 06/17] webkit2gtk: fix build for libxml2 2.12

---
 .../webkit2gtk/patches/fix-libxml2-2.12.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..0529514ffe0063
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,56 @@
+From 1bad176b2496579d760852c80cff3ad9fb7c3a4b Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Mon, 20 Nov 2023 07:42:30 -0800
+Subject: [PATCH] Build fails with libxml2 version 2.12.0 due to API change
+ https://bugs.webkit.org/show_bug.cgi?id=265128
+
+Reviewed by Philippe Normand.
+
+Starting with libxml2 2.12.0, the API has changed the const-ness of the
+xmlError pointers, which results in a build error due to a mismatched
+type in the parsing error callback. This papers over the difference by
+using preprocessor conditionals.
+
+* Source/WebCore/xml/XSLTProcessor.h: Use const when building against
+  libxml2 2.12.0 or newer.
+* Source/WebCore/xml/XSLTProcessorLibxslt.cpp:
+(WebCore::XSLTProcessor::parseErrorFunc): Ditto.
+
+Canonical link: https://commits.webkit.org/270977@main
+---
+ Source/WebCore/xml/XSLTProcessor.h          | 4 ++++
+ Source/WebCore/xml/XSLTProcessorLibxslt.cpp | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/Source/WebCore/xml/XSLTProcessor.h b/Source/WebCore/xml/XSLTProcessor.h
+index 21bb45b5cbe1..5cf20557918f 100644
+--- a/Source/WebCore/xml/XSLTProcessor.h
++++ b/Source/WebCore/xml/XSLTProcessor.h
+@@ -61,7 +61,11 @@ class XSLTProcessor : public RefCounted<XSLTProcessor> {
+ 
+     void reset();
+ 
++#if LIBXML_VERSION >= 21200
++    static void parseErrorFunc(void* userData, const xmlError*);
++#else
+     static void parseErrorFunc(void* userData, xmlError*);
++#endif
+     static void genericErrorFunc(void* userData, const char* msg, ...);
+     
+     // Only for libXSLT callbacks
+diff --git a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+index a65691087e3c..9f6b363dfc6c 100644
+--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
++++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+@@ -59,7 +59,11 @@ void XSLTProcessor::genericErrorFunc(void*, const char*, ...)
+     // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error)
++#else
+ void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
++#endif
+ {
+     PageConsoleClient* console = static_cast<PageConsoleClient*>(userData);
+     if (!console)

From acb196e951c4270950d3224a190b84a7ededdcf6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 07/17] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d374..0dfb40b1f1161d 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From a37e121df793597a7b827819737899f749741319 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 08/17] recoll: update to 1.37.4.

---
 srcpkgs/recoll/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e3..7b33d23df03a59 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 044590b710a940f479c8f48519e5723d93750160 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 09/17] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342a..e73856d05a1b80 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From ecd31eb6bb914f386f955f2108081a3c28ed9346 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:24:30 -0800
Subject: [PATCH 10/17] liferea: fix build for libxml2 2.12

---
 .../liferea/patches/fix-libxml2-2.12.patch    | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/liferea/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/liferea/patches/fix-libxml2-2.12.patch b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..abe1fb13766982
--- /dev/null
+++ b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,28 @@
+From be8ef494586d9ef73c04ec4ca058a9a158ae3562 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Sun, 31 Dec 2023 22:26:31 +0000
+Subject: [PATCH] src/node_type.h: add `#include <libxml/tree.h>` for
+ `xmlNodePtr` type
+
+Without the change build fails on `libxml2-2.12.3` as:
+
+    ../../src/node_type.h:62:64: error: unknown type name 'xmlNodePtr'; did you mean 'nodePtr'?
+       62 |         void            (*export)               (nodePtr node, xmlNodePtr cur, gboolean trusted);
+          |                                                                ^~~~~~~~~~
+          |                                                                nodePtr
+---
+ src/node_type.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/node_type.h b/src/node_type.h
+index fcd3e7223..a41ff52fc 100644
+--- a/src/node_type.h
++++ b/src/node_type.h
+@@ -23,6 +23,7 @@
+ 
+ #include "node.h"
+ 
++#include <libxml/tree.h>
+ #include <libxml/xmlmemory.h>
+ #include <gtk/gtk.h>
+ 

From b69cec9b69680e791d70ad0a2eba729d635dc165 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:31:24 -0800
Subject: [PATCH 11/17] gtkpod: fix build for libxml2 2.12

---
 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..58eab19153ee7f
--- /dev/null
+++ b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,12 @@
+Source: https://src.fedoraproject.org/rpms/gtkpod/blob/a3e1c785b5a43603ad46ef913b0644babbfc6a73/f/includes.patch
+
+--- a/libgtkpod/misc.c
++++ b/libgtkpod/misc.c
+@@ -39,6 +39,7 @@
+ #include <sys/wait.h>
+ #include <unistd.h>
+ #include <glib/gi18n-lib.h>
++#include <libxml/parser.h>
+ #include "charset.h"
+ #include "clientserver.h"
+ #include "misc.h"

From 87dc5dad485dcefb8a6db30b91bcdc62ffc71d2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:43:29 -0800
Subject: [PATCH 12/17] swiften: fix build for libxml2 2.12

---
 srcpkgs/swiften/patches/fix-libxml2-2.12.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 srcpkgs/swiften/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/swiften/patches/fix-libxml2-2.12.patch b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..3e3e4d16352060
--- /dev/null
+++ b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,15 @@
+diff -rup Swiften/Parser/LibXMLParser.cpp.orig Swiften/Parser/LibXMLParser.cpp
+--- a/Swiften/Parser/LibXMLParser.cpp
++++ b/Swiften/Parser/LibXMLParser.cpp
+@@ -97,7 +97,11 @@ bool LibXMLParser::parse(const std::stri
+     if (xmlParseChunk(p->context_, data.c_str(), boost::numeric_cast<int>(data.size()), false) == XML_ERR_OK) {
+         return true;
+     }
++#if LIBXML_VERSION >= 21200
++    const xmlError* error = xmlCtxtGetLastError(p->context_);
++#else
+     xmlError* error = xmlCtxtGetLastError(p->context_);
++#endif
+     if (error->code == XML_WAR_NS_URI || error->code == XML_WAR_NS_URI_RELATIVE) {
+         xmlCtxtResetLastError(p->context_);
+         p->context_->errNo = XML_ERR_OK;

From 9abab65127bf169dccb5f1d264983aa74d224715 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 13/17] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From d61e2f76b983ea0e69f1203a682b549902860c0f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 14/17] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From e685ba2788f04f6fd3d94dcbb670274f1995e8aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 15/17] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 00000000000000..0a00d1bdc502d3
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From 4380c925cc70ce2719aed2dbb5ea9882cb28a916 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 16/17] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..628005774327e9
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

From 37f053829d853097e0ec01cabcce2ec2d1b2ad3e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:32:05 -0800
Subject: [PATCH 17/17] libreoffice: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 300 ++++++++++++++++++
 1 file changed, 300 insertions(+)
 create mode 100644 srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch b/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..d4c6083dd74589
--- /dev/null
+++ b/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,300 @@
+From c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos@collabora.com>
+Date: Mon, 27 Nov 2023 08:02:59 +0100
+Subject: [PATCH] tdf#158302 fix build against system-libxml-2.12
+
+Seen in a fedora:40 container, using --with-system-libcmis,
+--with-system-liblangtag and --with-system-xmlsec.
+
+Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980
+Tested-by: Jenkins
+Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
+---
+ drawinglayer/source/tools/primitive2dxmldump.cxx | 1 +
+ filter/source/xsltfilter/LibXSLTTransformer.cxx  | 2 +-
+ helpcompiler/source/HelpLinker.cxx               | 4 ++++
+ include/xmloff/xmltoken.hxx                      | 2 +-
+ sax/source/fastparser/fastparser.cxx             | 2 +-
+ sc/source/core/tool/interpr7.cxx                 | 1 +
+ sc/source/filter/xml/XMLExportDataPilot.cxx      | 2 +-
+ sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 2 +-
+ sc/source/filter/xml/xmlfilti.cxx                | 6 +++---
+ unoxml/source/dom/attr.cxx                       | 1 +
+ unoxml/source/dom/document.cxx                   | 1 +
+ unoxml/source/dom/documentbuilder.cxx            | 1 +
+ unoxml/source/dom/entity.cxx                     | 1 +
+ unoxml/source/xpath/xpathapi.cxx                 | 7 ++++++-
+ xmloff/source/core/xmltoken.cxx                  | 2 +-
+ xmloff/source/style/PageMasterStyleMap.cxx       | 2 +-
+ xmlsecurity/inc/xmlsec-wrapper.h                 | 1 +
+ xmlsecurity/inc/xmlsec/saxhelper.hxx             | 1 +
+ 18 files changed, 28 insertions(+), 11 deletions(-)
+
+diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
+index 76aefec902ead..f3b9ef1bc9193 100644
+--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
++++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
+@@ -15,6 +15,7 @@
+ 
+ #include <math.h>
+ #include <memory>
++#include <libxml/parser.h>
+ #include <sal/log.hxx>
+ 
+ #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
+index 1a7c34805f1b5..5e9a7c4bcd35e 100644
+--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
++++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
+@@ -333,7 +333,7 @@ namespace XSLT
+         }
+         else
+         {
+-            xmlErrorPtr lastErr = xmlGetLastError();
++            const xmlError* lastErr = xmlGetLastError();
+             OUString msg;
+             if (lastErr)
+                 msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
+diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
+index 3d52834dbe6bf..898a8b26392a9 100644
+--- a/helpcompiler/source/HelpLinker.cxx
++++ b/helpcompiler/source/HelpLinker.cxx
+@@ -815,7 +815,11 @@ static const HelpProcessingException* GpXMLParsingException = nullptr;
+ 
+ extern "C" {
+ 
++#if LIBXML_VERSION >= 21200
++static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, const xmlError* error)
++#else
+ static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, xmlErrorPtr error)
++#endif
+ {
+     std::string aErrorMsg = error->message;
+     std::string aXMLParsingFile;
+diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
+index 4e64418417740..ba42fae4d035a 100644
+--- a/include/xmloff/xmltoken.hxx
++++ b/include/xmloff/xmltoken.hxx
+@@ -744,7 +744,7 @@ namespace xmloff::token {
+         XML_EMBEDDED_VISIBLE_AREA,
+         XML_EMBOSSED,
+         XML_EMISSIVE_COLOR,
+-        XML_EMPTY,
++        XML_TOKEN_EMPTY,
+         XML_EMPTY_LINE_REFRESH,
+         XML_ENABLE_NUMBERING,
+         XML_ENABLED,
+diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
+index ec8065016a12d..e0338e053cf05 100644
+--- a/sax/source/fastparser/fastparser.cxx
++++ b/sax/source/fastparser/fastparser.cxx
+@@ -578,7 +578,7 @@ Event& Entity::getEvent( CallbackType aType )
+ OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemId, sal_Int32 nLine )
+ {
+     const char* pMessage;
+-    xmlErrorPtr error = xmlCtxtGetLastError( ctxt );
++    const xmlError* error = xmlCtxtGetLastError( ctxt );
+     if( error && error->message )
+         pMessage = error->message;
+     else
+diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
+index 352c7cf70e45d..ecb4ea346396b 100644
+--- a/sc/source/core/tool/interpr7.cxx
++++ b/sc/source/core/tool/interpr7.cxx
+@@ -31,6 +31,7 @@
+ #include <cstring>
+ #include <memory>
+ #include <string_view>
++#include <libxml/parser.h>
+ 
+ using namespace com::sun::star;
+ 
+diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
+index da65bec0dab75..bd5f16d828ff7 100644
+--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
++++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
+@@ -123,7 +123,7 @@ void ScXMLExportDataPilot::WriteDPCondition(const ScQueryEntry& aQueryEntry, boo
+ 
+     if (aQueryEntry.IsQueryByEmpty())
+     {
+-        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_EMPTY));
++        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_TOKEN_EMPTY));
+     }
+     else if (aQueryEntry.IsQueryByNonEmpty())
+     {
+diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+index 6905e02d651bc..e4307065bd92f 100644
+--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
++++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+@@ -376,7 +376,7 @@ class WriteDatabaseRange
+             case SC_EQUAL:
+             {
+                 if (rEntry.IsQueryByEmpty())
+-                    return GetXMLToken(XML_EMPTY);
++                    return GetXMLToken(XML_TOKEN_EMPTY);
+                 else if (rEntry.IsQueryByNonEmpty())
+                     return GetXMLToken(XML_NOEMPTY);
+ 
+diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
+index 7585ce0c50fa1..61f7cfe4a3495 100644
+--- a/sc/source/filter/xml/xmlfilti.cxx
++++ b/sc/source/filter/xml/xmlfilti.cxx
+@@ -370,7 +370,7 @@ void ScXMLConditionContext::GetOperator(
+         rEntry.eOp = SC_BOTPERC;
+     else if (IsXMLToken(aOpStr, XML_BOTTOM_VALUES))
+         rEntry.eOp = SC_BOTVAL;
+-    else if (IsXMLToken(aOpStr, XML_EMPTY))
++    else if (IsXMLToken(aOpStr, XML_TOKEN_EMPTY))
+         rEntry.SetQueryByEmpty();
+     else if (aOpStr == u">")
+         rEntry.eOp = SC_GREATER;
+@@ -422,7 +422,7 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
+     if (maQueryItems.empty())
+     {
+         ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
+-        if (IsXMLToken(sOperator, XML_EMPTY))
++        if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
+             return;
+         if (IsXMLToken(sDataType, XML_NUMBER))
+         {
+@@ -753,7 +753,7 @@ void SAL_CALL ScXMLDPConditionContext::endFastElement( sal_Int32 /*nElement*/ )
+     else
+         aFilterField.eConnect = SC_AND;
+     pFilterContext->SetIsCaseSensitive(bIsCaseSensitive);
+-    if (IsXMLToken(sOperator, XML_EMPTY))
++    if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
+         aFilterField.SetQueryByEmpty();
+     else if (IsXMLToken(sOperator, XML_NOEMPTY))
+         aFilterField.SetQueryByNonEmpty();
+diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
+index dd974d910edb1..d8d873cdf0555 100644
+--- a/unoxml/source/dom/attr.cxx
++++ b/unoxml/source/dom/attr.cxx
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ 
+ #include <memory>
++#include <libxml/entities.h>
+ 
+ #include <osl/diagnose.h>
+ #include <sal/log.hxx>
+diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
+index cb48bd1635f82..0825fc2cd7edd 100644
+--- a/unoxml/source/dom/document.cxx
++++ b/unoxml/source/dom/document.cxx
+@@ -41,6 +41,7 @@
+ #include <eventdispatcher.hxx>
+ 
+ #include <string.h>
++#include <libxml/xmlIO.h>
+ 
+ #include <osl/diagnose.h>
+ 
+diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
+index c3cd7663d2fc6..3898d58e4be4a 100644
+--- a/unoxml/source/dom/documentbuilder.cxx
++++ b/unoxml/source/dom/documentbuilder.cxx
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ 
+ #include <libxml/xmlerror.h>
++#include <libxml/parser.h>
+ 
+ #include <memory>
+ 
+diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx
+index ccc8a08724997..98909dfe8f123 100644
+--- a/unoxml/source/dom/entity.cxx
++++ b/unoxml/source/dom/entity.cxx
+@@ -22,6 +22,7 @@
+ #include <osl/diagnose.h>
+ 
+ #include <string.h>
++#include <libxml/entities.h>
+ 
+ using namespace css::uno;
+ using namespace css::xml::dom;
+diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
+index a60083983882e..c2b7537831766 100644
+--- a/unoxml/source/xpath/xpathapi.cxx
++++ b/unoxml/source/xpath/xpathapi.cxx
+@@ -26,6 +26,7 @@
+ #include <libxml/xmlerror.h>
+ #include <libxml/xpath.h>
+ #include <libxml/xpathInternals.h>
++#include <libxml/xmlIO.h>
+ 
+ #include <com/sun/star/xml/xpath/XPathException.hpp>
+ 
+@@ -217,7 +218,7 @@ namespace XPath
+         return selectSingleNode(contextNode, expr);
+     }
+ 
+-    static OUString make_error_message(xmlErrorPtr pError)
++    static OUString make_error_message(const xmlError* pError)
+     {
+         OUStringBuffer buf;
+         if (pError) {
+@@ -259,7 +260,11 @@ namespace XPath
+             SAL_WARN("unoxml", "libxml2 error: " << str);
+         }
+ 
++#if LIBXML_VERSION >= 21200
++        static void structured_error_func(void *, const xmlError* error)
++#else
+         static void structured_error_func(void *, xmlErrorPtr error)
++#endif
+         {
+             SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error));
+         }
+diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
+index 6879f37db2950..e11dc0d161119 100644
+--- a/xmloff/source/core/xmltoken.cxx
++++ b/xmloff/source/core/xmltoken.cxx
+@@ -756,7 +756,7 @@ namespace xmloff::token {
+         TOKEN( "embedded-visible-area",           XML_EMBEDDED_VISIBLE_AREA ),
+         TOKEN( "embossed",                        XML_EMBOSSED ),
+         TOKEN( "emissive-color",                  XML_EMISSIVE_COLOR ),
+-        TOKEN( "empty",                           XML_EMPTY ),
++        TOKEN( "empty",                           XML_TOKEN_EMPTY ),
+         TOKEN( "empty-line-refresh",              XML_EMPTY_LINE_REFRESH ),
+         TOKEN( "enable-numbering",                XML_ENABLE_NUMBERING ),
+         TOKEN( "enabled",                         XML_ENABLED ),
+diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
+index 7b2cab4751aa8..6f631289672b7 100644
+--- a/xmloff/source/style/PageMasterStyleMap.cxx
++++ b/xmloff/source/style/PageMasterStyleMap.cxx
+@@ -157,7 +157,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
+     PLMAP( PROP_FootnoteLineRelativeWidth, XML_NAMESPACE_STYLE,    XML__EMPTY,     XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM,    CTF_PM_FTN_LINE_WIDTH ),
+     PLMAP( PROP_FootnoteLineTextDistance, XML_NAMESPACE_STYLE,    XML__EMPTY,     XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM,    CTF_PM_FTN_LINE_DISTANCE ),
+     PLMAP( PROP_FootnoteLineWeight,        XML_NAMESPACE_STYLE,    XML_FOOTNOTE_SEP,    XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM,    CTF_PM_FTN_LINE_WEIGHT ),
+-    PLMAP( PROP_FootnoteLineStyle,     XML_NAMESPACE_STYLE,    XML_EMPTY,  XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM,  CTF_PM_FTN_LINE_STYLE ),
++    PLMAP( PROP_FootnoteLineStyle,     XML_NAMESPACE_STYLE,    XML_TOKEN_EMPTY,  XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM,  CTF_PM_FTN_LINE_STYLE ),
+     PLMAP_EXT(PROP_GutterMargin, XML_NAMESPACE_LO_EXT, XML_MARGIN_GUTTER, XML_TYPE_MEASURE, CTF_PM_MARGINGUTTER),
+ 
+     //////////////////////////////////////////////////////////////////////////
+diff --git a/xmlsecurity/inc/xmlsec-wrapper.h b/xmlsecurity/inc/xmlsec-wrapper.h
+index 7c6d267e8b739..3ad705400c52c 100644
+--- a/xmlsecurity/inc/xmlsec-wrapper.h
++++ b/xmlsecurity/inc/xmlsec-wrapper.h
+@@ -23,6 +23,7 @@
+ 
+ #include <sal/types.h>
+ 
++#include <libxml/parser.h>
+ #include <xmlsec/base64.h>
+ #include <xmlsec/bn.h>
+ #include <xmlsec/errors.h>
+diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx
+index a49ccef1894c6..a5863ffd0e2a0 100644
+--- a/xmlsecurity/inc/xmlsec/saxhelper.hxx
++++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx
+@@ -23,6 +23,7 @@
+ 
+ #include <string_view>
+ 
++#include <libxml/parser.h>
+ #include <libxml/tree.h>
+ 
+ #include <rtl/ustring.hxx>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (22 preceding siblings ...)
  2024-02-19 14:53 ` oreo639
@ 2024-02-19 14:57 ` oreo639
  2024-02-25  3:45 ` oreo639
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-19 14:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 47355 bytes --]

From df29e1edfb763c6f990cfb6b9382b2f107cbc9aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 01/17] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 0000000000000..50a6da45513f8
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e..270753e103cee 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 6d535880a169896a3dd307ba70fa21298b78beb3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 02/17] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..dc5b0f53460c9
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 74d7a5cd59be1325c468a38ab0c505f2dab9464b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 03/17] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..eb8c8eb7709a8
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From 777ea0f588ae46bfdf2e8c6d158d40d273eb1f2a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 15:13:02 -0800
Subject: [PATCH 04/17] libgdal: update to 3.8.4.

---
 common/shlibs                          |  2 +-
 srcpkgs/libgdal/patches/10-atoll.patch | 34 --------------------------
 srcpkgs/libgdal/template               |  6 ++---
 3 files changed, 4 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/libgdal/patches/10-atoll.patch

diff --git a/common/shlibs b/common/shlibs
index 3cf507d8ada87..f5b32693cae68 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2459,7 +2459,7 @@ libu2f-host.so.0 libu2f-host-1.1.10_5
 libu2f-server.so.0 libu2f-server-1.1.0_9
 libsqlcipher.so.0 sqlcipher-4.3.0_3
 libgta.so.1 libgta-1.2.0_1
-libgdal.so.31 libgdal-3.5.3_1
+libgdal.so.34 libgdal-3.8.4_1
 libosgViewer.so.161 osg-3.6.5_1
 libosgShadow.so.161 osg-3.6.5_1
 libosgParticle.so.161 osg-3.6.5_1
diff --git a/srcpkgs/libgdal/patches/10-atoll.patch b/srcpkgs/libgdal/patches/10-atoll.patch
deleted file mode 100644
index a114098612c52..0000000000000
--- a/srcpkgs/libgdal/patches/10-atoll.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Author: Holger Jaekel <holger.jaekel@gmx.de>
-Summary: musl atoll() doesn't return ERANGE in case of overflow
-----
-
---- a/port/cpl_conv.cpp
-+++ b/port/cpl_conv.cpp
-@@ -1011,8 +1011,6 @@
- #endif
- }
- 
--#if defined(__MINGW32__) || defined(__sun__)
--
- // mingw atoll() doesn't return ERANGE in case of overflow
- static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
- {
-@@ -1035,8 +1033,6 @@
-     return strcmp(szBuffer, pszString) != 0;
- }
- 
--#endif
--
- /************************************************************************/
- /*                          CPLAtoGIntBigEx()                           */
- /************************************************************************/
-@@ -1065,9 +1061,7 @@
-     GIntBig nVal = atol(pszString);
- #endif
-     if( errno == ERANGE
--#if defined(__MINGW32__) || defined(__sun__)
-         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
--#endif
-         )
-     {
-         if( pbOverflow )
diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d5850fb768f66..93d916099045c 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
-version=3.5.3
-revision=12
+version=3.8.4
+revision=1
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON
@@ -21,7 +21,7 @@ license="MIT"
 homepage="https://www.gdal.org"
 changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
 distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
-checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
+checksum=0c53ced95d29474236487202709b49015854f8e02e35e44ed0f4f4e12a7966ce
 python_version=3
 
 if [ -z "$CROSS_BUILD" ]; then

From 4f0e9ccbeca1a32ace67d71fa0dd778e6efecea2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 05/17] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..f288ce9a66b09
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 2368a935a60a62c31932afbbae401717ea57fad6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:41:36 -0800
Subject: [PATCH 06/17] webkit2gtk: fix build for libxml2 2.12

---
 .../webkit2gtk/patches/fix-libxml2-2.12.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..0529514ffe006
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,56 @@
+From 1bad176b2496579d760852c80cff3ad9fb7c3a4b Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Mon, 20 Nov 2023 07:42:30 -0800
+Subject: [PATCH] Build fails with libxml2 version 2.12.0 due to API change
+ https://bugs.webkit.org/show_bug.cgi?id=265128
+
+Reviewed by Philippe Normand.
+
+Starting with libxml2 2.12.0, the API has changed the const-ness of the
+xmlError pointers, which results in a build error due to a mismatched
+type in the parsing error callback. This papers over the difference by
+using preprocessor conditionals.
+
+* Source/WebCore/xml/XSLTProcessor.h: Use const when building against
+  libxml2 2.12.0 or newer.
+* Source/WebCore/xml/XSLTProcessorLibxslt.cpp:
+(WebCore::XSLTProcessor::parseErrorFunc): Ditto.
+
+Canonical link: https://commits.webkit.org/270977@main
+---
+ Source/WebCore/xml/XSLTProcessor.h          | 4 ++++
+ Source/WebCore/xml/XSLTProcessorLibxslt.cpp | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/Source/WebCore/xml/XSLTProcessor.h b/Source/WebCore/xml/XSLTProcessor.h
+index 21bb45b5cbe1..5cf20557918f 100644
+--- a/Source/WebCore/xml/XSLTProcessor.h
++++ b/Source/WebCore/xml/XSLTProcessor.h
+@@ -61,7 +61,11 @@ class XSLTProcessor : public RefCounted<XSLTProcessor> {
+ 
+     void reset();
+ 
++#if LIBXML_VERSION >= 21200
++    static void parseErrorFunc(void* userData, const xmlError*);
++#else
+     static void parseErrorFunc(void* userData, xmlError*);
++#endif
+     static void genericErrorFunc(void* userData, const char* msg, ...);
+     
+     // Only for libXSLT callbacks
+diff --git a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+index a65691087e3c..9f6b363dfc6c 100644
+--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
++++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+@@ -59,7 +59,11 @@ void XSLTProcessor::genericErrorFunc(void*, const char*, ...)
+     // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error)
++#else
+ void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
++#endif
+ {
+     PageConsoleClient* console = static_cast<PageConsoleClient*>(userData);
+     if (!console)

From acb196e951c4270950d3224a190b84a7ededdcf6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 07/17] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d37..0dfb40b1f1161 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From d9addda4405405cb0030293bc865215bc749c3c1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 08/17] recoll: update to 1.37.4.

---
 srcpkgs/recoll/patches/musl.patch | 4 ++--
 srcpkgs/recoll/template           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/recoll/patches/musl.patch b/srcpkgs/recoll/patches/musl.patch
index d633e92b9df11..5d061a0578965 100644
--- a/srcpkgs/recoll/patches/musl.patch
+++ b/srcpkgs/recoll/patches/musl.patch
@@ -27,11 +27,11 @@ diff --git a/common/conf_post.h b/common/conf_post.h
 index 7093ead..0ecd56b 100644
 --- a/common/conf_post.h
 +++ b/common/conf_post.h
-@@ -73,12 +73,4 @@ typedef int ssize_t;
+@@ -74,12 +74,4 @@ typedef int ssize_t;
  #define REAL_GCC   __GNUC__ // probably
  #endif
  
--#ifdef REAL_GCC
+-#if defined(REAL_GCC) && defined(HAVE_FEATURES_H)
 -// Older gcc versions pretended to supply std::regex, but the resulting programs mostly crashed.
 -#include <features.h>
 -#if ! __GNUC_PREREQ(6,0)
diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e..7b33d23df03a5 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 02dd0abea401e76901258acd077fbbf2c600272a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 09/17] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342..e73856d05a1b8 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From 9de91c488c9f052bcb0b537c548ccc17f63134a3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:24:30 -0800
Subject: [PATCH 10/17] liferea: fix build for libxml2 2.12

---
 .../liferea/patches/fix-libxml2-2.12.patch    | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/liferea/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/liferea/patches/fix-libxml2-2.12.patch b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..abe1fb1376698
--- /dev/null
+++ b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,28 @@
+From be8ef494586d9ef73c04ec4ca058a9a158ae3562 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Sun, 31 Dec 2023 22:26:31 +0000
+Subject: [PATCH] src/node_type.h: add `#include <libxml/tree.h>` for
+ `xmlNodePtr` type
+
+Without the change build fails on `libxml2-2.12.3` as:
+
+    ../../src/node_type.h:62:64: error: unknown type name 'xmlNodePtr'; did you mean 'nodePtr'?
+       62 |         void            (*export)               (nodePtr node, xmlNodePtr cur, gboolean trusted);
+          |                                                                ^~~~~~~~~~
+          |                                                                nodePtr
+---
+ src/node_type.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/node_type.h b/src/node_type.h
+index fcd3e7223..a41ff52fc 100644
+--- a/src/node_type.h
++++ b/src/node_type.h
+@@ -23,6 +23,7 @@
+ 
+ #include "node.h"
+ 
++#include <libxml/tree.h>
+ #include <libxml/xmlmemory.h>
+ #include <gtk/gtk.h>
+ 

From a619434ccb76b266a06dfcad1c95c40235a85f16 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:31:24 -0800
Subject: [PATCH 11/17] gtkpod: fix build for libxml2 2.12

---
 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..58eab19153ee7
--- /dev/null
+++ b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,12 @@
+Source: https://src.fedoraproject.org/rpms/gtkpod/blob/a3e1c785b5a43603ad46ef913b0644babbfc6a73/f/includes.patch
+
+--- a/libgtkpod/misc.c
++++ b/libgtkpod/misc.c
+@@ -39,6 +39,7 @@
+ #include <sys/wait.h>
+ #include <unistd.h>
+ #include <glib/gi18n-lib.h>
++#include <libxml/parser.h>
+ #include "charset.h"
+ #include "clientserver.h"
+ #include "misc.h"

From 18dae382170a4603f280ee2b5a33aeffad2af9fa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:43:29 -0800
Subject: [PATCH 12/17] swiften: fix build for libxml2 2.12

---
 srcpkgs/swiften/patches/fix-libxml2-2.12.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 srcpkgs/swiften/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/swiften/patches/fix-libxml2-2.12.patch b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..3e3e4d1635206
--- /dev/null
+++ b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,15 @@
+diff -rup Swiften/Parser/LibXMLParser.cpp.orig Swiften/Parser/LibXMLParser.cpp
+--- a/Swiften/Parser/LibXMLParser.cpp
++++ b/Swiften/Parser/LibXMLParser.cpp
+@@ -97,7 +97,11 @@ bool LibXMLParser::parse(const std::stri
+     if (xmlParseChunk(p->context_, data.c_str(), boost::numeric_cast<int>(data.size()), false) == XML_ERR_OK) {
+         return true;
+     }
++#if LIBXML_VERSION >= 21200
++    const xmlError* error = xmlCtxtGetLastError(p->context_);
++#else
+     xmlError* error = xmlCtxtGetLastError(p->context_);
++#endif
+     if (error->code == XML_WAR_NS_URI || error->code == XML_WAR_NS_URI_RELATIVE) {
+         xmlCtxtResetLastError(p->context_);
+         p->context_->errNo = XML_ERR_OK;

From 5d58016e4ab9fffe63865a19fb7bc5a42fe4b350 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 13/17] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..f85ee4d01ff64
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 6d7e0e242f002d3d78c13937c7387945e7c2746a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 14/17] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..f85ee4d01ff64
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 3c9825d57bd988bc6f2c85ba4860ce362382f3ce Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 15/17] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 0000000000000..0a00d1bdc502d
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From a2fdffc4cb4d3e6af29c35874b0749adfae360dc Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 16/17] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..628005774327e
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

From 9df4ec656b8b95f728af21cbb2e046b3ef6689e8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:32:05 -0800
Subject: [PATCH 17/17] libreoffice: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 300 ++++++++++++++++++
 1 file changed, 300 insertions(+)
 create mode 100644 srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch b/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch
new file mode 100644
index 0000000000000..d4c6083dd7458
--- /dev/null
+++ b/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,300 @@
+From c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos@collabora.com>
+Date: Mon, 27 Nov 2023 08:02:59 +0100
+Subject: [PATCH] tdf#158302 fix build against system-libxml-2.12
+
+Seen in a fedora:40 container, using --with-system-libcmis,
+--with-system-liblangtag and --with-system-xmlsec.
+
+Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980
+Tested-by: Jenkins
+Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
+---
+ drawinglayer/source/tools/primitive2dxmldump.cxx | 1 +
+ filter/source/xsltfilter/LibXSLTTransformer.cxx  | 2 +-
+ helpcompiler/source/HelpLinker.cxx               | 4 ++++
+ include/xmloff/xmltoken.hxx                      | 2 +-
+ sax/source/fastparser/fastparser.cxx             | 2 +-
+ sc/source/core/tool/interpr7.cxx                 | 1 +
+ sc/source/filter/xml/XMLExportDataPilot.cxx      | 2 +-
+ sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 2 +-
+ sc/source/filter/xml/xmlfilti.cxx                | 6 +++---
+ unoxml/source/dom/attr.cxx                       | 1 +
+ unoxml/source/dom/document.cxx                   | 1 +
+ unoxml/source/dom/documentbuilder.cxx            | 1 +
+ unoxml/source/dom/entity.cxx                     | 1 +
+ unoxml/source/xpath/xpathapi.cxx                 | 7 ++++++-
+ xmloff/source/core/xmltoken.cxx                  | 2 +-
+ xmloff/source/style/PageMasterStyleMap.cxx       | 2 +-
+ xmlsecurity/inc/xmlsec-wrapper.h                 | 1 +
+ xmlsecurity/inc/xmlsec/saxhelper.hxx             | 1 +
+ 18 files changed, 28 insertions(+), 11 deletions(-)
+
+diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
+index 76aefec902ead..f3b9ef1bc9193 100644
+--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
++++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
+@@ -15,6 +15,7 @@
+ 
+ #include <math.h>
+ #include <memory>
++#include <libxml/parser.h>
+ #include <sal/log.hxx>
+ 
+ #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
+index 1a7c34805f1b5..5e9a7c4bcd35e 100644
+--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
++++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
+@@ -333,7 +333,7 @@ namespace XSLT
+         }
+         else
+         {
+-            xmlErrorPtr lastErr = xmlGetLastError();
++            const xmlError* lastErr = xmlGetLastError();
+             OUString msg;
+             if (lastErr)
+                 msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
+diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
+index 3d52834dbe6bf..898a8b26392a9 100644
+--- a/helpcompiler/source/HelpLinker.cxx
++++ b/helpcompiler/source/HelpLinker.cxx
+@@ -815,7 +815,11 @@ static const HelpProcessingException* GpXMLParsingException = nullptr;
+ 
+ extern "C" {
+ 
++#if LIBXML_VERSION >= 21200
++static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, const xmlError* error)
++#else
+ static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, xmlErrorPtr error)
++#endif
+ {
+     std::string aErrorMsg = error->message;
+     std::string aXMLParsingFile;
+diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
+index 4e64418417740..ba42fae4d035a 100644
+--- a/include/xmloff/xmltoken.hxx
++++ b/include/xmloff/xmltoken.hxx
+@@ -744,7 +744,7 @@ namespace xmloff::token {
+         XML_EMBEDDED_VISIBLE_AREA,
+         XML_EMBOSSED,
+         XML_EMISSIVE_COLOR,
+-        XML_EMPTY,
++        XML_TOKEN_EMPTY,
+         XML_EMPTY_LINE_REFRESH,
+         XML_ENABLE_NUMBERING,
+         XML_ENABLED,
+diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
+index ec8065016a12d..e0338e053cf05 100644
+--- a/sax/source/fastparser/fastparser.cxx
++++ b/sax/source/fastparser/fastparser.cxx
+@@ -578,7 +578,7 @@ Event& Entity::getEvent( CallbackType aType )
+ OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemId, sal_Int32 nLine )
+ {
+     const char* pMessage;
+-    xmlErrorPtr error = xmlCtxtGetLastError( ctxt );
++    const xmlError* error = xmlCtxtGetLastError( ctxt );
+     if( error && error->message )
+         pMessage = error->message;
+     else
+diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
+index 352c7cf70e45d..ecb4ea346396b 100644
+--- a/sc/source/core/tool/interpr7.cxx
++++ b/sc/source/core/tool/interpr7.cxx
+@@ -31,6 +31,7 @@
+ #include <cstring>
+ #include <memory>
+ #include <string_view>
++#include <libxml/parser.h>
+ 
+ using namespace com::sun::star;
+ 
+diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
+index da65bec0dab75..bd5f16d828ff7 100644
+--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
++++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
+@@ -123,7 +123,7 @@ void ScXMLExportDataPilot::WriteDPCondition(const ScQueryEntry& aQueryEntry, boo
+ 
+     if (aQueryEntry.IsQueryByEmpty())
+     {
+-        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_EMPTY));
++        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_TOKEN_EMPTY));
+     }
+     else if (aQueryEntry.IsQueryByNonEmpty())
+     {
+diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+index 6905e02d651bc..e4307065bd92f 100644
+--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
++++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+@@ -376,7 +376,7 @@ class WriteDatabaseRange
+             case SC_EQUAL:
+             {
+                 if (rEntry.IsQueryByEmpty())
+-                    return GetXMLToken(XML_EMPTY);
++                    return GetXMLToken(XML_TOKEN_EMPTY);
+                 else if (rEntry.IsQueryByNonEmpty())
+                     return GetXMLToken(XML_NOEMPTY);
+ 
+diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
+index 7585ce0c50fa1..61f7cfe4a3495 100644
+--- a/sc/source/filter/xml/xmlfilti.cxx
++++ b/sc/source/filter/xml/xmlfilti.cxx
+@@ -370,7 +370,7 @@ void ScXMLConditionContext::GetOperator(
+         rEntry.eOp = SC_BOTPERC;
+     else if (IsXMLToken(aOpStr, XML_BOTTOM_VALUES))
+         rEntry.eOp = SC_BOTVAL;
+-    else if (IsXMLToken(aOpStr, XML_EMPTY))
++    else if (IsXMLToken(aOpStr, XML_TOKEN_EMPTY))
+         rEntry.SetQueryByEmpty();
+     else if (aOpStr == u">")
+         rEntry.eOp = SC_GREATER;
+@@ -422,7 +422,7 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
+     if (maQueryItems.empty())
+     {
+         ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
+-        if (IsXMLToken(sOperator, XML_EMPTY))
++        if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
+             return;
+         if (IsXMLToken(sDataType, XML_NUMBER))
+         {
+@@ -753,7 +753,7 @@ void SAL_CALL ScXMLDPConditionContext::endFastElement( sal_Int32 /*nElement*/ )
+     else
+         aFilterField.eConnect = SC_AND;
+     pFilterContext->SetIsCaseSensitive(bIsCaseSensitive);
+-    if (IsXMLToken(sOperator, XML_EMPTY))
++    if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
+         aFilterField.SetQueryByEmpty();
+     else if (IsXMLToken(sOperator, XML_NOEMPTY))
+         aFilterField.SetQueryByNonEmpty();
+diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
+index dd974d910edb1..d8d873cdf0555 100644
+--- a/unoxml/source/dom/attr.cxx
++++ b/unoxml/source/dom/attr.cxx
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ 
+ #include <memory>
++#include <libxml/entities.h>
+ 
+ #include <osl/diagnose.h>
+ #include <sal/log.hxx>
+diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
+index cb48bd1635f82..0825fc2cd7edd 100644
+--- a/unoxml/source/dom/document.cxx
++++ b/unoxml/source/dom/document.cxx
+@@ -41,6 +41,7 @@
+ #include <eventdispatcher.hxx>
+ 
+ #include <string.h>
++#include <libxml/xmlIO.h>
+ 
+ #include <osl/diagnose.h>
+ 
+diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
+index c3cd7663d2fc6..3898d58e4be4a 100644
+--- a/unoxml/source/dom/documentbuilder.cxx
++++ b/unoxml/source/dom/documentbuilder.cxx
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ 
+ #include <libxml/xmlerror.h>
++#include <libxml/parser.h>
+ 
+ #include <memory>
+ 
+diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx
+index ccc8a08724997..98909dfe8f123 100644
+--- a/unoxml/source/dom/entity.cxx
++++ b/unoxml/source/dom/entity.cxx
+@@ -22,6 +22,7 @@
+ #include <osl/diagnose.h>
+ 
+ #include <string.h>
++#include <libxml/entities.h>
+ 
+ using namespace css::uno;
+ using namespace css::xml::dom;
+diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
+index a60083983882e..c2b7537831766 100644
+--- a/unoxml/source/xpath/xpathapi.cxx
++++ b/unoxml/source/xpath/xpathapi.cxx
+@@ -26,6 +26,7 @@
+ #include <libxml/xmlerror.h>
+ #include <libxml/xpath.h>
+ #include <libxml/xpathInternals.h>
++#include <libxml/xmlIO.h>
+ 
+ #include <com/sun/star/xml/xpath/XPathException.hpp>
+ 
+@@ -217,7 +218,7 @@ namespace XPath
+         return selectSingleNode(contextNode, expr);
+     }
+ 
+-    static OUString make_error_message(xmlErrorPtr pError)
++    static OUString make_error_message(const xmlError* pError)
+     {
+         OUStringBuffer buf;
+         if (pError) {
+@@ -259,7 +260,11 @@ namespace XPath
+             SAL_WARN("unoxml", "libxml2 error: " << str);
+         }
+ 
++#if LIBXML_VERSION >= 21200
++        static void structured_error_func(void *, const xmlError* error)
++#else
+         static void structured_error_func(void *, xmlErrorPtr error)
++#endif
+         {
+             SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error));
+         }
+diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
+index 6879f37db2950..e11dc0d161119 100644
+--- a/xmloff/source/core/xmltoken.cxx
++++ b/xmloff/source/core/xmltoken.cxx
+@@ -756,7 +756,7 @@ namespace xmloff::token {
+         TOKEN( "embedded-visible-area",           XML_EMBEDDED_VISIBLE_AREA ),
+         TOKEN( "embossed",                        XML_EMBOSSED ),
+         TOKEN( "emissive-color",                  XML_EMISSIVE_COLOR ),
+-        TOKEN( "empty",                           XML_EMPTY ),
++        TOKEN( "empty",                           XML_TOKEN_EMPTY ),
+         TOKEN( "empty-line-refresh",              XML_EMPTY_LINE_REFRESH ),
+         TOKEN( "enable-numbering",                XML_ENABLE_NUMBERING ),
+         TOKEN( "enabled",                         XML_ENABLED ),
+diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
+index 7b2cab4751aa8..6f631289672b7 100644
+--- a/xmloff/source/style/PageMasterStyleMap.cxx
++++ b/xmloff/source/style/PageMasterStyleMap.cxx
+@@ -157,7 +157,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
+     PLMAP( PROP_FootnoteLineRelativeWidth, XML_NAMESPACE_STYLE,    XML__EMPTY,     XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM,    CTF_PM_FTN_LINE_WIDTH ),
+     PLMAP( PROP_FootnoteLineTextDistance, XML_NAMESPACE_STYLE,    XML__EMPTY,     XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM,    CTF_PM_FTN_LINE_DISTANCE ),
+     PLMAP( PROP_FootnoteLineWeight,        XML_NAMESPACE_STYLE,    XML_FOOTNOTE_SEP,    XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM,    CTF_PM_FTN_LINE_WEIGHT ),
+-    PLMAP( PROP_FootnoteLineStyle,     XML_NAMESPACE_STYLE,    XML_EMPTY,  XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM,  CTF_PM_FTN_LINE_STYLE ),
++    PLMAP( PROP_FootnoteLineStyle,     XML_NAMESPACE_STYLE,    XML_TOKEN_EMPTY,  XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM,  CTF_PM_FTN_LINE_STYLE ),
+     PLMAP_EXT(PROP_GutterMargin, XML_NAMESPACE_LO_EXT, XML_MARGIN_GUTTER, XML_TYPE_MEASURE, CTF_PM_MARGINGUTTER),
+ 
+     //////////////////////////////////////////////////////////////////////////
+diff --git a/xmlsecurity/inc/xmlsec-wrapper.h b/xmlsecurity/inc/xmlsec-wrapper.h
+index 7c6d267e8b739..3ad705400c52c 100644
+--- a/xmlsecurity/inc/xmlsec-wrapper.h
++++ b/xmlsecurity/inc/xmlsec-wrapper.h
+@@ -23,6 +23,7 @@
+ 
+ #include <sal/types.h>
+ 
++#include <libxml/parser.h>
+ #include <xmlsec/base64.h>
+ #include <xmlsec/bn.h>
+ #include <xmlsec/errors.h>
+diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx
+index a49ccef1894c6..a5863ffd0e2a0 100644
+--- a/xmlsecurity/inc/xmlsec/saxhelper.hxx
++++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx
+@@ -23,6 +23,7 @@
+ 
+ #include <string_view>
+ 
++#include <libxml/parser.h>
+ #include <libxml/tree.h>
+ 
+ #include <rtl/ustring.hxx>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (23 preceding siblings ...)
  2024-02-19 14:57 ` oreo639
@ 2024-02-25  3:45 ` oreo639
  2024-02-25  3:59 ` oreo639
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-25  3:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 41531 bytes --]

From 3256ee1aa327964806791955c6a9c3d771e38cc0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 01/15] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..270753e103cee1 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From fdd3b4787a51f0a6901f80be5f49072fd5569e88 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 02/15] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..dc5b0f53460c9a
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 9df5b36b648662c558e21615c2c1bd4ffe683acf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 03/15] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..eb8c8eb7709a87
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From aed2161b08e86a32e30191bb66544fe828119828 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 04/15] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f288ce9a66b098
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 6e849265ebb70d0bc81a7c5b6a075c66ad4168d3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 05/15] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d374..0dfb40b1f1161d 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From c7f2ab204915a5a3d829e1e9d2bc04677eebceca Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 06/15] recoll: update to 1.37.4.

---
 srcpkgs/recoll/patches/musl.patch | 4 ++--
 srcpkgs/recoll/template           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/recoll/patches/musl.patch b/srcpkgs/recoll/patches/musl.patch
index d633e92b9df118..5d061a05789650 100644
--- a/srcpkgs/recoll/patches/musl.patch
+++ b/srcpkgs/recoll/patches/musl.patch
@@ -27,11 +27,11 @@ diff --git a/common/conf_post.h b/common/conf_post.h
 index 7093ead..0ecd56b 100644
 --- a/common/conf_post.h
 +++ b/common/conf_post.h
-@@ -73,12 +73,4 @@ typedef int ssize_t;
+@@ -74,12 +74,4 @@ typedef int ssize_t;
  #define REAL_GCC   __GNUC__ // probably
  #endif
  
--#ifdef REAL_GCC
+-#if defined(REAL_GCC) && defined(HAVE_FEATURES_H)
 -// Older gcc versions pretended to supply std::regex, but the resulting programs mostly crashed.
 -#include <features.h>
 -#if ! __GNUC_PREREQ(6,0)
diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e3..7b33d23df03a59 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 345b484ce9636a8df61ce06e66201ae13ace0d64 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 07/15] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342a..e73856d05a1b80 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From f4b8d5777e65ebe2e00df549dc1ac2ec5ad0803a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:24:30 -0800
Subject: [PATCH 08/15] liferea: fix build for libxml2 2.12

---
 .../liferea/patches/fix-libxml2-2.12.patch    | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/liferea/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/liferea/patches/fix-libxml2-2.12.patch b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..abe1fb13766982
--- /dev/null
+++ b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,28 @@
+From be8ef494586d9ef73c04ec4ca058a9a158ae3562 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Sun, 31 Dec 2023 22:26:31 +0000
+Subject: [PATCH] src/node_type.h: add `#include <libxml/tree.h>` for
+ `xmlNodePtr` type
+
+Without the change build fails on `libxml2-2.12.3` as:
+
+    ../../src/node_type.h:62:64: error: unknown type name 'xmlNodePtr'; did you mean 'nodePtr'?
+       62 |         void            (*export)               (nodePtr node, xmlNodePtr cur, gboolean trusted);
+          |                                                                ^~~~~~~~~~
+          |                                                                nodePtr
+---
+ src/node_type.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/node_type.h b/src/node_type.h
+index fcd3e7223..a41ff52fc 100644
+--- a/src/node_type.h
++++ b/src/node_type.h
+@@ -23,6 +23,7 @@
+ 
+ #include "node.h"
+ 
++#include <libxml/tree.h>
+ #include <libxml/xmlmemory.h>
+ #include <gtk/gtk.h>
+ 

From 47997bcf755bb07ef8253c31e33e53f95ba523a3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:31:24 -0800
Subject: [PATCH 09/15] gtkpod: fix build for libxml2 2.12

---
 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..58eab19153ee7f
--- /dev/null
+++ b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,12 @@
+Source: https://src.fedoraproject.org/rpms/gtkpod/blob/a3e1c785b5a43603ad46ef913b0644babbfc6a73/f/includes.patch
+
+--- a/libgtkpod/misc.c
++++ b/libgtkpod/misc.c
+@@ -39,6 +39,7 @@
+ #include <sys/wait.h>
+ #include <unistd.h>
+ #include <glib/gi18n-lib.h>
++#include <libxml/parser.h>
+ #include "charset.h"
+ #include "clientserver.h"
+ #include "misc.h"

From d4589fd9c1345317c7dbdf717e4f7988a326a732 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:43:29 -0800
Subject: [PATCH 10/15] swiften: fix build for libxml2 2.12

---
 srcpkgs/swiften/patches/fix-libxml2-2.12.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 srcpkgs/swiften/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/swiften/patches/fix-libxml2-2.12.patch b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..3e3e4d16352060
--- /dev/null
+++ b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,15 @@
+diff -rup Swiften/Parser/LibXMLParser.cpp.orig Swiften/Parser/LibXMLParser.cpp
+--- a/Swiften/Parser/LibXMLParser.cpp
++++ b/Swiften/Parser/LibXMLParser.cpp
+@@ -97,7 +97,11 @@ bool LibXMLParser::parse(const std::stri
+     if (xmlParseChunk(p->context_, data.c_str(), boost::numeric_cast<int>(data.size()), false) == XML_ERR_OK) {
+         return true;
+     }
++#if LIBXML_VERSION >= 21200
++    const xmlError* error = xmlCtxtGetLastError(p->context_);
++#else
+     xmlError* error = xmlCtxtGetLastError(p->context_);
++#endif
+     if (error->code == XML_WAR_NS_URI || error->code == XML_WAR_NS_URI_RELATIVE) {
+         xmlCtxtResetLastError(p->context_);
+         p->context_->errNo = XML_ERR_OK;

From a6ae79d5ab0edac9dde643efeb9a33e04c1eff5d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 11/15] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From af69d017a8aae4ef521d707f6e7cd2e5a43a8864 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 12/15] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 2456d28220860694d34fc2120a773efb1b1ade80 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 13/15] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 00000000000000..0a00d1bdc502d3
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From 1a79cc88967a5e35346db669fe194d3616b4c5af Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 14/15] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..628005774327e9
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

From 5d82e54a16c5771c4768ff5688012ad1b6059166 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:32:05 -0800
Subject: [PATCH 15/15] libreoffice: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 300 ++++++++++++++++++
 1 file changed, 300 insertions(+)
 create mode 100644 srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch b/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..d4c6083dd74589
--- /dev/null
+++ b/srcpkgs/libreoffice/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,300 @@
+From c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos@collabora.com>
+Date: Mon, 27 Nov 2023 08:02:59 +0100
+Subject: [PATCH] tdf#158302 fix build against system-libxml-2.12
+
+Seen in a fedora:40 container, using --with-system-libcmis,
+--with-system-liblangtag and --with-system-xmlsec.
+
+Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980
+Tested-by: Jenkins
+Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
+---
+ drawinglayer/source/tools/primitive2dxmldump.cxx | 1 +
+ filter/source/xsltfilter/LibXSLTTransformer.cxx  | 2 +-
+ helpcompiler/source/HelpLinker.cxx               | 4 ++++
+ include/xmloff/xmltoken.hxx                      | 2 +-
+ sax/source/fastparser/fastparser.cxx             | 2 +-
+ sc/source/core/tool/interpr7.cxx                 | 1 +
+ sc/source/filter/xml/XMLExportDataPilot.cxx      | 2 +-
+ sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 2 +-
+ sc/source/filter/xml/xmlfilti.cxx                | 6 +++---
+ unoxml/source/dom/attr.cxx                       | 1 +
+ unoxml/source/dom/document.cxx                   | 1 +
+ unoxml/source/dom/documentbuilder.cxx            | 1 +
+ unoxml/source/dom/entity.cxx                     | 1 +
+ unoxml/source/xpath/xpathapi.cxx                 | 7 ++++++-
+ xmloff/source/core/xmltoken.cxx                  | 2 +-
+ xmloff/source/style/PageMasterStyleMap.cxx       | 2 +-
+ xmlsecurity/inc/xmlsec-wrapper.h                 | 1 +
+ xmlsecurity/inc/xmlsec/saxhelper.hxx             | 1 +
+ 18 files changed, 28 insertions(+), 11 deletions(-)
+
+diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
+index 76aefec902ead..f3b9ef1bc9193 100644
+--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
++++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
+@@ -15,6 +15,7 @@
+ 
+ #include <math.h>
+ #include <memory>
++#include <libxml/parser.h>
+ #include <sal/log.hxx>
+ 
+ #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
+index 1a7c34805f1b5..5e9a7c4bcd35e 100644
+--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
++++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
+@@ -333,7 +333,7 @@ namespace XSLT
+         }
+         else
+         {
+-            xmlErrorPtr lastErr = xmlGetLastError();
++            const xmlError* lastErr = xmlGetLastError();
+             OUString msg;
+             if (lastErr)
+                 msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
+diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
+index 3d52834dbe6bf..898a8b26392a9 100644
+--- a/helpcompiler/source/HelpLinker.cxx
++++ b/helpcompiler/source/HelpLinker.cxx
+@@ -815,7 +815,11 @@ static const HelpProcessingException* GpXMLParsingException = nullptr;
+ 
+ extern "C" {
+ 
++#if LIBXML_VERSION >= 21200
++static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, const xmlError* error)
++#else
+ static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, xmlErrorPtr error)
++#endif
+ {
+     std::string aErrorMsg = error->message;
+     std::string aXMLParsingFile;
+diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
+index 4e64418417740..ba42fae4d035a 100644
+--- a/include/xmloff/xmltoken.hxx
++++ b/include/xmloff/xmltoken.hxx
+@@ -744,7 +744,7 @@ namespace xmloff::token {
+         XML_EMBEDDED_VISIBLE_AREA,
+         XML_EMBOSSED,
+         XML_EMISSIVE_COLOR,
+-        XML_EMPTY,
++        XML_TOKEN_EMPTY,
+         XML_EMPTY_LINE_REFRESH,
+         XML_ENABLE_NUMBERING,
+         XML_ENABLED,
+diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
+index ec8065016a12d..e0338e053cf05 100644
+--- a/sax/source/fastparser/fastparser.cxx
++++ b/sax/source/fastparser/fastparser.cxx
+@@ -578,7 +578,7 @@ Event& Entity::getEvent( CallbackType aType )
+ OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemId, sal_Int32 nLine )
+ {
+     const char* pMessage;
+-    xmlErrorPtr error = xmlCtxtGetLastError( ctxt );
++    const xmlError* error = xmlCtxtGetLastError( ctxt );
+     if( error && error->message )
+         pMessage = error->message;
+     else
+diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
+index 352c7cf70e45d..ecb4ea346396b 100644
+--- a/sc/source/core/tool/interpr7.cxx
++++ b/sc/source/core/tool/interpr7.cxx
+@@ -31,6 +31,7 @@
+ #include <cstring>
+ #include <memory>
+ #include <string_view>
++#include <libxml/parser.h>
+ 
+ using namespace com::sun::star;
+ 
+diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
+index da65bec0dab75..bd5f16d828ff7 100644
+--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
++++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
+@@ -123,7 +123,7 @@ void ScXMLExportDataPilot::WriteDPCondition(const ScQueryEntry& aQueryEntry, boo
+ 
+     if (aQueryEntry.IsQueryByEmpty())
+     {
+-        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_EMPTY));
++        rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_TOKEN_EMPTY));
+     }
+     else if (aQueryEntry.IsQueryByNonEmpty())
+     {
+diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+index 6905e02d651bc..e4307065bd92f 100644
+--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
++++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+@@ -376,7 +376,7 @@ class WriteDatabaseRange
+             case SC_EQUAL:
+             {
+                 if (rEntry.IsQueryByEmpty())
+-                    return GetXMLToken(XML_EMPTY);
++                    return GetXMLToken(XML_TOKEN_EMPTY);
+                 else if (rEntry.IsQueryByNonEmpty())
+                     return GetXMLToken(XML_NOEMPTY);
+ 
+diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
+index 7585ce0c50fa1..61f7cfe4a3495 100644
+--- a/sc/source/filter/xml/xmlfilti.cxx
++++ b/sc/source/filter/xml/xmlfilti.cxx
+@@ -370,7 +370,7 @@ void ScXMLConditionContext::GetOperator(
+         rEntry.eOp = SC_BOTPERC;
+     else if (IsXMLToken(aOpStr, XML_BOTTOM_VALUES))
+         rEntry.eOp = SC_BOTVAL;
+-    else if (IsXMLToken(aOpStr, XML_EMPTY))
++    else if (IsXMLToken(aOpStr, XML_TOKEN_EMPTY))
+         rEntry.SetQueryByEmpty();
+     else if (aOpStr == u">")
+         rEntry.eOp = SC_GREATER;
+@@ -422,7 +422,7 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
+     if (maQueryItems.empty())
+     {
+         ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
+-        if (IsXMLToken(sOperator, XML_EMPTY))
++        if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
+             return;
+         if (IsXMLToken(sDataType, XML_NUMBER))
+         {
+@@ -753,7 +753,7 @@ void SAL_CALL ScXMLDPConditionContext::endFastElement( sal_Int32 /*nElement*/ )
+     else
+         aFilterField.eConnect = SC_AND;
+     pFilterContext->SetIsCaseSensitive(bIsCaseSensitive);
+-    if (IsXMLToken(sOperator, XML_EMPTY))
++    if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
+         aFilterField.SetQueryByEmpty();
+     else if (IsXMLToken(sOperator, XML_NOEMPTY))
+         aFilterField.SetQueryByNonEmpty();
+diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
+index dd974d910edb1..d8d873cdf0555 100644
+--- a/unoxml/source/dom/attr.cxx
++++ b/unoxml/source/dom/attr.cxx
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ 
+ #include <memory>
++#include <libxml/entities.h>
+ 
+ #include <osl/diagnose.h>
+ #include <sal/log.hxx>
+diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
+index cb48bd1635f82..0825fc2cd7edd 100644
+--- a/unoxml/source/dom/document.cxx
++++ b/unoxml/source/dom/document.cxx
+@@ -41,6 +41,7 @@
+ #include <eventdispatcher.hxx>
+ 
+ #include <string.h>
++#include <libxml/xmlIO.h>
+ 
+ #include <osl/diagnose.h>
+ 
+diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
+index c3cd7663d2fc6..3898d58e4be4a 100644
+--- a/unoxml/source/dom/documentbuilder.cxx
++++ b/unoxml/source/dom/documentbuilder.cxx
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ 
+ #include <libxml/xmlerror.h>
++#include <libxml/parser.h>
+ 
+ #include <memory>
+ 
+diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx
+index ccc8a08724997..98909dfe8f123 100644
+--- a/unoxml/source/dom/entity.cxx
++++ b/unoxml/source/dom/entity.cxx
+@@ -22,6 +22,7 @@
+ #include <osl/diagnose.h>
+ 
+ #include <string.h>
++#include <libxml/entities.h>
+ 
+ using namespace css::uno;
+ using namespace css::xml::dom;
+diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
+index a60083983882e..c2b7537831766 100644
+--- a/unoxml/source/xpath/xpathapi.cxx
++++ b/unoxml/source/xpath/xpathapi.cxx
+@@ -26,6 +26,7 @@
+ #include <libxml/xmlerror.h>
+ #include <libxml/xpath.h>
+ #include <libxml/xpathInternals.h>
++#include <libxml/xmlIO.h>
+ 
+ #include <com/sun/star/xml/xpath/XPathException.hpp>
+ 
+@@ -217,7 +218,7 @@ namespace XPath
+         return selectSingleNode(contextNode, expr);
+     }
+ 
+-    static OUString make_error_message(xmlErrorPtr pError)
++    static OUString make_error_message(const xmlError* pError)
+     {
+         OUStringBuffer buf;
+         if (pError) {
+@@ -259,7 +260,11 @@ namespace XPath
+             SAL_WARN("unoxml", "libxml2 error: " << str);
+         }
+ 
++#if LIBXML_VERSION >= 21200
++        static void structured_error_func(void *, const xmlError* error)
++#else
+         static void structured_error_func(void *, xmlErrorPtr error)
++#endif
+         {
+             SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error));
+         }
+diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
+index 6879f37db2950..e11dc0d161119 100644
+--- a/xmloff/source/core/xmltoken.cxx
++++ b/xmloff/source/core/xmltoken.cxx
+@@ -756,7 +756,7 @@ namespace xmloff::token {
+         TOKEN( "embedded-visible-area",           XML_EMBEDDED_VISIBLE_AREA ),
+         TOKEN( "embossed",                        XML_EMBOSSED ),
+         TOKEN( "emissive-color",                  XML_EMISSIVE_COLOR ),
+-        TOKEN( "empty",                           XML_EMPTY ),
++        TOKEN( "empty",                           XML_TOKEN_EMPTY ),
+         TOKEN( "empty-line-refresh",              XML_EMPTY_LINE_REFRESH ),
+         TOKEN( "enable-numbering",                XML_ENABLE_NUMBERING ),
+         TOKEN( "enabled",                         XML_ENABLED ),
+diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
+index 7b2cab4751aa8..6f631289672b7 100644
+--- a/xmloff/source/style/PageMasterStyleMap.cxx
++++ b/xmloff/source/style/PageMasterStyleMap.cxx
+@@ -157,7 +157,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
+     PLMAP( PROP_FootnoteLineRelativeWidth, XML_NAMESPACE_STYLE,    XML__EMPTY,     XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM,    CTF_PM_FTN_LINE_WIDTH ),
+     PLMAP( PROP_FootnoteLineTextDistance, XML_NAMESPACE_STYLE,    XML__EMPTY,     XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM,    CTF_PM_FTN_LINE_DISTANCE ),
+     PLMAP( PROP_FootnoteLineWeight,        XML_NAMESPACE_STYLE,    XML_FOOTNOTE_SEP,    XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM,    CTF_PM_FTN_LINE_WEIGHT ),
+-    PLMAP( PROP_FootnoteLineStyle,     XML_NAMESPACE_STYLE,    XML_EMPTY,  XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM,  CTF_PM_FTN_LINE_STYLE ),
++    PLMAP( PROP_FootnoteLineStyle,     XML_NAMESPACE_STYLE,    XML_TOKEN_EMPTY,  XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM,  CTF_PM_FTN_LINE_STYLE ),
+     PLMAP_EXT(PROP_GutterMargin, XML_NAMESPACE_LO_EXT, XML_MARGIN_GUTTER, XML_TYPE_MEASURE, CTF_PM_MARGINGUTTER),
+ 
+     //////////////////////////////////////////////////////////////////////////
+diff --git a/xmlsecurity/inc/xmlsec-wrapper.h b/xmlsecurity/inc/xmlsec-wrapper.h
+index 7c6d267e8b739..3ad705400c52c 100644
+--- a/xmlsecurity/inc/xmlsec-wrapper.h
++++ b/xmlsecurity/inc/xmlsec-wrapper.h
+@@ -23,6 +23,7 @@
+ 
+ #include <sal/types.h>
+ 
++#include <libxml/parser.h>
+ #include <xmlsec/base64.h>
+ #include <xmlsec/bn.h>
+ #include <xmlsec/errors.h>
+diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx
+index a49ccef1894c6..a5863ffd0e2a0 100644
+--- a/xmlsecurity/inc/xmlsec/saxhelper.hxx
++++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx
+@@ -23,6 +23,7 @@
+ 
+ #include <string_view>
+ 
++#include <libxml/parser.h>
+ #include <libxml/tree.h>
+ 
+ #include <rtl/ustring.hxx>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (24 preceding siblings ...)
  2024-02-25  3:45 ` oreo639
@ 2024-02-25  3:59 ` oreo639
  2024-02-25 10:05 ` oreo639
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-25  3:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 28087 bytes --]

From 3256ee1aa327964806791955c6a9c3d771e38cc0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 01/14] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..270753e103cee1 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From fdd3b4787a51f0a6901f80be5f49072fd5569e88 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:57:54 -0800
Subject: [PATCH 02/14] inkscape: fix build for libxml2 2.12

---
 .../inkscape/patches/fix-libxml2-2.12.patch   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/inkscape/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..dc5b0f53460c9a
--- /dev/null
+++ b/srcpkgs/inkscape/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,33 @@
+From 694d8ae43d06efff21adebf377ce614d660b24cd Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Fri, 17 Nov 2023 22:30:42 +0100
+Subject: [PATCH] include missing header file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes build error:
+```
+/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’:
+/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’?
+   86 |         xmlFree(full);
+```
+---
+ src/object/uri.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/object/uri.h b/src/object/uri.h
+index 381adec58cf..d5b211fe2b2 100644
+--- a/src/object/uri.h
++++ b/src/object/uri.h
+@@ -13,6 +13,7 @@
+ #define INKSCAPE_URI_H
+ 
+ #include <libxml/uri.h>
++#include <libxml/xmlmemory.h>
+ #include <memory>
+ #include <string>
+ 
+-- 
+GitLab
+

From 9df5b36b648662c558e21615c2c1bd4ffe683acf Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:21 -0800
Subject: [PATCH 03/14] rdrview: fix build for libxml2 2.12

---
 .../rdrview/patches/fix-libxml2-2.12.patch    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/rdrview/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..eb8c8eb7709a87
--- /dev/null
+++ b/srcpkgs/rdrview/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From b5fdd379577e13d26784ffdeca3ecb02ff1d336e Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 13:49:49 -0800
+Subject: [PATCH] Add missing include with libxml2 2.12+
+
+libxml2 2.12 removed extra includes, which causes stdlib.h to not get implicitly
+included anymore.
+
+The missing include results in a warning on gcc13 and below with the resulting
+binary truncating the pointer to an integer, gcc14+ makes this a hard error.
+---
+ src/rdrview.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rdrview.h b/src/rdrview.h
+index 9365e7a..2eda156 100644
+--- a/src/rdrview.h
++++ b/src/rdrview.h
+@@ -26,6 +26,7 @@
+ #define RDRVIEW_H
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <regex.h>

From aed2161b08e86a32e30191bb66544fe828119828 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 20:58:50 -0800
Subject: [PATCH 04/14] cegui: fix build for libxml2 2.12

---
 srcpkgs/cegui/patches/fix-libxml2-2.12.patch | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/cegui/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/cegui/patches/fix-libxml2-2.12.patch b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f288ce9a66b098
--- /dev/null
+++ b/srcpkgs/cegui/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,26 @@
+From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
+From: oreo639 <oreo6391@gmail.com>
+Date: Sun, 18 Feb 2024 14:16:21 -0800
+Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
+
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
+---
+ cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+index 74a3dbddd..a408f9305 100644
+--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
++++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
+@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
+ 
+     if (!doc)
+     {
++#if LIBXML_VERSION >= 21200
++        const xmlError* err = xmlGetLastError();
++#else
+         xmlError* err = xmlGetLastError();
++#endif
+ 
+         throw GenericException(
+             String("xmlParseMemory failed in file: '") +

From 6e849265ebb70d0bc81a7c5b6a075c66ad4168d3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 05/14] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d374..0dfb40b1f1161d 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From c7f2ab204915a5a3d829e1e9d2bc04677eebceca Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 06/14] recoll: update to 1.37.4.

---
 srcpkgs/recoll/patches/musl.patch | 4 ++--
 srcpkgs/recoll/template           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/recoll/patches/musl.patch b/srcpkgs/recoll/patches/musl.patch
index d633e92b9df118..5d061a05789650 100644
--- a/srcpkgs/recoll/patches/musl.patch
+++ b/srcpkgs/recoll/patches/musl.patch
@@ -27,11 +27,11 @@ diff --git a/common/conf_post.h b/common/conf_post.h
 index 7093ead..0ecd56b 100644
 --- a/common/conf_post.h
 +++ b/common/conf_post.h
-@@ -73,12 +73,4 @@ typedef int ssize_t;
+@@ -74,12 +74,4 @@ typedef int ssize_t;
  #define REAL_GCC   __GNUC__ // probably
  #endif
  
--#ifdef REAL_GCC
+-#if defined(REAL_GCC) && defined(HAVE_FEATURES_H)
 -// Older gcc versions pretended to supply std::regex, but the resulting programs mostly crashed.
 -#include <features.h>
 -#if ! __GNUC_PREREQ(6,0)
diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e3..7b33d23df03a59 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 345b484ce9636a8df61ce06e66201ae13ace0d64 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 07/14] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342a..e73856d05a1b80 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From f4b8d5777e65ebe2e00df549dc1ac2ec5ad0803a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:24:30 -0800
Subject: [PATCH 08/14] liferea: fix build for libxml2 2.12

---
 .../liferea/patches/fix-libxml2-2.12.patch    | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 srcpkgs/liferea/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/liferea/patches/fix-libxml2-2.12.patch b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..abe1fb13766982
--- /dev/null
+++ b/srcpkgs/liferea/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,28 @@
+From be8ef494586d9ef73c04ec4ca058a9a158ae3562 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Sun, 31 Dec 2023 22:26:31 +0000
+Subject: [PATCH] src/node_type.h: add `#include <libxml/tree.h>` for
+ `xmlNodePtr` type
+
+Without the change build fails on `libxml2-2.12.3` as:
+
+    ../../src/node_type.h:62:64: error: unknown type name 'xmlNodePtr'; did you mean 'nodePtr'?
+       62 |         void            (*export)               (nodePtr node, xmlNodePtr cur, gboolean trusted);
+          |                                                                ^~~~~~~~~~
+          |                                                                nodePtr
+---
+ src/node_type.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/node_type.h b/src/node_type.h
+index fcd3e7223..a41ff52fc 100644
+--- a/src/node_type.h
++++ b/src/node_type.h
+@@ -23,6 +23,7 @@
+ 
+ #include "node.h"
+ 
++#include <libxml/tree.h>
+ #include <libxml/xmlmemory.h>
+ #include <gtk/gtk.h>
+ 

From 47997bcf755bb07ef8253c31e33e53f95ba523a3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:31:24 -0800
Subject: [PATCH 09/14] gtkpod: fix build for libxml2 2.12

---
 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..58eab19153ee7f
--- /dev/null
+++ b/srcpkgs/gtkpod/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,12 @@
+Source: https://src.fedoraproject.org/rpms/gtkpod/blob/a3e1c785b5a43603ad46ef913b0644babbfc6a73/f/includes.patch
+
+--- a/libgtkpod/misc.c
++++ b/libgtkpod/misc.c
+@@ -39,6 +39,7 @@
+ #include <sys/wait.h>
+ #include <unistd.h>
+ #include <glib/gi18n-lib.h>
++#include <libxml/parser.h>
+ #include "charset.h"
+ #include "clientserver.h"
+ #include "misc.h"

From d4589fd9c1345317c7dbdf717e4f7988a326a732 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:43:29 -0800
Subject: [PATCH 10/14] swiften: fix build for libxml2 2.12

---
 srcpkgs/swiften/patches/fix-libxml2-2.12.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 srcpkgs/swiften/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/swiften/patches/fix-libxml2-2.12.patch b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..3e3e4d16352060
--- /dev/null
+++ b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,15 @@
+diff -rup Swiften/Parser/LibXMLParser.cpp.orig Swiften/Parser/LibXMLParser.cpp
+--- a/Swiften/Parser/LibXMLParser.cpp
++++ b/Swiften/Parser/LibXMLParser.cpp
+@@ -97,7 +97,11 @@ bool LibXMLParser::parse(const std::stri
+     if (xmlParseChunk(p->context_, data.c_str(), boost::numeric_cast<int>(data.size()), false) == XML_ERR_OK) {
+         return true;
+     }
++#if LIBXML_VERSION >= 21200
++    const xmlError* error = xmlCtxtGetLastError(p->context_);
++#else
+     xmlError* error = xmlCtxtGetLastError(p->context_);
++#endif
+     if (error->code == XML_WAR_NS_URI || error->code == XML_WAR_NS_URI_RELATIVE) {
+         xmlCtxtResetLastError(p->context_);
+         p->context_->errNo = XML_ERR_OK;

From a6ae79d5ab0edac9dde643efeb9a33e04c1eff5d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 11/14] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From af69d017a8aae4ef521d707f6e7cd2e5a43a8864 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 12/14] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 2456d28220860694d34fc2120a773efb1b1ade80 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 13/14] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 00000000000000..0a00d1bdc502d3
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From 1a79cc88967a5e35346db669fe194d3616b4c5af Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 14/14] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..628005774327e9
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (25 preceding siblings ...)
  2024-02-25  3:59 ` oreo639
@ 2024-02-25 10:05 ` oreo639
  2024-02-27  2:39 ` oreo639
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-25 10:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 19424 bytes --]

From 9e10b74d986badf99e4f88ea45652bc17b4e696d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 1/8] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch | 85 +++++++++++++++++++
 srcpkgs/libxml2/template                      |  8 +-
 2 files changed, 89 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..270753e103cee1 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 6d7d511cf19f89cd8de1c35555dc9d89aff1df72 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 2/8] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d374..0dfb40b1f1161d 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From 02e40ab0253f7d2b7ec509dca7f5fddb5e99c3ec Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 3/8] recoll: update to 1.37.4.

---
 srcpkgs/recoll/patches/musl.patch | 4 ++--
 srcpkgs/recoll/template           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/recoll/patches/musl.patch b/srcpkgs/recoll/patches/musl.patch
index d633e92b9df118..5d061a05789650 100644
--- a/srcpkgs/recoll/patches/musl.patch
+++ b/srcpkgs/recoll/patches/musl.patch
@@ -27,11 +27,11 @@ diff --git a/common/conf_post.h b/common/conf_post.h
 index 7093ead..0ecd56b 100644
 --- a/common/conf_post.h
 +++ b/common/conf_post.h
-@@ -73,12 +73,4 @@ typedef int ssize_t;
+@@ -74,12 +74,4 @@ typedef int ssize_t;
  #define REAL_GCC   __GNUC__ // probably
  #endif
  
--#ifdef REAL_GCC
+-#if defined(REAL_GCC) && defined(HAVE_FEATURES_H)
 -// Older gcc versions pretended to supply std::regex, but the resulting programs mostly crashed.
 -#include <features.h>
 -#if ! __GNUC_PREREQ(6,0)
diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e3..7b33d23df03a59 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 0b11d4f883023089908b6fcbe1b3ad62e94b8d39 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 4/8] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342a..e73856d05a1b80 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From b22f846da1ccf41d9c8c8c620afafe1d06d40005 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 5/8] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 21c5f731842a2c8472d64c95a3fd6602224152a8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 6/8] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 58113bf670ad5c62db1e509830365046f1edf3c9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 7/8] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 00000000000000..0a00d1bdc502d3
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From 8a1a4d6493f2bab0f2cfd344417d12367f1e9e00 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 8/8] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..628005774327e9
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (26 preceding siblings ...)
  2024-02-25 10:05 ` oreo639
@ 2024-02-27  2:39 ` oreo639
  2024-03-05 23:22 ` oreo639
                   ` (2 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-02-27  2:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 24038 bytes --]

From be1ccc7f585179f09ab0cb71e4ff02b2dcd25bcc Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 1/8] libxml2: update to 2.12.5.

---
 ...952bdb7a4364100f009043e94e1bf44c6197.patch |  85 ++++++++++++
 ...a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch | 131 ++++++++++++++++++
 srcpkgs/libxml2/template                      |   8 +-
 3 files changed, 220 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
 create mode 100644 srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch

diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch b/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch
new file mode 100644
index 00000000000000..feae220b634abc
--- /dev/null
+++ b/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch
@@ -0,0 +1,131 @@
+From 4365a5e1153dd5ed7d269d00f8f14daee0fac5c8 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 26 Feb 2024 15:14:28 +0100
+Subject: [PATCH] xmlreader: Fix xmlTextReaderConstEncoding
+
+Regression from commit f1c1f5c6.
+
+Fixes #697.
+---
+ SAX2.c                   | 12 +-----------
+ include/private/parser.h |  2 ++
+ parserInternals.c        | 24 ++++++++++++++++++++++++
+ xmlreader.c              | 22 ++++++++++------------
+ 4 files changed, 37 insertions(+), 23 deletions(-)
+
+diff --git a/SAX2.c b/SAX2.c
+index ed21a559..bb72e160 100644
+--- a/SAX2.c
++++ b/SAX2.c
+@@ -955,17 +955,7 @@ xmlSAX2EndDocument(void *ctx)
+ 
+     doc = ctxt->myDoc;
+     if ((doc != NULL) && (doc->encoding == NULL)) {
+-        const xmlChar *encoding = NULL;
+-
+-        if ((ctxt->input->flags & XML_INPUT_USES_ENC_DECL) ||
+-            (ctxt->input->flags & XML_INPUT_AUTO_ENCODING)) {
+-            /* Preserve encoding exactly */
+-            encoding = ctxt->encoding;
+-        } else if ((ctxt->input->buf) && (ctxt->input->buf->encoder)) {
+-            encoding = BAD_CAST ctxt->input->buf->encoder->name;
+-        } else if (ctxt->input->flags & XML_INPUT_HAS_ENCODING) {
+-            encoding = BAD_CAST "UTF-8";
+-        }
++        const xmlChar *encoding = xmlGetActualEncoding(ctxt);
+ 
+         if (encoding != NULL) {
+             doc->encoding = xmlStrdup(encoding);
+diff --git a/include/private/parser.h b/include/private/parser.h
+index 40d179fe..7f8f6912 100644
+--- a/include/private/parser.h
++++ b/include/private/parser.h
+@@ -48,6 +48,8 @@ XML_HIDDEN void
+ xmlDetectEncoding(xmlParserCtxtPtr ctxt);
+ XML_HIDDEN void
+ xmlSetDeclaredEncoding(xmlParserCtxtPtr ctxt, xmlChar *encoding);
++XML_HIDDEN const xmlChar *
++xmlGetActualEncoding(xmlParserCtxtPtr ctxt);
+ 
+ XML_HIDDEN xmlParserNsData *
+ xmlParserNsCreate(void);
+diff --git a/parserInternals.c b/parserInternals.c
+index e6b4cb14..166397bd 100644
+--- a/parserInternals.c
++++ b/parserInternals.c
+@@ -1479,6 +1479,30 @@ xmlSetDeclaredEncoding(xmlParserCtxtPtr ctxt, xmlChar *encoding) {
+     }
+ }
+ 
++/**
++ * xmlGetActualEncoding:
++ * @ctxt:  the parser context
++ *
++ * Returns the actual used to parse the document. This can differ from
++ * the declared encoding.
++ */
++const xmlChar *
++xmlGetActualEncoding(xmlParserCtxtPtr ctxt) {
++    const xmlChar *encoding = NULL;
++
++    if ((ctxt->input->flags & XML_INPUT_USES_ENC_DECL) ||
++        (ctxt->input->flags & XML_INPUT_AUTO_ENCODING)) {
++        /* Preserve encoding exactly */
++        encoding = ctxt->encoding;
++    } else if ((ctxt->input->buf) && (ctxt->input->buf->encoder)) {
++        encoding = BAD_CAST ctxt->input->buf->encoder->name;
++    } else if (ctxt->input->flags & XML_INPUT_HAS_ENCODING) {
++        encoding = BAD_CAST "UTF-8";
++    }
++
++    return(encoding);
++}
++
+ /************************************************************************
+  *									*
+  *	Commodity functions to handle entities processing		*
+diff --git a/xmlreader.c b/xmlreader.c
+index 1f903306..5fdeb2b8 100644
+--- a/xmlreader.c
++++ b/xmlreader.c
+@@ -40,6 +40,7 @@
+ #endif
+ 
+ #include "private/buf.h"
++#include "private/parser.h"
+ #include "private/tree.h"
+ #ifdef LIBXML_XINCLUDE_ENABLED
+ #include "private/xinclude.h"
+@@ -2795,20 +2796,17 @@ xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader) {
+  */
+ const xmlChar *
+ xmlTextReaderConstEncoding(xmlTextReaderPtr reader) {
+-    xmlDocPtr doc = NULL;
++    const xmlChar *encoding = NULL;
++
+     if (reader == NULL)
+-	return(NULL);
+-    if (reader->doc != NULL)
+-        doc = reader->doc;
+-    else if (reader->ctxt != NULL)
+-	doc = reader->ctxt->myDoc;
+-    if (doc == NULL)
+-	return(NULL);
++        return(NULL);
+ 
+-    if (doc->encoding == NULL)
+-	return(NULL);
+-    else
+-      return(CONSTSTR(doc->encoding));
++    if (reader->ctxt != NULL)
++        encoding = xmlGetActualEncoding(reader->ctxt);
++    else if (reader->doc != NULL)
++        encoding = reader->doc->encoding;
++
++    return(CONSTSTR(encoding));
+ }
+ 
+ 
+-- 
+GitLab
+
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..270753e103cee1 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From db1af4ecb4221e5968e049b8a48590a7fe3ecdd2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 2/8] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d374..0dfb40b1f1161d 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From 9d52485ebf3bd23f0aadfbb614844bc8e04e053d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 3/8] recoll: update to 1.37.4.

---
 srcpkgs/recoll/patches/musl.patch | 4 ++--
 srcpkgs/recoll/template           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/recoll/patches/musl.patch b/srcpkgs/recoll/patches/musl.patch
index d633e92b9df118..5d061a05789650 100644
--- a/srcpkgs/recoll/patches/musl.patch
+++ b/srcpkgs/recoll/patches/musl.patch
@@ -27,11 +27,11 @@ diff --git a/common/conf_post.h b/common/conf_post.h
 index 7093ead..0ecd56b 100644
 --- a/common/conf_post.h
 +++ b/common/conf_post.h
-@@ -73,12 +73,4 @@ typedef int ssize_t;
+@@ -74,12 +74,4 @@ typedef int ssize_t;
  #define REAL_GCC   __GNUC__ // probably
  #endif
  
--#ifdef REAL_GCC
+-#if defined(REAL_GCC) && defined(HAVE_FEATURES_H)
 -// Older gcc versions pretended to supply std::regex, but the resulting programs mostly crashed.
 -#include <features.h>
 -#if ! __GNUC_PREREQ(6,0)
diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e3..7b33d23df03a59 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 92a56f3b2102f683ac6ccfb887f59ebeb1fb110b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 4/8] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342a..e73856d05a1b80 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From 140cbb2a76cc554a0862a208ff0b4cdc8fd8d5cd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 5/8] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 88e82765b75c3e61e05ca1c1dc0cb787e4e3b5aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 6/8] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 626b1a2999db99acc7add412eba69e78b9089422 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 7/8] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 00000000000000..0a00d1bdc502d3
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From 767eba1d7d9d7fc682eb730b80b280a8715329d3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 8/8] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..628005774327e9
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (27 preceding siblings ...)
  2024-02-27  2:39 ` oreo639
@ 2024-03-05 23:22 ` oreo639
  2024-03-05 23:41 ` oreo639
  2024-03-06  0:35 ` [PR PATCH] [Merged]: " oreo639
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-03-05 23:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 27256 bytes --]

From 980cf944412835f7b504f43e96d25e5475be2785 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 1/8] libxml2: update to 2.12.5.

---
 ...50067b4ba37dc0dc1a889a17e96dc1610799.patch |  98 +++++++++++++
 ...952bdb7a4364100f009043e94e1bf44c6197.patch |  85 ++++++++++++
 ...a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch | 131 ++++++++++++++++++
 srcpkgs/libxml2/template                      |   8 +-
 4 files changed, 318 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/0b5650067b4ba37dc0dc1a889a17e96dc1610799.patch
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
 create mode 100644 srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch

diff --git a/srcpkgs/libxml2/patches/0b5650067b4ba37dc0dc1a889a17e96dc1610799.patch b/srcpkgs/libxml2/patches/0b5650067b4ba37dc0dc1a889a17e96dc1610799.patch
new file mode 100644
index 00000000000000..973aa04d20f110
--- /dev/null
+++ b/srcpkgs/libxml2/patches/0b5650067b4ba37dc0dc1a889a17e96dc1610799.patch
@@ -0,0 +1,98 @@
+From 0b5650067b4ba37dc0dc1a889a17e96dc1610799 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 26 Feb 2024 01:03:34 +0100
+Subject: [PATCH] html: Fix htmlCreatePushParserCtxt with encoding
+
+Regression from commit ec7be506.
+
+Fixes #696.
+---
+ HTMLparser.c |  5 ++++-
+ testparser.c | 34 ++++++++++++++++++++++++++++++++++
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+
+diff --git a/HTMLparser.c b/HTMLparser.c
+index 097ed2369..ea6a4f265 100644
+--- a/HTMLparser.c
++++ b/HTMLparser.c
+@@ -5987,7 +5987,7 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
+ 
+     xmlInitParser();
+ 
+-    buf = xmlAllocParserInputBuffer(enc);
++    buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);
+     if (buf == NULL) return(NULL);
+ 
+     ctxt = htmlNewSAXParserCtxt(sax, user_data);
+@@ -6018,6 +6018,9 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
+ 
+     inputPush(ctxt, inputStream);
+ 
++    if (enc != XML_CHAR_ENCODING_NONE)
++        xmlSwitchEncoding(ctxt, enc);
++
+     if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
+         (ctxt->input->buf != NULL))  {
+ 	size_t pos = ctxt->input->cur - ctxt->input->base;
+diff --git a/testparser.c b/testparser.c
+index e67cea5b1..705e61387 100644
+--- a/testparser.c
++++ b/testparser.c
+@@ -5,6 +5,7 @@
+  */
+ 
+ #include <libxml/parser.h>
++#include <libxml/HTMLparser.h>
+ 
+ static int
+ testStandaloneWithEncoding(void) {
+@@ -86,6 +87,36 @@ testHugeEncodedChunk(void) {
+ }
+ #endif
+ 
++#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
++static int
++testHtmlPushWithEncoding(void) {
++    htmlParserCtxtPtr ctxt;
++    htmlDocPtr doc;
++    htmlNodePtr node;
++    int err = 0;
++
++    ctxt = htmlCreatePushParserCtxt(NULL, NULL, NULL, 0, NULL,
++                                    XML_CHAR_ENCODING_UTF8);
++    htmlParseChunk(ctxt, "-\xC3\xA4-", 4, 1);
++
++    doc = ctxt->myDoc;
++    if (!xmlStrEqual(doc->encoding, BAD_CAST "UTF-8")) {
++        fprintf(stderr, "testHtmlPushWithEncoding failed\n");
++        err = 1;
++    }
++
++    node = xmlDocGetRootElement(doc)->children->children->children;
++    if (!xmlStrEqual(node->content, BAD_CAST "-\xC3\xA4-")) {
++        fprintf(stderr, "testHtmlPushWithEncoding failed\n");
++        err = 1;
++    }
++
++    xmlFreeDoc(doc);
++    htmlFreeParserCtxt(ctxt);
++    return err;
++}
++#endif
++
+ int
+ main(void) {
+     int err = 0;
+@@ -95,6 +126,9 @@ main(void) {
+     err |= testHugePush();
+     err |= testHugeEncodedChunk();
+ #endif
++#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
++    err |= testHtmlPushWithEncoding();
++#endif
+ 
+     return err;
+ }
+-- 
+GitLab
+
diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch b/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch
new file mode 100644
index 00000000000000..feae220b634abc
--- /dev/null
+++ b/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch
@@ -0,0 +1,131 @@
+From 4365a5e1153dd5ed7d269d00f8f14daee0fac5c8 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 26 Feb 2024 15:14:28 +0100
+Subject: [PATCH] xmlreader: Fix xmlTextReaderConstEncoding
+
+Regression from commit f1c1f5c6.
+
+Fixes #697.
+---
+ SAX2.c                   | 12 +-----------
+ include/private/parser.h |  2 ++
+ parserInternals.c        | 24 ++++++++++++++++++++++++
+ xmlreader.c              | 22 ++++++++++------------
+ 4 files changed, 37 insertions(+), 23 deletions(-)
+
+diff --git a/SAX2.c b/SAX2.c
+index ed21a559..bb72e160 100644
+--- a/SAX2.c
++++ b/SAX2.c
+@@ -955,17 +955,7 @@ xmlSAX2EndDocument(void *ctx)
+ 
+     doc = ctxt->myDoc;
+     if ((doc != NULL) && (doc->encoding == NULL)) {
+-        const xmlChar *encoding = NULL;
+-
+-        if ((ctxt->input->flags & XML_INPUT_USES_ENC_DECL) ||
+-            (ctxt->input->flags & XML_INPUT_AUTO_ENCODING)) {
+-            /* Preserve encoding exactly */
+-            encoding = ctxt->encoding;
+-        } else if ((ctxt->input->buf) && (ctxt->input->buf->encoder)) {
+-            encoding = BAD_CAST ctxt->input->buf->encoder->name;
+-        } else if (ctxt->input->flags & XML_INPUT_HAS_ENCODING) {
+-            encoding = BAD_CAST "UTF-8";
+-        }
++        const xmlChar *encoding = xmlGetActualEncoding(ctxt);
+ 
+         if (encoding != NULL) {
+             doc->encoding = xmlStrdup(encoding);
+diff --git a/include/private/parser.h b/include/private/parser.h
+index 40d179fe..7f8f6912 100644
+--- a/include/private/parser.h
++++ b/include/private/parser.h
+@@ -48,6 +48,8 @@ XML_HIDDEN void
+ xmlDetectEncoding(xmlParserCtxtPtr ctxt);
+ XML_HIDDEN void
+ xmlSetDeclaredEncoding(xmlParserCtxtPtr ctxt, xmlChar *encoding);
++XML_HIDDEN const xmlChar *
++xmlGetActualEncoding(xmlParserCtxtPtr ctxt);
+ 
+ XML_HIDDEN xmlParserNsData *
+ xmlParserNsCreate(void);
+diff --git a/parserInternals.c b/parserInternals.c
+index e6b4cb14..166397bd 100644
+--- a/parserInternals.c
++++ b/parserInternals.c
+@@ -1479,6 +1479,30 @@ xmlSetDeclaredEncoding(xmlParserCtxtPtr ctxt, xmlChar *encoding) {
+     }
+ }
+ 
++/**
++ * xmlGetActualEncoding:
++ * @ctxt:  the parser context
++ *
++ * Returns the actual used to parse the document. This can differ from
++ * the declared encoding.
++ */
++const xmlChar *
++xmlGetActualEncoding(xmlParserCtxtPtr ctxt) {
++    const xmlChar *encoding = NULL;
++
++    if ((ctxt->input->flags & XML_INPUT_USES_ENC_DECL) ||
++        (ctxt->input->flags & XML_INPUT_AUTO_ENCODING)) {
++        /* Preserve encoding exactly */
++        encoding = ctxt->encoding;
++    } else if ((ctxt->input->buf) && (ctxt->input->buf->encoder)) {
++        encoding = BAD_CAST ctxt->input->buf->encoder->name;
++    } else if (ctxt->input->flags & XML_INPUT_HAS_ENCODING) {
++        encoding = BAD_CAST "UTF-8";
++    }
++
++    return(encoding);
++}
++
+ /************************************************************************
+  *									*
+  *	Commodity functions to handle entities processing		*
+diff --git a/xmlreader.c b/xmlreader.c
+index 1f903306..5fdeb2b8 100644
+--- a/xmlreader.c
++++ b/xmlreader.c
+@@ -40,6 +40,7 @@
+ #endif
+ 
+ #include "private/buf.h"
++#include "private/parser.h"
+ #include "private/tree.h"
+ #ifdef LIBXML_XINCLUDE_ENABLED
+ #include "private/xinclude.h"
+@@ -2795,20 +2796,17 @@ xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader) {
+  */
+ const xmlChar *
+ xmlTextReaderConstEncoding(xmlTextReaderPtr reader) {
+-    xmlDocPtr doc = NULL;
++    const xmlChar *encoding = NULL;
++
+     if (reader == NULL)
+-	return(NULL);
+-    if (reader->doc != NULL)
+-        doc = reader->doc;
+-    else if (reader->ctxt != NULL)
+-	doc = reader->ctxt->myDoc;
+-    if (doc == NULL)
+-	return(NULL);
++        return(NULL);
+ 
+-    if (doc->encoding == NULL)
+-	return(NULL);
+-    else
+-      return(CONSTSTR(doc->encoding));
++    if (reader->ctxt != NULL)
++        encoding = xmlGetActualEncoding(reader->ctxt);
++    else if (reader->doc != NULL)
++        encoding = reader->doc->encoding;
++
++    return(CONSTSTR(encoding));
+ }
+ 
+ 
+-- 
+GitLab
+
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..270753e103cee1 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,8 +12,9 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 

From 5b8158909a13c3856dfaec842185c38f53ef7d13 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 2/8] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d374..0dfb40b1f1161d 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From 934265674324e3817caf8f79c3e1b59755539749 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 3/8] recoll: update to 1.37.4.

---
 srcpkgs/recoll/patches/musl.patch | 4 ++--
 srcpkgs/recoll/template           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/recoll/patches/musl.patch b/srcpkgs/recoll/patches/musl.patch
index d633e92b9df118..5d061a05789650 100644
--- a/srcpkgs/recoll/patches/musl.patch
+++ b/srcpkgs/recoll/patches/musl.patch
@@ -27,11 +27,11 @@ diff --git a/common/conf_post.h b/common/conf_post.h
 index 7093ead..0ecd56b 100644
 --- a/common/conf_post.h
 +++ b/common/conf_post.h
-@@ -73,12 +73,4 @@ typedef int ssize_t;
+@@ -74,12 +74,4 @@ typedef int ssize_t;
  #define REAL_GCC   __GNUC__ // probably
  #endif
  
--#ifdef REAL_GCC
+-#if defined(REAL_GCC) && defined(HAVE_FEATURES_H)
 -// Older gcc versions pretended to supply std::regex, but the resulting programs mostly crashed.
 -#include <features.h>
 -#if ! __GNUC_PREREQ(6,0)
diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e3..7b33d23df03a59 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 2b31317a18629ed71ff60dc49e7f41e46c3aa87b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 4/8] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342a..e73856d05a1b80 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From 0b2f68e67cdfa4e0d3bc070f873fa555b956eeda Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 5/8] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 766c5b262fd798a8624f214b785f9b4c61fe6d7c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 6/8] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 49c74d5feaaef9409f551977f9a8974cb9fa4c4f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 7/8] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 00000000000000..0a00d1bdc502d3
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From 893c4a79aa65a7a4b5da71a8d66412dc8299e368 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 8/8] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..628005774327e9
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Updated] libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (28 preceding siblings ...)
  2024-03-05 23:22 ` oreo639
@ 2024-03-05 23:41 ` oreo639
  2024-03-06  0:35 ` [PR PATCH] [Merged]: " oreo639
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-03-05 23:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxml2
https://github.com/void-linux/void-packages/pull/48826

libxml2: update to 2.12.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48826.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxml2-48826.patch --]
[-- Type: text/x-diff, Size: 27449 bytes --]

From e19957d2af63335278883a6e929996bb5bd8076b Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Sun, 18 Feb 2024 13:33:55 -0800
Subject: [PATCH 1/8] libxml2: update to 2.12.5.

---
 ...50067b4ba37dc0dc1a889a17e96dc1610799.patch |  98 +++++++++++++
 ...952bdb7a4364100f009043e94e1bf44c6197.patch |  85 ++++++++++++
 ...a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch | 131 ++++++++++++++++++
 srcpkgs/libxml2/template                      |  10 +-
 4 files changed, 320 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/libxml2/patches/0b5650067b4ba37dc0dc1a889a17e96dc1610799.patch
 create mode 100644 srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
 create mode 100644 srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch

diff --git a/srcpkgs/libxml2/patches/0b5650067b4ba37dc0dc1a889a17e96dc1610799.patch b/srcpkgs/libxml2/patches/0b5650067b4ba37dc0dc1a889a17e96dc1610799.patch
new file mode 100644
index 00000000000000..973aa04d20f110
--- /dev/null
+++ b/srcpkgs/libxml2/patches/0b5650067b4ba37dc0dc1a889a17e96dc1610799.patch
@@ -0,0 +1,98 @@
+From 0b5650067b4ba37dc0dc1a889a17e96dc1610799 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 26 Feb 2024 01:03:34 +0100
+Subject: [PATCH] html: Fix htmlCreatePushParserCtxt with encoding
+
+Regression from commit ec7be506.
+
+Fixes #696.
+---
+ HTMLparser.c |  5 ++++-
+ testparser.c | 34 ++++++++++++++++++++++++++++++++++
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+
+diff --git a/HTMLparser.c b/HTMLparser.c
+index 097ed2369..ea6a4f265 100644
+--- a/HTMLparser.c
++++ b/HTMLparser.c
+@@ -5987,7 +5987,7 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
+ 
+     xmlInitParser();
+ 
+-    buf = xmlAllocParserInputBuffer(enc);
++    buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);
+     if (buf == NULL) return(NULL);
+ 
+     ctxt = htmlNewSAXParserCtxt(sax, user_data);
+@@ -6018,6 +6018,9 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
+ 
+     inputPush(ctxt, inputStream);
+ 
++    if (enc != XML_CHAR_ENCODING_NONE)
++        xmlSwitchEncoding(ctxt, enc);
++
+     if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
+         (ctxt->input->buf != NULL))  {
+ 	size_t pos = ctxt->input->cur - ctxt->input->base;
+diff --git a/testparser.c b/testparser.c
+index e67cea5b1..705e61387 100644
+--- a/testparser.c
++++ b/testparser.c
+@@ -5,6 +5,7 @@
+  */
+ 
+ #include <libxml/parser.h>
++#include <libxml/HTMLparser.h>
+ 
+ static int
+ testStandaloneWithEncoding(void) {
+@@ -86,6 +87,36 @@ testHugeEncodedChunk(void) {
+ }
+ #endif
+ 
++#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
++static int
++testHtmlPushWithEncoding(void) {
++    htmlParserCtxtPtr ctxt;
++    htmlDocPtr doc;
++    htmlNodePtr node;
++    int err = 0;
++
++    ctxt = htmlCreatePushParserCtxt(NULL, NULL, NULL, 0, NULL,
++                                    XML_CHAR_ENCODING_UTF8);
++    htmlParseChunk(ctxt, "-\xC3\xA4-", 4, 1);
++
++    doc = ctxt->myDoc;
++    if (!xmlStrEqual(doc->encoding, BAD_CAST "UTF-8")) {
++        fprintf(stderr, "testHtmlPushWithEncoding failed\n");
++        err = 1;
++    }
++
++    node = xmlDocGetRootElement(doc)->children->children->children;
++    if (!xmlStrEqual(node->content, BAD_CAST "-\xC3\xA4-")) {
++        fprintf(stderr, "testHtmlPushWithEncoding failed\n");
++        err = 1;
++    }
++
++    xmlFreeDoc(doc);
++    htmlFreeParserCtxt(ctxt);
++    return err;
++}
++#endif
++
+ int
+ main(void) {
+     int err = 0;
+@@ -95,6 +126,9 @@ main(void) {
+     err |= testHugePush();
+     err |= testHugeEncodedChunk();
+ #endif
++#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
++    err |= testHtmlPushWithEncoding();
++#endif
+ 
+     return err;
+ }
+-- 
+GitLab
+
diff --git a/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
new file mode 100644
index 00000000000000..50a6da45513f82
--- /dev/null
+++ b/srcpkgs/libxml2/patches/387a952bdb7a4364100f009043e94e1bf44c6197.patch
@@ -0,0 +1,85 @@
+From 387a952bdb7a4364100f009043e94e1bf44c6197 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 12 Feb 2024 16:45:16 +0100
+Subject: [PATCH] xmllint: Return error code if XPath returns empty nodeset
+
+Return an error code as before but make it possible to distinguish from
+real errors.
+
+Fixes #690.
+---
+ doc/xmllint.xml | 11 ++++++++++-
+ xmllint.c       | 24 +++++++++++++-----------
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/doc/xmllint.xml b/doc/xmllint.xml
+index b81da3aa7..8bc665216 100644
+--- a/doc/xmllint.xml
++++ b/doc/xmllint.xml
+@@ -575,7 +575,9 @@
+                     result. In case of a nodeset result, each node in the
+                     node set is serialized in full in the output. In case
+                     of an empty node set the "XPath set is empty" result
+-                    will be shown and an error exit code will be returned.
++                    will be shown and exit code 11 will be returned..
++                    This feature is EXPERIMENTAL. Implementation details can
++                    change without futher notice.
+                 </para>
+             </listitem>
+         </varlistentry>
+@@ -945,6 +947,13 @@
+             </listitem>
+         </varlistentry>
+ 
++        <varlistentry>
++            <term><errorcode>11</errorcode></term>
++            <listitem>
++                <para>XPath result is empty</para>
++            </listitem>
++        </varlistentry>
++
+     </variablelist>
+ </refsect1>
+ 
+diff --git a/xmllint.c b/xmllint.c
+index 21dbe7d24..5c26c3fe8 100644
+--- a/xmllint.c
++++ b/xmllint.c
+@@ -86,17 +86,18 @@
+ #endif
+ 
+ typedef enum {
+-    XMLLINT_RETURN_OK = 0,	/* No error */
+-    XMLLINT_ERR_UNCLASS = 1,	/* Unclassified */
+-    XMLLINT_ERR_DTD = 2,	/* Error in DTD */
+-    XMLLINT_ERR_VALID = 3,	/* Validation error */
+-    XMLLINT_ERR_RDFILE = 4,	/* CtxtReadFile error */
+-    XMLLINT_ERR_SCHEMACOMP = 5,	/* Schema compilation */
+-    XMLLINT_ERR_OUT = 6,	/* Error writing output */
+-    XMLLINT_ERR_SCHEMAPAT = 7,	/* Error in schema pattern */
+-    XMLLINT_ERR_RDREGIS = 8,	/* Error in Reader registration */
+-    XMLLINT_ERR_MEM = 9,	/* Out of memory error */
+-    XMLLINT_ERR_XPATH = 10	/* XPath evaluation error */
++    XMLLINT_RETURN_OK = 0,	    /* No error */
++    XMLLINT_ERR_UNCLASS = 1,	    /* Unclassified */
++    XMLLINT_ERR_DTD = 2,	    /* Error in DTD */
++    XMLLINT_ERR_VALID = 3,	    /* Validation error */
++    XMLLINT_ERR_RDFILE = 4,	    /* CtxtReadFile error */
++    XMLLINT_ERR_SCHEMACOMP = 5,	    /* Schema compilation */
++    XMLLINT_ERR_OUT = 6,	    /* Error writing output */
++    XMLLINT_ERR_SCHEMAPAT = 7,	    /* Error in schema pattern */
++    XMLLINT_ERR_RDREGIS = 8,	    /* Error in Reader registration */
++    XMLLINT_ERR_MEM = 9,	    /* Out of memory error */
++    XMLLINT_ERR_XPATH = 10,	    /* XPath evaluation error */
++    XMLLINT_ERR_XPATH_EMPTY = 11    /* XPath result is empty */
+ } xmllintReturnCode;
+ #ifdef LIBXML_DEBUG_ENABLED
+ static int shell = 0;
+@@ -2019,6 +2020,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) {
+             xmlOutputBufferPtr buf;
+ 
+             if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
++                progresult = XMLLINT_ERR_XPATH_EMPTY;
+                 if (!quiet) {
+                     fprintf(stderr, "XPath set is empty\n");
+                 }
diff --git a/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch b/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch
new file mode 100644
index 00000000000000..feae220b634abc
--- /dev/null
+++ b/srcpkgs/libxml2/patches/4365a5e1153dd5ed7d269d00f8f14daee0fac5c8.patch
@@ -0,0 +1,131 @@
+From 4365a5e1153dd5ed7d269d00f8f14daee0fac5c8 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 26 Feb 2024 15:14:28 +0100
+Subject: [PATCH] xmlreader: Fix xmlTextReaderConstEncoding
+
+Regression from commit f1c1f5c6.
+
+Fixes #697.
+---
+ SAX2.c                   | 12 +-----------
+ include/private/parser.h |  2 ++
+ parserInternals.c        | 24 ++++++++++++++++++++++++
+ xmlreader.c              | 22 ++++++++++------------
+ 4 files changed, 37 insertions(+), 23 deletions(-)
+
+diff --git a/SAX2.c b/SAX2.c
+index ed21a559..bb72e160 100644
+--- a/SAX2.c
++++ b/SAX2.c
+@@ -955,17 +955,7 @@ xmlSAX2EndDocument(void *ctx)
+ 
+     doc = ctxt->myDoc;
+     if ((doc != NULL) && (doc->encoding == NULL)) {
+-        const xmlChar *encoding = NULL;
+-
+-        if ((ctxt->input->flags & XML_INPUT_USES_ENC_DECL) ||
+-            (ctxt->input->flags & XML_INPUT_AUTO_ENCODING)) {
+-            /* Preserve encoding exactly */
+-            encoding = ctxt->encoding;
+-        } else if ((ctxt->input->buf) && (ctxt->input->buf->encoder)) {
+-            encoding = BAD_CAST ctxt->input->buf->encoder->name;
+-        } else if (ctxt->input->flags & XML_INPUT_HAS_ENCODING) {
+-            encoding = BAD_CAST "UTF-8";
+-        }
++        const xmlChar *encoding = xmlGetActualEncoding(ctxt);
+ 
+         if (encoding != NULL) {
+             doc->encoding = xmlStrdup(encoding);
+diff --git a/include/private/parser.h b/include/private/parser.h
+index 40d179fe..7f8f6912 100644
+--- a/include/private/parser.h
++++ b/include/private/parser.h
+@@ -48,6 +48,8 @@ XML_HIDDEN void
+ xmlDetectEncoding(xmlParserCtxtPtr ctxt);
+ XML_HIDDEN void
+ xmlSetDeclaredEncoding(xmlParserCtxtPtr ctxt, xmlChar *encoding);
++XML_HIDDEN const xmlChar *
++xmlGetActualEncoding(xmlParserCtxtPtr ctxt);
+ 
+ XML_HIDDEN xmlParserNsData *
+ xmlParserNsCreate(void);
+diff --git a/parserInternals.c b/parserInternals.c
+index e6b4cb14..166397bd 100644
+--- a/parserInternals.c
++++ b/parserInternals.c
+@@ -1479,6 +1479,30 @@ xmlSetDeclaredEncoding(xmlParserCtxtPtr ctxt, xmlChar *encoding) {
+     }
+ }
+ 
++/**
++ * xmlGetActualEncoding:
++ * @ctxt:  the parser context
++ *
++ * Returns the actual used to parse the document. This can differ from
++ * the declared encoding.
++ */
++const xmlChar *
++xmlGetActualEncoding(xmlParserCtxtPtr ctxt) {
++    const xmlChar *encoding = NULL;
++
++    if ((ctxt->input->flags & XML_INPUT_USES_ENC_DECL) ||
++        (ctxt->input->flags & XML_INPUT_AUTO_ENCODING)) {
++        /* Preserve encoding exactly */
++        encoding = ctxt->encoding;
++    } else if ((ctxt->input->buf) && (ctxt->input->buf->encoder)) {
++        encoding = BAD_CAST ctxt->input->buf->encoder->name;
++    } else if (ctxt->input->flags & XML_INPUT_HAS_ENCODING) {
++        encoding = BAD_CAST "UTF-8";
++    }
++
++    return(encoding);
++}
++
+ /************************************************************************
+  *									*
+  *	Commodity functions to handle entities processing		*
+diff --git a/xmlreader.c b/xmlreader.c
+index 1f903306..5fdeb2b8 100644
+--- a/xmlreader.c
++++ b/xmlreader.c
+@@ -40,6 +40,7 @@
+ #endif
+ 
+ #include "private/buf.h"
++#include "private/parser.h"
+ #include "private/tree.h"
+ #ifdef LIBXML_XINCLUDE_ENABLED
+ #include "private/xinclude.h"
+@@ -2795,20 +2796,17 @@ xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader) {
+  */
+ const xmlChar *
+ xmlTextReaderConstEncoding(xmlTextReaderPtr reader) {
+-    xmlDocPtr doc = NULL;
++    const xmlChar *encoding = NULL;
++
+     if (reader == NULL)
+-	return(NULL);
+-    if (reader->doc != NULL)
+-        doc = reader->doc;
+-    else if (reader->ctxt != NULL)
+-	doc = reader->ctxt->myDoc;
+-    if (doc == NULL)
+-	return(NULL);
++        return(NULL);
+ 
+-    if (doc->encoding == NULL)
+-	return(NULL);
+-    else
+-      return(CONSTSTR(doc->encoding));
++    if (reader->ctxt != NULL)
++        encoding = xmlGetActualEncoding(reader->ctxt);
++    else if (reader->doc != NULL)
++        encoding = reader->doc->encoding;
++
++    return(CONSTSTR(encoding));
+ }
+ 
+ 
+-- 
+GitLab
+
diff --git a/srcpkgs/libxml2/template b/srcpkgs/libxml2/template
index 7e05639eaaa1e2..80378055434c13 100644
--- a/srcpkgs/libxml2/template
+++ b/srcpkgs/libxml2/template
@@ -1,8 +1,7 @@
 # Template file for 'libxml2'
 pkgname=libxml2
-reverts="2.12.1_1"
-version=2.11.4
-revision=6
+version=2.12.5
+revision=1
 build_style=gnu-configure
 configure_args="--with-threads --with-history --with-icu
  --with-legacy --with-ftp --with-xptr-locs --enable-static"
@@ -13,14 +12,17 @@ short_desc="Library providing XML and HTML support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.gnome.org/GNOME/libxml2"
+changelog="https://gitlab.gnome.org/GNOME/libxml2/-/raw/master/NEWS"
 distfiles="${GNOME_SITE}/libxml2/${version%.*}/libxml2-${version}.tar.xz"
-checksum=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+checksum=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 python_version=3
 CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
 
 post_extract() {
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+		# Disable broken encoding conversion tests on musl
 		rm -f test/ebcdic_566012.xml
+		rm -f test/icu_parse_test.xml
 	fi
 }
 

From 4d3619525e422f8d63e84d77c71e13f3dea42cda Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 04:57:49 -0800
Subject: [PATCH 2/8] xmlsec1: update to 1.3.3.

Fixes build with libxml2 2.12.
---
 srcpkgs/xmlsec1/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xmlsec1/template b/srcpkgs/xmlsec1/template
index a4d9792bd2d374..0dfb40b1f1161d 100644
--- a/srcpkgs/xmlsec1/template
+++ b/srcpkgs/xmlsec1/template
@@ -1,6 +1,6 @@
 # Template file for 'xmlsec1'
 pkgname=xmlsec1
-version=1.3.2
+version=1.3.3
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config"
@@ -11,8 +11,8 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT"
 homepage="https://www.aleksey.com/xmlsec/"
 changelog="https://www.aleksey.com/xmlsec/news.html"
-distfiles="https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz"
-checksum=4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf
+distfiles="https://github.com/lsh123/xmlsec/releases/download/${version}/xmlsec1-${version}.tar.gz"
+checksum=ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2
 
 post_install() {
 	if [ "$CROSS_BUILD" ]; then

From 82ec5986bc45ee12a21829856d7ae1f8d73f5029 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:13:26 -0800
Subject: [PATCH 3/8] recoll: update to 1.37.4.

---
 srcpkgs/recoll/patches/musl.patch | 4 ++--
 srcpkgs/recoll/template           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/recoll/patches/musl.patch b/srcpkgs/recoll/patches/musl.patch
index d633e92b9df118..5d061a05789650 100644
--- a/srcpkgs/recoll/patches/musl.patch
+++ b/srcpkgs/recoll/patches/musl.patch
@@ -27,11 +27,11 @@ diff --git a/common/conf_post.h b/common/conf_post.h
 index 7093ead..0ecd56b 100644
 --- a/common/conf_post.h
 +++ b/common/conf_post.h
-@@ -73,12 +73,4 @@ typedef int ssize_t;
+@@ -74,12 +74,4 @@ typedef int ssize_t;
  #define REAL_GCC   __GNUC__ // probably
  #endif
  
--#ifdef REAL_GCC
+-#if defined(REAL_GCC) && defined(HAVE_FEATURES_H)
 -// Older gcc versions pretended to supply std::regex, but the resulting programs mostly crashed.
 -#include <features.h>
 -#if ! __GNUC_PREREQ(6,0)
diff --git a/srcpkgs/recoll/template b/srcpkgs/recoll/template
index cbcc61e13cd0e3..7b33d23df03a59 100644
--- a/srcpkgs/recoll/template
+++ b/srcpkgs/recoll/template
@@ -1,7 +1,7 @@
 # Template file for 'recoll'
 pkgname=recoll
-version=1.32.7
-revision=3
+version=1.37.4
+revision=1
 build_style=gnu-configure
 build_helper="qmake python3"
 configure_args="--enable-recollq --disable-python-chm --disable-x11mon
@@ -9,10 +9,10 @@ configure_args="--enable-recollq --disable-python-chm --disable-x11mon
 hostmakedepends="pkg-config gettext-devel qt5-qmake qt5-host-tools
  which python3-setuptools"
 makedepends="libxslt-devel xapian-core-devel zlib-devel qt5-devel
- python3-devel"
+ python3-devel aspell-devel"
 short_desc="Full text search tool based on Xapian backend"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.lesbonscomptes.com/recoll/"
 distfiles="https://www.lesbonscomptes.com/recoll/recoll-${version}.tar.gz"
-checksum=ca08a6f4bb0b519bf915a062a9b7aadc4f343473cc1f07895708208d66337dba
+checksum=3109d76a65bb2f887231b643994ed701c2efe6ba0771f8451b39e2f186c3b6ad

From 5152ac9389998d21c4c1f96b516b4413795460a3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 05:18:02 -0800
Subject: [PATCH 4/8] squid: update to 6.7.

---
 srcpkgs/squid/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/squid/template b/srcpkgs/squid/template
index 1dff665cda342a..e73856d05a1b80 100644
--- a/srcpkgs/squid/template
+++ b/srcpkgs/squid/template
@@ -1,7 +1,7 @@
 # Template file for 'squid'
 pkgname=squid
-version=5.7
-revision=4
+version=6.7
+revision=1
 build_style=gnu-configure
 configure_args="
  --sysconfdir=/etc/squid
@@ -52,9 +52,9 @@ short_desc="Caching proxy for the Web"
 maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://www.squid-cache.org/"
-changelog="http://www.squid-cache.org/Versions/v5/changesets/"
-distfiles="http://www.squid-cache.org/Versions/v5/squid-${version}.tar.xz"
-checksum=6b0753aaba4c9c4efd333e67124caecf7ad6cc2d38581f19d2f0321f5b7ecd81
+changelog="http://www.squid-cache.org/Versions/v${version%%.*}/changesets/"
+distfiles="http://www.squid-cache.org/Versions/v${version%%.*}/squid-${version}.tar.xz"
+checksum=e14daa4eae41925d1ae3f08e64439a6aaa3011bdced686628b8de697d5ab8428
 system_accounts="squid"
 # squid-conf-tests requires a squid user in the system
 make_check=no

From b512594cf8dcf1230786f699d289efd9a6a36450 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:22 -0800
Subject: [PATCH 5/8] qt5-webengine: fix build for libxml2 2.12

---
 .../patches/fix-libxml2-2.12.patch            | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 72bc20c950ee1ace6494d637f91f2f59dfd679f5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:07:37 -0800
Subject: [PATCH 6/8] qt6-pdf: fix build for libxml2 2.12

---
 .../qt6-pdf/patches/fix-libxml2-2.12.patch    | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..f85ee4d01ff64f
--- /dev/null
+++ b/srcpkgs/qt6-pdf/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,34 @@
+Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
+
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
+index d53835e9675793e..2eaea31ed29b90f 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
+ 
+   void reset();
+ 
++#if LIBXML_VERSION >= 21200
++  static void ParseErrorFunc(void* user_data, const xmlError*);
++#else
+   static void ParseErrorFunc(void* user_data, xmlError*);
++#endif
+   static void GenericErrorFunc(void* user_data, const char* msg, ...);
+ 
+   // Only for libXSLT callbacks
+diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+index 133e0b3355d2f09..f424077089da87d 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
+   // It would be nice to do something with this error message.
+ }
+ 
++#if LIBXML_VERSION >= 21200
++void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
++#else
+ void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
++#endif
+   FrameConsole* console = static_cast<FrameConsole*>(user_data);
+   if (!console)
+     return;

From 3acd2bb1b2cefea72d10b2d99ee327e77057a6c4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:13:32 -0800
Subject: [PATCH 7/8] libmusicbrainz5: fix build for libxml2 2.12

---
 .../patches/libxml2-2.12.patch                | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch

diff --git a/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
new file mode 100644
index 00000000000000..0a00d1bdc502d3
--- /dev/null
+++ b/srcpkgs/libmusicbrainz5/patches/libxml2-2.12.patch
@@ -0,0 +1,36 @@
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+ 
+     doc = xmlParseFile(filename.c_str());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+ 
+     doc = xmlParseMemory(xml.c_str(), xml.length());
+     if ((doc == NULL) && (results != NULL)) {
+-        xmlErrorPtr error = xmlGetLastError();
++        const xmlError *error = xmlGetLastError();
+         results->message = error->message;
+         results->line = error->line;
+         results->code = error->code;

From 8c8dc21ae8f50809194423f1ddd6783b092bf1e1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 19 Feb 2024 06:27:42 -0800
Subject: [PATCH 8/8] osinfo-db-tools: fix build for libxml2 2.12 and gcc 14

---
 .../patches/fix-libxml2-2.12.patch            | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch

diff --git a/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
new file mode 100644
index 00000000000000..628005774327e9
--- /dev/null
+++ b/srcpkgs/osinfo-db-tools/patches/fix-libxml2-2.12.patch
@@ -0,0 +1,54 @@
+Not currently necessary, but will be with gcc 14
+
+From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:04:43 +0100
+Subject: [PATCH] Make xmlError structs constant
+
+In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so
+that:
+
+1) xmlGetLastError() returns pointer to a constant xmlError
+   struct, and
+
+2) xmlSetStructuredErrorFunc() changed the signature of callback
+   (validate_structured_error_nop()), it too is passed pointer to
+   a constant xmlError struct.
+
+But of course, older libxml2 expects different callback
+signature. Therefore, we need to typecast it anyway.
+
+Also, drop obviously incorrect @error annotation in
+validate_structured_error_nop; the variable is used.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/osinfo-db-validate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
+index a721b4d..b1434a6 100644
+--- a/tools/osinfo-db-validate.c
++++ b/tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlError *error)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
+@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro
+     g_autofree gchar *schemapath = NULL;
+ 
+     xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
+-    xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
++    /* Drop this typecast when >=libxml2-2.12.0 is required */
++    xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop);
+ 
+     schemapath = g_file_get_path(schema);
+     rngParser = xmlRelaxNGNewParserCtxt(schemapath);
+-- 
+GitLab
+

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PR PATCH] [Merged]: libxml2: update to 2.12.5.
  2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
                   ` (29 preceding siblings ...)
  2024-03-05 23:41 ` oreo639
@ 2024-03-06  0:35 ` oreo639
  30 siblings, 0 replies; 32+ messages in thread
From: oreo639 @ 2024-03-06  0:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

There's a merged pull request on the void-packages repository

libxml2: update to 2.12.5.
https://github.com/void-linux/void-packages/pull/48826

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

I tested building all packages depending on libxml2.
~~The only other build failure not addressed is vtk, which is gcc 13 related.~~
This depends on https://github.com/void-linux/void-packages/pull/48824

cc: @classabbyamp 

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2024-03-06  0:35 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19  5:20 [PR PATCH] libxml2: update to 2.12.5 oreo639
2024-02-19  5:26 ` oreo639
2024-02-19  5:30 ` oreo639
2024-02-19  5:51 ` [PR PATCH] [Updated] " oreo639
2024-02-19  6:18 ` sgn
2024-02-19  6:50 ` oreo639
2024-02-19  6:51 ` oreo639
2024-02-19  6:51 ` oreo639
2024-02-19  6:55 ` oreo639
2024-02-19  6:55 ` oreo639
2024-02-19  6:55 ` oreo639
2024-02-19  6:56 ` oreo639
2024-02-19  6:56 ` oreo639
2024-02-19  6:57 ` oreo639
2024-02-19  7:00 ` oreo639
2024-02-19  7:01 ` sgn
2024-02-19  7:21 ` oreo639
2024-02-19  7:22 ` oreo639
2024-02-19  7:23 ` oreo639
2024-02-19  7:37 ` [PR PATCH] [Updated] " oreo639
2024-02-19 12:41 ` oreo639
2024-02-19 12:59 ` oreo639
2024-02-19 14:32 ` oreo639
2024-02-19 14:53 ` oreo639
2024-02-19 14:57 ` oreo639
2024-02-25  3:45 ` oreo639
2024-02-25  3:59 ` oreo639
2024-02-25 10:05 ` oreo639
2024-02-27  2:39 ` oreo639
2024-03-05 23:22 ` oreo639
2024-03-05 23:41 ` oreo639
2024-03-06  0:35 ` [PR PATCH] [Merged]: " oreo639

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).