dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / app-text / xhtml11 / xhtml11-20101123.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit sgml-catalog-r1
6
7 DESCRIPTION="DTDs for the eXtensible HyperText Markup Language 1.0"
8 HOMEPAGE="http://www.w3.org/TR/xhtml11/"
9 SRC_URI="http://www.w3.org/TR/xhtml11/xhtml11.tgz -> ${P}.tar.gz"
10
11 LICENSE="W3C"
12 SLOT="0"
13 KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
14 IUSE=""
15
16 DEPEND="app-text/sgml-common
17         dev-libs/libxml2"
18
19 xml_catalog_setup() {
20         CATALOG="${EROOT}/etc/xml/catalog"
21         XMLTOOL="${BROOT}/usr/bin/xmlcatalog"
22         DTDDIR="${EROOT}/usr/share/sgml/${PN}"
23
24         [[ -x ${XMLTOOL} ]]
25 }
26
27 src_install() {
28         insinto /usr/share/sgml/${PN}
29         doins DTD/*.{cat,dcl,dtd,mod}
30
31         insinto /etc/sgml
32         newins - xhtml11.cat <<-EOF
33                 CATALOG "${EPREFIX}/usr/share/sgml/xhtml11/xhtml11.cat"
34         EOF
35
36         dodoc *.pdf *.ps
37         docinto html
38         dodoc *.html *.gif *.css
39 }
40
41 pkg_postinst() {
42         sgml-catalog-r1_pkg_postinst
43
44         xml_catalog_setup || return
45         einfo "Installing xhtml11 in the global XML catalog"
46         "${XMLTOOL}" --noout --add 'public' '-//W3C//DTD XHTML 1.1//EN' \
47                 "${DTDDIR}"/xhtml11-flat.dtd "${CATALOG}"
48         "${XMLTOOL}" --noout --add 'rewriteSystem' 'http://www.w3.org/TR/xhtml11/DTD' \
49                 "${DTDDIR}" "${CATALOG}"
50         "${XMLTOOL}" --noout --add 'rewriteURI' 'http://www.w3.org/TR/xhtml11/DTD' \
51                 "${DTDDIR}" "${CATALOG}"
52 }
53
54 pkg_postrm() {
55         sgml-catalog-r1_pkg_postrm
56
57         [[ -n ${REPLACED_BY_VERSION} ]] && return
58         xml_catalog_setup || return
59         einfo "Removing xhtml1 from the global XML catalog"
60         "${XMLTOOL}" --noout --del '-//W3C//DTD XHTML 1.1//EN' "${CATALOG}"
61         "${XMLTOOL}" --noout --del 'http://www.w3.org/TR/xhtml11/DTD' "${CATALOG}"
62 }