[packages/xmlstarlet] correct type usage and fix build with libxml2 >= 2.14
atler
atler at pld-linux.org
Wed Aug 6 18:21:17 CEST 2025
commit b2404b7f5da60e7100864fc6167089ce1021c0f7
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Aug 6 18:20:30 2025 +0200
correct type usage and fix build with libxml2 >= 2.14
libxml2.14.patch | 29 +++++++++++++++++++++++++++++
types.patch | 20 ++++++++++++++++++++
xmlstarlet.spec | 4 ++++
3 files changed, 53 insertions(+)
---
diff --git a/xmlstarlet.spec b/xmlstarlet.spec
index 623b850..8ee4fd5 100644
--- a/xmlstarlet.spec
+++ b/xmlstarlet.spec
@@ -7,6 +7,8 @@ License: MIT
Group: Applications/Publishing/XML
Source0: http://downloads.sourceforge.net/xmlstar/%{name}-%{version}.tar.gz
# Source0-md5: f3c5dfa3b1a2ee06cd57c255cc8b70a0
+Patch0: libxml2.14.patch
+Patch1: types.patch
URL: http://xmlstar.sourceforge.net/
BuildRequires: autoconf >= 2.62
BuildRequires: automake >= 1:1.11
@@ -31,6 +33,8 @@ przy użyciu poleceń uniksowych grep, sed, awk, diff, patch, join itp.
%prep
%setup -q
+%patch -P0 -p1
+%patch -P1 -p1
%build
%{__aclocal} -I m4
diff --git a/libxml2.14.patch b/libxml2.14.patch
new file mode 100644
index 0000000..0229d1c
--- /dev/null
+++ b/libxml2.14.patch
@@ -0,0 +1,29 @@
+--- xmlstarlet-1.6.1/src/xml_pyx.c.orig 2013-07-01 04:58:36.000000000 +0200
++++ xmlstarlet-1.6.1/src/xml_pyx.c 2025-08-06 18:08:40.213694639 +0200
+@@ -200,7 +200,7 @@
+ }
+
+ static void
+-pyxExternalSubsetHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
++pyxExternalSubsetHandler(void *ctx __attribute__((unused)), const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+ {
+ fprintf(stdout, "D %s PUBLIC", name); /* TODO: re-check */
+@@ -215,7 +215,7 @@
+ }
+
+ static void
+-pyxCommentHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
++pyxCommentHandler(void *ctx __attribute__((unused)), const xmlChar *value)
+ {
+ fprintf(stdout,"C");
+ SanitizeData(value, xmlStrlen(value));
+@@ -223,7 +223,7 @@
+ }
+
+ static void
+-pyxCdataBlockHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len)
++pyxCdataBlockHandler(void *ctx __attribute__((unused)), const xmlChar *value, int len)
+ {
+ fprintf(stdout,"[");
+ SanitizeData(value, len);
diff --git a/types.patch b/types.patch
new file mode 100644
index 0000000..2cbf1eb
--- /dev/null
+++ b/types.patch
@@ -0,0 +1,20 @@
+--- xmlstarlet-1.6.1/src/xml_elem.c.orig 2012-08-12 17:18:59.000000000 +0200
++++ xmlstarlet-1.6.1/src/xml_elem.c 2025-08-06 18:15:54.018827446 +0200
+@@ -178,7 +178,7 @@
+ }
+
+ typedef struct {
+- xmlChar **array;
++ const xmlChar **array;
+ int offset;
+ } ArrayDest;
+
+@@ -186,7 +186,7 @@
+ * put @name into @data->array[@data->offset]
+ */
+ static void
+-hash_key_put(void *payload, void *data, xmlChar *name)
++hash_key_put(void *payload, void *data, const xmlChar *name)
+ {
+ ArrayDest *dest = data;
+ dest->array[dest->offset++] = name;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xmlstarlet.git/commitdiff/b2404b7f5da60e7100864fc6167089ce1021c0f7
More information about the pld-cvs-commit
mailing list