diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-12-17 08:08:00 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-12-17 08:08:00 +0000 |
commit | 120c0685647b241c780c3350bdc4179d9369d7dd (patch) | |
tree | e2187eca0217ec96b98ad749164350f5e08a7901 /sci-libs/acml/acml-4.0.1.ebuild | |
parent | Fix for fortran.eclass removal (diff) | |
download | gentoo-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-4.0.1.ebuild')
-rw-r--r-- | sci-libs/acml/acml-4.0.1.ebuild | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/sci-libs/acml/acml-4.0.1.ebuild b/sci-libs/acml/acml-4.0.1.ebuild index 567c6eda5bfb..ae70afffc0a2 100644 --- a/sci-libs/acml/acml-4.0.1.ebuild +++ b/sci-libs/acml/acml-4.0.1.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-4.0.1.ebuild,v 1.6 2010/12/16 14:09:09 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/acml-4.0.1.ebuild,v 1.7 2010/12/17 08:08:00 jlec Exp $ inherit eutils toolchain-funcs @@ -38,9 +38,19 @@ 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() { - FORTRAN="gfortran" - if [[ $(tc-getFC) == gfortran ]]; then + if [[ $(tc-getFC) =~ gfortran ]]; then local gcc_version=$(gcc-major-version)$(gcc-minor-version) if ! use openmp && (( ${gcc_version} != 41 )); then eerror "You need gcc-4.1.x to test acml." @@ -52,12 +62,16 @@ pkg_setup() { die "setup gcc failed" fi fi + if use openmp; then + tc-has-openmp || die "Please ensure your compiler has openmp support" + fi + get_fcomp } src_unpack() { unpack ${A} (DISTDIR="${S}" unpack contents-acml-*.tgz) - case $(tc-getFC) in + case ${FCOMP} in gfortran) FORT=gfortran ;; if*) FORT=ifort ;; *) eerror "Unsupported fortran compiler: $(tc-getFC)" @@ -98,7 +112,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 |