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