Skip to content

Commit 9ba0af2

Browse files
committed
app-text/docbook-xsl-ns-stylesheets: Add from Gentoo
It's from Gentoo commit 0ad96e879b651cc7e8214159d5841d6b633bef8a. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
1 parent 009df56 commit 9ba0af2

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DIST docbook-xsl-ns-1.79.1.tar.bz2 21962317 BLAKE2B a68cc31ea8cb98fc07e198fe55f242c6438284d6fa75d4920a9ca7b5038732f966cc6653e058d7fafb26c0ff49f2039025a48a0f8c0392ee892951723703bce3 SHA512 23fd06870bd5afe4efcd08c8ad679821c202a62442b50657c093cbe9cd71b585a3c56a5534a0d41119f58bf98b1f9014a53ff2e48ab59075ec1827e7363980e9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Copyright 1999-2025 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=7
5+
6+
DOCBOOKDIR="/usr/share/sgml/${PN/-//}"
7+
MY_PN="${PN%-stylesheets}"
8+
MY_P="${MY_PN}-${PV}"
9+
10+
DESCRIPTION="XSL Stylesheets for Docbook"
11+
HOMEPAGE="https://github.com/docbook/wiki/wiki"
12+
SRC_URI="https://downloads.sourceforge.net/docbook/${MY_P}.tar.bz2"
13+
14+
LICENSE="BSD"
15+
SLOT="0"
16+
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
17+
IUSE="ruby"
18+
19+
RDEPEND=">=app-text/build-docbook-catalog-1.4
20+
ruby? ( dev-lang/ruby )"
21+
DEPEND=""
22+
23+
S="${WORKDIR}/${MY_P}"
24+
25+
# Makefile is broken since 1.76.0
26+
RESTRICT=test
27+
28+
# The makefile runs tests, not builds.
29+
src_compile() { :; }
30+
31+
src_test() {
32+
emake check
33+
}
34+
35+
src_install() {
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
39+
40+
insinto ${DOCBOOKDIR}
41+
doins VERSION VERSION.xsl
42+
43+
local i
44+
for i in $(find . -maxdepth 1 -mindepth 1 -type d -exec basename {} \;); do
45+
[[ "${i}" == "epub" ]] && ! use ruby && continue
46+
47+
cd "${S}"/${i}
48+
for doc in ChangeLog README; do
49+
if [[ -e "${doc}" ]] ; then
50+
mv ${doc} ${doc}.${i} || die
51+
dodoc ${doc}.${i}
52+
rm ${doc}.${i} || die
53+
fi
54+
done
55+
56+
doins -r "${S}"/${i}
57+
done
58+
59+
if use ruby; then
60+
local cmd="dbtoepub${MY_PN#docbook-xsl}"
61+
62+
# we can't use a symlink or it'll look for the library in the
63+
# wrong path.
64+
dodir /usr/bin
65+
cat - > "${ED}"/usr/bin/${cmd} <<EOF
66+
#!/usr/bin/env ruby
67+
68+
load "${DOCBOOKDIR}/epub/bin/dbtoepub"
69+
EOF
70+
fperms 0755 /usr/bin/${cmd}
71+
fi
72+
}
73+
74+
pkg_postinst() {
75+
# See bug #816303 for rationale behind die
76+
build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?"
77+
}
78+
79+
pkg_postrm() {
80+
# See bug #816303 for rationale behind die
81+
build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?"
82+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
3+
<pkgmetadata>
4+
<!--maintainer-needed-->
5+
<use>
6+
<flag name="ruby">
7+
Install the Ruby-based dbtoepub script; requires an interpreter
8+
compatible with <pkg>app-eselect/eselect-ruby</pkg>.
9+
</flag>
10+
</use>
11+
<stabilize-allarches/>
12+
<upstream>
13+
<remote-id type="sourceforge">docbook</remote-id>
14+
<remote-id type="github">docbook/wiki</remote-id>
15+
</upstream>
16+
</pkgmetadata>

0 commit comments

Comments
 (0)