blob: 3140d3116d82fa73ca40b82d8cd4dd936bdec295 (
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
61
62
63
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils fortran-2 multilib toolchain-funcs
DESCRIPTION="A Fortran interface to the GNU Scientific Library"
HOMEPAGE="http://www.lrz.de/services/software/mathematik/gsl/fortran/"
SRC_URI="http://www.lrz.de/services/software/mathematik/gsl/fortran/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="static-libs"
RDEPEND=">=sci-libs/gsl-1.14"
DEPEND="${RDEPEND}
virtual/pkgconfig"
#TODO: make docs
FORTRAN_STANDARD=90
src_prepare() {
epatch "${FILESDIR}"/${P}-sharedlibs.patch
if use amd64; then
ln -s interface/integer_ilp64.finc integer.finc || die
elif use x86; then
ln -s interface/integer_ilp32.finc integer.finc || die
else
die "Don't know who you are"
fi
cat <<- EOF > "${S}/make.inc"
F90 = $(tc-getFC)
CC = $(tc-getCC)
GSL_LIB = $($(tc-getPKG_CONFIG) --libs gsl)
GSL_INC = $($(tc-getPKG_CONFIG) --cflags gsl)
PREFIX = /usr
ARFLAGS = -csrv
FPP = -cpp
LIB = $(get_libdir)
EOF
use static-libs && echo "STATIC_LIBS = yes" >> "${S}/make.inc"
}
src_configure() {
return
}
src_install() {
dodoc NEWS README
ln -s lib${PN}.so.0.0.0 lib${PN}.so.0 || die
ln -s lib${PN}.so.0.0.0 lib${PN}.so || die
dolib.so lib${PN}.so*
insinto /usr/include
doins ${PN}.mod
if use static-libs ; then
newlib.a lib${PN}_$(tc-getFC).a lib${PN}.a
fi
}
|