blob: 6ad8bd8554a9db4bada9338b9eea02bcb97f2bd8 (
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
56
57
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-tex/hevea/hevea-1.10-r1.ebuild,v 1.1 2010/10/06 18:28:32 aballier Exp $
EAPI="2"
inherit eutils multilib
IUSE="+ocamlopt"
DESCRIPTION="HeVeA is a quite complete and fast LaTeX to HTML translator"
HOMEPAGE="http://pauillac.inria.fr/~maranget/hevea/"
SRC_URI="ftp://ftp.inria.fr/INRIA/moscova/hevea/${P}.tar.gz"
LICENSE="QPL"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
DEPEND=">=dev-lang/ocaml-3.10.2[ocamlopt?]"
RDEPEND="${DEPEND}"
src_compile() {
rm -f config.sh
emake PREFIX=/usr DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)/hevea" LATEXLIBDIR="/usr/share/texmf-site/tex/latex/hevea" config.sh || die "Failed to create config.sh"
if use ocamlopt; then
emake PREFIX=/usr || die "Failed to build native code binaries"
else
emake PREFIX=/usr TARGET=byte || die "Failed to build bytecode binaries"
fi
}
src_install() {
if use ocamlopt; then
emake DESTDIR="${D}" PREFIX=/usr install || die "Install failed"
else
emake DESTDIR="${D}" PREFIX=/usr TARGET=byte install || die "Install failed"
fi
dodoc README CHANGES
}
# If texmf-update is present this means we have a latex install; update it so
# that hevea.sty can be found
# Do not (r)depend on latex though because hevea does not need it itself
# If latex is installed later, it will see hevea.sty
pkg_postinst() {
if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
/usr/sbin/texmf-update
fi
}
pkg_postrm() {
if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
/usr/sbin/texmf-update
fi
}
|