summaryrefslogtreecommitdiff
blob: ec7b464557a862bfe21ec71d2cf9e29f44d56a93 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-sci/mathomatic/mathomatic-11.1c.ebuild,v 1.3 2004/06/24 22:09:56 agriffis Exp $

inherit eutils

DESCRIPTION="Mathomatic - Algebraic Manipulator"
HOMEPAGE="http://www.mathomatic.com/"
SRC_URI="http://www.panix.com/~gesslein/${P}.tgz"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="icc"

DEPEND="sys-libs/readline \
	sys-libs/ncurses \
	icc? ( dev-lang/icc )"

S=${WORKDIR}/am

src_compile() {
	epatch ${FILESDIR}/gentoo-${P}.diff || die "patching failed"
	if use icc; then
		CC="icc" CFLAGS="-O3 -axKWNBP -ipo" LDFLAGS="-O3 -axKWNBP -ipo -limf" emake || die "emake failed"
	else
		LDFLAGS="-lm" emake || die "emake failed"
	fi

	make test
}

src_install() {
	PREFIX=${D} MANDIR=${D}/usr/share/man einstall || die "einstall failed"
	dohtml am.htm manual.htm notes.htm
	newdoc changes.txt CHANGES
	newdoc lgpl.txt LGPL
	newdoc readme.txt README

	dodir /usr/share/doc/${PF}/examples
	insinto /usr/share/doc/${PF}/examples
	doins tests/*in
}