summaryrefslogtreecommitdiff
blob: 33d105256c916a4a4735b8f961c75efdcb10c82e (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-libs/gerris/gerris-20080929.ebuild,v 1.3 2010/05/21 14:12:22 jlec Exp $

inherit autotools

DESCRIPTION="The Gerris Flow Solver"
LICENSE="GPL-2"
HOMEPAGE="http://gfs.sourceforge.net/"
SRC_URI="mirror://sourceforge/gfs/${P}.tar.gz"

SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="mpi dx"

RDEPEND=">=dev-libs/glib-2.4.0
		>=sci-libs/gts-20081607
		sys-apps/gawk
		dev-lang/python
		mpi? ( virtual/mpi )
		dx? ( sci-visualization/opendx )"
DEPEND="${RDEPEND}
		sys-devel/libtool"

RESTRICT="test"

S="${WORKDIR}"/${PN}-snapshot-080929

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-as-needed.patch
	eautoreconf
}

src_compile() {
	econf $(use_enable mpi ) \
		$(use_enable dx) \
		|| die "configure failed"

	emake -j1 || die "make failed"
}

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

	dodoc AUTHORS ChangeLog NEWS README THANKS TODO

	insinto /usr/share/doc/${P}/examples
	rm -f doc/examples/*.pyc || die "Failed to remove python object"
	doins -r doc/examples/*
}