Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/mkl/
Date: Tue, 03 Jun 2014 07:06:38
Message-Id: 1401776341.104b8024a37672dd91774c7aeb7b743196b6cb78.jlec@gentoo
1 commit: 104b8024a37672dd91774c7aeb7b743196b6cb78
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 2 11:33:44 2014 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 3 06:19:01 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=104b8024
7
8 sci-libs/mkl: Version Bump
9
10 Package-Manager: portage-2.2.10
11
12 ---
13 sci-libs/mkl/ChangeLog | 5 ++
14 sci-libs/mkl/mkl-11.1.3.174.ebuild | 141 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 146 insertions(+)
16
17 diff --git a/sci-libs/mkl/ChangeLog b/sci-libs/mkl/ChangeLog
18 index 5d8927c..839e6eb 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.1.3.174 (02 Jun 2014)
26 +
27 + 02 Jun 2014; Justin Lecher <jlec@g.o> +mkl-11.1.3.174.ebuild:
28 + Version Bump
29 +
30 *mkl-11.1.2.144 (24 Mar 2014)
31
32 24 Mar 2014; Justin Lecher <jlec@g.o> +mkl-11.1.2.144.ebuild:
33
34 diff --git a/sci-libs/mkl/mkl-11.1.3.174.ebuild b/sci-libs/mkl/mkl-11.1.3.174.ebuild
35 new file mode 100644
36 index 0000000..b4dd5d3
37 --- /dev/null
38 +++ b/sci-libs/mkl/mkl-11.1.3.174.ebuild
39 @@ -0,0 +1,141 @@
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=4220
48 +INTEL_DPV=2013_sp1_update3
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 + libdir_comp=${INTEL_SDP_EDIR}/compiler/lib/${IARCH}
88 + includedir=\${prefix}/include
89 + Name: ${pcname}
90 + Description: ${DESCRIPTION}
91 + Version: ${PV}
92 + URL: ${HOMEPAGE}
93 + Libs: -L\${libdir} -L\${libdir_comp} ${libs}
94 + Cflags: -I\${includedir} ${cflags}
95 + EOF
96 + insinto /usr/$(get_libdir)/pkgconfig
97 + doins ${pcname}.pc
98 + for x in $*; do
99 + alternatives_for ${x} ${pcname/-${x}} 0 \
100 + /usr/$(get_libdir)/pkgconfig/${x}.pc ${pcname}.pc
101 + done
102 +}
103 +
104 +# mkl_prof [_ilp64 or _lp64]
105 +# help: http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
106 +mkl_prof() {
107 + local bits=""
108 + if [[ ${IARCH} == intel64 ]]; then
109 + bits=_lp64
110 + [[ ${1} == int64 ]] && bits=_ilp64
111 + fi
112 + local gf="-Wl,--start-group -lmkl_gf${bits}"
113 + local intel="-Wl,--start-group -lmkl_intel${bits}"
114 + local core="-lmkl_core -Wl,--end-group"
115 + local prof=mkl${IARCH:((${#IARCH} - 2)):2}
116 + [[ ${1} == int64 ]] && prof=${prof}-int64
117 + local libs
118 +
119 + libs="${gf} -lmkl_sequential ${core} -lpthread" \
120 + mkl_add_prof ${prof}-gfortran blas lapack
121 + libs="${intel} -lmkl_sequential ${core} -lpthread" \
122 + mkl_add_prof ${prof}-intel blas lapack cblas lapacke
123 + libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
124 + mkl_add_prof ${prof}-gfortran-openmp blas lapack
125 + libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
126 + mkl_add_prof ${prof}-gcc-openmp cblas lapacke
127 + libs="${intel} -lmkl_intel_thread ${core} -openmp -lpthread" \
128 + mkl_add_prof ${prof}-intel-openmp blas lapack cblas lapacke
129 + libs="-lmkl_rt -lpthread" \
130 + mkl_add_prof ${prof}-dynamic blas lapack cblas lapacke
131 + libs="-lmkl_rt -liomp5 -lpthread" \
132 + mkl_add_prof ${prof}-dynamic-openmp blas lapack cblas lapacke
133 +
134 + # blacs and scalapack
135 + local scal="-lmkl_scalapack${bits:-_core}"
136 + local blacs="-lmkl_blacs_intelmpi${bits}"
137 + core="-lmkl_core ${blacs} -Wl,--end-group"
138 +
139 + libs="${gf} -lmkl_sequential ${core} -lpthread" \
140 + mkl_add_prof ${prof}-gfortran-blacs blacs
141 + libs="${scal} ${gf} -lmkl_sequential ${core} -lpthread" \
142 + mkl_add_prof ${prof}-gfortran-scalapack scalapack
143 + libs="${intel} -lmkl_sequential ${core} -lpthread" \
144 + mkl_add_prof ${prof}-intel-blacs blacs
145 + libs="${scal} ${intel} -lmkl_sequential ${core} -lpthread" \
146 + mkl_add_prof ${prof}-intel-scalapack scalapack
147 + libs="${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
148 + mkl_add_prof ${prof}-gfortran-openmp-blacs blacs
149 + libs="${scal} ${gf} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
150 + mkl_add_prof ${prof}-gfortran-openmp-scalapack scalapack
151 + libs="${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
152 + mkl_add_prof ${prof}-gcc-openmp-blacs blacs
153 + libs="${scal} ${intel} -lmkl_gnu_thread ${core} -fopenmp -lpthread" \
154 + mkl_add_prof ${prof}-gcc-openmp-scalapack scalapack
155 + libs="${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \
156 + mkl_add_prof ${prof}-intel-openmp-blacs blacs
157 + libs="${scal} ${intel} -lmkl_intel_thread ${core} -liomp5 -lpthread" \
158 + mkl_add_prof ${prof}-intel-openmp-scalapack scalapack
159 + libs="-lmkl_rt ${blacs} -lpthread" \
160 + mkl_add_prof ${prof}-dynamic-blacs blacs
161 + libs="${scal} -lmkl_rt ${blacs} -lpthread" \
162 + mkl_add_prof ${prof}-dynamic-scalapack scalapack
163 + libs="-lmkl_rt ${blacs} -liomp5 -lpthread" \
164 + mkl_add_prof ${prof}-dynamic-openmp-blacs blacs
165 + libs="${scal} -lmkl_rt ${blacs} -liomp5 -lpthread" \
166 + mkl_add_prof ${prof}-dynamic-openmp-scalapack scalapack
167 +}
168 +
169 +src_install() {
170 + intel-sdp_src_install
171 + echo -n > 35mkl "LDPATH="
172 + for IARCH in ${INTEL_ARCH}; do
173 + mkl_prof
174 + sed -i -e '/mkl/s/$/:/' 35mkl
175 + echo -n >> 35mkl "${INTEL_SDP_EDIR}/mkl/lib/${IARCH}"
176 + [[ ${IARCH} == intel64 ]] && mkl_prof int64
177 + done
178 + echo >> 35mkl
179 + doenvd 35mkl
180 +}