[packages/libxml2] Up to 2.15.1; python modules no longer python 2 compatible
arekm
arekm at pld-linux.org
Sat Oct 18 14:43:45 CEST 2025
commit d44baa34d2aa24e6bb294d528a247c6e868090f8
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Oct 18 14:43:30 2025 +0200
Up to 2.15.1; python modules no longer python 2 compatible
libxml2-python-setup.patch | 2 +-
libxml2-python3-unicode-errors.patch | 14 ++++++--------
libxml2.spec | 17 ++++++++++-------
3 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/libxml2.spec b/libxml2.spec
index 67c4a9c..5179962 100644
--- a/libxml2.spec
+++ b/libxml2.spec
@@ -5,7 +5,7 @@
%bcond_without apidocs # API documentation
%bcond_with ftp # FTP support
%bcond_without legacy # legacy API support
-%bcond_without python2 # CPython 2.x module
+%bcond_with python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%bcond_without static_libs # static library
%bcond_without zlib # zlib support
@@ -16,14 +16,14 @@ Summary(es.UTF-8): Biblioteca libXML version 2
Summary(pl.UTF-8): Biblioteka libXML wersja 2
Summary(pt_BR.UTF-8): Biblioteca libXML versão 2
Name: libxml2
-Version: 2.14.6
+Version: 2.15.1
Release: 1
Epoch: 1
License: MIT
Group: Libraries
#Source0: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
-Source0: https://download.gnome.org/sources/libxml2/2.14/%{name}-%{version}.tar.xz
-# Source0-md5: a2bb2b6cb8fc7be1fafa14f500e4f7c5
+Source0: https://download.gnome.org/sources/libxml2/2.15/%{name}-%{version}.tar.xz
+# Source0-md5: fcf38f534bb8996984dba978ee3e27f4
Patch0: %{name}-open.gz.patch
Patch1: %{name}-largefile.patch
Patch2: %{name}-libx32.patch
@@ -35,6 +35,10 @@ Patch11: %{name}-python3-unicode-errors.patch
URL: http://xmlsoft.org/
BuildRequires: autoconf >= 2.68
BuildRequires: automake >= 1:1.16.3
+%if %{with apidocs}
+BuildRequires: doxygen >= 1.9.2
+BuildRequires: libxslt-progs
+%endif
BuildRequires: libtool >= 2:2.0
BuildRequires: pkgconfig
%if %{with python2}
@@ -197,6 +201,7 @@ do biblioteki libxml2.
%configure \
--disable-silent-rules \
%{?with_static_libs:--enable-static} \
+ %{?with_apidocs:--with-docs} \
%{?with_ftp:--with-ftp} \
--with-http \
%{?with_legacy:--with-legacy} \
@@ -227,8 +232,7 @@ cd ..
rm -rf $RPM_BUILD_ROOT
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT \
- devhelpdir=%{_gtkdocdir}/libxml2
+ DESTDIR=$RPM_BUILD_ROOT
%if %{with python2}
cd python
@@ -288,7 +292,6 @@ rm -rf $RPM_BUILD_ROOT
%files apidocs
%defattr(644,root,root,755)
%{_docdir}/%{name}
-%{_gtkdocdir}/libxml2
%{_examplesdir}/%{name}-%{version}
%endif
diff --git a/libxml2-python-setup.patch b/libxml2-python-setup.patch
index b7853d3..02ba0e8 100644
--- a/libxml2-python-setup.patch
+++ b/libxml2-python-setup.patch
@@ -21,7 +21,7 @@
+'@libdir@',
]
- xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
+ xml_files = ["libxml.c", "libxml.py", "libxml_wrap.h", "types.c",
@@ -194,7 +185,7 @@
if WITHDLLS:
modules.append('libxmlmods.__init__')
diff --git a/libxml2-python3-unicode-errors.patch b/libxml2-python3-unicode-errors.patch
index 3a64862..10f17df 100644
--- a/libxml2-python3-unicode-errors.patch
+++ b/libxml2-python3-unicode-errors.patch
@@ -1,17 +1,15 @@
-Index: libxml2-2.9.5/python/libxml.c
-===================================================================
---- libxml2-2.9.5.orig/python/libxml.c
-+++ libxml2-2.9.5/python/libxml.c
-@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
+--- libxml2-2.15.1/python/libxml.c~ 2025-10-16 17:49:18.000000000 +0200
++++ libxml2-2.15.1/python/libxml.c 2025-10-18 12:06:23.895443826 +0200
+@@ -1488,6 +1488,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
PyObject *message;
PyObject *result;
- char str[1000];
+ char str[1024];
+ unsigned char *ptr = (unsigned char *)str;
if (libxml_xmlPythonErrorFuncHandler == NULL) {
va_start(ap, msg);
-@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
- str[999] = 0;
+@@ -1498,12 +1499,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
+ vsnprintf(str, sizeof(str), msg, ap);
va_end(ap);
+#if PY_MAJOR_VERSION >= 3
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libxml2.git/commitdiff/d44baa34d2aa24e6bb294d528a247c6e868090f8
More information about the pld-cvs-commit
mailing list