commit: 42102058a420c16f01fe7a04868774fcb62b1a55 Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com> AuthorDate: Sat Sep 14 07:56:16 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Dec 11 05:42:18 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42102058
app-text/po4a: apply patch from upstream for xsl lookup See https://github.com/mquinson/po4a/issues/431 Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/38599 Signed-off-by: Sam James <sam <AT> gentoo.org> app-text/po4a/files/po4a-0.69-xmlcatalog.patch | 23 ++++++++++++++++++++++ .../po4a/{po4a-0.69.ebuild => po4a-0.69-r1.ebuild} | 5 ++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app-text/po4a/files/po4a-0.69-xmlcatalog.patch b/app-text/po4a/files/po4a-0.69-xmlcatalog.patch new file mode 100644 index 000000000000..2d05a5b2ac75 --- /dev/null +++ b/app-text/po4a/files/po4a-0.69-xmlcatalog.patch @@ -0,0 +1,23 @@ +--- a/Po4aBuilder.pm 2024-09-14 15:48:58.642546000 +0800 ++++ b/Po4aBuilder.pm 2024-09-14 15:50:38.415546000 +0800 +@@ -242,15 +242,17 @@ sub ACTION_man { + foreach $file (qw(po4a-display-man.xml po4a-display-pod.xml)) { + copy ( File::Spec->catdir("share", "doc", $file), $man1path) or die; + } ++ my $docbook_xsl_url = "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"; ++ my $local_docbook_xsl = `xmlcatalog --noout "" "$docbook_xsl_url"` =~ m,file://(.+\.xsl), && $1; + foreach $file (@{$self->rscan_dir($manpath, qr{\.xml$})}) { + if ($file =~ m,(.*/man(.))/([^/]*)\.xml$,) { + my ($outdir, $section, $outfile) = ($1, $2, $3); +- if (-e "/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl") { # Location on Debian at least ++ if ($local_docbook_xsl) { + print "Convert $outdir/$outfile.$section (local docbook.xsl file). "; +- system("xsltproc -o $outdir/$outfile.$section --nonet /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl $file") and die; ++ system("xsltproc -o $outdir/$outfile.$section --nonet $local_docbook_xsl $file") and die; + } else { # Not found locally, use the XSL file online + print "Convert $outdir/$outfile.$section (online docbook.xsl file). "; +- system("xsltproc -o $outdir/$outfile.$section --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $file") and die; ++ system("xsltproc -o $outdir/$outfile.$section --nonet $docbook_xsl_url $file") and die; + } + } + unlink "$file" || die; diff --git a/app-text/po4a/po4a-0.69.ebuild b/app-text/po4a/po4a-0.69-r1.ebuild similarity index 94% rename from app-text/po4a/po4a-0.69.ebuild rename to app-text/po4a/po4a-0.69-r1.ebuild index 7cae274325d9..cf6b84cfb464 100644 --- a/app-text/po4a/po4a-0.69.ebuild +++ b/app-text/po4a/po4a-0.69-r1.ebuild @@ -38,7 +38,10 @@ BDEPEND="app-text/docbook-xml-dtd:4.1.2 virtual/latex-base )" -PATCHES=( "${FILESDIR}"/${P}-man.patch ) +PATCHES=( + "${FILESDIR}"/${P}-man.patch + "${FILESDIR}"/${P}-xmlcatalog.patch +) DIST_TEST="do"
