1 |
commit: ce7cdb0b9e2e4fd962ba58ffdd2515949e4f9686 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 4 11:58:45 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 11 17:57:34 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce7cdb0b |
7 |
|
8 |
app-text/sgmltools-lite: Bump to EAPI 7, use sgml-catalog-r1 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
.../sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild | 99 ++++++++++++++++++++++ |
13 |
1 file changed, 99 insertions(+) |
14 |
|
15 |
diff --git a/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild b/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..b8d8da45abc |
18 |
--- /dev/null |
19 |
+++ b/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild |
20 |
@@ -0,0 +1,99 @@ |
21 |
+# Copyright 1999-2019 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=7 |
25 |
+ |
26 |
+PYTHON_COMPAT=( python2_7 ) |
27 |
+ |
28 |
+inherit python-single-r1 sgml-catalog-r1 |
29 |
+ |
30 |
+DESCRIPTION="Python interface to SGML software in a DocBook/OpenJade env" |
31 |
+HOMEPAGE="http://sgmltools-lite.sourceforge.net/" |
32 |
+SRC_URI=" |
33 |
+ https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${P}.tar.gz |
34 |
+ https://downloads.sourceforge.net/project/${PN}/support%20files/0.0.1-1/nw-eps-icons-0.0.1.tar.gz" |
35 |
+ |
36 |
+LICENSE="GPL-2" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
39 |
+IUSE="jadetex" |
40 |
+ |
41 |
+RDEPEND="${PYTHON_DEPS} |
42 |
+ app-text/sgml-common |
43 |
+ app-text/docbook-sgml-dtd:3.1 |
44 |
+ app-text/docbook-dsssl-stylesheets |
45 |
+ app-text/openjade |
46 |
+ jadetex? ( app-text/jadetex ) |
47 |
+ || ( |
48 |
+ www-client/w3m |
49 |
+ www-client/lynx |
50 |
+ )" |
51 |
+DEPEND=${RDEPEND} |
52 |
+ |
53 |
+REQUIRED_USE=${PYTHON_REQUIRED_USE} |
54 |
+ |
55 |
+src_configure() { |
56 |
+ econf \ |
57 |
+ --datadir='${prefix}/share' \ |
58 |
+ --mandir='${prefix}/share/man' |
59 |
+} |
60 |
+ |
61 |
+src_install() { |
62 |
+ # yes, it does not respect DESTDIR |
63 |
+ emake install \ |
64 |
+ prefix="${ED}/usr" \ |
65 |
+ etcdir="${ED}/etc/sgml" |
66 |
+ |
67 |
+ dodoc ChangeLog POSTINSTALL README* |
68 |
+ |
69 |
+ insinto /usr/share/sgml/docbook/dsssl-stylesheets/ |
70 |
+ doins -r "${WORKDIR}"/nw-eps-icons-0.0.1/images |
71 |
+ |
72 |
+ rm "${ED}"/etc/sgml/catalog.{suse,rh62} || die |
73 |
+ |
74 |
+ # Remove file provided by sgml-common |
75 |
+ rm "${ED}"/usr/bin/sgmlwhich || die |
76 |
+ |
77 |
+ # List of backends to alias with sgml2* |
78 |
+ # Do not provide sgml2{txt,rtf,html} anymore, they are part of |
79 |
+ # linuxdoc-tools |
80 |
+ local backends=() |
81 |
+ if use jadetex; then |
82 |
+ backends+=(ps dvi pdf) |
83 |
+ else |
84 |
+ # Remove the backends that require jadetex |
85 |
+ rm "${ED}"/usr/share/sgml/misc/sgmltools/python/backends/{Dvi,Ps,Pdf,JadeTeX}.py || die |
86 |
+ fi |
87 |
+ |
88 |
+ # Create simple alias scripts that people are used to |
89 |
+ # And make the manpages for those link to the sgmltools-lite manpage |
90 |
+ local b |
91 |
+ for b in "${backends[@]}"; do |
92 |
+ newbin - "sgml2${b}" <<-EOF |
93 |
+ #!/bin/sh |
94 |
+ exec sgmltools --backend=${b} "\${@}" |
95 |
+ EOF |
96 |
+ |
97 |
+ dosym sgmltools-lite.1 "/usr/share/man/man1/sgml2${b}.1" |
98 |
+ done |
99 |
+ |
100 |
+ insinto /etc/sgml |
101 |
+ newins - sgml-lite.cat <<-EOF |
102 |
+ CATALOG "${EPREFIX}/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat" |
103 |
+ EOF |
104 |
+ |
105 |
+ python_fix_shebang "${D}" |
106 |
+ python_optimize "${ED}/usr/share/sgml/misc/sgmltools/python" |
107 |
+} |
108 |
+ |
109 |
+pkg_preinst() { |
110 |
+ # work-around old revision removing it |
111 |
+ cp "${ED}"/etc/sgml/sgml-lite.cat "${T}" || die |
112 |
+} |
113 |
+ |
114 |
+pkg_postinst() { |
115 |
+ if [[ ! -f ${EROOT}/etc/sgml/sgml-lite.cat ]]; then |
116 |
+ cp "${T}"/sgml-lite.cat "${EROOT}"/etc/sgml/ || die |
117 |
+ fi |
118 |
+ sgml-catalog-r1_pkg_postinst |
119 |
+} |