summaryrefslogtreecommitdiff
blob: 8c6982de2bb6d61a9490d5f8bca87600a081dd11 (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
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Michael Conrad Tilstra <tadpol@gentoo.org> <tadpol@tadpol.org>
# $Header: /var/cvsroot/gentoo-x86/app-text/latex2html/latex2html-2000.1b.ebuild,v 1.4 2002/04/27 09:22:19 seemant Exp $

#darn weird naming...
MY_P=${PN}-2K.1beta
S=${WORKDIR}/${MY_P}
DESCRIPTION="LATEX2HTML is a convertor written in Perl that converts LATEX documents to HTML."
SRC_URI="http://saftsack.fs.uni-bayreuth.de/~latex2ht/current/${MY_P}.tar.gz"
HOMEPAGE="http://www.latex2html.org"

DEPEND="virtual/glibc"

RDEPEND="sys-devel/perl
	app-text/ghostscript
	media-libs/netpbm
	app-text/tetex
	"

src_compile() {
	econf || die
	make || die
	make check || die
#	make test || die
}

src_install () {
	# modify cfgcache.pm
	[ -f cfgcache.pm.backup ] && mv cfgcache.pm.backup cfgcache.pm
	cat cfgcache.pm | sed \
		-e "/BINDIR/s:/usr/bin:${D}usr/bin:" \
		-e "/LIBDIR/s:/usr/lib:${D}usr/lib:" \
		-e "/TEXPATH/s:/usr/share:${D}usr/share:" \
		-e '/MKTEXLSR/s:/usr/bin/mktexlsr::' > cfgcache.NEW
	mv cfgcache.pm cfgcache.pm.backup
	mv cfgcache.NEW cfgcache.pm
	
	dodir /usr/bin /usr/lib/latex2html /usr/share/texmf/tex/latex/html
	make install || die

	cp cfgcache.pm.backup ${D}/usr/lib/latex2html/cfgcache.pm
	#Install docs
	dodoc BUGS Changes FAQ INSTALL LICENSE MANIFEST README TODO
}

pkg_postinst() {
	einfo "Running mktexlsr to rebuild ls-R database...."
	mktexlsr
}


# vim: ai et sw=4 ts=4