summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2011-06-06 18:33:06 +0100
committerSébastien Fabbro <bicatali@gentoo.org>2011-06-06 18:33:06 +0100
commit57781c1d484c57437043007cc654498265b6ae9c (patch)
treec32e10105f2dcd8fb9cb4d769e7218c3545c2c34 /sci-libs
parentrenamed profiles according to use flags (diff)
downloadbicatali-57781c1d484c57437043007cc654498265b6ae9c.tar.gz
bicatali-57781c1d484c57437043007cc654498265b6ae9c.tar.bz2
bicatali-57781c1d484c57437043007cc654498265b6ae9c.zip
reworked all profile generation
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/mkl/ChangeLog3
-rw-r--r--sci-libs/mkl/Manifest4
-rw-r--r--sci-libs/mkl/mkl-10.3.4.191.ebuild117
3 files changed, 71 insertions, 53 deletions
diff --git a/sci-libs/mkl/ChangeLog b/sci-libs/mkl/ChangeLog
index 6180d0d..d6c26b3 100644
--- a/sci-libs/mkl/ChangeLog
+++ b/sci-libs/mkl/ChangeLog
@@ -2,6 +2,9 @@
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 06 Jun 2011; Sébastien Fabbro <bicatali@gentoo.org> mkl-10.3.4.191.ebuild:
+ Reworked all profile generation
+
30 May 2011; Sébastien Fabbro <bicatali@gentoo.org> mkl-10.3.4.191.ebuild:
Bump
diff --git a/sci-libs/mkl/Manifest b/sci-libs/mkl/Manifest
index 0f99f2b..f3beb91 100644
--- a/sci-libs/mkl/Manifest
+++ b/sci-libs/mkl/Manifest
@@ -1,6 +1,6 @@
DIST parallel_studio_xe_2011_update2.tgz 1551817814 RMD160 7f1c770a1ad5fe626718a5c352d2db6d628b22aa SHA1 b216e25ec4f1254e7e07defa5ab0ec835965a018 SHA256 3e77fb39fc05e0c4eafa594617674858ae9c59a5cfddb0f95651bbf7d4baa907
DIST parallel_studio_xe_2011_update2_ia32.tgz 810216099 RMD160 33293a7f524722b1e2f4fc839aea3984dff490c5 SHA1 73368f9f14ff530dc953aeeca1ec5de90607774d SHA256 e2d040774cc4888a294dbd2081882b7f90fef7280ad1c4dcb04026871d6e638d
DIST parallel_studio_xe_2011_update2_intel64.tgz 966899604 RMD160 e14ebd58b2e626431c3b796d925ff460752fc689 SHA1 55cfdb64f7c84222ff599f4e9def3cb66e45c962 SHA256 f6d9acacb350cccb3e29c2309ced7b9564d86d53d59409b4a79d7a79b396f2f1
-EBUILD mkl-10.3.4.191.ebuild 2899 RMD160 0ee5ba4ef41a5c38f3838d19c9cd5728bf09d2eb SHA1 5e74438a813bb52e5839a572ad48baf3a3042077 SHA256 091b39480f25323440e68cc390e86eebbf7c7a54f2b3d26cb83be996ea0cbdd1
-MISC ChangeLog 440 RMD160 60dccc49f150ac36d6f2c526686c1cad4b8d97ea SHA1 8106bb83f9137da3e53c00f77bb474a2d236c683 SHA256 8eece3d73b3c98c05a2bb5f28a21e644c195e62047479e9f6266eb85fe444820
+EBUILD mkl-10.3.4.191.ebuild 3927 RMD160 6595ca39688fdc895eba2394cae8b7d5331d3579 SHA1 33792ed60ac03bef25acf3dc3793dbad49170098 SHA256 044d1b7fcf02db19b9602a3213ec70c32ba2a6f0059e606c02d8e70967ab4df1
+MISC ChangeLog 553 RMD160 f68c1b5e6ae43b571a6148433ec539ef926e7050 SHA1 ba4ebe939c353515e46de0e349f020cc63e8e59f SHA256 e5167e96ce9d103ac20cd2cc33a206d12104a9382ab2232e75fd4bb3347140b1
MISC metadata.xml 617 RMD160 9066d97c2d34843270db78a9b31b8d6f8b32497e SHA1 6d9842a03eb3367d4fc85458f1e65e52490e98b2 SHA256 2b482d847f4ae464b31e582f412ffa59c97c59b75309d6392edfcbd9f16b2ae5
diff --git a/sci-libs/mkl/mkl-10.3.4.191.ebuild b/sci-libs/mkl/mkl-10.3.4.191.ebuild
index 14d4532..0193f91 100644
--- a/sci-libs/mkl/mkl-10.3.4.191.ebuild
+++ b/sci-libs/mkl/mkl-10.3.4.191.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI=3
+EAPI=4
INTEL_DPN=parallel_studio_xe
INTEL_DID=2158
INTEL_DPV=2011_update2
@@ -34,26 +34,9 @@ src_prepare() {
chmod u+w -R opt
}
-# help: http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
-# mkl_add_prof <compiler lib> <thread lib>
mkl_add_prof() {
- local libs="-Wl,--start-group -lmkl_${1} -lmkl_${2} -lmkl_core -Wl,--end-group"
- local prof=mkl
- [[ ${1} == gf* ]] && prof=mkl-gfortran
- if [[ ${2} == intel_thread ]]; then
- libs="${libs} -liomp5 -pthread"
- prof="${prof}-intel_omp"
- elif [[ ${2} == gnu_thread ]]; then
- libs="${libs} -fopenmp -pthread"
- prof="${prof}-gnu_omp"
- elif [[ ${2} == pgi_thread ]]; then
- libs="${libs} -mp -pthread -pgf90libs"
- prof="${prof}-pg_omp"
- elif [[ ${2} == sequential ]]; then
- libs="${libs} -pthread"
- prof="${prof}-sequential"
- fi
- [[ ${1} == *_ilp64 ]] && prof="${prof}-int64"
+ local x prof=${1}
+ shift
cat <<-EOF > ${prof}.pc
prefix=${INTEL_SDP_EDIR}/mkl
libdir=\${prefix}/lib/
@@ -63,45 +46,77 @@ mkl_add_prof() {
Version: ${PV}
URL: ${HOMEPAGE}
Libs: -L\${libdir} ${libs}
- Cflags: -I\${includedir}
+ Cflags: -I\${includedir} ${cflags}
EOF
- local libdir=$(get_libdir)
- use amd64 && [[ ${1} != *lp64 ]] && libdir=lib32
- insinto /usr/${libdir}/pkgconfig
+ insinto /usr/$(get_libdir)/pkgconfig
doins ${prof}.pc || die
- local x pkgs="blas lapack"
- [[ ${1} != gf* ]] && pkgs="blas lapack cblas lapacke"
- for x in ${pkgs}; do
- alternatives_for ${x} ${prof} 0 \
- "/usr/$(get_libdir)/pkgconfig/${x}.pc" "${prof}.pc"
- done
- local ext=
- [[ ${1} == *lp64 ]] && ext=_${1#*_}
- sed \
- -e "s/-Wl,--end-group/-lmkl_blacs_intelmpi${ext} -Wl,--end-group/" \
- ${prof}.pc > ${prof}-blacs.pc
- [[ -z ${ext} ]] && ext=_core
- sed \
- -e "s/-Wl,--start-group/-lmkl_scalapack${ext}/" \
- ${prof}-blacs.pc > ${prof}-scalapack.pc
- for x in blacs scalapack; do
+ for x in $*; do
alternatives_for ${x} ${prof} 0 \
"/usr/$(get_libdir)/pkgconfig/${x}.pc" "${prof}.pc"
done
}
+# mkl_prof [_ilp64 or _lp64]
+# help: http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
+mkl_prof() {
+ local scal="-lmkl_scalapack${1:-_core}"
+ local blacs="-lmkl_blacs_intelmpi${1}"
+ local gf="-Wl,--start-group -lmkl_gf${1}"
+ local intel="-Wl,--start-group -lmkl_intel${1}"
+ local core="-lmkl_core -Wl,--end-group"
+ local prof=mkl
+ [[ ${1} == *ilp64 ]] && prof=mkl-int64 && cflags=-DMKL_ILP64
+
+ 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
+ core="-lmkl_core ${blacs} -Wl,--end-group"
+ libs="${gf} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-gfortran blacs
+ libs="${intel} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-intel blacs
+ libs="${scal} ${gf} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-gfortran scalapack
+ libs="${scal} ${intel} -lmkl_sequential ${core} -lpthread" \
+ mkl_add_prof ${prof}-intel scalapack
+ libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gfortran-openmp blacs
+ libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gcc-openmp blacs
+ libs="${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-intel-openmp blacs
+ libs="${scal} ${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
+ mkl_add_prof ${prof}-gfortran-openmp scalapack
+ libs="${scal} ${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-intel-openmp scalapack
+ libs="-lmkl_rt ${blacs} -lpthread" \
+ mkl_add_prof ${prof}-dynamic blacs
+ libs="-lmkl_rt ${blacs} -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-dynamic-openmp blacs
+ libs="${scal} -lmkl_rt ${blacs} -lpthread" \
+ mkl_add_prof ${prof}-dynamic scalapack
+ libs="${scal} -lmkl_rt ${blacs} -liomp5 -lpthread" \
+ mkl_add_prof ${prof}-dynamic-openmp scalapack
+}
+
src_install() {
intel-sdp_src_install
- local comps="gf intel"
- if use amd64 && use multilib; then
- comps="${comps} gf_lp64 gf_ilp64 intel_lp64 intel_ilp64"
- elif use amd64; then
- comps="gf_lp64 gf_ilp64 intel_lp64 intel_ilp64"
+ use x86 && mkl_prof
+ if use amd64; then
+ mkl_prof _lp64
+ mkl_prof _ilp64
fi
- local c t
- for c in ${comps}; do
- for t in gnu_thread intel_thread sequential; do
- mkl_add_prof ${c} ${t}
- done
- done
}