1 |
commit: 2cc9d558f938e76e75c7576f48276542a5a40286 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 2 14:13:57 2013 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 2 14:26:14 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=2cc9d558 |
7 |
|
8 |
sci-libs/mkl: Version Bump |
9 |
|
10 |
Package-Manager: portage-2.2.7 |
11 |
|
12 |
--- |
13 |
sci-libs/mkl/ChangeLog | 5 ++ |
14 |
sci-libs/mkl/mkl-11.1.0.080.ebuild | 140 +++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 145 insertions(+) |
16 |
|
17 |
diff --git a/sci-libs/mkl/ChangeLog b/sci-libs/mkl/ChangeLog |
18 |
index 627b3ef..ce281d4 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.1.0.080 (02 Oct 2013) |
26 |
+ |
27 |
+ 02 Oct 2013; Justin Lecher <jlec@g.o> +mkl-11.1.0.080.ebuild: |
28 |
+ Version Bump |
29 |
+ |
30 |
*mkl-11.0.5.192 (14 Jul 2013) |
31 |
|
32 |
14 Jul 2013; Justin Lecher <jlec@g.o> +mkl-11.0.5.192.ebuild, |
33 |
|
34 |
diff --git a/sci-libs/mkl/mkl-11.1.0.080.ebuild b/sci-libs/mkl/mkl-11.1.0.080.ebuild |
35 |
new file mode 100644 |
36 |
index 0000000..c674527 |
37 |
--- /dev/null |
38 |
+++ b/sci-libs/mkl/mkl-11.1.0.080.ebuild |
39 |
@@ -0,0 +1,140 @@ |
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=3447 |
48 |
+INTEL_DPV=2013_sp1 |
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 |
+# single arch packages |
72 |
+# mkl-mic mkl-mic-devel |
73 |
+# mkl-sp2dp mkl-sp2dp-devel |
74 |
+INTEL_DAT_RPMS="mkl-common mkl-cluster-common mkl-f95-common" |
75 |
+ |
76 |
+src_prepare() { |
77 |
+ chmod u+w -R opt |
78 |
+} |
79 |
+ |
80 |
+mkl_add_prof() { |
81 |
+ local pcname=${1} libs cflags x |
82 |
+ shift |
83 |
+ [[ ${pcname} = *int64* ]] && cflags=-DMKL_ILP64 |
84 |
+ cat <<-EOF > ${pcname}.pc |
85 |
+ prefix=${INTEL_SDP_EDIR}/mkl |
86 |
+ libdir=\${prefix}/lib/${IARCH} |
87 |
+ includedir=\${prefix}/include |
88 |
+ Name: ${pcname} |
89 |
+ Description: ${DESCRIPTION} |
90 |
+ Version: ${PV} |
91 |
+ URL: ${HOMEPAGE} |
92 |
+ Libs: -L\${libdir} ${libs} |
93 |
+ Cflags: -I\${includedir} ${cflags} |
94 |
+ EOF |
95 |
+ insinto /usr/$(get_libdir)/pkgconfig |
96 |
+ doins ${pcname}.pc |
97 |
+ for x in $*; do |
98 |
+ alternatives_for ${x} ${pcname/-${x}} 0 \ |
99 |
+ /usr/$(get_libdir)/pkgconfig/${x}.pc ${pcname}.pc |
100 |
+ done |
101 |
+} |
102 |
+ |
103 |
+# mkl_prof [_ilp64 or _lp64] |
104 |
+# help: http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ |
105 |
+mkl_prof() { |
106 |
+ local bits="" |
107 |
+ if [[ ${IARCH} == intel64 ]]; then |
108 |
+ bits=_lp64 |
109 |
+ [[ ${1} == int64 ]] && bits=_ilp64 |
110 |
+ fi |
111 |
+ local gf="-Wl,--start-group -lmkl_gf${bits}" |
112 |
+ local intel="-Wl,--start-group -lmkl_intel${bits}" |
113 |
+ local core="-lmkl_core -Wl,--end-group" |
114 |
+ local prof=mkl${IARCH:((${#IARCH} - 2)):2} |
115 |
+ [[ ${1} == int64 ]] && prof=${prof}-int64 |
116 |
+ local libs |
117 |
+ |
118 |
+ libs="${gf} -lmkl_sequential ${core} -lpthread" \ |
119 |
+ mkl_add_prof ${prof}-gfortran blas lapack |
120 |
+ libs="${intel} -lmkl_sequential ${core} -lpthread" \ |
121 |
+ mkl_add_prof ${prof}-intel blas lapack cblas lapacke |
122 |
+ libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
123 |
+ mkl_add_prof ${prof}-gfortran-openmp blas lapack |
124 |
+ libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
125 |
+ mkl_add_prof ${prof}-gcc-openmp cblas lapacke |
126 |
+ libs="${intel} -lmkl_intel_thread ${core} -openmp -lpthread" \ |
127 |
+ mkl_add_prof ${prof}-intel-openmp blas lapack cblas lapacke |
128 |
+ libs="-lmkl_rt -lpthread" \ |
129 |
+ mkl_add_prof ${prof}-dynamic blas lapack cblas lapacke |
130 |
+ libs="-lmkl_rt -liomp5 -lpthread" \ |
131 |
+ mkl_add_prof ${prof}-dynamic-openmp blas lapack cblas lapacke |
132 |
+ |
133 |
+ # blacs and scalapack |
134 |
+ local scal="-lmkl_scalapack${bits:-_core}" |
135 |
+ local blacs="-lmkl_blacs_intelmpi${bits}" |
136 |
+ core="-lmkl_core ${blacs} -Wl,--end-group" |
137 |
+ |
138 |
+ libs="${gf} -lmkl_sequential ${core} -lpthread" \ |
139 |
+ mkl_add_prof ${prof}-gfortran-blacs blacs |
140 |
+ libs="${scal} ${gf} -lmkl_sequential ${core} -lpthread" \ |
141 |
+ mkl_add_prof ${prof}-gfortran-scalapack scalapack |
142 |
+ libs="${intel} -lmkl_sequential ${core} -lpthread" \ |
143 |
+ mkl_add_prof ${prof}-intel-blacs blacs |
144 |
+ libs="${scal} ${intel} -lmkl_sequential ${core} -lpthread" \ |
145 |
+ mkl_add_prof ${prof}-intel-scalapack scalapack |
146 |
+ libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
147 |
+ mkl_add_prof ${prof}-gfortran-openmp-blacs blacs |
148 |
+ libs="${scal} ${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
149 |
+ mkl_add_prof ${prof}-gfortran-openmp-scalapack scalapack |
150 |
+ libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
151 |
+ mkl_add_prof ${prof}-gcc-openmp-blacs blacs |
152 |
+ libs="${scal} ${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \ |
153 |
+ mkl_add_prof ${prof}-gcc-openmp-scalapack scalapack |
154 |
+ libs="${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \ |
155 |
+ mkl_add_prof ${prof}-intel-openmp-blacs blacs |
156 |
+ libs="${scal} ${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \ |
157 |
+ mkl_add_prof ${prof}-intel-openmp-scalapack scalapack |
158 |
+ libs="-lmkl_rt ${blacs} -lpthread" \ |
159 |
+ mkl_add_prof ${prof}-dynamic-blacs blacs |
160 |
+ libs="${scal} -lmkl_rt ${blacs} -lpthread" \ |
161 |
+ mkl_add_prof ${prof}-dynamic-scalapack scalapack |
162 |
+ libs="-lmkl_rt ${blacs} -liomp5 -lpthread" \ |
163 |
+ mkl_add_prof ${prof}-dynamic-openmp-blacs blacs |
164 |
+ libs="${scal} -lmkl_rt ${blacs} -liomp5 -lpthread" \ |
165 |
+ mkl_add_prof ${prof}-dynamic-openmp-scalapack scalapack |
166 |
+} |
167 |
+ |
168 |
+src_install() { |
169 |
+ intel-sdp_src_install |
170 |
+ echo -n > 35mkl "LDPATH=" |
171 |
+ for IARCH in ${INTEL_ARCH}; do |
172 |
+ mkl_prof |
173 |
+ sed -i -e '/mkl/s/$/:/' 35mkl |
174 |
+ echo -n >> 35mkl "${INTEL_SDP_EDIR}/mkl/lib/${IARCH}" |
175 |
+ [[ ${IARCH} == intel64 ]] && mkl_prof int64 |
176 |
+ done |
177 |
+ echo >> 35mkl |
178 |
+ doenvd 35mkl |
179 |
+} |