aboutsummaryrefslogtreecommitdiff
blob: ecc5b22e6bdf02621f27161fb643fcb6b485d366 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils autotools
DESCRIPTION="factory is a C++ library for representing multivariate polynomials"

HOMEPAGE="http://www.mathematik.uni-kl.de/pub/Math/Singular/Factory"

SRC_URI="ftp://www.mathematik.uni-kl.de/pub/Math/Singular/Factory/factory-3-1-0.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

IUSE="singular"

DEPEND="dev-libs/gmp
		>=dev-libs/ntl-5.4.1"

RDEPEND="${DEPEND}"

S="${WORKDIR}/factory"

src_unpack() {
	unpack "${A}"
	cd "${S}"
	epatch "${FILESDIR}"/patch-3.1.0b || die "patching failed"
	eautoreconf
}

src_compile() {
	cd "${S}"

	econf --prefix="${D}/usr" \
		$(use_with singular Singular) ||  die "econf failed"

	# Not doing this explicitly might trigger a race condition
	emake factoryconf.h || die "make failed"
	emake all || die "make failed"
}

src_install() {
	cd "${S}"
	# Another race condition when creating dirs with -j3
	emake -j1 install || die "Install failed"
}