fixups
[portage-overlay.git] / dev-tex / mathtex / mathtex-1.05.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Tool to easily embed LaTeX math in html pages"
9 HOMEPAGE="http://www.forkosh.com/mathtex.html"
10
11 LICENSE="GPL-3"
12 SLOT="0"
13 IUSE="png"
14 SRC_URI="https://download.sumptuouscapital.com/gentoo/releases/${CATEGORY}/${PN}/${P}.zip"
15
16 KEYWORDS="~amd64 ~x86"
17
18 CDEPEND="virtual/latex-base
19         app-text/dvipng"
20
21 DEPEND="${CDEPEND}"
22 RDEPEND="${CDEPEND}"
23
24 S=${WORKDIR}
25
26 src_compile()
27 {
28         #This package ships as a single .c file, manual compile process needed
29         $(tc-getCC) mathtex.c \
30             -DLATEX=\"$(/usr/bin/which latex)\"   \
31             -DDVIPNG=\"$(/usr/bin/which dvipng)\"   \
32             -DCACHE=\"../${PN}_cache\" \
33             $(use png && echo "-DPNG") \
34             -o mathtex.cgi || die
35 }
36
37 src_install()
38 {
39         dodoc README
40         exeinto /usr/libexec/${PN}
41         doexe ${PN}.cgi
42 }
43
44 pkg_postinst()
45 {
46         elog "${PN}.cgi has been installed in /usr/libexec/${PN},"
47         elog "if you want to enable this for a webserver please create a symlink"\
48              " to your cgi-bin"
49 }