summaryrefslogtreecommitdiff
blob: 5f8a7b58501ce597b768295a2a817c76d62641cb (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-tex/tipa/tipa-1.3.ebuild,v 1.2 2006/03/13 20:20:36 ehmsen Exp $

DESCRIPTION="International Phonetic Alphabet package for LaTeX"
HOMEPAGE="http://www.l.u-tokyo.ac.jp/~fkr/"
SRC_URI="http://www.l.u-tokyo.ac.jp/~fkr/tipa/${P}.tar.gz"

LICENSE="LPPL-1.2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

IUSE=""

DEPEND="virtual/tetex"

src_compile() {
	# install files under /usr/share/texmf/
	sed -e 's@PREFIX=/usr/local/teTeX/share/texmf@PREFIX=/usr/share/texmf@' \
		-i Makefile || die "sed failed"

	sed -e 's/\($(TEXDIR)\)/$(DESTDIR)\/\1/' \
		-e 's/\($(FONTDIR)\)/$(DESTDIR)\/\1/g' \
		-e 's/\($(MAPDIR)\)/$(DESTDIR)\/\1/' \
		-i Makefile || die "sed failed"

	# removing `mktexlsr` from Makefile (leads to access violation)
	sed -e 's/-mktexlsr//' -i Makefile || die "sed failed"
}

src_install() {
	make DESTDIR=${D} install || die "make install failed."
	dodoc doc/*.{tex,sty,bib,bbl} || die "dodoc failed."

	einfo "A huge documentation can be found in '/usr/share/doc/${P}'."
}

pkg_postinst() {
	einfo "Running mktexlsr..."
	mktexlsr || die "mktexlsr failed"

	einfo
	einfo "Append the line"
	einfo "p +tipa.map"
	einfo "to /usr/share/texmf/dvips/config/config.ps"
	einfo
}

pkg_postrm() {
	einfo "Running mktexlsr..."
	mktexlsr || die "mktexlsr failed"
}