| 1 |
# Copyright 1999-2011 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-text/mathtex/mathtex-1.04.ebuild,v 1.2 2011/08/07 10:41:02 hwoarang Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
|
| 7 |
inherit toolchain-funcs |
| 8 |
|
| 9 |
DESCRIPTION="MathTeX lets you easily embed LaTeX math in your own html pages, blogs, wikis, etc" |
| 10 |
HOMEPAGE="http://www.forkosh.com/mathtex.html" |
| 11 |
SRC_URI="mirror://gentoo/${P}.zip" |
| 12 |
|
| 13 |
LICENSE="GPL-3" |
| 14 |
SLOT="0" |
| 15 |
KEYWORDS="amd64 x86" |
| 16 |
IUSE="png" |
| 17 |
|
| 18 |
RDEPEND="app-text/dvipng |
| 19 |
virtual/latex-base" |
| 20 |
DEPEND="" |
| 21 |
|
| 22 |
S=${WORKDIR} |
| 23 |
|
| 24 |
einfo_run_command() { |
| 25 |
einfo "${@}" |
| 26 |
${@} || die |
| 27 |
} |
| 28 |
|
| 29 |
src_compile() { |
| 30 |
einfo_run_command $(tc-getCC) \ |
| 31 |
${CFLAGS} ${LDFLAGS} \ |
| 32 |
-DLATEX=\"/usr/bin/latex\" \ |
| 33 |
-DDVIPNG=\"/usr/bin/dvipng\" \ |
| 34 |
$(use png && echo "-DPNG") \ |
| 35 |
mathtex.c -o mathtex |
| 36 |
} |
| 37 |
|
| 38 |
src_install() { |
| 39 |
dobin mathtex |
| 40 |
dodoc README |
| 41 |
dohtml mathtex.html |
| 42 |
} |
| 43 |
|
| 44 |
pkg_postinst() { |
| 45 |
elog "To use mathtex in your web-pages, just link /usr/bin/mathtex" |
| 46 |
elog "to your cgi-bin subdirectory!" |
| 47 |
} |