1 |
commit: 958ac932b6781bf522d38745f6ce34b11333a2e9 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 4 09:12:46 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 11 17:57:31 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=958ac932 |
7 |
|
8 |
app-text/xhtml1: Bump to EAPI 7, use sgml-catalog-r1 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
app-text/xhtml1/xhtml1-20020801-r6.ebuild | 78 +++++++++++++++++++++++++++++++ |
13 |
1 file changed, 78 insertions(+) |
14 |
|
15 |
diff --git a/app-text/xhtml1/xhtml1-20020801-r6.ebuild b/app-text/xhtml1/xhtml1-20020801-r6.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..306fefc150c |
18 |
--- /dev/null |
19 |
+++ b/app-text/xhtml1/xhtml1-20020801-r6.ebuild |
20 |
@@ -0,0 +1,78 @@ |
21 |
+# Copyright 1999-2019 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=7 |
25 |
+inherit sgml-catalog-r1 |
26 |
+ |
27 |
+DESCRIPTION="DTDs for the eXtensible HyperText Markup Language 1.0" |
28 |
+HOMEPAGE="http://www.w3.org/TR/xhtml1/" |
29 |
+SRC_URI="mirror://gentoo/xhtml1.tgz -> ${P}.tgz" |
30 |
+ |
31 |
+LICENSE="W3C" |
32 |
+SLOT="0" |
33 |
+KEYWORDS="~amd64 ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" |
34 |
+IUSE="" |
35 |
+ |
36 |
+DEPEND="app-text/sgml-common |
37 |
+ dev-libs/libxml2" |
38 |
+ |
39 |
+PATCHES=( "${FILESDIR}"/${PN}-catalog.patch ) |
40 |
+ |
41 |
+xml_catalog_setup() { |
42 |
+ CATALOG="${EROOT}/etc/xml/catalog" |
43 |
+ XMLTOOL="${BROOT}/usr/bin/xmlcatalog" |
44 |
+ DTDDIR="${EROOT}/usr/share/sgml/${PN}" |
45 |
+ |
46 |
+ [[ -x ${XMLTOOL} ]] |
47 |
+} |
48 |
+ |
49 |
+src_install() { |
50 |
+ insinto /usr/share/sgml/${PN} |
51 |
+ doins DTD/xhtml.soc DTD/*.dcl DTD/*.dtd DTD/*.ent |
52 |
+ |
53 |
+ insinto /etc/sgml |
54 |
+ newins - xhtml1.cat <<-EOF |
55 |
+ CATALOG "${EPREFIX}/usr/share/sgml/xhtml1/xhtml.soc" |
56 |
+ EOF |
57 |
+ |
58 |
+ dodoc *.pdf *.ps |
59 |
+ docinto html |
60 |
+ dodoc *.html *.png *.css |
61 |
+} |
62 |
+ |
63 |
+pkg_preinst() { |
64 |
+ # work-around old revision removing it |
65 |
+ cp "${ED}"/etc/sgml/xhtml1.cat "${T}" || die |
66 |
+} |
67 |
+ |
68 |
+pkg_postinst() { |
69 |
+ if [[ ! -f ${EROOT}/etc/sgml/xhtml1.cat ]]; then |
70 |
+ cp "${T}"/xhtml1.cat "${EROOT}"/etc/sgml/ || die |
71 |
+ fi |
72 |
+ sgml-catalog-r1_pkg_postinst |
73 |
+ |
74 |
+ xml_catalog_setup || return |
75 |
+ einfo "Installing xhtml1 in the global XML catalog" |
76 |
+ "${XMLTOOL}" --noout --add 'public' '-//W3C//DTD XHTML 1.0 Strict//EN' \ |
77 |
+ "${DTDDIR}"/xhtml1-strict.dtd "${CATALOG}" |
78 |
+ "${XMLTOOL}" --noout --add 'public' '-//W3C//DTD XHTML 1.0 Transitional//EN' \ |
79 |
+ "${DTDDIR}"/xhtml1-transitional.dtd "${CATALOG}" |
80 |
+ "${XMLTOOL}" --noout --add 'public' '-//W3C//DTD XHTML 1.0 Frameset//EN' \ |
81 |
+ "${DTDDIR}"/xhtml1-frameset.dtd "${CATALOG}" |
82 |
+ "${XMLTOOL}" --noout --add 'rewriteSystem' 'http://www.w3.org/TR/xhtml1/DTD' \ |
83 |
+ "${DTDDIR}" "${CATALOG}" |
84 |
+ "${XMLTOOL}" --noout --add 'rewriteURI' 'http://www.w3.org/TR/xhtml1/DTD' \ |
85 |
+ "${DTDDIR}" "${CATALOG}" |
86 |
+} |
87 |
+ |
88 |
+pkg_postrm() { |
89 |
+ sgml-catalog-r1_pkg_postrm |
90 |
+ |
91 |
+ [[ -n ${REPLACED_BY_VERSION} ]] && return |
92 |
+ xml_catalog_setup || return |
93 |
+ einfo "Removing xhtml1 from the global XML catalog" |
94 |
+ "${XMLTOOL}" --noout --del '-//W3C//DTD XHTML 1.0 Strict//EN' "${CATALOG}" |
95 |
+ "${XMLTOOL}" --noout --del '-//W3C//DTD XHTML 1.0 Transitional//EN' "${CATALOG}" |
96 |
+ "${XMLTOOL}" --noout --del '-//W3C//DTD XHTML 1.0 Frameset//EN' "${CATALOG}" |
97 |
+ "${XMLTOOL}" --noout --del 'http://www.w3.org/TR/xhtml1/DTD' "${CATALOG}" |
98 |
+} |