[packages/libxml2] up to 2.13.0
atler
atler at pld-linux.org
Fri Jun 14 20:27:58 CEST 2024
commit a0b7bb82cf45112e2f31b532aac6e2a30c2b12ce
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Jun 14 20:11:32 2024 +0200
up to 2.13.0
libxml2-open.gz.patch | 56 ++++++++++++++++++++++-----------------------------
libxml2.spec | 18 +++++++++--------
2 files changed, 34 insertions(+), 40 deletions(-)
---
diff --git a/libxml2.spec b/libxml2.spec
index 6aaedf6..377a73e 100644
--- a/libxml2.spec
+++ b/libxml2.spec
@@ -9,7 +9,6 @@
%bcond_without python3 # CPython 3.x module
%bcond_without static_libs # static library
%bcond_without zlib # zlib support
-%bcond_with mem_debug # libxml2 memory debuging
%bcond_without tests # "make check" call
Summary: libXML library version 2
@@ -17,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.12.8
+Version: 2.13.0
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.12/%{name}-%{version}.tar.xz
-# Source0-md5: 121a262ac4e4b4110a1104ac33676903
+Source0: https://download.gnome.org/sources/libxml2/2.13/%{name}-%{version}.tar.xz
+# Source0-md5: 22a4b108240c3f2aeb1354346055b436
Patch0: %{name}-open.gz.patch
Patch1: %{name}-largefile.patch
Patch2: %{name}-libx32.patch
@@ -196,11 +195,12 @@ do biblioteki libxml2.
--disable-silent-rules \
%{?with_static_libs:--enable-static} \
%{?with_ftp:--with-ftp} \
+ --with-http \
%{?with_legacy:--with-legacy} \
--with-lzma \
- --with-mem-debug%{!?with_mem_debug:=no} \
--without-python \
- %{!?with_zlib:--without-zlib}
+ --with-tls \
+ %{?with_zlib:--with-zlib}
%{__make}
@@ -241,8 +241,10 @@ cd python
cd ..
%endif
-install -d $RPM_BUILD_ROOT%{_examplesdir}
-%{__mv} $RPM_BUILD_ROOT%{_docdir}/libxml2/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+%if %{with apidocs}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p example/*.{c,xml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+%endif
# install catalog file
install -d $RPM_BUILD_ROOT%{_sysconfdir}/xml
diff --git a/libxml2-open.gz.patch b/libxml2-open.gz.patch
index 644204b..61ec90a 100644
--- a/libxml2-open.gz.patch
+++ b/libxml2-open.gz.patch
@@ -1,38 +1,30 @@
---- libxml2-2.10.0/xmlIO.c.orig 2022-08-18 16:29:32.843322082 +0200
-+++ libxml2-2.10.0/xmlIO.c 2022-08-18 16:32:12.985787850 +0200
-@@ -1115,8 +1115,33 @@ xmlGzfileOpen_real (const char *filename
+--- libxml2-2.13.0/xmlIO.c.orig 2024-06-14 12:32:12.257784372 +0200
++++ libxml2-2.13.0/xmlIO.c 2024-06-14 19:23:06.355299914 +0200
+@@ -547,6 +547,27 @@
+ fd = open(filename, flags, 0777);
+ #endif /* WIN32 */
- if (path == NULL)
- return(NULL);
-- if (!xmlCheckFilename(path))
-- return(NULL);
-+ if (!xmlCheckFilename(path)) {
-+ /* If we cannot open `foo.xml', we try `foo.xml.gz'. However we i
-+ * append .gz only if filename doesn't alreay end with .gz. */
-+ if (strlen(path) < 3 || strcmp(path + strlen(path) - 3, ".gz") != 0) {
-+ char *gz_filename = xmlMalloc(strlen(path) + 4);
++ if (fd < 0 && errno == ENOENT) {
++ /* If we cannot open `foo.xml', we try `foo.xml.gz'. However we i
++ * append .gz only if filename doesn't alreay end with .gz. */
++ if (strlen(filename) < 3 || strcmp(filename + strlen(filename) - 3, ".gz") != 0) {
++ char *gz_filename = xmlMalloc(strlen(filename) + 4);
++ int gz_fd;
+
-+ if (gz_filename == NULL) {
-+ xmlGenericError(xmlGenericErrorContext,
-+ "xmlGzfileOpen: %s\n",
-+ "Failure allocating buffer for filename.");
-+ return NULL;
-+ }
++ if (gz_filename != NULL) {
++ strcpy(gz_filename, filename);
++ strcat(gz_filename, ".gz");
++ }
+
-+ strcpy(gz_filename, path);
-+ strcat(gz_filename, ".gz");
++ gz_fd = open(gz_filename, flags, 0777);
+
-+ fd = NULL;
++ if (gz_fd >= 0)
++ fd = gz_fd;
+
-+ if (xmlCheckFilename(gz_filename))
-+ fd = gzopen(gz_filename, "rb");
-+
-+ xmlFree(gz_filename);
-+
-+ return((void *) fd);
-+ } else
-+ return NULL;
++ xmlFree(gz_filename);
++ }
+ }
-
- #if defined(_WIN32)
- fd = xmlWrapGzOpenUtf8(path, "rb");
++
+ if (fd < 0) {
+ /*
+ * Windows and possibly other platforms return EINVAL
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libxml2.git/commitdiff/a0b7bb82cf45112e2f31b532aac6e2a30c2b12ce
More information about the pld-cvs-commit
mailing list