diff options
Diffstat (limited to 'app-text/docbook-xsl-ns-stylesheets')
3 files changed, 96 insertions, 0 deletions
diff --git a/app-text/docbook-xsl-ns-stylesheets/Manifest b/app-text/docbook-xsl-ns-stylesheets/Manifest new file mode 100644 index 000000000000..ff19dbf96ad9 --- /dev/null +++ b/app-text/docbook-xsl-ns-stylesheets/Manifest @@ -0,0 +1,3 @@ +DIST docbook-xsl-ns-1.78.0.tar.bz2 4992293 BLAKE2B 3bc93ca1dc45756121a4a3838093539957bba4ddffbbd7d27c5df6c63422a8694ea7d805cc9585ab1ce2d9092e35b91cd3bde97ee2fabb91c8c870eefa8ded1d SHA512 f3b9b52a4ba5670c17086cdf64674080ef82a9226f085887c23c53d2d102611d690895c71d14186cd84a25c7735b05d6c55207f4b2b9084d65889aaac7993cf3 +EBUILD docbook-xsl-ns-stylesheets-1.78.0.ebuild 1648 BLAKE2B caed04c4c7d135bb4e50c29c357bb7d5e87fb471ca050652cd0a8f58f807bc820e991835f6cc8dadcaa66a8598558e75265ee7a25e7d4105b1e8339a2d077921 SHA512 8ad0e0d62480762974c747edd80212a152c53a839309e6e6ec5fbd02487c8c9d1a823e8e3a59ddb37b74b14c745aa73a602c3bbc0820fd5e0bcc3e614bea6972 +MISC metadata.xml 385 BLAKE2B 048351fc482c44ecc4528ba7c66f61c2103594eb0ad75559aa4174cfba98c17e9f0355456aae62429b1eaf2f92b0f17067ddcf325e331023f57e642f917f3036 SHA512 779b06691df7d5e473f854558344f4c44b1af292f107e9208c5cd501108399451da4e4210feff60088f1ae8009665569b6f96794f36930938f13c5cb65005af4 diff --git a/app-text/docbook-xsl-ns-stylesheets/docbook-xsl-ns-stylesheets-1.78.0.ebuild b/app-text/docbook-xsl-ns-stylesheets/docbook-xsl-ns-stylesheets-1.78.0.ebuild new file mode 100644 index 000000000000..a50b149c8f9c --- /dev/null +++ b/app-text/docbook-xsl-ns-stylesheets/docbook-xsl-ns-stylesheets-1.78.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DOCBOOKDIR="/usr/share/sgml/${PN/-//}" +MY_PN="${PN%-stylesheets}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="XSL Stylesheets for Docbook" +HOMEPAGE="https://github.com/docbook/wiki/wiki" +SRC_URI="mirror://sourceforge/docbook/${MY_P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +IUSE="ruby" + +RDEPEND=">=app-text/build-docbook-catalog-1.4 + ruby? ( dev-lang/ruby )" +DEPEND="" + +S="${WORKDIR}/${MY_P}" + +# Makefile is broken since 1.76.0 +RESTRICT=test + +# The makefile runs tests, not builds. +src_compile() { :; } + +src_test() { + emake check +} + +src_install() { + # The changelog is now zipped, and copied as the RELEASE-NOTES, so we + # don't need to install it + dodoc AUTHORS BUGS NEWS README RELEASE-NOTES.txt TODO + + insinto ${DOCBOOKDIR} + doins VERSION VERSION.xsl + + local i + for i in $(find . -maxdepth 1 -mindepth 1 -type d -exec basename {} \;); do + [[ "$i" == "epub" ]] && ! use ruby && continue + + cd "${S}"/${i} + for doc in ChangeLog README; do + if [ -e "$doc" ]; then + mv ${doc} ${doc}.${i} + dodoc ${doc}.${i} + rm ${doc}.${i} + fi + done + + doins -r "${S}"/${i} + done + + if use ruby; then + local cmd="dbtoepub${MY_PN#docbook-xsl}" + + # we can't use a symlink or it'll look for the library in the + # wrong path. + dodir /usr/bin + cat - > "${D}"/usr/bin/${cmd} <<EOF +#!/usr/bin/env ruby + +load "${DOCBOOKDIR}/epub/bin/dbtoepub" +EOF + fperms 0755 /usr/bin/${cmd} + fi +} + +pkg_postinst() { + build-docbook-catalog +} + +pkg_postrm() { + build-docbook-catalog +} diff --git a/app-text/docbook-xsl-ns-stylesheets/metadata.xml b/app-text/docbook-xsl-ns-stylesheets/metadata.xml new file mode 100644 index 000000000000..11db2d7f5b6c --- /dev/null +++ b/app-text/docbook-xsl-ns-stylesheets/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name="ruby"> + Install the Ruby-based dbtoepub script; requires an interpreter + compatible with <pkg>app-eselect/eselect-ruby</pkg>. + </flag> + </use> + <upstream> + <remote-id type="sourceforge">docbook</remote-id> + </upstream> +</pkgmetadata> |