commit: d45a8c895acb5c984682a6b724a703d5b394379d Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Sep 9 22:34:01 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Sep 9 22:35:06 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d45a8c89
media-video/vcdimager: fix compat w/ libxml2-2.14 Using the patch from Arch but adapted w/ #ifdefs for libxml2-2.13. Closes: https://bugs.gentoo.org/955707 Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/vcdimager-2.0.1-libxml2-2.14.patch | 48 +++++++++++++++ media-video/vcdimager/vcdimager-2.0.1-r2.ebuild | 69 ++++++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/media-video/vcdimager/files/vcdimager-2.0.1-libxml2-2.14.patch b/media-video/vcdimager/files/vcdimager-2.0.1-libxml2-2.14.patch new file mode 100644 index 000000000000..725932614dac --- /dev/null +++ b/media-video/vcdimager/files/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/media-video/vcdimager/vcdimager-2.0.1-r2.ebuild b/media-video/vcdimager/vcdimager-2.0.1-r2.ebuild new file mode 100644 index 000000000000..9eef44b8880e --- /dev/null +++ b/media-video/vcdimager/vcdimager-2.0.1-r2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools multilib-minimal toolchain-funcs + +DESCRIPTION="GNU VCDimager" +HOMEPAGE="https://www.gnu.org/software/vcdimager/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="static-libs +xml" + +RDEPEND=" + >=dev-libs/libcdio-2.0.0:=[-minimal,${MULTILIB_USEDEP}] + dev-libs/popt + xml? ( dev-libs/libxml2:2= ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( AUTHORS BUGS ChangeLog FAQ HACKING NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}/${P}-pkg-config.patch" + "${FILESDIR}/${PN}-2.0.1-libxml2-2.14.patch" +) + +src_prepare() { + default + + # Avoid building useless programs (bug #226249) + sed -i \ + -e 's/check_PROGRAMS =/check_PROGRAMS +=/' \ + -e 's/noinst_PROGRAMS =/check_PROGRAMS =/' \ + test/Makefile.am || die + sed -i \ + -e 's/noinst_PROGRAMS =/check_PROGRAMS =/' \ + example/Makefile.am || die + + # Don't call nm directly (bug #724838) + sed -i \ + -e "s|nm|$(tc-getNM)|" \ + lib/Makefile.am || die + + eautoreconf +} + +multilib_src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + $(multilib_native_with cli-frontend) + $(multilib_native_use_with xml xml-frontend) + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_test() { + emake -j1 check +} + +multilib_src_install_all() { + find "${D}" -name '*.la' -delete || die + einstalldocs +}
