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

inherit eutils

DESCRIPTION="A Fortran interface to the GNU Scientific Library"
HOMEPAGE="http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/"
SRC_URI="http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
#IUSE="gfortran ifort"  #Compiler gfortran does not (properly) support ISO_C_BINDING
IUSE="ifort"

DEPEND=">=sci-libs/gsl-1.10
	ifort? ( >=dev-lang/ifc-10.0.026-r1 )"
RDEPEND=${DEPEND}

DESTDIR="/usr"

BITS="32"
if use amd64; then
	BITS="64"
fi



src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-configure.patch  #Allows the use of econf
	epatch "${FILESDIR}"/${P}-Makefile.patch   #Makes make more verbose
}


src_compile() {
	if use ifort; then
		econf --prefix ${DESTDIR} --gsl ${DESTDIR} --f90 ifort --bits ${BITS}
	#elif use gfortran; then
	#	econf --prefix ${DESTDIR} --gsl ${DESTDIR} --f90 gfortran --bits ${BITS}
	else
		die "  You must select at least one Fortran compiler in your use flags"
	fi

	emake || die "emake failed"
}

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

pkg_config()
{
	eerror "This ebuild does not have a config function."
}