summaryrefslogtreecommitdiff
blob: 845d93edb080c5ef1e13937eba21b36869cc5c24 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/ppl/ppl-0.10.2.ebuild,v 1.5 2009/06/07 14:19:46 armin76 Exp $

EAPI=2

inherit eutils

DESCRIPTION="The Parma Polyhedra Library provides numerical abstractions for analysis of complex systems"
HOMEPAGE="http://www.cs.unipr.it/ppl/"
SRC_URI="http://www.cs.unipr.it/ppl/Download/ftp/releases/${PV}/${P}.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="doc pch prolog test watchdog"

RDEPEND="prolog? ( dev-lang/swi-prolog[gmp] )
		>=dev-libs/gmp-4.1.3[-nocxx]"
DEPEND="${RDEPEND}
	sys-devel/m4"

pkg_setup() {
	if use test; then
		ewarn "The PPL testsuite will be run."
		ewarn "Note that this can take several hours to complete on a fast machine."
		epause 3
	fi
}

src_configure() {
	use prolog && want_prolog="swi_prolog"
	use test && want_check="--enable-check=quick"

	econf 												\
		--docdir=/usr/share/doc/${PF} 					\
		--disable-debugging 							\
		--disable-optimization 							\
		$(use_enable pch)                               \
		$(use_enable watchdog)							\
		--enable-interfaces="c cxx ${want_prolog}"		\
		${want_check}                                   \
		|| die "configure failed"
}

src_test() {
	# default src_test runs with -j1, overriding it here saves about
	# 30 minutes and recommended by upstream
	if emake -j1 check -n &> /dev/null; then
		emake check || die "tests failed"
	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "install failed"

	if ! use doc; then
		rm -r "${D}"/usr/share/doc/${PF}/ppl-user*-html
		rm -r "${D}"/usr/share/doc/${PF}/pwl-user*-html
	fi

	cd "${S}"
	dodoc NEWS README README.configure STANDARDS TODO
}