summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-09-04 13:40:24 +0200
committerMichał Górny <mgorny@gentoo.org>2019-09-11 19:57:32 +0200
commitffb5f0b94d7db3816984820506d0d3c3538324cb (patch)
tree045a3bf3ae138cb3146f2d78fd75df22aa60e3e3 /app-text
parentapp-text/xhtml1: Bump to EAPI 7, use sgml-catalog-r1 (diff)
downloadgentoo-ffb5f0b94d7db3816984820506d0d3c3538324cb.tar.gz
gentoo-ffb5f0b94d7db3816984820506d0d3c3538324cb.tar.bz2
gentoo-ffb5f0b94d7db3816984820506d0d3c3538324cb.zip
app-text/linuxdoc-tools: Bump to EAPI 7, use sgml-catalog-r1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild86
1 files changed, 86 insertions, 0 deletions
diff --git a/app-text/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild b/app-text/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild
new file mode 100644
index 000000000000..4f2129a2644a
--- /dev/null
+++ b/app-text/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools latex-package perl-functions sgml-catalog-r1 toolchain-funcs
+
+DESCRIPTION="A toolset for processing LinuxDoc DTD SGML files"
+HOMEPAGE="https://gitlab.com/agmartin/linuxdoc-tools"
+SRC_URI="https://gitlab.com/agmartin/linuxdoc-tools/-/archive/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3+ MIT SGMLUG"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="doc"
+
+RDEPEND="
+ || ( app-text/openjade app-text/opensp )
+ app-text/sgml-common
+ dev-lang/perl:=
+ sys-apps/groff
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/awk
+ doc? (
+ dev-texlive/texlive-fontsrecommended
+ virtual/latex-base
+ )
+"
+
+src_prepare() {
+ default_src_prepare
+ # Pregenerated configure scripts fail.
+ eautoreconf
+}
+
+src_configure() {
+ perl_set_version
+ tc-export CC
+ local myeconfargs=(
+ --disable-docs
+ --with-texdir="${TEXMF}/tex/latex/${PN}"
+ --with-perllibdir="${VENDOR_ARCH}"
+ --with-installed-iso-entities
+ )
+ use doc && myeconfargs+=(--enable-docs="txt pdf html")
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # Prevent access violations from bitmap font files generation.
+ use doc && export VARTEXFONTS="${T}/fonts"
+ default_src_compile
+}
+
+src_install() {
+ # Makefile ignores docdir configuration option.
+ emake DESTDIR="${D}" docdir="${EPREFIX}/usr/share/doc/${PF}" install
+ dodoc ChangeLog README
+
+ insinto /etc/sgml
+ newins - linuxdoc.cat <<-EOF
+ CATALOG "${EPREFIX}/usr/share/linuxdoc-tools/linuxdoc-tools.catalog"
+ EOF
+}
+
+pkg_preinst() {
+ # work around sgml-catalog.eclass removing it
+ cp "${ED}"/etc/sgml/linuxdoc.cat "${T}" || die
+}
+
+pkg_postinst() {
+ if [[ ! -f ${EROOT}/etc/sgml/linuxdoc.cat ]]; then
+ cp "${T}"/linuxdoc.cat "${EROOT}"/etc/sgml/ || die
+ fi
+
+ latex-package_pkg_postinst
+ sgml-catalog-r1_pkg_postinst
+}
+
+pkg_postrm() {
+ latex-package_pkg_postrm
+ sgml-catalog-r1_pkg_postrm
+}