aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-10-07 11:16:02 +0200
committerJustin Lecher <jlec@gentoo.org>2012-10-07 11:16:02 +0200
commit31ebaca843da1dc44b5c7401ce84e63381654d35 (patch)
tree22449c0f105773cfa3be2d29ba3cfc2288244533 /sci-libs/mkl/mkl-11.0.0.079.ebuild
parentin CVS (diff)
parentfix to build petsc in Gentoo Prefix (thanks to Matthias Maier) (diff)
downloadsci-31ebaca843da1dc44b5c7401ce84e63381654d35.tar.gz
sci-31ebaca843da1dc44b5c7401ce84e63381654d35.tar.bz2
sci-31ebaca843da1dc44b5c7401ce84e63381654d35.zip
Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/sci
# By Justin Lecher (20) and others # Via Jens-Malte Gottfried (1) and Justin Lecher (1) * 'master' of git+ssh://git.overlays.gentoo.org/proj/sci: (41 commits) fix to build petsc in Gentoo Prefix (thanks to Matthias Maier) live ebuild update live ebuild update updated package.mask cmake-utils.eclass got merged in gx86 hybrid stuff got merged [sci-mathematics/scilab] fix errors in previous commit [sci-mathematics/scilab] version bump [dev-java/scirenderer] version bump version bump app-benchmarks/numbench: Updated dependency for eselect alternatives sci-libs/mkl: Version bump sci-libs/acml: Version bump [sci-mathematics/scilab] update dependencies [dev-java/scirenderer] version bump [dev-java/jlatexmath-fop] version bump [dev-java/jlatexmath] version bump app-admin/eselect: rev-bumped to avoid conflict with tree sci-chemistry/specView: Needs webkit support in pyside sci-chemistry/chemBuild: Needs webkit support in pyside ... Conflicts: app-admin/eselect/ChangeLog app-admin/eselect/Manifest
Diffstat (limited to 'sci-libs/mkl/mkl-11.0.0.079.ebuild')
-rw-r--r--sci-libs/mkl/mkl-11.0.0.079.ebuild137
1 files changed, 137 insertions, 0 deletions
diff --git a/sci-libs/mkl/mkl-11.0.0.079.ebuild b/sci-libs/mkl/mkl-11.0.0.079.ebuild
new file mode 100644
index 000000000..54aa19301
--- /dev/null
+++ b/sci-libs/mkl/mkl-11.0.0.079.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2749
+INTEL_DPV=2013
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp multilib alternatives-2
+
+DESCRIPTION="Intel Math Kernel Library: linear algebra, fft, math functions"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-mkl/"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-libs/intel-common-12"
+
+QA_PREBUILT="
+ ${INTEL_SDP_DIR}/mkl/lib/*/*
+ ${INTEL_SDP_DIR}/mkl/examples/lapack/lib/*
+ ${INTEL_SDP_DIR}/mkl/tests/cblas/source/*
+ ${INTEL_SDP_DIR}/mkl/benchmarks/linpack/*
+ ${INTEL_SDP_DIR}/mkl/benchmarks/mp_linpack/*/*/*"
+
+CHECKREQS_DISK_BUILD=1536M
+
+INTEL_BIN_RPMS="mkl mkl-devel"
+INTEL_DAT_RPMS="mkl-common"
+
+src_prepare() {
+ chmod u+w -R opt
+}
+
+mkl_add_prof() {
+ local pcname=${1} libs cflags x
+ shift
+ [[ ${pcname} = *int64* ]] && cflags=-DMKL_ILP64
+ cat <<-EOF > ${pcname}.pc
+ prefix=${INTEL_SDP_EDIR}/mkl
+ libdir=\${prefix}/lib/${IARCH}
+ includedir=\${prefix}/include
+ Name: ${pcname}
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} ${libs}
+ Cflags: -I\${includedir} ${cflags}
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${pcname}.pc
+ for x in $*; do
+ alternatives_for ${x} ${pcname/-${x}} 0 \
+ /usr/$(get_libdir)/pkgconfig/${x}.pc ${pcname}.pc
+ done
+}
+
+# mkl_prof [_ilp64 or _lp64]
+# help: http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
+mkl_prof() {
+ local bits=""
+ if [[ ${IARCH} == intel64 ]]; then
+ bits=_lp64
+ [[ ${1} == int64 ]] && bits=_ilp64
+ fi
+ local gf="-Wl,--start-group -lmkl_gf${bits}"
+ local intel="-Wl,--start-group -lmkl_intel${bits}"
+ local core="-lmkl_core -Wl,--end-group"
+ local prof=mkl${IARCH:((${#IARCH} - 2)):2}
+ [[ ${1} == int64 ]] && prof=${prof}-int64
+ local libs
+
+ libs="${gf} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-gfortran blas lapack
+ libs="${intel} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-intel blas lapack cblas lapacke
+ libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gfortran-openmp blas lapack
+ libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gcc-openmp cblas lapacke
+ libs="${intel} -lmkl_intel_thread ${core} -openmp -lpthread" \
+ mkl_add_prof ${prof}-intel-openmp blas lapack cblas lapacke
+ libs="-lmkl_rt -lpthread" \
+ mkl_add_prof ${prof}-dynamic blas lapack cblas lapacke
+ libs="-lmkl_rt -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-dynamic-openmp blas lapack cblas lapacke
+
+ # blacs and scalapack
+ local scal="-lmkl_scalapack${bits:-_core}"
+ local blacs="-lmkl_blacs_intelmpi${bits}"
+ core="-lmkl_core ${blacs} -Wl,--end-group"
+
+ libs="${gf} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-gfortran-blacs blacs
+ libs="${scal} ${gf} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-gfortran-scalapack scalapack
+ libs="${intel} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-intel-blacs blacs
+ libs="${scal} ${intel} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-intel-scalapack scalapack
+ libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gfortran-openmp-blacs blacs
+ libs="${scal} ${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gfortran-openmp-scalapack scalapack
+ libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gcc-openmp-blacs blacs
+ libs="${scal} ${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gcc-openmp-scalapack scalapack
+ libs="${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-intel-openmp-blacs blacs
+ libs="${scal} ${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-intel-openmp-scalapack scalapack
+ libs="-lmkl_rt ${blacs} -lpthread" \
+ mkl_add_prof ${prof}-dynamic-blacs blacs
+ libs="${scal} -lmkl_rt ${blacs} -lpthread" \
+ mkl_add_prof ${prof}-dynamic-scalapack scalapack
+ libs="-lmkl_rt ${blacs} -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-dynamic-openmp-blacs blacs
+ libs="${scal} -lmkl_rt ${blacs} -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-dynamic-openmp-scalapack scalapack
+}
+
+src_install() {
+ intel-sdp_src_install
+ echo -n > 35mkl "LDPATH="
+ for IARCH in ${INTEL_ARCH}; do
+ mkl_prof
+ sed -i -e '/mkl/s/$/:/' 35mkl
+ echo -n >> 35mkl "${INTEL_SDP_EDIR}/mkl/lib/${IARCH}"
+ [[ ${IARCH} == intel64 ]] && mkl_prof int64
+ done
+ echo >> 35mkl
+ doenvd 35mkl
+}