public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/vcdimager] rawhide: Fix build with libxml2 2.14+
@ 2026-10-22 21:15 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-10-22 21:15 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/vcdimager
            Branch : rawhide
            Commit : 1e67214e2c421df6546486eee8e370779955d0c4
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-10-15T22:25:24-04:00
            Stats  : +50/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/vcdimager/c/1e67214e2c421df6546486eee8e370779955d0c4?branch=rawhide

            Log:
            Fix build with libxml2 2.14+

Patch is from Gentoo, and is also used in Debian.

---
diff --git a/vcdimager-2.0.1-libxml2-2.14.patch b/vcdimager-2.0.1-libxml2-2.14.patch
new file mode 100644
index 0000000..7259326
--- /dev/null
+++ b/vcdimager-2.0.1-libxml2-2.14.patch
@@ -0,0 +1,48 @@
+Adapted from https://gitlab.archlinux.org/archlinux/packaging/packages/vcdimager/-/commit/88dc511b7f3dea8fb45e0c2bfa1345a75a088848
+https://bugs.gentoo.org/955707
+--- a/frontends/xml/vcd_xml_common.c
++++ b/frontends/xml/vcd_xml_common.c
+@@ -242,17 +242,43 @@ _convert (const char in[], const char encoding[], bool from)
+ 
+   temp = size - 1;
+   if (from) {
++#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 21400
++    if (!(handler->flags & 2) && NULL != handler->output.func)
++      ret = handler->output.func (handler->outputCtxt, out, &out_size, (const unsigned char *) in, &temp, 1);
++    if ((handler->flags & 2) && NULL != handler->output.legacyFunc)
++      ret = handler->output.legacyFunc (out, &out_size, (const unsigned char *) in, &temp);
++    else {
++      xmlCharEncCloseFunc(handler);
++      return strdup(in);
++    }
++#else
+     if (NULL != handler->output)
+       ret = handler->output (out, &out_size, (const unsigned char *) in, &temp);
+     else
+       return strdup(in);
++#endif
+   } else {
++#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 21400
++    if (!(handler->flags & 2) && NULL != handler->input.func)
++      ret = handler->input.func (handler->inputCtxt, out, &out_size, (const unsigned char *) in, &temp, 1);
++    if ((handler->flags & 2) && NULL != handler->input.legacyFunc)
++      ret = handler->input.legacyFunc (out, &out_size, (const unsigned char *) in, &temp);
++    else {
++      xmlCharEncCloseFunc(handler);
++      return strdup(in);
++    }
++#else
+     if (NULL != handler->input)
+       ret = handler->input (out, &out_size, (const unsigned char *) in, &temp);
+     else
++#endif
+       return strdup(in);
+   }
+ 
++#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 21400
++  xmlCharEncCloseFunc(handler);
++#endif
++
+   if (ret < 0 || (temp - size + 1))
+     {
+       free (out);

diff --git a/vcdimager.spec b/vcdimager.spec
index 7c0d5ea..6aee898 100644
--- a/vcdimager.spec
+++ b/vcdimager.spec
@@ -5,6 +5,8 @@ Release: 26%{?dist}
 License: GPL-2.0-or-later
 URL:     http://www.gnu.org/software/vcdimager/
 Source:  https://ftp.gnu.org/pub/gnu/vcdimager/vcdimager-%{version}.tar.gz
+# from Gentoo, also used by Debian
+Patch:   vcdimager-2.0.1-libxml2-2.14.patch
 
 BuildRequires: gcc-c++
 BuildRequires: libcdio-devel >= 0.72

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-22 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22 21:15 [rpms/vcdimager] rawhide: Fix build with libxml2 2.14+ Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox