xmlto: upgraded package to upstream

Upgraded app-text/xmlto to version 0.0.28-r6 for all.
This fixes CC misuse.

BUG=None
TEST=CQ passes

Change-Id: I7e0f0264e4a3ee866138f1f3e4063bdfc8cf09c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2971624
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/app-text/xmlto/Manifest b/app-text/xmlto/Manifest
index ddeb94a..2ac9943 100644
--- a/app-text/xmlto/Manifest
+++ b/app-text/xmlto/Manifest
@@ -1,2 +1 @@
-DIST xmlto-0.0.24-mans.tar.bz2 4575 RMD160 6687bf4d59b823f416b37b179a24ed6d9a315227 SHA1 e5c44ec88dd3e473d0be5151008b00d5fe190dc1 SHA256 1a5b78cf9b349023aaed17c2b39d94e123da58d9b682693013fb3bcdaac7735b
-DIST xmlto-0.0.24.tar.bz2 111860 RMD160 c3aa05569571aa7c2acbe0cc93c136a0d77a7d80 SHA1 68b1664e9ba4d76c37c373f2f0082d62c41506c8 SHA256 30f59f4cc87a5e86f74fc1d2e63ceb6adc7a260d438e0439689efc2588976e13
+DIST xmlto-0.0.28.tar.bz2 127921 BLAKE2B 12ef3e2e1436c330e7b003d08f4a4d4032d70255777956949eb8b47b6f5466e7c158b0f85dc87069c1e379603cac0b01c88589f98ca1ef9e862f0aef31169f6d SHA512 6e0c4968d4f1b7a3b132904182aa72a73f6167553eabdeb65cfafa6295ef7b960541685769d04144207963cca77b0c44db4f9fbb2796348ffcb37b3b399f18f1
diff --git a/app-text/xmlto/files/xmlto-0.0.24-parallelmake.patch b/app-text/xmlto/files/xmlto-0.0.24-parallelmake.patch
deleted file mode 100644
index 6d18724..0000000
--- a/app-text/xmlto/files/xmlto-0.0.24-parallelmake.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From f2ada08ce5b92de1869419f1ed50aa1190a8bfb4 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Fri, 19 Aug 2011 10:47:10 -0400
-Subject: [PATCH] fix building manpages in parallel
-
-The current man page rules allow make to fire off two children (1 per
-man page), but each child will attempt to create all the required man
-pages.  So it's possible for the children to collide on their outputs.
-Rewrite the rules so that each man page will fire off one child and
-only process its specific man page.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- Makefile.am |    8 +++-----
- 1 files changed, 3 insertions(+), 5 deletions(-)
-
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -68,11 +68,9 @@ EXTRA_DIST = xmlto.spec \
- 	doc/xmlif.xml \
- 	xmlto.mak
- 
--$(man1_MANS): $(top_srcdir)/doc/xmlto.xml $(top_srcdir)/doc/xmlif.xml
--	for xml in xmlif.xml xmlto.xml; do \
--	  FORMAT_DIR=$(top_srcdir)/format \
--	   $(BASH) ./xmlto -o man/man1 man $(top_srcdir)/doc/$$xml ; \
--	done || ( RC=$$?; exit $$RC )
-+GEN_MANPAGE = FORMAT_DIR=$(top_srcdir)/format $(BASH) ./xmlto -o $(@D) man $<
-+man/man1/xmlto.1: doc/xmlto.xml ; $(GEN_MANPAGE)
-+man/man1/xmlif.1: doc/xmlif.xml ; $(GEN_MANPAGE)
- 
- TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) top_builddir=$(top_builddir)
- TESTS = xmlif/test/run-test
-
-The Makefile.in patch is trivial, so avoid autotools just for this
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -959,11 +959,9 @@
- 	uninstall-man uninstall-man1 uninstall-nobase_pkgdataDATA
- 
- 
--$(man1_MANS): $(top_srcdir)/doc/xmlto.xml $(top_srcdir)/doc/xmlif.xml
--	for xml in xmlif.xml xmlto.xml; do \
--	  FORMAT_DIR=$(top_srcdir)/format \
--	   $(BASH) ./xmlto -o man/man1 man $(top_srcdir)/doc/$$xml ; \
--	done || ( RC=$$?; exit $$RC )
-+GEN_MANPAGE = FORMAT_DIR=$(top_srcdir)/format $(BASH) ./xmlto -o $(@D) man $<
-+man/man1/xmlto.1: doc/xmlto.xml ; $(GEN_MANPAGE)
-+man/man1/xmlif.1: doc/xmlif.xml ; $(GEN_MANPAGE)
- 
- tag:
- 	cvs tag -c `echo V@VERSION@ | tr . _`
--- 
-1.7.6
-
diff --git a/app-text/xmlto/files/xmlto-0.0.28-allow-links.patch b/app-text/xmlto/files/xmlto-0.0.28-allow-links.patch
new file mode 100644
index 0000000..b35b492
--- /dev/null
+++ b/app-text/xmlto/files/xmlto-0.0.28-allow-links.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/679626
+Thanks-to: dolphinling
+--- a/configure.in
++++ b/configure.in
+@@ -100,8 +100,8 @@ dnl
+ AC_ARG_VAR([LYNX], [Name and path of the `lynx' browser.])
+ AC_PATH_PROG([LYNX], [lynx], [lynx])
+ 
+-AC_ARG_VAR([LINKS], [Name and path of the `elinks' browser.])
+-AC_PATH_PROG([LINKS], [elinks], [elinks])
++AC_ARG_VAR([LINKS], [Name and path of the `links/elinks' browser.])
++AC_PATH_PROGS([LINKS], [links elinks], [links])
+ 
+ AC_ARG_VAR([W3M], [Name and path of the `w3m' browser.])
+ AC_PATH_PROG([W3M], [w3m], [w3m])
diff --git a/app-text/xmlto/metadata.xml b/app-text/xmlto/metadata.xml
index e960864..d52af1c 100644
--- a/app-text/xmlto/metadata.xml
+++ b/app-text/xmlto/metadata.xml
@@ -1,5 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-  <herd>sgml</herd>
+	<maintainer type="person">
+		<email>sam@gentoo.org</email>
+		<name>Sam James</name>
+	</maintainer>
+	<use>
+		<flag name="text">Support conversion from XML to plain text</flag>
+	</use>
 </pkgmetadata>
diff --git a/app-text/xmlto/xmlto-0.0.24-r1.ebuild b/app-text/xmlto/xmlto-0.0.24-r1.ebuild
deleted file mode 100644
index eb51c0b..0000000
--- a/app-text/xmlto/xmlto-0.0.24-r1.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/xmlto/xmlto-0.0.24-r1.ebuild,v 1.1 2011/08/19 15:23:41 vapier Exp $
-
-EAPI="3"
-
-inherit eutils
-
-DESCRIPTION="script for converting XML and DocBook formatted documents to a variety of output formats"
-HOMEPAGE="https://fedorahosted.org/xmlto/"
-SRC_URI="https://fedorahosted.org/releases/x/m/xmlto/${P}.tar.bz2
-	mirror://gentoo/${P}-mans.tar.bz2
-	http://dev.gentoo.org/~vapier/dist/${P}-mans.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="*"
-IUSE="latex"
-
-RDEPEND="app-shells/bash
-	|| ( sys-apps/which sys-freebsd/freebsd-ubin )
-	dev-libs/libxslt
-	>=app-text/docbook-xsl-stylesheets-1.62.0-r1
-	~app-text/docbook-xml-dtd-4.2
-	|| ( sys-apps/util-linux app-misc/getopt )
-	|| ( >=sys-apps/coreutils-6.10-r1 sys-freebsd/freebsd-ubin )
-	latex? ( >=app-text/passivetex-1.25 >=dev-tex/xmltex-1.9-r2 )"
-DEPEND="${RDEPEND}
-	sys-devel/flex"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-0.0.22-format_fo_passivetex_check.patch
-	epatch "${FILESDIR}"/${PN}-0.0.24-parallelmake.patch
-}
-
-src_configure() {
-	export BASH
-	has_version sys-apps/util-linux || export GETOPT="getopt-long"
-	econf
-}
-
-src_install() {
-	emake DESTDIR="${D}" install || die
-	dodoc AUTHORS ChangeLog FAQ NEWS README THANKS
-	insinto /usr/share/doc/${PF}/xml
-	doins doc/*.xml
-}
diff --git a/app-text/xmlto/xmlto-0.0.28-r6.ebuild b/app-text/xmlto/xmlto-0.0.28-r6.ebuild
new file mode 100644
index 0000000..bf9de2c
--- /dev/null
+++ b/app-text/xmlto/xmlto-0.0.28-r6.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Script for converting XML and DocBook documents to a variety of output formats"
+HOMEPAGE="https://pagure.io/xmlto"
+SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="*"
+IUSE="latex text"
+
+RDEPEND="
+	app-text/docbook-xsl-stylesheets
+	app-text/docbook-xml-dtd:4.2
+	dev-libs/libxslt
+	|| ( sys-apps/util-linux app-misc/getopt )
+	text? ( || ( virtual/w3m www-client/elinks www-client/links www-client/lynx ) )
+	latex? ( dev-texlive/texlive-formatsextra )
+"
+# We only depend on flex when we patch the input lexer.
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS )
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.0.22-format_fo_passivetex_check.patch
+	"${FILESDIR}"/${PN}-0.0.28-allow-links.patch
+)
+
+src_prepare() {
+	default
+
+	# fix symbol clash on Solaris
+	if [[ ${CHOST} == *-solaris* ]] ; then
+		sed -i -e 's/\(attrib\|val\)/XMLTO\1/g' xmlif/xmlif.l || die
+	fi
+
+	eautoreconf
+}
+
+src_configure() {
+	# We don't want the script to detect /bin/sh if it is bash.
+	export ac_cv_path_BASH="${BASH}"
+	has_version sys-apps/util-linux || export GETOPT=getopt-long
+
+	econf
+}