1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit sgml-catalog-r1
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"
13 KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
16 DEPEND="app-text/sgml-common
20 CATALOG="${EROOT}/etc/xml/catalog"
21 XMLTOOL="${BROOT}/usr/bin/xmlcatalog"
22 DTDDIR="${EROOT}/usr/share/sgml/${PN}"
28 insinto /usr/share/sgml/${PN}
29 doins DTD/*.{cat,dcl,dtd,mod}
32 newins - xhtml11.cat <<-EOF
33 CATALOG "${EPREFIX}/usr/share/sgml/xhtml11/xhtml11.cat"
38 dodoc *.html *.gif *.css
42 sgml-catalog-r1_pkg_postinst
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}"
55 sgml-catalog-r1_pkg_postrm
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}"