summaryrefslogtreecommitdiff
path: root/sci-libs/cuba/cuba-2.1.ebuild
blob: a2fc01306527cfd8be9795f1b3f9a86a318f60d9 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils distutils

EAPI="2"

DESCRIPTION="A library for multidimensional numerical integration"
HOMEPAGE="http://www.feynarts.de/cuba/"
LICENSE="LGPL"
SRC_URI="http://www.feynarts.de/cuba/Cuba-${PV}.tar.gz"
S=${WORKDIR}/Cuba-${PV}

KEYWORDS="~amd64 ~x86"
IUSE="+static-libs +shared-libs doc examples"
SLOT="0"


src_prepare() {
	if use shared-libs; then
		epatch "${FILESDIR}/shared.patch"
	elif use !static-libs; then
		eerror "Must USE shared-libs or static-libs"
		die
	fi
}

src_configure() {
	econf
}

src_compile() {
	if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
		emake lib || die "emake failed"
	else
		die "No Makefile"
	fi
}

#src_test() {
#	emake check
#}


src_install() {
	use static-libs && dolib.a libcuba.a
	use shared-libs && dolib.so libcuba.so*
	use doc && dodoc cuba.pdf ChangeLog
	if use examples; then
		insinto /usr/share/doc/${PF}
		doins -r demo
	fi
	insinto /usr/include
	doins cuba.h
}