aboutsummaryrefslogtreecommitdiff
blob: a2e40b09d5a42bdc8b1a2cff65b036b68af963c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit latex-package

DESCRIPTION="LaTeX package for line breaking of equations."
HOMEPAGE="http://www.ctan.org/tex-archive/macros/latex/contrib/mh/"
SRC_URI="http://www.ctan.org/get/macros/latex/contrib/mh/breqn.dtx
	http://www.ctan.org/get/macros/latex/contrib/mh/flexisym.dtx
	http://www.ctan.org/get/macros/latex/contrib/mh/mathstyle.dtx
	http://www.ctan.org/get/macros/latex/contrib/mh/breqn-technotes.tex"
LICENSE="LPPL-1.3"
SLOT="0"
IUSE="doc"
KEYWORDS="~x86"

src_unpack() {
	mkdir "${S}"
	cd "${DISTDIR}"
	cp breqn.dtx flexisym.dtx mathstyle.dtx breqn-technotes.tex "${S}"
}

src_compile() {
	# Unpacking *.dtx
	for i in *.dtx; do
		tex $i
	done

	if use doc; then
		# To avoid sandbox violations
		export VARTEXFONTS="${T}/fonts"

		for i in mathstyle flexisym breqn; do
			pdflatex $i.drv
			makeindex -s gind.ist $i.idx
			pdflatex $i.drv
			makeindex -s gind.ist $i.idx
			pdflatex $i.drv
		done

		pdflatex breqn-technotes
		pdflatex breqn-technotes
	fi
}

src_install() {
	insinto "${TEXMF}"/tex/latex/mh
	doins *.sty *.sym

	if use doc; then
		insinto /usr/share/doc/${P}
		doins *.pdf
	fi
}