summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/mkl/mkl-10.0.5.025.ebuild')
-rw-r--r--sci-libs/mkl/mkl-10.0.5.025.ebuild22
1 files changed, 17 insertions, 5 deletions
diff --git a/sci-libs/mkl/mkl-10.0.5.025.ebuild b/sci-libs/mkl/mkl-10.0.5.025.ebuild
index cf7534c2f923..3afe07a91f23 100644
--- a/sci-libs/mkl/mkl-10.0.5.025.ebuild
+++ b/sci-libs/mkl/mkl-10.0.5.025.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/mkl-10.0.5.025.ebuild,v 1.6 2010/12/16 18:58:00 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/mkl-10.0.5.025.ebuild,v 1.7 2010/12/17 08:24:38 jlec Exp $
inherit eutils toolchain-funcs check-reqs
@@ -29,6 +29,17 @@ INTEL_LIC_DIR=/opt/intel/licenses
QA_EXECSTACK="opt/intel/${PN}/${PV}/*"
QA_TEXTRELS="opt/intel/${PN}/${PV}/*"
+get_fcomp() {
+ case $(tc-getFC) in
+ *gfortran* )
+ FCOMP="gfortran" ;;
+ ifort )
+ FCOMP="ifc" ;;
+ * )
+ FCOMP=$(tc-getFC) ;;
+ esac
+}
+
pkg_setup() {
# Check the license
if [[ -z ${MKL_LICENSE} ]]; then
@@ -50,11 +61,11 @@ pkg_setup() {
# Check and setup fortran
if use fortran95; then
# blas95 and lapack95 don't compile with gfortran < 4.2
- [[ $(tc-getFC) == g* ]] && [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] &&
+ [[ $(tc-getFC) =~ g* ]] && [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] &&
die "blas95 and lapack95 don't compile with gfortran < 4.2"
fi
MKL_FC="gnu"
- [[ $(tc-getFC) == if* ]] && MKL_FC="intel"
+ [[ $(tc-getFC) =~ if* ]] && MKL_FC="intel"
# build profiles according to what compiler is installed
MKL_CC="gnu"
@@ -69,6 +80,7 @@ pkg_setup() {
else
MKL_MPI=intelmpi
fi
+ get_fcomp
}
src_unpack() {
@@ -146,11 +158,11 @@ src_compile() {
if use fortran95; then
einfo "Compiling fortan95 static lib wrappers"
local myconf="lib${MKL_ARCH}"
- [[ $(tc-getFC) == gfortran ]] && \
+ [[ $(tc-getFC) =~ gfortran ]] && \
myconf="${myconf} FC=gfortran"
if use int64; then
myconf="${myconf} interface=ilp64"
- [[ $(tc-getFC) == gfortran ]] && \
+ [[ $(tc-getFC) =~ gfortran ]] && \
myconf="${myconf} FOPTS=-fdefault-integer-8"
fi
for x in blas95 lapack95; do