mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 06:56:58 +02:00
xmlto: import from upstream Gentoo
No local changes made. BUG=chromium-os:19382 TEST=emerged it, review log for recursive calls, and checked its output with xmlto mans Change-Id: I110b9d92ec34bdaaf18b31c05f797e979ea5ff18 Reviewed-on: http://gerrit.chromium.org/gerrit/6409 Reviewed-by: Anush Elangovan <anush@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
6062a543e2
commit
889d690d1c
@ -0,0 +1,46 @@
|
|||||||
|
- Check for a passivetex format file and tell the user, if it's missing.
|
||||||
|
- Modified to use texmf-site directory by ssuominen at gentoo.org.
|
||||||
|
- http://bugs.debian.org/190840
|
||||||
|
|
||||||
|
diff -ur xmlto-0.0.22.orig/format/fo/dvi xmlto-0.0.22/format/fo/dvi
|
||||||
|
--- xmlto-0.0.22.orig/format/fo/dvi 2009-03-20 10:28:02.000000000 +0200
|
||||||
|
+++ xmlto-0.0.22/format/fo/dvi 2009-05-22 15:20:33.000000000 +0300
|
||||||
|
@@ -11,6 +11,10 @@
|
||||||
|
echo >&2 "Can't process, xmltex tool not found at $XMLTEX_PATH."
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
+ if [ ! -f /usr/share/texmf-site/tex/xmltex/passivetex/fotex.xmt ]; then
|
||||||
|
+ printf "PassiveTeX is needed for this format, but it is not installed. Please install\nthe passivetex package.\n"
|
||||||
|
+ exit 1
|
||||||
|
+ fi
|
||||||
|
# Work around stupid tetex bug with '_' in filenames
|
||||||
|
# Also work around stupid tetex limitation with long lines (bug #101055)
|
||||||
|
sed -e "s,/>,\n/>,g" "$XSLT_PROCESSED" >tmp.fo
|
||||||
|
diff -ur xmlto-0.0.22.orig/format/fo/pdf xmlto-0.0.22/format/fo/pdf
|
||||||
|
--- xmlto-0.0.22.orig/format/fo/pdf 2009-03-20 10:28:33.000000000 +0200
|
||||||
|
+++ xmlto-0.0.22/format/fo/pdf 2009-05-22 15:20:33.000000000 +0300
|
||||||
|
@@ -13,6 +13,10 @@
|
||||||
|
echo >&2 "Can't process, pdfxmltex tool not found at $PDFXMLTEX_PATH."
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
+ if [ ! -f /usr/share/texmf-site/tex/xmltex/passivetex/fotex.xmt ]; then
|
||||||
|
+ printf "PassiveTeX is needed for this format, but it is not installed. Please install\nthe passivetex package.\n"
|
||||||
|
+ exit 1
|
||||||
|
+ fi
|
||||||
|
# Work around stupid tetex bug with '_' in filenames
|
||||||
|
# Also work around stupid tetex limitation with long lines (bug #101055)
|
||||||
|
sed -e "s,/>,\n/>,g" "$XSLT_PROCESSED" >tmp.fo
|
||||||
|
diff -ur xmlto-0.0.22.orig/format/fo/ps xmlto-0.0.22/format/fo/ps
|
||||||
|
--- xmlto-0.0.22.orig/format/fo/ps 2009-03-17 18:39:52.000000000 +0200
|
||||||
|
+++ xmlto-0.0.22/format/fo/ps 2009-05-22 15:20:33.000000000 +0300
|
||||||
|
@@ -8,6 +8,10 @@
|
||||||
|
then
|
||||||
|
echo >&2 "Post-process XSL-FO to DVI"
|
||||||
|
fi
|
||||||
|
+ if [ ! -f /usr/share/texmf-site/tex/xmltex/passivetex/fotex.xmt ]; then
|
||||||
|
+ printf "PassiveTeX is needed for this format, but it is not installed. Please install\nthe passivetex package.\n"
|
||||||
|
+ exit 1
|
||||||
|
+ fi
|
||||||
|
# Work around stupid tetex bug with '_' in filenames
|
||||||
|
# Also work around stupid tetex limitation with long lines (bug #101055)
|
||||||
|
sed -e "s,/>,\n/>,g" "$XSLT_PROCESSED" >tmp.fo
|
@ -0,0 +1,56 @@
|
|||||||
|
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
|
||||||
|
|
47
sdk_container/src/third_party/portage-stable/app-text/xmlto/xmlto-0.0.24-r1.ebuild
vendored
Normal file
47
sdk_container/src/third_party/portage-stable/app-text/xmlto/xmlto-0.0.24-r1.ebuild
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# 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="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
|
||||||
|
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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user