summaryrefslogtreecommitdiff
blob: 035581619694211a720406666560436949bbff65 (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/frobby/frobby-0.8.2-r1.ebuild,v 1.7 2011/11/14 11:26:47 flameeyes Exp $

EAPI=2

inherit eutils

DESCRIPTION="Frobby is a software system and project for computations with monomial ideals"
HOMEPAGE="http://www.broune.com/frobby/"
SRC_URI="http://www.broune.com/frobby/frobby_v${PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="doc"

RDEPEND="dev-libs/gmp[cxx]"
DEPEND="${RDEPEND}
	doc? ( virtual/latex-base )"

S="${WORKDIR}/frobby_v${PV}"

src_prepare() {
	epatch "${FILESDIR}/${PN}-latex.patch"
	epatch "${FILESDIR}/${PN}-useless-checks.patch"
	epatch "${FILESDIR}/${PN}-cflags-no-strip.patch"
}

src_compile() {
	emake || die "compile failed"
	emake library || die "making libfrobby failed"
	if use doc; then
		# latex loops don't parallelize well
		emake -j1 doc || die "failed creating documentation"
	fi
}

src_install() {
	dobin bin/frobby || die
	dolib.a bin/libfrobby.a || die
	insinto /usr/include
	doins src/frobby.h || die
	dodir /usr/include/"${PN}" || die
	insinto /usr/include/"${PN}"
	doins src/stdinc.h || die
	if use doc; then
		dodoc bin/manual.pdf || die
	fi
}