summaryrefslogtreecommitdiff
blob: 6b1b9ae7dafb0bd7330de04450f41207c0f2616f (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-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-libs/gerris/gerris-20100519.ebuild,v 1.3 2012/05/04 08:22:51 jdhore Exp $

EAPI=2

inherit autotools eutils

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="examples mpi"

RDEPEND="dev-libs/glib:2
	sci-libs/netcdf
	sci-libs/gsl
	sci-libs/gts
	sci-libs/proj
	mpi? ( virtual/mpi )"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

# test assume it is installed
RESTRICT="test"

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

src_prepare() {
	epatch "${FILESDIR}"/${P}-autotools.patch
	eautoreconf
}

src_configure() {
	econf $(use_enable mpi)
}

src_install() {
	emake DESTDIR="${D}" install || die "emake nstall failed"
	dodoc AUTHORS ChangeLog NEWS README THANKS TODO

	if use examples; then
		insinto /usr/share/doc/${PF}/examples
		rm -f doc/examples/*.pyc || die "Failed to remove python object"
		doins -r doc/examples/* || die
	fi
}