Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app-text/docbook-mathml-dtd: New ebuild for bug #349033. Thanks to Samue... #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions app-text/docbook-mathml-dtd/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ChangeLog for app-text/docbook-mathml-dtd
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $

16 Dec 2013; Klemens Baum (kbwt) <[email protected]>
docbook-mathml-dtd-1.1_rc1.ebuild:
Fix typo: ${MV_PV} -> ${MY_PV}

16 Dec 2013; Klemens Baum (kbwt) <[email protected]>
docbook-mathml-dtd-1.1_rc1.ebuild:
Remove unneeded '|| die' after sgml-catalog phase hooks

16 Dec 2013; Klemens Baum (kbwt) <[email protected]>
docbook-mathml-dtd-1.1_rc1.ebuild:
Upgrade to EAPI 5 and simplify ebuild

*docbook-mathml-dtd-1.1_rc1 (16 Dec 2013)

16 Dec 2013; Klemens Baum (kbwt) <[email protected]>
+docbook-mathml-dtd-1.1_rc1.ebuild, +metadata.xml:
New ebuild for bug #349033. Thanks to Samuel BAUER, mgorny and Dennis
Schridde.

4 changes: 4 additions & 0 deletions app-text/docbook-mathml-dtd/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DIST dbmathml.dtd 3525 SHA256 70da7140035621330f1b5ab6926197c3c3af467f2207d55a41f6396d9ad96abd SHA512 031ad81e0fd873d2ed0fb78a074cc2de93ea7c937d85aac6cb2dc3023e3ba494a9a20f485b5355ce9060aea9adae192c9259b59139ac71273ca3fb858a240704 WHIRLPOOL fff4da1abccf69ebf42963f31571da7ba173008410c08b78e0983d6ca81bb16c6bb0cc5081c472ca842223ba598be5e5f1520df7a59b6466836343af7a28e8a5
EBUILD docbook-mathml-dtd-1.1_rc1.ebuild 1699 SHA256 788ee01a09273911c2bac287d408e88aa06c550f9d5d555446a678d99ac83395 SHA512 4aaa470acee31adfc5ba888267da9dce8e1b597af1afd183d0a2a7c186a4fff0c2fcaed763071f56ea346c2f2158639fc3cbf16ce1beb03b8b64d37fb75ccafd WHIRLPOOL 4ca20b901210ac430b9d907785ebb434b6a0d8101100ba531c9fb1fb1400889832ce02a5855d523e7809e3db223497bd9e1230ee9efefc1466ef616c8110ff67
MISC ChangeLog 790 SHA256 c92e4743bab2ca4cf49c68abaebfc614372dceab578726f8b480ec7ba9d3d01d SHA512 62b0990903641a6f305968f36c2f39634f06fd98d60b402c74a06d6dacb0c0daf1740c1e591b3576ebfed6e29b2b8a6e41568b1b3ab5b677c78d6ce6c9aebb8d WHIRLPOOL a32a33f975fa992e44cca893f3b07fbc7d6434b1889eae1bf6ddb60a580f60f67130e9762ca4df0101763b0fa76ac55c5c79fa20c7ea949faef719a81e9a0c5c
MISC metadata.xml 214 SHA256 c1f09dc7d5313cd2da7b82259c7846ed23144d62b15e59680ada90e2b6b4d154 SHA512 aeb2fb354a9ddf41c45a071091a58b91eaf8b25d6d2c49e3e3daa547b591a54530144de4533573160b48dc356289c909612c4e3c80e387f081f88cb39263e130 WHIRLPOOL 54d8861daedd18ca38e4ada0fb71026c612b63946d47a9b34de90d1d6d85c8ce05c0a4b97730f554ea637d73ccce8ed207d33e707c2b8c1dd28af24cf44dd186
68 changes: 68 additions & 0 deletions app-text/docbook-mathml-dtd/docbook-mathml-dtd-1.1_rc1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit sgml-catalog

MY_PV=${PV/_beta/b}
MY_PV=${PV/_rc/CR}

DESCRIPTION="Docbook DTD for MathML"
HOMEPAGE="http://www.docbook.org/xml/mathml/"
SRC_URI="http://www.docbook.org/xml/mathml/${MY_PV}/dbmathml.dtd"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND="app-text/mathml-xml-dtd"
RDEPEND="dev-libs/libxml2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alphabetical order please

app-text/docbook-xml-dtd:4.3
>=app-text/build-docbook-catalog-1.6
${DEPEND}"

S=${WORKDIR}

sgml-catalog_cat_include "/etc/sgml/mathml-docbook-${PV}.cat" \
"/usr/share/sgml/docbook/${P#docbook-}/docbook.cat"

src_unpack() {
cp "${DISTDIR}"/${A} "${S}" || die
}

src_prepare() {
cat <<- EOF > docbook.cat || die
PUBLIC "-//OASIS//DTD DocBook MathML Module V${MY_PV}//EN" "dbmathml.dtd"
SYSTEM "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" "dbmathml.dtd"
EOF
}

src_install() {
insinto /usr/share/sgml/docbook/${P#docbook-}
doins *.cat *.dtd
}

pkg_postinst() {
build-docbook-catalog || die
sgml-catalog_pkg_postinst

xmlcatalog --noout \
--add public "-//OASIS//DTD DocBook MathML Module V${MY_PV}//EN" "file:///usr/share/sgml/docbook/${P#docbook-}/dbmathml.dtd" \
--add rewriteSystem "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1" "file:///usr/share/sgml/docbook/${P#docbook-}" \
"${EPREFIX}"/etc/xml/docbook \
|| die

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"|| die" in postinst is a weird thing to do, because the stuff is already installed and the process cannot really be aborted anymore. I'd even say behavior is more or less undefined if you die in pkg_post* phases.

}

pkg_postrm() {
build-docbook-catalog || die
sgml-catalog_pkg_postrm

xmlcatalog --noout \
--del "-//OASIS//DTD DocBook MathML Module V${MY_PV}//EN" \
--del "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" \
"${EPREFIX}"/etc/xml/docbook \
|| die
}
7 changes: 7 additions & 0 deletions app-text/docbook-mathml-dtd/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>[email protected]</email>
</maintainer>
</pkgmetadata>