diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-12-17 08:24:38 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-12-17 08:24:38 +0000 |
commit | 2bf2bc1d63c4e63a1769e05ce6f01dae049f7626 (patch) | |
tree | ffde5c8f4a577f6ee862ed85fe36b1fe189c52d3 /sci-libs/mkl | |
parent | Fix for fortran.eclass removal (diff) | |
download | gentoo-2-2bf2bc1d63c4e63a1769e05ce6f01dae049f7626.tar.gz gentoo-2-2bf2bc1d63c4e63a1769e05ce6f01dae049f7626.tar.bz2 gentoo-2-2bf2bc1d63c4e63a1769e05ce6f01dae049f7626.zip |
Fix for fortran.eclass removal
(Portage version: 2.2.0_alpha8/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/mkl')
-rw-r--r-- | sci-libs/mkl/ChangeLog | 6 | ||||
-rw-r--r-- | sci-libs/mkl/mkl-10.0.2.018-r2.ebuild | 21 | ||||
-rw-r--r-- | sci-libs/mkl/mkl-10.0.5.025.ebuild | 22 | ||||
-rw-r--r-- | sci-libs/mkl/mkl-9.1.023.ebuild | 20 |
4 files changed, 54 insertions, 15 deletions
diff --git a/sci-libs/mkl/ChangeLog b/sci-libs/mkl/ChangeLog index 8d9ca7a4b31d..2a36898c11f3 100644 --- a/sci-libs/mkl/ChangeLog +++ b/sci-libs/mkl/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sci-libs/mkl # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/ChangeLog,v 1.39 2010/12/16 15:47:27 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/ChangeLog,v 1.40 2010/12/17 08:24:38 jlec Exp $ + + 17 Dec 2010; Justin Lecher <jlec@gentoo.org> mkl-9.1.023.ebuild, + mkl-10.0.2.018-r2.ebuild, mkl-10.0.5.025.ebuild: + Fix for fortran.eclass removal 16 Dec 2010; Justin Lecher <jlec@gentoo.org> mkl-9.1.023.ebuild, mkl-10.0.2.018-r2.ebuild, mkl-10.0.5.025.ebuild: diff --git a/sci-libs/mkl/mkl-10.0.2.018-r2.ebuild b/sci-libs/mkl/mkl-10.0.2.018-r2.ebuild index d7234d1adfd6..554b68f2a294 100644 --- a/sci-libs/mkl/mkl-10.0.2.018-r2.ebuild +++ b/sci-libs/mkl/mkl-10.0.2.018-r2.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.2.018-r2.ebuild,v 1.4 2010/12/16 18:58:00 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/mkl-10.0.2.018-r2.ebuild,v 1.5 2010/12/17 08:24:38 jlec Exp $ inherit eutils toolchain-funcs check-reqs @@ -29,6 +29,16 @@ RDEPEND="${DEPEND} MKL_DIR=/opt/intel/${PN}/${PV} INTEL_LIC_DIR=/opt/intel/licenses +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 +60,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 +79,7 @@ pkg_setup() { else MKL_MPI=intelmpi fi + get_fcomp } src_unpack() { @@ -142,11 +153,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 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 diff --git a/sci-libs/mkl/mkl-9.1.023.ebuild b/sci-libs/mkl/mkl-9.1.023.ebuild index 067e88fb8622..f95b2d55e1dc 100644 --- a/sci-libs/mkl/mkl-9.1.023.ebuild +++ b/sci-libs/mkl/mkl-9.1.023.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-9.1.023.ebuild,v 1.10 2010/12/16 15:47:27 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/mkl-9.1.023.ebuild,v 1.11 2010/12/17 08:24:38 jlec Exp $ inherit eutils versionator toolchain-funcs @@ -34,6 +34,17 @@ RDEPEND="${DEPEND} MKL_DIR=/opt/intel/${PN}/${MAJOR}.${MINOR} +get_fcomp() { + case $(tc-getFC) in + *gfortran* ) + FCOMP="gfortran" ;; + ifort ) + FCOMP="ifc" ;; + * ) + FCOMP=$(tc-getFC) ;; + esac +} + pkg_setup() { # setting up license [[ -z ${MKL_LICENSE} && -d /opt/intel/licenses ]] && \ @@ -51,6 +62,7 @@ pkg_setup() { # setting up compilers MKL_CC=gnu [[ $(tc-getCC) == icc ]] && MKL_CC=icc + get_fcomp } src_unpack() { @@ -125,7 +137,7 @@ src_unpack() { fi # fix a bad makefile in the test - if [[ $(tc-getFC) == gfortran ]] || [[ $(tc-getFC) == if* ]]; then + if [[ $(tc-getFC) =~ gfortran ]] || [[ $(tc-getFC) =~ if* ]]; then sed -i \ -e "s/g77/$(tc-getFC)/" \ -e 's/-DGNU_USE//' \ @@ -196,7 +208,7 @@ mkl_install_lib() { local extlibs="-L${libdir} -lguide -lpthread" [[ "${1}" == "serial" ]] && extlibs="" - [[ "$(tc-getFC)" == "gfortran" ]] && \ + [[ $(tc-getFC) =~ gfortran ]] && \ gfortranlibs="-L${libdir} -lmkl_gfortran" cp -pPR "${S}"/${proflib} "${D}"${MKL_DIR} @@ -286,7 +298,7 @@ pkg_postinst() { elif use serial; then ext=serial fi - ESELECT_PROF="${PN}-$(tc-getFC)-${ext}" + ESELECT_PROF="${PN}-${FCOMP}-${ext}" # if blas profile is mkl, set lapack and cblas profiles as mkl local blas_lib=$(eselect blas show | cut -d' ' -f2) for p in blas cblas lapack; do |