summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-12-17 08:08:00 +0000
committerJustin Lecher <jlec@gentoo.org>2010-12-17 08:08:00 +0000
commit120c0685647b241c780c3350bdc4179d9369d7dd (patch)
treee2187eca0217ec96b98ad749164350f5e08a7901 /sci-libs/acml/acml-3.6.0-r1.ebuild
parentFix for fortran.eclass removal (diff)
downloadgentoo-2-120c0685647b241c780c3350bdc4179d9369d7dd.tar.gz
gentoo-2-120c0685647b241c780c3350bdc4179d9369d7dd.tar.bz2
gentoo-2-120c0685647b241c780c3350bdc4179d9369d7dd.zip
Fix for fortran.eclass removal
(Portage version: 2.2.0_alpha8/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/acml/acml-3.6.0-r1.ebuild')
-rw-r--r--sci-libs/acml/acml-3.6.0-r1.ebuild19
1 files changed, 17 insertions, 2 deletions
diff --git a/sci-libs/acml/acml-3.6.0-r1.ebuild b/sci-libs/acml/acml-3.6.0-r1.ebuild
index a59848c33736..fdc5a4f8b73b 100644
--- a/sci-libs/acml/acml-3.6.0-r1.ebuild
+++ b/sci-libs/acml/acml-3.6.0-r1.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/acml/acml-3.6.0-r1.ebuild,v 1.10 2010/12/16 14:09:09 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/acml-3.6.0-r1.ebuild,v 1.11 2010/12/17 08:08:00 jlec Exp $
inherit eutils toolchain-funcs
@@ -42,6 +42,17 @@ pkg_nofetch() {
einfo "SRC=${A} $SRC_URI"
}
+get_fcomp() {
+ case $(tc-getFC) in
+ *gfortran* )
+ FCOMP="gfortran" ;;
+ ifort )
+ FCOMP="ifc" ;;
+ * )
+ FCOMP=$(tc-getFC) ;;
+ esac
+}
+
pkg_setup() {
elog "From version 3.5.0 on, ACML no longer supports"
elog "hardware without SSE/SSE2 instructions. "
@@ -51,6 +62,10 @@ pkg_setup() {
FORTRAN=ifc
FORT=ifort
! use ifc && ! use openmp && FORTRAN=g77 && FORT=gnu
+ if use openmp; then
+ tc-has-openmp || die "Please ensure your compiler has openmp support"
+ fi
+ get_fcomp
}
src_unpack() {
@@ -88,7 +103,7 @@ src_install() {
cp -pPR "${S}/${fort}" "${D}"${instdir} || die "copy ${fort} failed"
# install profiles
- ESELECT_PROF=acml-$(tc-getFC)
+ ESELECT_PROF=acml-${FCOMP}
local acmldir=${instdir}/${fort}
local acmllibs="-lacml -lacml_mv"
local libname=${acmldir}/lib/libacml