1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DOCBOOKDIR="/usr/share/sgml/${PN/-//}"
7 MY_PN="${PN%-stylesheets}"
10 DESCRIPTION="XSL Stylesheets for Docbook"
11 HOMEPAGE="https://github.com/docbook/wiki/wiki"
12 SRC_URI="mirror://sourceforge/docbook/${MY_P}.tar.bz2"
16 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
19 RDEPEND=">=app-text/build-docbook-catalog-1.4
20 ruby? ( dev-lang/ruby )"
23 S="${WORKDIR}/${MY_P}"
25 # Makefile is broken since 1.76.0
28 # The makefile runs tests, not builds.
36 # The changelog is now zipped, and copied as the RELEASE-NOTES, so we
37 # don't need to install it
38 dodoc AUTHORS BUGS NEWS README RELEASE-NOTES.txt TODO
41 doins VERSION VERSION.xsl
44 for i in $(find . -maxdepth 1 -mindepth 1 -type d -exec basename {} \;); do
45 [[ "$i" == "epub" ]] && ! use ruby && continue
48 for doc in ChangeLog README; do
49 if [ -e "$doc" ]; then
60 local cmd="dbtoepub${MY_PN#docbook-xsl}"
62 # we can't use a symlink or it'll look for the library in the
65 cat - > "${D}"/usr/bin/${cmd} <<EOF
68 load "${DOCBOOKDIR}/epub/bin/dbtoepub"
70 fperms 0755 /usr/bin/${cmd}