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

EAPI="2"

inherit autotools mercurial

DESCRIPTION="Votca tools library"
HOMEPAGE="http://www.votca.org"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="-boost doc"

RDEPEND="sci-libs/fftw:3.0
	dev-libs/expat
	sci-libs/gsl
	boost? ( >=dev-libs/boost-1.33.1 )
	doc? ( >=app-text/txt2tags-2.5 )"

DEPEND="${RDEPEND}
	dev-util/pkgconfig"

EHG_REPO_URI="https://tools.votca.googlecode.com/hg/"

S="${WORKDIR}/hg"

src_prepare() {
	eautoreconf || die "eautoreconf failed"
}

src_configure() {
	local myconf="--disable-la-files"

	use boost \
		&&  myconf="${myconf} $(use_with boost) --disable-votca-boost" \
		||  myconf="${myconf} $(use_with boost) --enable-votca-boost"

	econf ${myconf} || die "econf failed"
}

src_compile() {
	emake || die "emake failed"
}

src_install() {
	emake install DESTDIR="${D}" || die "emake install failed"
	dodoc NOTICE
	if use doc; then
		emake CHANGELOG || die "emake CHANGELOG failed"
		dodoc CHANGELOG
	fi

	sed -n -e '/^VOTCA\(BIN\|LDLIB\)/p' \
		"${D}"/usr/bin/VOTCARC.bash >> "${T}/80${PN}"
	doenvd "${T}/80${PN}"
	rm -f "${D}"/usr/bin/VOTCARC*
}