1 |
commit: 04367338fa5cd12484d39c5d91162f2820db28ff |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 2 14:19:39 2013 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 2 14:19:39 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=04367338 |
7 |
|
8 |
sci-libs/mkl: Version Bump |
9 |
|
10 |
Package-Manager: portage-2.2.0_alpha173 |
11 |
|
12 |
--- |
13 |
sci-libs/mkl/ChangeLog | 5 ++ |
14 |
sci-libs/mkl/mkl-11.0.3.163.ebuild | 131 ++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 136 insertions(+), 0 deletions(-) |
16 |
|
17 |
diff --git a/sci-libs/mkl/ChangeLog b/sci-libs/mkl/ChangeLog |
18 |
index 83c216d..72df03b 100644 |
19 |
--- a/sci-libs/mkl/ChangeLog |
20 |
+++ b/sci-libs/mkl/ChangeLog |
21 |
@@ -2,6 +2,11 @@ |
22 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
23 |
# $Header: $ |
24 |
|
25 |
+*mkl-11.0.3.163 (02 May 2013) |
26 |
+ |
27 |
+ 02 May 2013; Justin Lecher <jlec@g.o> +mkl-11.0.3.163.ebuild: |
28 |
+ Version Bump |
29 |
+ |
30 |
*mkl-11.0.2.146 (14 Feb 2013) |
31 |
|
32 |
14 Feb 2013; Justin Lecher <jlec@g.o> -mkl-11.0.1.117.ebuild, |
33 |
|
34 |
diff --git a/sci-libs/mkl/mkl-11.0.3.163.ebuild b/sci-libs/mkl/mkl-11.0.3.163.ebuild |
35 |
new file mode 100644 |
36 |
index 0000000..fee4df0 |
37 |
--- /dev/null |
38 |
+++ b/sci-libs/mkl/mkl-11.0.3.163.ebuild |
39 |
@@ -0,0 +1,131 @@ |
40 |
+# Copyright 1999-2013 Gentoo Foundation |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+# $Header: $ |
43 |
+ |
44 |
+EAPI=5 |
45 |
+ |
46 |
+INTEL_DPN=parallel_studio_xe |
47 |
+INTEL_DID=3078 |
48 |
+INTEL_DPV=2013_update3 |
49 |
+INTEL_SUBDIR=composerxe |
50 |
+ |
51 |
+inherit intel-sdp multilib alternatives-2 |
52 |
+ |
53 |
+DESCRIPTION="Intel Math Kernel Library: linear algebra, fft, math functions" |
54 |
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-mkl/" |
55 |
+ |
56 |
+IUSE="" |
57 |
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" |
58 |
+ |
59 |
+DEPEND="" |
60 |
+RDEPEND=">=dev-libs/intel-common-13" |
61 |
+ |
62 |
+CHECKREQS_DISK_BUILD=2500M |
63 |
+ |
64 |
+INTEL_BIN_RPMS="mkl mkl-devel" |
65 |
+INTEL_DAT_RPMS="mkl-common" |
66 |
+ |
67 |
+src_prepare() { |
68 |
+ chmod u+w -R opt |
69 |
+} |
70 |
+ |
71 |
+mkl_add_prof() { |
72 |
+ local pcname=${1} libs cflags x |
73 |
+ shift |
74 |
+ [[ ${pcname} = *int64* ]] && cflags=-DMKL_ILP64 |
75 |
+ cat <<-EOF > ${pcname}.pc |
76 |
+ prefix=${INTEL_SDP_EDIR}/mkl |
77 |
+ libdir=\${prefix}/lib/${IARCH} |
78 |
+ includedir=\${prefix}/include |
79 |
+ Name: ${pcname} |
80 |
+ Description: ${DESCRIPTION} |
81 |
+ Version: ${PV} |
82 |
+ URL: ${HOMEPAGE} |
83 |
+ Libs: -L\${libdir} ${libs} |
84 |
+ Cflags: -I\${includedir} ${cflags} |
85 |
+ EOF |
86 |
+ insinto /usr/$(get_libdir)/pkgconfig |
87 |
+ doins ${pcname}.pc |
88 |
+ for x in $*; do |
89 |
+ alternatives_for ${x} ${pcname/-${x}} 0 \ |
90 |
+ /usr/$(get_libdir)/pkgconfig/${x}.pc ${pcname}.pc |
91 |
+ done |
92 |
+} |
93 |
+ |
94 |
+# mkl_prof [_ilp64 or _lp64] |
95 |
+# help: http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ |
96 |
+mkl_prof() { |
97 |
+ local bits="" |
98 |
+ if [[ ${IARCH} == intel64 ]]; then |
99 |
+ bits=_lp64 |
100 |
+ [[ ${1} == int64 ]] && bits=_ilp64 |
101 |
+ fi |
102 |
+ local gf="-Wl,--start-group -lmkl_gf${bits}" |
103 |
+ local intel="-Wl,--start-group -lmkl_intel${bits}" |
104 |
+ local core="-lmkl_core -Wl,--end-group" |
105 |
+ local prof=mkl${IARCH:((${#IARCH} - 2)):2} |
106 |
+ [[ ${1} == int64 ]] && prof=${prof}-int64 |
107 |
+ local libs |
108 |
+ |
109 |
+ libs="${gf} -lmkl_sequential ${core} -lpthread" \ |
110 |
+ mkl_add_prof ${prof}-gfortran blas lapack |
111 |
+ libs="${intel} -lmkl_sequential ${core} -lpthread" \ |
112 |
+ mkl_add_prof ${prof}-intel blas lapack cblas lapacke |
113 |
+ libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
114 |
+ mkl_add_prof ${prof}-gfortran-openmp blas lapack |
115 |
+ libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
116 |
+ mkl_add_prof ${prof}-gcc-openmp cblas lapacke |
117 |
+ libs="${intel} -lmkl_intel_thread ${core} -openmp -lpthread" \ |
118 |
+ mkl_add_prof ${prof}-intel-openmp blas lapack cblas lapacke |
119 |
+ libs="-lmkl_rt -lpthread" \ |
120 |
+ mkl_add_prof ${prof}-dynamic blas lapack cblas lapacke |
121 |
+ libs="-lmkl_rt -liomp5 -lpthread" \ |
122 |
+ mkl_add_prof ${prof}-dynamic-openmp blas lapack cblas lapacke |
123 |
+ |
124 |
+ # blacs and scalapack |
125 |
+ local scal="-lmkl_scalapack${bits:-_core}" |
126 |
+ local blacs="-lmkl_blacs_intelmpi${bits}" |
127 |
+ core="-lmkl_core ${blacs} -Wl,--end-group" |
128 |
+ |
129 |
+ libs="${gf} -lmkl_sequential ${core} -lpthread" \ |
130 |
+ mkl_add_prof ${prof}-gfortran-blacs blacs |
131 |
+ libs="${scal} ${gf} -lmkl_sequential ${core} -lpthread" \ |
132 |
+ mkl_add_prof ${prof}-gfortran-scalapack scalapack |
133 |
+ libs="${intel} -lmkl_sequential ${core} -lpthread" \ |
134 |
+ mkl_add_prof ${prof}-intel-blacs blacs |
135 |
+ libs="${scal} ${intel} -lmkl_sequential ${core} -lpthread" \ |
136 |
+ mkl_add_prof ${prof}-intel-scalapack scalapack |
137 |
+ libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
138 |
+ mkl_add_prof ${prof}-gfortran-openmp-blacs blacs |
139 |
+ libs="${scal} ${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
140 |
+ mkl_add_prof ${prof}-gfortran-openmp-scalapack scalapack |
141 |
+ libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
142 |
+ mkl_add_prof ${prof}-gcc-openmp-blacs blacs |
143 |
+ libs="${scal} ${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
144 |
+ mkl_add_prof ${prof}-gcc-openmp-scalapack scalapack |
145 |
+ libs="${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \ |
146 |
+ mkl_add_prof ${prof}-intel-openmp-blacs blacs |
147 |
+ libs="${scal} ${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \ |
148 |
+ mkl_add_prof ${prof}-intel-openmp-scalapack scalapack |
149 |
+ libs="-lmkl_rt ${blacs} -lpthread" \ |
150 |
+ mkl_add_prof ${prof}-dynamic-blacs blacs |
151 |
+ libs="${scal} -lmkl_rt ${blacs} -lpthread" \ |
152 |
+ mkl_add_prof ${prof}-dynamic-scalapack scalapack |
153 |
+ libs="-lmkl_rt ${blacs} -liomp5 -lpthread" \ |
154 |
+ mkl_add_prof ${prof}-dynamic-openmp-blacs blacs |
155 |
+ libs="${scal} -lmkl_rt ${blacs} -liomp5 -lpthread" \ |
156 |
+ mkl_add_prof ${prof}-dynamic-openmp-scalapack scalapack |
157 |
+} |
158 |
+ |
159 |
+src_install() { |
160 |
+ intel-sdp_src_install |
161 |
+ echo -n > 35mkl "LDPATH=" |
162 |
+ for IARCH in ${INTEL_ARCH}; do |
163 |
+ mkl_prof |
164 |
+ sed -i -e '/mkl/s/$/:/' 35mkl |
165 |
+ echo -n >> 35mkl "${INTEL_SDP_EDIR}/mkl/lib/${IARCH}" |
166 |
+ [[ ${IARCH} == intel64 ]] && mkl_prof int64 |
167 |
+ done |
168 |
+ echo >> 35mkl |
169 |
+ doenvd 35mkl |
170 |
+} |