1 |
commit: bc36b5406f2bb289a3920ef13d50853a567bc83d |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 19 07:14:19 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 28 17:25:09 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=bc36b540 |
7 |
|
8 |
Large fix of numeric code |
9 |
|
10 |
fortran-int64.eclass code has been splitted into |
11 |
numeric-int64-multibuild.eclass, fortran-2.eclass and |
12 |
numeric.eclass. |
13 |
|
14 |
Gentoo: |
15 |
https://bugs.gentoo.org/show_bug.cgi?id=563292 |
16 |
https://bugs.gentoo.org/show_bug.cgi?id=551764 |
17 |
https://bugs.gentoo.org/show_bug.cgi?id=555302 |
18 |
|
19 |
Github: |
20 |
resolves gentoo-science/sci#438 |
21 |
resolves gentoo-science/sci#443 |
22 |
resolves gentoo-science/sci#447 |
23 |
resolves gentoo-science/sci#450 |
24 |
resolves gentoo-science/sci#467 |
25 |
resolves gentoo-science/sci#492 |
26 |
resolves gentoo-science/sci#507 |
27 |
resolves gentoo-science/sci#508 |
28 |
resolves gentoo-science/sci#522 |
29 |
|
30 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
31 |
|
32 |
eclass/alternatives-2.eclass | 10 +- |
33 |
eclass/fortran-2.eclass | 276 ++++++++++++++ |
34 |
eclass/fortran-int64.eclass | 300 ---------------- |
35 |
eclass/numeric-int64-multibuild.eclass | 397 +++++++++++++++++++++ |
36 |
eclass/numeric.eclass | 35 +- |
37 |
.../blas-reference-20131116-r1.ebuild | 118 ------ |
38 |
.../blas-reference-20131116-r2.ebuild | 107 ++++++ |
39 |
.../blas-reference/blas-reference-20131116.ebuild | 78 ---- |
40 |
.../blas-reference/blas-reference-99999999.ebuild | 76 ++-- |
41 |
sci-libs/blas-reference/metadata.xml | 4 +- |
42 |
.../cblas-reference-20110218-r1.ebuild | 98 +++-- |
43 |
.../cblas-reference-20110218.ebuild | 116 ------ |
44 |
sci-libs/gotoblas2/gotoblas2-1.13.ebuild | 139 ++++---- |
45 |
.../lapack-reference/lapack-reference-3.4.2.ebuild | 139 -------- |
46 |
.../lapack-reference/lapack-reference-3.5.0.ebuild | 81 ++--- |
47 |
.../lapack-reference/lapack-reference-9999.ebuild | 86 ++--- |
48 |
sci-libs/openblas/openblas-0.2.11.ebuild | 227 ------------ |
49 |
sci-libs/openblas/openblas-0.2.12.ebuild | 227 ------------ |
50 |
sci-libs/openblas/openblas-0.2.14.ebuild | 190 ++++------ |
51 |
sci-libs/openblas/openblas-0.2.8.ebuild | 126 ------- |
52 |
sci-libs/openblas/openblas-9999.ebuild | 190 ++++------ |
53 |
sci-libs/xblas/xblas-1.0.248-r1.ebuild | 78 ++-- |
54 |
sci-libs/xblas/xblas-1.0.248.ebuild | 93 ----- |
55 |
virtual/blas/blas-2.1-r1.ebuild | 38 -- |
56 |
virtual/blas/blas-2.1-r2.ebuild | 41 --- |
57 |
virtual/blas/blas-2.1-r3.ebuild | 11 +- |
58 |
virtual/blas/metadata.xml | 6 +- |
59 |
virtual/cblas/cblas-2.0-r1.ebuild | 28 -- |
60 |
virtual/cblas/cblas-2.0-r2.ebuild | 31 -- |
61 |
virtual/cblas/cblas-2.0-r3.ebuild | 14 +- |
62 |
virtual/cblas/cblas-2.0.ebuild | 24 -- |
63 |
virtual/lapack/lapack-3.4-r1.ebuild | 35 -- |
64 |
virtual/lapack/lapack-3.5-r1.ebuild | 33 -- |
65 |
virtual/lapack/lapack-3.5-r2.ebuild | 6 +- |
66 |
34 files changed, 1239 insertions(+), 2219 deletions(-) |
67 |
|
68 |
diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass |
69 |
index 749cda8..19e8306 100644 |
70 |
--- a/eclass/alternatives-2.eclass |
71 |
+++ b/eclass/alternatives-2.eclass |
72 |
@@ -102,7 +102,7 @@ alternatives-2_pkg_postinst() { |
73 |
fi |
74 |
|
75 |
# Set alternative provider if there is no valid provider selected |
76 |
- eselect "${alt}" update "${provider}" |
77 |
+ eselect alternatives update "${alt}" |
78 |
|
79 |
cleanup_old_alternatives_module ${alt} |
80 |
done |
81 |
@@ -122,9 +122,10 @@ alternatives-2_pkg_prerm() { |
82 |
|
83 |
# If we are uninstalling, update alternatives to valid provider |
84 |
[[ -n ${REPLACED_BY_VERSION} ]] || ignore="--ignore" |
85 |
- |
86 |
+set -x |
87 |
for alt in ${ALTERNATIVES_CREATED[@]}; do |
88 |
- eselect "${alt}" update ${ignore} "${provider}" |
89 |
+ eselect alternatives update "${alt}" |
90 |
+ ret=$? |
91 |
|
92 |
case ${ret} in |
93 |
0) : ;; |
94 |
@@ -134,10 +135,11 @@ alternatives-2_pkg_prerm() { |
95 |
eselect alternatives delete "${alt}" || eerror "Failed to remove ${alt}" |
96 |
;; |
97 |
*) |
98 |
- eerror "eselect ${alt} update ${provider} returned ${ret}" |
99 |
+ eerror "eselect alternatives update returned \"${ret}\"" |
100 |
;; |
101 |
esac |
102 |
done |
103 |
+set +x |
104 |
} |
105 |
|
106 |
EXPORT_FUNCTIONS pkg_postinst pkg_prerm |
107 |
|
108 |
diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass |
109 |
new file mode 100644 |
110 |
index 0000000..5cb6d7d |
111 |
--- /dev/null |
112 |
+++ b/eclass/fortran-2.eclass |
113 |
@@ -0,0 +1,276 @@ |
114 |
+# Copyright 1999-2015 Gentoo Foundation |
115 |
+# Distributed under the terms of the GNU General Public License v2 |
116 |
+# $Id$ |
117 |
+ |
118 |
+# @ECLASS: fortran-2.eclass |
119 |
+# @MAINTAINER: |
120 |
+# jlec@g.o |
121 |
+# sci@g.o |
122 |
+# @AUTHOR: |
123 |
+# Author Justin Lecher <jlec@g.o> |
124 |
+# Test functions provided by Sebastien Fabbro and Kacper Kowalik |
125 |
+# @BLURB: Simplify fortran compiler management |
126 |
+# @DESCRIPTION: |
127 |
+# If you need a fortran compiler, then you should be inheriting this eclass. |
128 |
+# In case you only need optional support, please export FORTRAN_NEEDED before |
129 |
+# inheriting the eclass. |
130 |
+# |
131 |
+# The eclass tests for working fortran compilers |
132 |
+# and exports the variables FC and F77. |
133 |
+# Optionally, it checks for extended capabilities based on |
134 |
+# the variable options selected in the ebuild |
135 |
+# The only phase function exported is fortran-2_pkg_setup. |
136 |
+# @EXAMPLE: |
137 |
+# FORTRAN_NEEDED="lapack fortran" |
138 |
+# |
139 |
+# inherit fortran-2 |
140 |
+# |
141 |
+# FORTRAN_NEED_OPENMP=1 |
142 |
+ |
143 |
+if [[ ! ${_FORTRAN_2_CLASS} ]]; then |
144 |
+ |
145 |
+# @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP |
146 |
+# @DESCRIPTION: |
147 |
+# Set to "1" in order to automatically have the eclass abort if the fortran |
148 |
+# compiler lacks openmp support. |
149 |
+: ${FORTRAN_NEED_OPENMP:=0} |
150 |
+ |
151 |
+# @ECLASS-VARIABLE: FORTRAN_STANDARD |
152 |
+# @DESCRIPTION: |
153 |
+# Set this, if a special dialect needs to be supported. |
154 |
+# Generally not needed as default is sufficient. |
155 |
+# |
156 |
+# Valid settings are any combination of: 77 90 95 2003 |
157 |
+: ${FORTRAN_STANDARD:=77} |
158 |
+ |
159 |
+# @ECLASS-VARIABLE: FORTRAN_NEEDED |
160 |
+# @DESCRIPTION: |
161 |
+# If your package has an optional fortran support, set this variable |
162 |
+# to the space separated list of USE triggering the fortran |
163 |
+# dependency. |
164 |
+# |
165 |
+# e.g. FORTRAN_NEEDED=lapack would result in |
166 |
+# |
167 |
+# DEPEND="lapack? ( virtual/fortran )" |
168 |
+# |
169 |
+# If unset, we always depend on virtual/fortran. |
170 |
+: ${FORTRAN_NEEDED:=always} |
171 |
+ |
172 |
+inherit eutils toolchain-funcs |
173 |
+ |
174 |
+for _f_use in ${FORTRAN_NEEDED}; do |
175 |
+ case ${_f_use} in |
176 |
+ always) |
177 |
+ DEPEND+=" virtual/fortran" |
178 |
+ break |
179 |
+ ;; |
180 |
+ no) |
181 |
+ break |
182 |
+ ;; |
183 |
+ *) |
184 |
+ DEPEND+=" ${_f_use}? ( virtual/fortran )" |
185 |
+ ;; |
186 |
+ esac |
187 |
+done |
188 |
+RDEPEND="${DEPEND}" |
189 |
+ |
190 |
+# @FUNCTION: fortran_int64_abi_fflags |
191 |
+# @DESCRIPTION: Return the Fortran compiler flag to enable 64 bit integers for |
192 |
+# array indices |
193 |
+# @CODE |
194 |
+fortran_int64_abi_fflags() { |
195 |
+ debug-print-function ${FUNCNAME} "${@}" |
196 |
+ _FC=$(tc-getFC) |
197 |
+ if [[ ${_FC} == *gfortran* ]]; then |
198 |
+ echo "-fdefault-integer-8" |
199 |
+ elif [[ ${_FC} == ifort ]]; then |
200 |
+ echo "-integer-size 64" |
201 |
+ else |
202 |
+ die "Compiler flag for 64bit interger for ${_FC} unknown" |
203 |
+ fi |
204 |
+} |
205 |
+ |
206 |
+# @FUNCTION: _fortran_write_testsuite |
207 |
+# @INTERNAL |
208 |
+# @DESCRIPTION: |
209 |
+# writes fortran test code |
210 |
+_fortran_write_testsuite() { |
211 |
+ local filebase=${T}/test-fortran |
212 |
+ |
213 |
+ # f77 code |
214 |
+ cat <<- EOF > "${filebase}.f" |
215 |
+ end |
216 |
+ EOF |
217 |
+ |
218 |
+ # f90/95 code |
219 |
+ cat <<- EOF > "${filebase}.f90" |
220 |
+ end |
221 |
+ EOF |
222 |
+ |
223 |
+ # f2003 code |
224 |
+ cat <<- EOF > "${filebase}.f03" |
225 |
+ procedure(), pointer :: p |
226 |
+ end |
227 |
+ EOF |
228 |
+} |
229 |
+ |
230 |
+# @FUNCTION: _fortran_compile_test |
231 |
+# @USAGE: <compiler> [dialect] |
232 |
+# @INTERNAL |
233 |
+# @DESCRIPTION: |
234 |
+# Takes fortran compiler as first argument and dialect as second. |
235 |
+# Checks whether the passed fortran compiler speaks the fortran dialect |
236 |
+_fortran_compile_test() { |
237 |
+ local filebase=${T}/test-fortran |
238 |
+ local fcomp=${1} |
239 |
+ local fdia=${2} |
240 |
+ local fcode=${filebase}.f${fdia} |
241 |
+ local ret |
242 |
+ |
243 |
+ [[ $# -lt 1 ]] && \ |
244 |
+ die "_fortran_compile_test() needs at least one argument" |
245 |
+ |
246 |
+ [[ -f ${fcode} ]] || _fortran_write_testsuite |
247 |
+ |
248 |
+ ${fcomp} "${fcode}" -o "${fcode}.x" \ |
249 |
+ >> "${T}"/_fortran_compile_test.log 2>&1 |
250 |
+ ret=$? |
251 |
+ |
252 |
+ rm -f "${fcode}.x" |
253 |
+ return ${ret} |
254 |
+} |
255 |
+ |
256 |
+# @FUNCTION: _fortran-has-openmp |
257 |
+# @RETURN: return code of the compiler |
258 |
+# @INTERNAL |
259 |
+# @DESCRIPTION: |
260 |
+# See if the fortran supports OpenMP. |
261 |
+_fortran-has-openmp() { |
262 |
+ local flag |
263 |
+ local filebase=${T}/test-fc-openmp |
264 |
+ local fcode=${filebase}.f |
265 |
+ local ret |
266 |
+ local _fc=$(tc-getFC) |
267 |
+ |
268 |
+ cat <<- EOF > "${fcode}" |
269 |
+ call omp_get_num_threads |
270 |
+ end |
271 |
+ EOF |
272 |
+ |
273 |
+ for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do |
274 |
+ ${_fc} ${flag} "${fcode}" -o "${fcode}.x" \ |
275 |
+ &>> "${T}"/_fortran_compile_test.log |
276 |
+ ret=$? |
277 |
+ (( ${ret} )) || break |
278 |
+ done |
279 |
+ |
280 |
+ rm -f "${fcode}.x" |
281 |
+ return ${ret} |
282 |
+} |
283 |
+ |
284 |
+# @FUNCTION: _fortran_die_msg |
285 |
+# @INTERNAL |
286 |
+# @DESCRIPTION: |
287 |
+# Detailed description how to handle fortran support |
288 |
+_fortran_die_msg() { |
289 |
+ echo |
290 |
+ eerror "Please install currently selected gcc version with USE=fortran." |
291 |
+ eerror "If you intend to use a different compiler then gfortran, please" |
292 |
+ eerror "set FC variable accordingly and take care that the necessary" |
293 |
+ eerror "fortran dialects are supported." |
294 |
+ echo |
295 |
+ die "Currently no working fortran compiler is available" |
296 |
+} |
297 |
+ |
298 |
+# @FUNCTION: _fortran_test_function |
299 |
+# @INTERNAL |
300 |
+# @DESCRIPTION: |
301 |
+# Internal test function for working fortran compiler. |
302 |
+# It is called in fortran-2_pkg_setup. |
303 |
+_fortran_test_function() { |
304 |
+ local dialect |
305 |
+ |
306 |
+ : ${F77:=$(tc-getFC)} |
307 |
+ |
308 |
+ : ${FORTRAN_STANDARD:=77} |
309 |
+ for dialect in ${FORTRAN_STANDARD}; do |
310 |
+ case ${dialect} in |
311 |
+ 77) _fortran_compile_test $(tc-getF77) || \ |
312 |
+ _fortran_die_msg ;; |
313 |
+ 90|95) _fortran_compile_test $(tc-getFC) 90 || \ |
314 |
+ _fortran_die_msg ;; |
315 |
+ 2003) _fortran_compile_test $(tc-getFC) 03 || \ |
316 |
+ _fortran_die_msg ;; |
317 |
+ 2008) die "Future" ;; |
318 |
+ *) die "${dialect} is not a Fortran dialect." ;; |
319 |
+ esac |
320 |
+ done |
321 |
+ |
322 |
+ tc-export F77 FC |
323 |
+ einfo "Using following Fortran compiler:" |
324 |
+ einfo " F77: ${F77}" |
325 |
+ einfo " FC: ${FC}" |
326 |
+ |
327 |
+ if [[ ${FORTRAN_NEED_OPENMP} == 1 ]]; then |
328 |
+ if _fortran-has-openmp; then |
329 |
+ einfo "${FC} has OPENMP support" |
330 |
+ else |
331 |
+ die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP" |
332 |
+ fi |
333 |
+ fi |
334 |
+} |
335 |
+ |
336 |
+# @FUNCTION: _fortran-2_pkg_setup |
337 |
+# @INTERNAL |
338 |
+# @DESCRIPTION: |
339 |
+# _The_ fortran-2_pkg_setup() code |
340 |
+_fortran-2_pkg_setup() { |
341 |
+ for _f_use in ${FORTRAN_NEEDED}; do |
342 |
+ case ${_f_use} in |
343 |
+ always) |
344 |
+ _fortran_test_function && break |
345 |
+ ;; |
346 |
+ no) |
347 |
+ einfo "Forcing fortran support off" |
348 |
+ break |
349 |
+ ;; |
350 |
+ *) |
351 |
+ if use ${_f_use}; then |
352 |
+ _fortran_test_function && break |
353 |
+ else |
354 |
+ unset FC |
355 |
+ unset F77 |
356 |
+ fi |
357 |
+ ;; |
358 |
+ esac |
359 |
+ done |
360 |
+} |
361 |
+ |
362 |
+ |
363 |
+# @FUNCTION: fortran-2_pkg_setup |
364 |
+# @DESCRIPTION: |
365 |
+# Setup functionality, |
366 |
+# checks for a valid fortran compiler and optionally for its openmp support. |
367 |
+fortran-2_pkg_setup() { |
368 |
+ case ${EAPI:-0} in |
369 |
+ 0|1|2|3) |
370 |
+ eqawarn "Support for EAPI < 4 will be removed from the" |
371 |
+ eqawarn "fortran-2.eclass in until 2013-09-30." |
372 |
+ eqawarn "Please migrate your package to a higher EAPI" |
373 |
+ eqawarn "or file a bug at https://bugs.gentoo.org" |
374 |
+ _fortran-2_pkg_setup ;; |
375 |
+ 4|5) |
376 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
377 |
+ _fortran-2_pkg_setup |
378 |
+ fi |
379 |
+ ;; |
380 |
+ esac |
381 |
+} |
382 |
+ |
383 |
+case ${EAPI:-0} in |
384 |
+ 0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;; |
385 |
+ *) die "EAPI=${EAPI} is not supported" ;; |
386 |
+esac |
387 |
+ |
388 |
+_FORTRAN_2_ECLASS=1 |
389 |
+fi |
390 |
|
391 |
diff --git a/eclass/fortran-int64.eclass b/eclass/fortran-int64.eclass |
392 |
deleted file mode 100644 |
393 |
index 09980c8..0000000 |
394 |
--- a/eclass/fortran-int64.eclass |
395 |
+++ /dev/null |
396 |
@@ -1,300 +0,0 @@ |
397 |
-# Copyright 1999-2014 Gentoo Foundation |
398 |
-# Distributed under the terms of the GNU General Public License v2 |
399 |
-# $Id$ |
400 |
- |
401 |
-# @ECLASS: fortran-int64.eclass |
402 |
-# @MAINTAINER: |
403 |
-# sci team <sci@g.o> |
404 |
-# @AUTHOR: |
405 |
-# Author: Mark Wright <gienah@g.o> |
406 |
-# @BLURB: flags and utility functions for building Fortran multilib int64 |
407 |
-# multibuild packages |
408 |
-# @DESCRIPTION: |
409 |
-# The fortran-int64.eclass exports USE flags and utility functions |
410 |
-# necessary to build packages for multilib int64 multibuild in a clean |
411 |
-# and uniform manner. |
412 |
- |
413 |
-if [[ ! ${_FORTRAN_INT64_ECLASS} ]]; then |
414 |
- |
415 |
-# EAPI=4 is required for meaningful MULTILIB_USEDEP. |
416 |
-case ${EAPI:-0} in |
417 |
- 4|5) ;; |
418 |
- *) die "EAPI=${EAPI} is not supported" ;; |
419 |
-esac |
420 |
- |
421 |
-inherit multilib-build toolchain-funcs |
422 |
- |
423 |
-# @ECLASS-VARIABLE: EBASE_PROFNAME |
424 |
-# @DESCRIPTION: The base pkg-config module name of the package being built. |
425 |
-# EBASE_PROFNAME is used by the fortran-int64_get_profname function to |
426 |
-# determine the pkg-config module name based on whether the package |
427 |
-# has dynamic, threads or openmp USE flags and if so, if the user has |
428 |
-# turned them or, and if the current multibuild is a int64 build or not. |
429 |
-# @CODE |
430 |
-# EBASE_PROFNAME="openblas" |
431 |
-# inherit ... fortran-int64 |
432 |
-# @CODE |
433 |
-: ${EBASE_PROFNAME:=blas} |
434 |
- |
435 |
-# @ECLASS-VARIABLE: ESTATIC_MULTIBUILD |
436 |
-# @DEFAULT_UNSET |
437 |
-# @DESCRIPTION: |
438 |
-# If this is set, then do separate static multibuilds. |
439 |
-# @CODE |
440 |
-# ESTATIC_MULTIBUILD=1 |
441 |
-# inherit ... fortran-int64 |
442 |
-# @CODE |
443 |
- |
444 |
-INT64_SUFFIX="int64" |
445 |
-STATIC_SUFFIX="static" |
446 |
- |
447 |
-# @FUNCTION: fortran-int64_is_int64_build |
448 |
-# @DESCRIPTION: |
449 |
-# Returns shell true if the current multibuild is a int64 build, |
450 |
-# else returns shell false. |
451 |
-# @CODE |
452 |
-# $(fortran-int64_is_int64_build) && \ |
453 |
-# openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT" |
454 |
-# @CODE |
455 |
-fortran-int64_is_int64_build() { |
456 |
- debug-print-function ${FUNCNAME} "${@}" |
457 |
- if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then |
458 |
- return 0 |
459 |
- else |
460 |
- return 1 |
461 |
- fi |
462 |
-} |
463 |
- |
464 |
-# @FUNCTION: fortran-int64_is_static_build |
465 |
-# @DESCRIPTION: |
466 |
-# Returns shell true if ESTATIC_MULTIBUILD is true and the current multibuild |
467 |
-# is a static build, else returns shell false. |
468 |
-# @CODE |
469 |
-# if $(fortran-int64_is_static_build); then |
470 |
-# ... |
471 |
-# @CODE |
472 |
-fortran-int64_is_static_build() { |
473 |
- debug-print-function ${FUNCNAME} "${@}" |
474 |
- if [[ "${MULTIBUILD_ID}" =~ "_${STATIC_SUFFIX}" ]]; then |
475 |
- return 0 |
476 |
- else |
477 |
- return 1 |
478 |
- fi |
479 |
-} |
480 |
- |
481 |
-# @FUNCTION: fortran-int64_get_profname |
482 |
-# @USAGE: [<profname>] |
483 |
-# @DESCRIPTION: Return the pkgbuild profile name, without the .pc extension, |
484 |
-# for the current fortran int64 build. If the current build is not an int64 |
485 |
-# build, and the ebuild does not have dynamic, threads or openmp USE flags or |
486 |
-# they are disabled, then the profname is ${EBASE_PROFNAME} or <profname> if |
487 |
-# <profname> is specified. |
488 |
-# |
489 |
-# Takes an optional <profname> parameter. If no <profname> is specified, uses |
490 |
-# ${EBASE_PROFNAME} as the base to calculate the profname for the current |
491 |
-# build. |
492 |
-fortran-int64_get_profname() { |
493 |
- debug-print-function ${FUNCNAME} "${@}" |
494 |
- local profname="${1:-${EBASE_PROFNAME}}" |
495 |
- if has dynamic ${IUSE} && use dynamic; then |
496 |
- profname+="-dynamic" |
497 |
- fi |
498 |
- if $(fortran-int64_is_int64_build); then |
499 |
- profname+="-${INT64_SUFFIX}" |
500 |
- fi |
501 |
- # choose posix threads over openmp when the two are set |
502 |
- # yet to see the need of having the two profiles simultaneously |
503 |
- if has threads ${IUSE} && use threads; then |
504 |
- profname+="-threads" |
505 |
- elif has openmp ${IUSE} && use openmp; then |
506 |
- profname+="-openmp" |
507 |
- fi |
508 |
- echo "${profname}" |
509 |
-} |
510 |
- |
511 |
-# @FUNCTION: fortran-int64_get_blas_provider |
512 |
-# @DESCRIPTION: Returns the eselect blas provider for the current build. |
513 |
-# Which is blas-int64 if called from an int64 build, or blas otherwise. |
514 |
-# @CODE |
515 |
-# local profname=$(fortran-int64_get_profname) |
516 |
-# local provider=$(fortran-int64_get_blas_provider) |
517 |
-# alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
518 |
-# /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc |
519 |
-# @CODE |
520 |
-fortran-int64_get_blas_provider() { |
521 |
- debug-print-function ${FUNCNAME} "${@}" |
522 |
- local provider_name="blas" |
523 |
- if $(fortran-int64_is_int64_build); then |
524 |
- provider_name+="-${INT64_SUFFIX}" |
525 |
- fi |
526 |
- echo "${provider_name}" |
527 |
-} |
528 |
- |
529 |
-# @FUNCTION: fortran-int64_get_cblas_provider |
530 |
-# @DESCRIPTION: Returns the eselect cblas provider for the current build. |
531 |
-# Which is cblas-int64 if called from an int64 build, or cblas otherwise. |
532 |
-# @CODE |
533 |
-# local profname=$(fortran-int64_get_profname) |
534 |
-# local provider=$(fortran-int64_get_cblas_provider) |
535 |
-# alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
536 |
-# /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc |
537 |
-# @CODE |
538 |
-fortran-int64_get_cblas_provider() { |
539 |
- debug-print-function ${FUNCNAME} "${@}" |
540 |
- local provider_name="cblas" |
541 |
- if $(fortran-int64_is_int64_build); then |
542 |
- provider_name+="-${INT64_SUFFIX}" |
543 |
- fi |
544 |
- echo "${provider_name}" |
545 |
-} |
546 |
- |
547 |
-# @FUNCTION: fortran-int64_get_lapack_provider |
548 |
-# @DESCRIPTION: Returns the eselect lapack provider for the current build. |
549 |
-# Which is lapack-int64 if called from an int64 build, or lapack otherwise. |
550 |
-# @CODE |
551 |
-# local profname=$(fortran-int64_get_profname) |
552 |
-# local provider=$(fortran-int64_get_lapack_provider) |
553 |
-# alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
554 |
-# /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc |
555 |
-# @CODE |
556 |
-fortran-int64_get_lapack_provider() { |
557 |
- debug-print-function ${FUNCNAME} "${@}" |
558 |
- local provider_name="lapack" |
559 |
- if $(fortran-int64_is_int64_build); then |
560 |
- provider_name+="-${INT64_SUFFIX}" |
561 |
- fi |
562 |
- echo "${provider_name}" |
563 |
-} |
564 |
- |
565 |
-# @FUNCTION: fortran-int64_get_blas_profname |
566 |
-# @DESCRIPTION: Returns the pkg-config file name, without the .pc extension, |
567 |
-# for the currently selected blas-int64 module if we are performing an int64 |
568 |
-# build, or the currently selected blas module otherwise. |
569 |
-# @CODE |
570 |
-# cat <<-EOF > ${profname}.pc |
571 |
-# ... |
572 |
-# Requires: $(fortran-int64_get_blas_profname) |
573 |
-# ... |
574 |
-# @CODE |
575 |
-fortran-int64_get_blas_profname() { |
576 |
- debug-print-function ${FUNCNAME} "${@}" |
577 |
- local blas_provider=$(fortran-int64_get_blas_provider) |
578 |
- local blas_symlinks=( $(eselect "${blas_provider}" files) ) |
579 |
- local blas_prof_symlink="$(readlink -f "${blas_symlinks[0]}")" |
580 |
- local blas_prof_file="${blas_prof_symlink##*/}" |
581 |
- echo "${blas_prof_file%.pc}" |
582 |
-} |
583 |
- |
584 |
-# @FUNCTION: fortran-int64_get_xblas_profname |
585 |
-# @DESCRIPTION: Returns the xblas pkg-config file name, without the .pc extension, |
586 |
-# for the current build. Which is xblas-int64 if we are performing an int64 |
587 |
-# build, or xblas otherwise. |
588 |
-# @CODE |
589 |
-# cat <<-EOF > ${profname}.pc |
590 |
-# ... |
591 |
-# Requires: $(fortran-int64_get_xblas_profname) |
592 |
-# ... |
593 |
-# @CODE |
594 |
-fortran-int64_get_xblas_profname() { |
595 |
- debug-print-function ${FUNCNAME} "${@}" |
596 |
- local xblas_provider="xblas" |
597 |
- if $(fortran-int64_is_int64_build); then |
598 |
- xblas_provider+="-${INT64_SUFFIX}" |
599 |
- fi |
600 |
- echo "${xblas_provider}" |
601 |
-} |
602 |
- |
603 |
-# @FUNCTION: fortran-int64_get_fortran_int64_abi_fflags |
604 |
-# @DESCRIPTION: Return the Fortran compiler flag to enable 64 bit integers for |
605 |
-# array indices if we are performing an int64 build, or the empty string |
606 |
-# otherwise. |
607 |
-# @CODE |
608 |
-# src_configure() { |
609 |
-# local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
610 |
-# my_configure() { |
611 |
-# export FCFLAGS="${FCFLAGS} $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags)" |
612 |
-# econf $(use_enable fortran) |
613 |
-# } |
614 |
-# multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure |
615 |
-# } |
616 |
-# @CODE |
617 |
-fortran-int64_get_fortran_int64_abi_fflags() { |
618 |
- debug-print-function ${FUNCNAME} "${@}" |
619 |
- local openblas_abi_fflags="" |
620 |
- if $(fortran-int64_is_int64_build); then |
621 |
- openblas_abi_fflags+="-fdefault-integer-8" |
622 |
- fi |
623 |
- echo "${openblas_abi_fflags}" |
624 |
-} |
625 |
- |
626 |
-# @FUNCTION: fortran-int64_multilib_get_enabled_abis |
627 |
-# @DESCRIPTION: Returns the array of multilib int64 and optionally static |
628 |
-# build combinations. Each ebuild function that requires multibuild |
629 |
-# functionalits needs to set the MULTIBUILD_VARIANTS variable to the |
630 |
-# array returned by this function. |
631 |
-# @CODE |
632 |
-# src_prepare() { |
633 |
-# local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
634 |
-# multibuild_copy_sources |
635 |
-# } |
636 |
-# @CODE |
637 |
-fortran-int64_multilib_get_enabled_abis() { |
638 |
- debug-print-function ${FUNCNAME} "${@}" |
639 |
- local MULTILIB_VARIANTS=( $(multilib_get_enabled_abis) ) |
640 |
- local MULTILIB_INT64_VARIANTS=() |
641 |
- local i |
642 |
- for i in "${MULTILIB_VARIANTS[@]}"; do |
643 |
- if use int64 && [[ "${i}" =~ 64$ ]]; then |
644 |
- MULTILIB_INT64_VARIANTS+=( "${i}_${INT64_SUFFIX}" ) |
645 |
- fi |
646 |
- MULTILIB_INT64_VARIANTS+=( "${i}" ) |
647 |
- done |
648 |
- local MULTIBUILD_VARIANTS=() |
649 |
- if [[ -n ${ESTATIC_MULTIBUILD} ]]; then |
650 |
- local j |
651 |
- for j in "${MULTILIB_INT64_VARIANTS[@]}"; do |
652 |
- use static-libs && MULTIBUILD_VARIANTS+=( "${j}_${STATIC_SUFFIX}" ) |
653 |
- MULTIBUILD_VARIANTS+=( "${j}" ) |
654 |
- done |
655 |
- else |
656 |
- MULTIBUILD_VARIANTS="${MULTILIB_INT64_VARIANTS[@]}" |
657 |
- fi |
658 |
- echo "${MULTIBUILD_VARIANTS[@]}" |
659 |
-} |
660 |
- |
661 |
-# @FUNCTION: fortran-int64_ensure_blas |
662 |
-# @DESCRIPTION: Check the blas pkg-config files are available for the currently |
663 |
-# selected blas module, and for the currently select blas-int64 module if the |
664 |
-# int64 USE flag is enabled. |
665 |
-# @CODE |
666 |
-# src_prepare() { |
667 |
-# fortran-int64_ensure_blas |
668 |
-# ... |
669 |
-# @CODE |
670 |
-fortran-int64_ensure_blas() { |
671 |
- local MULTILIB_INT64_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
672 |
- local MULTIBUILD_ID |
673 |
- for MULTIBUILD_ID in "${MULTILIB_INT64_VARIANTS[@]}"; do |
674 |
- local blas_profname=$(fortran-int64_get_blas_profname) |
675 |
- $(tc-getPKG_CONFIG) --exists "${blas_profname}" \ |
676 |
- || die "${PN} requires the pkgbuild module ${blas_profname}" |
677 |
- done |
678 |
-} |
679 |
- |
680 |
-# @FUNCTION: fortran-int64_multilib_multibuild_wrapper |
681 |
-# @USAGE: <argv>... |
682 |
-# @DESCRIPTION: |
683 |
-# Initialize the environment for ABI selected for multibuild. |
684 |
-# @CODE |
685 |
-# multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install |
686 |
-# @CODE |
687 |
-fortran-int64_multilib_multibuild_wrapper() { |
688 |
- debug-print-function ${FUNCNAME} "${@}" |
689 |
- local v="${MULTIBUILD_VARIANT/_${INT64_SUFFIX}/}" |
690 |
- local ABI="${v/_${STATIC_SUFFIX}/}" |
691 |
- multilib_toolchain_setup "${ABI}" |
692 |
- "${@}" |
693 |
-} |
694 |
- |
695 |
-_FORTRAN_INT64_ECLASS=1 |
696 |
-fi |
697 |
|
698 |
diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass |
699 |
new file mode 100644 |
700 |
index 0000000..a55db31 |
701 |
--- /dev/null |
702 |
+++ b/eclass/numeric-int64-multibuild.eclass |
703 |
@@ -0,0 +1,397 @@ |
704 |
+# Copyright 1999-2015 Gentoo Foundation |
705 |
+# Distributed under the terms of the GNU General Public License v2 |
706 |
+# $Id$ |
707 |
+ |
708 |
+# @ECLASS: numeric-int64-multilib.eclass |
709 |
+# @MAINTAINER: |
710 |
+# sci team <sci@g.o> |
711 |
+# @AUTHOR: |
712 |
+# Author: Mark Wright <gienah@g.o> |
713 |
+# Author: Justin Lecher <jlec@g.o> |
714 |
+# @BLURB: Build functions for Fortran multilib int64 multibuild packages |
715 |
+# @DESCRIPTION: |
716 |
+# The numeric-int64-multilib.eclass exports USE flags and utility functions |
717 |
+# necessary to build packages for multilib int64 multibuild in a clean |
718 |
+# and uniform manner. |
719 |
+ |
720 |
+if [[ ! ${_NUMERIC_INT64_MULTILIB_ECLASS} ]]; then |
721 |
+ |
722 |
+# EAPI=5 is required for meaningful MULTILIB_USEDEP. |
723 |
+case ${EAPI:-0} in |
724 |
+ 5) |
725 |
+ inherit multilib |
726 |
+ ;; |
727 |
+ *) die "EAPI=${EAPI} is not supported" ;; |
728 |
+esac |
729 |
+ |
730 |
+inherit alternatives-2 eutils fortran-2 multilib-build numeric toolchain-funcs |
731 |
+ |
732 |
+IUSE="int64" |
733 |
+ |
734 |
+# @ECLASS-VARIABLE: NUMERIC_INT32_SUFFIX |
735 |
+# @INTERNAL |
736 |
+# @DESCRIPTION: |
737 |
+# MULTIBUILD_ID suffix for int32 build |
738 |
+NUMERIC_INT32_SUFFIX="int32" |
739 |
+ |
740 |
+# @ECLASS-VARIABLE: NUMERIC_INT64_SUFFIX |
741 |
+# @INTERNAL |
742 |
+# @DESCRIPTION: |
743 |
+# MULTIBUILD_ID suffix for int64 build |
744 |
+NUMERIC_INT64_SUFFIX="int64" |
745 |
+ |
746 |
+# @ECLASS-VARIABLE: NUMERIC_STATIC_SUFFIX |
747 |
+# @INTERNAL |
748 |
+# @DESCRIPTION: |
749 |
+# MULTIBUILD_ID suffix for static build |
750 |
+NUMERIC_STATIC_SUFFIX="static" |
751 |
+ |
752 |
+# @FUNCTION: numeric-int64_is_int64_build |
753 |
+# @DESCRIPTION: |
754 |
+# Returns shell true if the current multibuild is a int64 build, |
755 |
+# else returns shell false. |
756 |
+# |
757 |
+# Example: |
758 |
+# |
759 |
+# @CODE |
760 |
+# $(numeric-int64_is_int64_build) && \ |
761 |
+# openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT" |
762 |
+# @CODE |
763 |
+numeric-int64_is_int64_build() { |
764 |
+ debug-print-function ${FUNCNAME} "${@}" |
765 |
+ if [[ "${MULTIBUILD_ID}" =~ "${NUMERIC_INT64_SUFFIX}" ]]; then |
766 |
+ return 0 |
767 |
+ else |
768 |
+ return 1 |
769 |
+ fi |
770 |
+} |
771 |
+ |
772 |
+# @FUNCTION: numeric-int64_is_static_build |
773 |
+# @DESCRIPTION: |
774 |
+# Returns shell true if current multibuild is a static build, |
775 |
+# else returns shell false. |
776 |
+# |
777 |
+# Example: |
778 |
+# |
779 |
+# @CODE |
780 |
+# if $(numeric-int64_is_static_build); then |
781 |
+# dolib.a lib*a |
782 |
+# fi |
783 |
+# @CODE |
784 |
+numeric-int64_is_static_build() { |
785 |
+ debug-print-function ${FUNCNAME} "${@}" |
786 |
+ if [[ "${MULTIBUILD_ID}" =~ "${NUMERIC_STATIC_SUFFIX}" ]]; then |
787 |
+ return 0 |
788 |
+ else |
789 |
+ return 1 |
790 |
+ fi |
791 |
+} |
792 |
+ |
793 |
+# @FUNCTION: numeric-int64_get_module_name |
794 |
+# @USAGE: [<module_name>] |
795 |
+# @DESCRIPTION: |
796 |
+# Return the numeric module name, without the .pc extension, |
797 |
+# for the current fortran int64 build. If the current build is not an int64 |
798 |
+# build, and the ebuild does not have dynamic, threads or openmp USE flags or |
799 |
+# they are disabled, then the module_name is ${NUMERIC_MODULE_NAME} or |
800 |
+# <module_name> if <module_name> is specified. |
801 |
+# |
802 |
+# Takes an optional <module_name> parameter. If no <module_name> is specified, |
803 |
+# uses ${NUMERIC_MODULE_NAME} as the base to calculate the module_name for the |
804 |
+# current build. |
805 |
+# |
806 |
+# Example: |
807 |
+# |
808 |
+# @CODE |
809 |
+# NUMERIC_MODULE_NAME=blas |
810 |
+# profname=$(numeric-int64_get_module_name) |
811 |
+# |
812 |
+# int32 build: |
813 |
+# -> profname == blas |
814 |
+# |
815 |
+# int64 build: |
816 |
+# -> profname == blas-int64 |
817 |
+# @CODE |
818 |
+numeric-int64_get_module_name() { |
819 |
+ debug-print-function ${FUNCNAME} "${@}" |
820 |
+ local module_name="${1:-${NUMERIC_MODULE_NAME}}" |
821 |
+ if has dynamic ${IUSE} && use dynamic; then |
822 |
+ module_name+="-dynamic" |
823 |
+ fi |
824 |
+ if $(numeric-int64_is_int64_build); then |
825 |
+ module_name+="-${NUMERIC_INT64_SUFFIX}" |
826 |
+ fi |
827 |
+ # choose posix threads over openmp when the two are set |
828 |
+ # yet to see the need of having the two profiles simultaneously |
829 |
+ if use_if_iuse threads; then |
830 |
+ module_name+="-threads" |
831 |
+ elif use_if_iuse openmp; then |
832 |
+ module_name+="-openmp" |
833 |
+ fi |
834 |
+ echo "${module_name}" |
835 |
+} |
836 |
+ |
837 |
+# @FUNCTION: _numeric-int64_get_numeric_alternative |
838 |
+# @INTERNAL |
839 |
+_numeric-int64_get_numeric_alternative() { |
840 |
+ debug-print-function ${FUNCNAME} "${@}" |
841 |
+ local alternative_name="${1}" |
842 |
+ if $(numeric-int64_is_int64_build); then |
843 |
+ alternative_name+="-${NUMERIC_INT64_SUFFIX}" |
844 |
+ fi |
845 |
+ echo "${alternative_name}" |
846 |
+} |
847 |
+ |
848 |
+# @FUNCTION: numeric-int64_get_blas_alternative |
849 |
+# @DESCRIPTION: |
850 |
+# Returns the eselect blas alternative for the current |
851 |
+# int build type. Which is blas-int64 if called from an int64 build, |
852 |
+# or blas otherwise. |
853 |
+numeric-int64_get_blas_alternative() { |
854 |
+ debug-print-function ${FUNCNAME} "${@}" |
855 |
+ _numeric-int64_get_numeric_alternative blas |
856 |
+} |
857 |
+ |
858 |
+# @FUNCTION: numeric-int64_get_cblas_alternative |
859 |
+# @DESCRIPTION: |
860 |
+# Returns the eselect cblas alternative for the current |
861 |
+# int build type. Which is cblas-int64 if called from an int64 build, |
862 |
+# or cblas otherwise. |
863 |
+numeric-int64_get_cblas_alternative() { |
864 |
+ debug-print-function ${FUNCNAME} "${@}" |
865 |
+ _numeric-int64_get_numeric_alternative cblas |
866 |
+} |
867 |
+ |
868 |
+# @FUNCTION: numeric-int64_get_xblas_alternative |
869 |
+# @DESCRIPTION: |
870 |
+# Returns the eselect xblas alternative for the current |
871 |
+# int build type. Which is xblas-int64 if called from an int64 build, |
872 |
+# or xblas otherwise. |
873 |
+numeric-int64_get_xblas_alternative() { |
874 |
+ debug-print-function ${FUNCNAME} "${@}" |
875 |
+ _numeric-int64_get_numeric_alternative xblas |
876 |
+} |
877 |
+ |
878 |
+# @FUNCTION: numeric-int64_get_lapack_alternative |
879 |
+# @DESCRIPTION: |
880 |
+# Returns the eselect lapack alternative for the current |
881 |
+# int build type. Which is lapack-int64 if called from an int64 build, |
882 |
+# or lapack otherwise. |
883 |
+numeric-int64_get_lapack_alternative() { |
884 |
+ debug-print-function ${FUNCNAME} "${@}" |
885 |
+ _numeric-int64_get_numeric_alternative lapack |
886 |
+} |
887 |
+ |
888 |
+# @FUNCTION: numeric-int64_get_blas_module_name |
889 |
+# @DESCRIPTION: |
890 |
+# Returns the pkg-config file name, without the .pc extension, |
891 |
+# for the currently selected blas-int64 module if we are performing an int64 |
892 |
+# build, or the currently selected blas module otherwise. |
893 |
+numeric-int64_get_blas_module_name() { |
894 |
+ debug-print-function ${FUNCNAME} "${@}" |
895 |
+ local blas_alternative=$(numeric-int64_get_blas_alternative) |
896 |
+ local blas_symlinks=( $(eselect "${blas_alternative}" files) ) |
897 |
+ local blas_prof_symlink="$(readlink -f ${blas_symlinks[0]})" |
898 |
+ local blas_prof_file="${blas_prof_symlink##*/}" |
899 |
+ echo "${blas_prof_file%.pc}" |
900 |
+} |
901 |
+ |
902 |
+# @FUNCTION: numeric-int64_get_xblas_module_name |
903 |
+# @DESCRIPTION: |
904 |
+# Returns the xblas pkg-config file name, |
905 |
+# without the .pc extension, for the current build. Which is xblas-int64 if |
906 |
+# we are performing an int64 build, or xblas otherwise. |
907 |
+numeric-int64_get_xblas_module_name() { |
908 |
+ debug-print-function ${FUNCNAME} "${@}" |
909 |
+ local xblas_provider="xblas" |
910 |
+ if $(numeric-int64_is_int64_build); then |
911 |
+ xblas_provider+="-${INT64_SUFFIX}" |
912 |
+ fi |
913 |
+ echo "${xblas_provider}" |
914 |
+} |
915 |
+ |
916 |
+# @FUNCTION: numeric-int64_get_fortran_int64_abi_fflags |
917 |
+# @DESCRIPTION: |
918 |
+# Return the Fortran compiler flag to enable 64 bit integers for |
919 |
+# array indices if we are performing an int64 build, or the empty string |
920 |
+# otherwise. |
921 |
+# |
922 |
+# Example: |
923 |
+# |
924 |
+# @CODE |
925 |
+# src_configure() { |
926 |
+# my_configure() { |
927 |
+# export FCFLAGS="${FCFLAGS} $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags)" |
928 |
+# econf $(use_enable fortran) |
929 |
+# } |
930 |
+# numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_configure |
931 |
+# } |
932 |
+# @CODE |
933 |
+numeric-int64_get_fortran_int64_abi_fflags() { |
934 |
+ debug-print-function ${FUNCNAME} "${@}" |
935 |
+ $(numeric-int64_is_int64_build) && echo "$(fortran_int64_abi_fflags)" |
936 |
+} |
937 |
+ |
938 |
+# @FUNCTION: numeric-int64_get_multibuild_int_variants |
939 |
+# @DESCRIPTION: |
940 |
+# Returns the array of int64 and int32 |
941 |
+# multibuild combinations. |
942 |
+numeric-int64_get_multibuild_int_variants() { |
943 |
+ debug-print-function ${FUNCNAME} "${@}" |
944 |
+ local MULTIBUILD_VARIANTS=( int32 ) variant |
945 |
+ |
946 |
+ use_if_iuse int64 && MULTIBUILD_VARIANTS+=( int64 ) |
947 |
+ |
948 |
+ echo "${MULTIBUILD_VARIANTS[@]}" |
949 |
+} |
950 |
+ |
951 |
+# @FUNCTION: numeric-int64_get_multibuild_variants |
952 |
+# @DESCRIPTION: |
953 |
+# Returns the array of int64, int32 and static |
954 |
+# multibuild combinations. |
955 |
+numeric-int64_get_multibuild_variants() { |
956 |
+ debug-print-function ${FUNCNAME} "${@}" |
957 |
+ local MULTIBUILD_VARIANTS=$(numeric-int64_get_multibuild_int_variants) |
958 |
+ if use_if_iuse static-libs; then |
959 |
+ for variant in ${MULTIBUILD_VARIANTS[@]}; do |
960 |
+ MULTIBUILD_VARIANTS+=( static_${variant} ) |
961 |
+ done |
962 |
+ fi |
963 |
+ echo "${MULTIBUILD_VARIANTS[@]}" |
964 |
+} |
965 |
+ |
966 |
+# @FUNCTION: numeric-int64_get_all_abi_variants |
967 |
+# @DESCRIPTION: |
968 |
+# Returns the array of int64, int32 and static build combinations |
969 |
+# combined with all multilib ABI variants. |
970 |
+numeric-int64_get_all_abi_variants() { |
971 |
+ debug-print-function ${FUNCNAME} "${@}" |
972 |
+ local abi ret=() variant |
973 |
+ |
974 |
+ for abi in $(multilib_get_enabled_abis); do |
975 |
+ for variant in $(numeric-int64_get_multibuild_variants); do |
976 |
+ if [[ ${variant} =~ int64 ]]; then |
977 |
+ [[ ${abi} =~ amd64 ]] && ret+=( ${abi}_${variant} ) |
978 |
+ else |
979 |
+ ret+=( ${abi}_${variant} ) |
980 |
+ fi |
981 |
+ done |
982 |
+ done |
983 |
+ echo "${ret[@]}" |
984 |
+} |
985 |
+ |
986 |
+# @FUNCTION: numeric-int64_ensure_blas_int_support |
987 |
+# @DESCRIPTION: |
988 |
+# Check the blas supports the necessary int types in the currently |
989 |
+# selected blas module. |
990 |
+# |
991 |
+# Example: |
992 |
+# |
993 |
+# @CODE |
994 |
+# src_prepare() { |
995 |
+# numeric-int64_ensure_blas_int_support |
996 |
+# ... |
997 |
+# @CODE |
998 |
+numeric-int64_ensure_blas_int_support() { |
999 |
+ local MULTILIB_INT64_VARIANTS=( $(numeric-int64_get_multibuild_variants) ) |
1000 |
+ local MULTIBUILD_ID |
1001 |
+ for MULTIBUILD_ID in "${MULTILIB_INT64_VARIANTS[@]}"; do |
1002 |
+ local blas_module_name=$(numeric-int64_get_blas_module_name) |
1003 |
+ $(tc-getPKG_CONFIG) --exists "${blas_module_name}" \ |
1004 |
+ || die "${PN} requires the pkgbuild module ${blas_module_name}" |
1005 |
+ done |
1006 |
+} |
1007 |
+ |
1008 |
+# @FUNCTION: numeric-int64-multibuild_install_alternative |
1009 |
+# @USAGE: <alternative name> <provider name> [extra files sources] [extra files dest] |
1010 |
+# @DESCRIPTION: |
1011 |
+# Install alternatives pc file and extra files for all providers for all multilib ABIs. |
1012 |
+numeric-int64-multibuild_install_alternative() { |
1013 |
+ debug-print-function ${FUNCNAME} "${@}" |
1014 |
+ [[ $# -lt 2 ]] && die "${FUNCNAME} needs at least two arguments" |
1015 |
+ pc_file() { |
1016 |
+ debug-print-function ${FUNCNAME} "${@}" |
1017 |
+ numeric-int64_is_static_build && return |
1018 |
+ local alternative=$(_numeric-int64_get_numeric_alternative "$1") |
1019 |
+ local module_name=$(numeric-int64_get_module_name) |
1020 |
+ printf \ |
1021 |
+ "/usr/$(get_libdir)/pkgconfig/${alternative}.pc ${module_name}.pc " \ |
1022 |
+ >> "${T}"/alternative-${alternative}.sh || die |
1023 |
+ } |
1024 |
+ pc_install() { |
1025 |
+ debug-print-function ${FUNCNAME} "${@}" |
1026 |
+ numeric-int64_is_static_build && return |
1027 |
+ local alternative=$(_numeric-int64_get_numeric_alternative "$1") |
1028 |
+ local module_name=$(numeric-int64_get_module_name $2) |
1029 |
+ shift 2 |
1030 |
+ alternatives_for \ |
1031 |
+ ${alternative} ${module_name} 0 \ |
1032 |
+ $(cat "${T}"/alternative-${alternative}.sh) ${@} |
1033 |
+ } |
1034 |
+ numeric-int64-multibuild_foreach_all_abi_variants pc_file ${@} |
1035 |
+ numeric-int64-multibuild_foreach_int_abi pc_install ${@} |
1036 |
+} |
1037 |
+ |
1038 |
+# @FUNCTION: numeric-int64-multibuild_multilib_wrapper |
1039 |
+# @USAGE: <argv>... |
1040 |
+# @DESCRIPTION: |
1041 |
+# Initialize the environment for ABI selected for multibuild. |
1042 |
+# |
1043 |
+# Example: |
1044 |
+# |
1045 |
+# @CODE |
1046 |
+# multibuild_foreach_variant run_in_build_dir \ |
1047 |
+# numeric-int64-multibuild_multilib_wrapper my_src_install |
1048 |
+# @CODE |
1049 |
+numeric-int64-multibuild_multilib_wrapper() { |
1050 |
+ debug-print-function ${FUNCNAME} "${@}" |
1051 |
+ local v="${MULTIBUILD_VARIANT/_${NUMERIC_INT32_SUFFIX}/}" |
1052 |
+ local v="${v/_${NUMERIC_INT64_SUFFIX}/}" |
1053 |
+ local ABI="${v/_${NUMERIC_STATIC_SUFFIX}/}" |
1054 |
+ multilib_toolchain_setup "${ABI}" |
1055 |
+ "${@}" || die |
1056 |
+} |
1057 |
+ |
1058 |
+# @FUNCTION: numeric-int64-multibuild_foreach_int_abi |
1059 |
+# @USAGE: <argv> ... |
1060 |
+# @DESCRIPTION: |
1061 |
+# Run command for each enabled numeric variant (e.g. int32, int64) |
1062 |
+numeric-int64-multibuild_foreach_int_abi() { |
1063 |
+ debug-print-function ${FUNCNAME} "${@}" |
1064 |
+ local MULTIBUILD_VARIANTS=( $(numeric-int64_get_multibuild_int_variants) ) |
1065 |
+ multibuild_foreach_variant numeric-int64-multibuild_multilib_wrapper "${@}" |
1066 |
+} |
1067 |
+ |
1068 |
+# @FUNCTION: numeric-int64-multibuild_foreach_variant |
1069 |
+# @USAGE: <argv> ... |
1070 |
+# @DESCRIPTION: |
1071 |
+# Run command for each enabled numeric abi and static-libs (e.g. int32, int64, static) |
1072 |
+numeric-int64-multibuild_foreach_variant() { |
1073 |
+ debug-print-function ${FUNCNAME} "${@}" |
1074 |
+ local MULTIBUILD_VARIANTS=( $(numeric-int64_get_multibuild_variants) ) |
1075 |
+ multibuild_foreach_variant numeric-int64-multibuild_multilib_wrapper "${@}" |
1076 |
+} |
1077 |
+ |
1078 |
+# @FUNCTION: numeric-int64-multibuild_foreach_all_abi_variants |
1079 |
+# @USAGE: <argv> ... |
1080 |
+# @DESCRIPTION: |
1081 |
+# Run command for each enabled numeric variant (e.g. int32, int64, static) _AND_ |
1082 |
+# enabled multilib ABI |
1083 |
+numeric-int64-multibuild_foreach_all_abi_variants() { |
1084 |
+ debug-print-function ${FUNCNAME} "${@}" |
1085 |
+ local MULTIBUILD_VARIANTS=( $(numeric-int64_get_all_abi_variants) ) |
1086 |
+ multibuild_foreach_variant numeric-int64-multibuild_multilib_wrapper "${@}" |
1087 |
+} |
1088 |
+ |
1089 |
+# @FUNCTION: numeric-int64-multibuild_copy_sources |
1090 |
+# @DESCRIPTION: |
1091 |
+# Thin wrapper around multibuild_copy_sources() |
1092 |
+numeric-int64-multibuild_copy_sources() { |
1093 |
+ |
1094 |
+ debug-print-function ${FUNCNAME} "${@}" |
1095 |
+ local MULTIBUILD_VARIANTS=( $(numeric-int64_get_all_abi_variants) ) |
1096 |
+ multibuild_copy_sources |
1097 |
+} |
1098 |
+ |
1099 |
+_NUMERIC_INT64_MULTILIB_ECLASS=1 |
1100 |
+fi |
1101 |
|
1102 |
diff --git a/eclass/numeric.eclass b/eclass/numeric.eclass |
1103 |
index b3f92be..adee3c5 100644 |
1104 |
--- a/eclass/numeric.eclass |
1105 |
+++ b/eclass/numeric.eclass |
1106 |
@@ -10,22 +10,43 @@ |
1107 |
# Various functions which make the maintenance numerical algebra packages |
1108 |
# easier. |
1109 |
|
1110 |
+case ${EAPI:-0} in |
1111 |
+ 0|1|2|3|4|5) ;; |
1112 |
+ *) die "EAPI=${EAPI} is not supported" ;; |
1113 |
+esac |
1114 |
+ |
1115 |
+if [[ ! ${_NUMERIC_ECLASS} ]]; then |
1116 |
+ |
1117 |
inherit multilib |
1118 |
|
1119 |
+# @VARIABLE: NUMERIC_MODULE_NAME |
1120 |
+# @DESCRIPTION: |
1121 |
+# The base pkg-config module name of the package being built. |
1122 |
+# NUMERIC_MODULE_NAME is used by the numeric-int64_get_module_name to |
1123 |
+# determine the pkg-config module name based on whether the package |
1124 |
+# has dynamic, threads or openmp USE flags and if so, if the user has |
1125 |
+# turned them or, and if the current multibuild is a int64 build or not. |
1126 |
+# |
1127 |
+# @CODE |
1128 |
+# NUMERIC_MODULE_NAME="openblas" |
1129 |
+# inherit ... numeric-int64-multibuild |
1130 |
+# @CODE |
1131 |
+: ${NUMERIC_MODULE_NAME:=blas} |
1132 |
+ |
1133 |
# @FUNCTION: create_pkgconfig |
1134 |
# @USAGE: [ additional arguments ] |
1135 |
# @DESCRIPTION: |
1136 |
-# Creates and installs .pc file. The function should only be executed in |
1137 |
+# Creates and installs pkg-config file. The function should only be executed in |
1138 |
# src_install(). For further information about optional arguments please consult |
1139 |
# http://people.freedesktop.org/~dbn/pkg-config-guide.html |
1140 |
# |
1141 |
# @CODE |
1142 |
# Optional arguments are: |
1143 |
# |
1144 |
-# -p | --prefix Offset for current package (${EPREFIX}/usr) |
1145 |
-# -e | --exec-prefix Offset for current package (${prefix}) |
1146 |
-# -L | --libdir Libdir to use (${prefix}/$(get_libdir)) |
1147 |
-# -I | --includedir Includedir to use (${prefix}/include) |
1148 |
+# -p | --prefix Offset for current package (${EPREFIX}/usr) |
1149 |
+# -e | --exec-prefix Offset for current package (${prefix}) |
1150 |
+# -L | --libdir Libdir to use (${prefix}/$(get_libdir)) |
1151 |
+# -I | --includedir Includedir to use (${prefix}/include) |
1152 |
# -n | --name A human-readable name (PN} |
1153 |
# -d | --description A brief description (DESCRIPTION) |
1154 |
# -V | --version Version of the package (PV) |
1155 |
@@ -38,6 +59,7 @@ inherit multilib |
1156 |
# --libs-private Like --libs, but not exposed (unset) |
1157 |
# @CODE |
1158 |
create_pkgconfig() { |
1159 |
+ debug-print-function ${FUNCNAME} "${@}" |
1160 |
local pcfilename pcrequires pcrequirespriv pcconflicts pclibs pclibspriv pccflags |
1161 |
local pcprefix="${EPREFIX}/usr" |
1162 |
local pcexecprefix="${pcprefix}" |
1163 |
@@ -112,3 +134,6 @@ create_pkgconfig() { |
1164 |
insinto /usr/$(get_libdir)/pkgconfig |
1165 |
doins "${T}"/${pcfilename}.pc |
1166 |
} |
1167 |
+ |
1168 |
+_NUMERIC_ECLASS=1 |
1169 |
+fi |
1170 |
|
1171 |
diff --git a/sci-libs/blas-reference/blas-reference-20131116-r1.ebuild b/sci-libs/blas-reference/blas-reference-20131116-r1.ebuild |
1172 |
deleted file mode 100644 |
1173 |
index 4b9d2ea..0000000 |
1174 |
--- a/sci-libs/blas-reference/blas-reference-20131116-r1.ebuild |
1175 |
+++ /dev/null |
1176 |
@@ -1,118 +0,0 @@ |
1177 |
-# Copyright 1999-2014 Gentoo Foundation |
1178 |
-# Distributed under the terms of the GNU General Public License v2 |
1179 |
-# $Id$ |
1180 |
- |
1181 |
-EAPI=5 |
1182 |
- |
1183 |
-EBASE_PROFNAME="refblas" |
1184 |
-ESTATIC_MULTIBUILD="true" |
1185 |
-inherit fortran-2 cmake-utils alternatives-2 multibuild multilib-build toolchain-funcs fortran-int64 |
1186 |
- |
1187 |
-LPN=lapack |
1188 |
-LPV=3.5.0 |
1189 |
- |
1190 |
-if [[ ${PV} == "99999999" ]] ; then |
1191 |
- ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk" |
1192 |
- inherit subversion |
1193 |
- KEYWORDS="" |
1194 |
-else |
1195 |
- SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" |
1196 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1197 |
-fi |
1198 |
- |
1199 |
-DESCRIPTION="Reference implementation of BLAS" |
1200 |
-HOMEPAGE="http://www.netlib.org/lapack/" |
1201 |
- |
1202 |
-LICENSE="BSD" |
1203 |
-SLOT="0" |
1204 |
-IUSE="int64 static-libs test" |
1205 |
- |
1206 |
-RDEPEND="" |
1207 |
-DEPEND="${RDEPEND} |
1208 |
- virtual/pkgconfig" |
1209 |
-PDEPEND=">=virtual/blas-2.1-r3[int64?]" |
1210 |
- |
1211 |
-S="${WORKDIR}/${LPN}-${LPV}" |
1212 |
- |
1213 |
-src_prepare() { |
1214 |
- # rename library to avoid collision with other blas implementations |
1215 |
- # ${LIBNAME} and ${PROFNAME} are not defined here, they are in single |
1216 |
- # quotes in the following seds. They are later set by defining cmake |
1217 |
- # variables with -DPROFNAME etc in src_configure |
1218 |
- sed -i \ |
1219 |
- -e 's:\([^xc]\)blas:\1${LIBNAME}:g' \ |
1220 |
- CMakeLists.txt \ |
1221 |
- BLAS/SRC/CMakeLists.txt || die |
1222 |
- sed -i \ |
1223 |
- -e '/Name: /s:blas:${PROFNAME}:' \ |
1224 |
- -e 's:-lblas:-l${LIBNAME}:g' \ |
1225 |
- BLAS/blas.pc.in || die |
1226 |
- sed -i \ |
1227 |
- -e 's:blas):${LIBNAME}):' \ |
1228 |
- BLAS/TESTING/CMakeLists.txt || die |
1229 |
- sed -i \ |
1230 |
- -e 's:BINARY_DIR}/blas:BINARY_DIR}/${PROFNAME}:' \ |
1231 |
- BLAS/CMakeLists.txt || die |
1232 |
-} |
1233 |
- |
1234 |
-src_configure() { |
1235 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1236 |
- blas_configure() { |
1237 |
- local profname=$(fortran-int64_get_profname) |
1238 |
- local libname="${profname//-/_}" |
1239 |
- local mycmakeargs=( |
1240 |
- -Wno-dev |
1241 |
- -DPROFNAME="${profname}" |
1242 |
- -DLIBNAME="${libname}" |
1243 |
- -DUSE_OPTIMIZED_BLAS=OFF |
1244 |
- $(cmake-utils_use_build test TESTING) |
1245 |
- -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" |
1246 |
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)" |
1247 |
- ) |
1248 |
- if $(fortran-int64_is_static_build); then |
1249 |
- mycmakeargs+=( |
1250 |
- -DBUILD_SHARED_LIBS=OFF |
1251 |
- -DBUILD_STATIC_LIBS=ON |
1252 |
- ) |
1253 |
- else |
1254 |
- mycmakeargs+=( |
1255 |
- -DBUILD_SHARED_LIBS=ON |
1256 |
- -DBUILD_STATIC_LIBS=OFF |
1257 |
- ) |
1258 |
- fi |
1259 |
- cmake-utils_src_configure |
1260 |
- } |
1261 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper blas_configure |
1262 |
-} |
1263 |
- |
1264 |
-src_compile() { |
1265 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1266 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile -C BLAS |
1267 |
-} |
1268 |
- |
1269 |
-src_test() { |
1270 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1271 |
- blas_test() { |
1272 |
- _check_build_dir |
1273 |
- pushd "${BUILD_DIR}/BLAS" > /dev/null |
1274 |
- local ctestargs |
1275 |
- [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" |
1276 |
- ctest ${ctestargs} || die |
1277 |
- popd > /dev/null |
1278 |
- } |
1279 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper blas_test |
1280 |
-} |
1281 |
- |
1282 |
-src_install() { |
1283 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1284 |
- my_src_install() { |
1285 |
- cmake-utils_src_install -C BLAS |
1286 |
- if ! $(fortran-int64_is_static_build); then |
1287 |
- local profname=$(fortran-int64_get_profname) |
1288 |
- local provider=$(fortran-int64_get_blas_provider) |
1289 |
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
1290 |
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc |
1291 |
- fi |
1292 |
- } |
1293 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install |
1294 |
-} |
1295 |
|
1296 |
diff --git a/sci-libs/blas-reference/blas-reference-20131116-r2.ebuild b/sci-libs/blas-reference/blas-reference-20131116-r2.ebuild |
1297 |
new file mode 100644 |
1298 |
index 0000000..3b4d976 |
1299 |
--- /dev/null |
1300 |
+++ b/sci-libs/blas-reference/blas-reference-20131116-r2.ebuild |
1301 |
@@ -0,0 +1,107 @@ |
1302 |
+# Copyright 1999-2015 Gentoo Foundation |
1303 |
+# Distributed under the terms of the GNU General Public License v2 |
1304 |
+# $Id$ |
1305 |
+ |
1306 |
+EAPI=5 |
1307 |
+ |
1308 |
+PYTHON_COMPAT=( python2_7 ) |
1309 |
+ |
1310 |
+NUMERIC_MODULE_NAME="refblas" |
1311 |
+ |
1312 |
+inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs |
1313 |
+ |
1314 |
+LPN=lapack |
1315 |
+LPV=3.5.0 |
1316 |
+ |
1317 |
+DESCRIPTION="Reference implementation of BLAS" |
1318 |
+HOMEPAGE="http://www.netlib.org/lapack/" |
1319 |
+SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" |
1320 |
+ |
1321 |
+LICENSE="BSD" |
1322 |
+SLOT="0" |
1323 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1324 |
+IUSE="static-libs test" |
1325 |
+ |
1326 |
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" |
1327 |
+ |
1328 |
+RDEPEND="" |
1329 |
+DEPEND="${RDEPEND} |
1330 |
+ test? ( ${PYTHON_DEPS} ) |
1331 |
+ virtual/pkgconfig" |
1332 |
+ |
1333 |
+S="${WORKDIR}/${LPN}-${LPV}" |
1334 |
+ |
1335 |
+src_prepare() { |
1336 |
+ # rename library to avoid collision with other blas implementations |
1337 |
+ # ${LIBNAME} and ${PROFNAME} are not defined here, they are in single |
1338 |
+ # quotes in the following seds. They are later set by defining cmake |
1339 |
+ # variables with -DPROFNAME etc in src_configure |
1340 |
+ sed -i \ |
1341 |
+ -e 's:\([^xc]\)blas:\1${LIBNAME}:g' \ |
1342 |
+ CMakeLists.txt \ |
1343 |
+ BLAS/SRC/CMakeLists.txt || die |
1344 |
+ sed -i \ |
1345 |
+ -e '/Name: /s:blas:${PROFNAME}:' \ |
1346 |
+ -e 's:-lblas:-l${LIBNAME}:g' \ |
1347 |
+ BLAS/blas.pc.in || die |
1348 |
+ sed -i \ |
1349 |
+ -e 's:blas):${LIBNAME}):' \ |
1350 |
+ BLAS/TESTING/CMakeLists.txt || die |
1351 |
+ sed -i \ |
1352 |
+ -e 's:BINARY_DIR}/blas:BINARY_DIR}/${PROFNAME}:' \ |
1353 |
+ BLAS/CMakeLists.txt || die |
1354 |
+} |
1355 |
+ |
1356 |
+src_configure() { |
1357 |
+ blas_configure() { |
1358 |
+ local FCFLAGS="${FCFLAGS}" |
1359 |
+ append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname}) |
1360 |
+ append-fflags $(get_abi_CFLAGS) |
1361 |
+ append-fflags $(numeric-int64_get_fortran_int64_abi_fflags) |
1362 |
+ |
1363 |
+ local profname=$(numeric-int64_get_module_name) |
1364 |
+ local libname="${profname//-/_}" |
1365 |
+ |
1366 |
+ local mycmakeargs=( |
1367 |
+ -Wno-dev |
1368 |
+ -DPROFNAME="${profname}" |
1369 |
+ -DLIBNAME="${libname}" |
1370 |
+ -DUSE_OPTIMIZED_BLAS=OFF |
1371 |
+ -DCMAKE_Fortran_FLAGS="${FCFLAGS}" |
1372 |
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)" |
1373 |
+ $(cmake-utils_use_build test TESTING) |
1374 |
+ ) |
1375 |
+ if $(numeric-int64_is_static_build); then |
1376 |
+ mycmakeargs+=( |
1377 |
+ -DBUILD_SHARED_LIBS=OFF |
1378 |
+ -DBUILD_STATIC_LIBS=ON |
1379 |
+ ) |
1380 |
+ else |
1381 |
+ mycmakeargs+=( |
1382 |
+ -DBUILD_SHARED_LIBS=ON |
1383 |
+ -DBUILD_STATIC_LIBS=OFF |
1384 |
+ ) |
1385 |
+ fi |
1386 |
+ cmake-utils_src_configure |
1387 |
+ } |
1388 |
+ numeric-int64-multibuild_foreach_all_abi_variants blas_configure |
1389 |
+} |
1390 |
+ |
1391 |
+src_compile() { |
1392 |
+ local each target_dirs=( BLAS ) |
1393 |
+ use test && target_dirs+=( TESTING ) |
1394 |
+ for each in ${target_dirs[@]}; do |
1395 |
+ numeric-int64-multibuild_foreach_all_abi_variants \ |
1396 |
+ cmake-utils_src_compile -C ${each} |
1397 |
+ done |
1398 |
+ |
1399 |
+} |
1400 |
+ |
1401 |
+src_test() { |
1402 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test |
1403 |
+} |
1404 |
+ |
1405 |
+src_install() { |
1406 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install -C BLAS |
1407 |
+ numeric-int64-multibuild_install_alternative blas reference |
1408 |
+} |
1409 |
|
1410 |
diff --git a/sci-libs/blas-reference/blas-reference-20131116.ebuild b/sci-libs/blas-reference/blas-reference-20131116.ebuild |
1411 |
deleted file mode 100644 |
1412 |
index 94337c9..0000000 |
1413 |
--- a/sci-libs/blas-reference/blas-reference-20131116.ebuild |
1414 |
+++ /dev/null |
1415 |
@@ -1,78 +0,0 @@ |
1416 |
-# Copyright 1999-2014 Gentoo Foundation |
1417 |
-# Distributed under the terms of the GNU General Public License v2 |
1418 |
-# $Id$ |
1419 |
- |
1420 |
-EAPI=5 |
1421 |
- |
1422 |
-inherit fortran-2 cmake-utils alternatives-2 |
1423 |
- |
1424 |
-LPN=lapack |
1425 |
-LPV=3.5.0 |
1426 |
- |
1427 |
-if [[ ${PV} == "99999999" ]] ; then |
1428 |
- ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk" |
1429 |
- inherit subversion |
1430 |
- KEYWORDS="" |
1431 |
-else |
1432 |
- SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" |
1433 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1434 |
-fi |
1435 |
- |
1436 |
-DESCRIPTION="Reference implementation of BLAS" |
1437 |
-HOMEPAGE="http://www.netlib.org/lapack/" |
1438 |
- |
1439 |
-LICENSE="BSD" |
1440 |
-SLOT="0" |
1441 |
-IUSE="static-libs test" |
1442 |
- |
1443 |
-S="${WORKDIR}/${LPN}-${LPV}" |
1444 |
- |
1445 |
-src_prepare() { |
1446 |
- # rename library to avoid collision with other blas implementations |
1447 |
- sed -i \ |
1448 |
- -e 's:blas:refblas:g' \ |
1449 |
- CMakeLists.txt BLAS/blas.pc.in \ |
1450 |
- BLAS/{SRC,TESTING}/CMakeLists.txt || die |
1451 |
- sed -i \ |
1452 |
- -e 's:BINARY_DIR}/blas:BINARY_DIR}/refblas:' \ |
1453 |
- BLAS/CMakeLists.txt || die |
1454 |
- use static-libs && mkdir "${WORKDIR}/${PN}_static" |
1455 |
-} |
1456 |
- |
1457 |
-src_configure() { |
1458 |
- blas_configure() { |
1459 |
- local mycmakeargs=( |
1460 |
- -DUSE_OPTIMIZED_BLAS=OFF |
1461 |
- $(cmake-utils_use_build test TESTING) |
1462 |
- $@ |
1463 |
- ) |
1464 |
- cmake-utils_src_configure |
1465 |
- } |
1466 |
- |
1467 |
- blas_configure -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF |
1468 |
- use static-libs && \ |
1469 |
- CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" blas_configure \ |
1470 |
- -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON |
1471 |
-} |
1472 |
- |
1473 |
-src_compile() { |
1474 |
- cmake-utils_src_compile -C BLAS |
1475 |
- use static-libs && CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \ |
1476 |
- cmake-utils_src_compile -C BLAS |
1477 |
-} |
1478 |
- |
1479 |
-src_test() { |
1480 |
- pushd "${CMAKE_BUILD_DIR}/BLAS" > /dev/null |
1481 |
- local ctestargs |
1482 |
- [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" |
1483 |
- ctest ${ctestargs} || die |
1484 |
- popd > /dev/null |
1485 |
-} |
1486 |
- |
1487 |
-src_install() { |
1488 |
- cmake-utils_src_install -C BLAS |
1489 |
- use static-libs && CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \ |
1490 |
- cmake-utils_src_install -C BLAS |
1491 |
- alternatives_for blas reference 0 \ |
1492 |
- /usr/$(get_libdir)/pkgconfig/blas.pc refblas.pc |
1493 |
-} |
1494 |
|
1495 |
diff --git a/sci-libs/blas-reference/blas-reference-99999999.ebuild b/sci-libs/blas-reference/blas-reference-99999999.ebuild |
1496 |
index 4b9d2ea..b079855 100644 |
1497 |
--- a/sci-libs/blas-reference/blas-reference-99999999.ebuild |
1498 |
+++ b/sci-libs/blas-reference/blas-reference-99999999.ebuild |
1499 |
@@ -1,34 +1,32 @@ |
1500 |
-# Copyright 1999-2014 Gentoo Foundation |
1501 |
+# Copyright 1999-2015 Gentoo Foundation |
1502 |
# Distributed under the terms of the GNU General Public License v2 |
1503 |
# $Id$ |
1504 |
|
1505 |
EAPI=5 |
1506 |
|
1507 |
-EBASE_PROFNAME="refblas" |
1508 |
-ESTATIC_MULTIBUILD="true" |
1509 |
-inherit fortran-2 cmake-utils alternatives-2 multibuild multilib-build toolchain-funcs fortran-int64 |
1510 |
+PYTHON_COMPAT=( python2_7 ) |
1511 |
+ |
1512 |
+NUMERIC_MODULE_NAME="refblas" |
1513 |
+ |
1514 |
+inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs subversion |
1515 |
|
1516 |
LPN=lapack |
1517 |
LPV=3.5.0 |
1518 |
|
1519 |
-if [[ ${PV} == "99999999" ]] ; then |
1520 |
- ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk" |
1521 |
- inherit subversion |
1522 |
- KEYWORDS="" |
1523 |
-else |
1524 |
- SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" |
1525 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
1526 |
-fi |
1527 |
- |
1528 |
DESCRIPTION="Reference implementation of BLAS" |
1529 |
HOMEPAGE="http://www.netlib.org/lapack/" |
1530 |
+ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk" |
1531 |
|
1532 |
LICENSE="BSD" |
1533 |
SLOT="0" |
1534 |
-IUSE="int64 static-libs test" |
1535 |
+KEYWORDS="" |
1536 |
+IUSE="static-libs test" |
1537 |
+ |
1538 |
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" |
1539 |
|
1540 |
RDEPEND="" |
1541 |
DEPEND="${RDEPEND} |
1542 |
+ test? ( ${PYTHON_DEPS} ) |
1543 |
virtual/pkgconfig" |
1544 |
PDEPEND=">=virtual/blas-2.1-r3[int64?]" |
1545 |
|
1546 |
@@ -56,20 +54,25 @@ src_prepare() { |
1547 |
} |
1548 |
|
1549 |
src_configure() { |
1550 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1551 |
blas_configure() { |
1552 |
- local profname=$(fortran-int64_get_profname) |
1553 |
+ local FCFLAGS="${FCFLAGS}" |
1554 |
+ append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname}) |
1555 |
+ append-fflags $(get_abi_CFLAGS) |
1556 |
+ append-fflags $(numeric-int64_get_fortran_int64_abi_fflags) |
1557 |
+ |
1558 |
+ local profname=$(numeric-int64_get_module_name) |
1559 |
local libname="${profname//-/_}" |
1560 |
+ |
1561 |
local mycmakeargs=( |
1562 |
-Wno-dev |
1563 |
-DPROFNAME="${profname}" |
1564 |
-DLIBNAME="${libname}" |
1565 |
-DUSE_OPTIMIZED_BLAS=OFF |
1566 |
+ -DCMAKE_Fortran_FLAGS="${FCFLAGS}" |
1567 |
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)" |
1568 |
$(cmake-utils_use_build test TESTING) |
1569 |
- -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" |
1570 |
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)" |
1571 |
) |
1572 |
- if $(fortran-int64_is_static_build); then |
1573 |
+ if $(numeric-int64_is_static_build); then |
1574 |
mycmakeargs+=( |
1575 |
-DBUILD_SHARED_LIBS=OFF |
1576 |
-DBUILD_STATIC_LIBS=ON |
1577 |
@@ -82,37 +85,24 @@ src_configure() { |
1578 |
fi |
1579 |
cmake-utils_src_configure |
1580 |
} |
1581 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper blas_configure |
1582 |
+ numeric-int64-multibuild_foreach_all_abi_variants blas_configure |
1583 |
} |
1584 |
|
1585 |
src_compile() { |
1586 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1587 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile -C BLAS |
1588 |
+ local each target_dirs=( BLAS ) |
1589 |
+ use test && target_dirs+=( TESTING ) |
1590 |
+ for each in ${target_dirs[@]}; do |
1591 |
+ numeric-int64-multibuild_foreach_all_abi_variants \ |
1592 |
+ cmake-utils_src_compile -C ${each} |
1593 |
+ done |
1594 |
+ |
1595 |
} |
1596 |
|
1597 |
src_test() { |
1598 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1599 |
- blas_test() { |
1600 |
- _check_build_dir |
1601 |
- pushd "${BUILD_DIR}/BLAS" > /dev/null |
1602 |
- local ctestargs |
1603 |
- [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" |
1604 |
- ctest ${ctestargs} || die |
1605 |
- popd > /dev/null |
1606 |
- } |
1607 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper blas_test |
1608 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test |
1609 |
} |
1610 |
|
1611 |
src_install() { |
1612 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1613 |
- my_src_install() { |
1614 |
- cmake-utils_src_install -C BLAS |
1615 |
- if ! $(fortran-int64_is_static_build); then |
1616 |
- local profname=$(fortran-int64_get_profname) |
1617 |
- local provider=$(fortran-int64_get_blas_provider) |
1618 |
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
1619 |
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc |
1620 |
- fi |
1621 |
- } |
1622 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install |
1623 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install -C BLAS |
1624 |
+ numeric-int64-multibuild_install_alternative blas reference |
1625 |
} |
1626 |
|
1627 |
diff --git a/sci-libs/blas-reference/metadata.xml b/sci-libs/blas-reference/metadata.xml |
1628 |
index 346d64c..f5000eb 100644 |
1629 |
--- a/sci-libs/blas-reference/metadata.xml |
1630 |
+++ b/sci-libs/blas-reference/metadata.xml |
1631 |
@@ -1,8 +1,8 @@ |
1632 |
<?xml version="1.0" encoding="UTF-8"?> |
1633 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
1634 |
<pkgmetadata> |
1635 |
-<herd>sci</herd> |
1636 |
-<longdescription lang="en"> |
1637 |
+ <herd>sci</herd> |
1638 |
+ <longdescription lang="en"> |
1639 |
The BLAS (Basic Linear Algebra Subprograms) are high quality "building |
1640 |
block" routines for performing basic vector and matrix operations. Level 1 |
1641 |
BLAS do vector-vector operations, Level 2 BLAS do matrix-vector operations, |
1642 |
|
1643 |
diff --git a/sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild b/sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild |
1644 |
index 9e7e1f3..e875937 100644 |
1645 |
--- a/sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild |
1646 |
+++ b/sci-libs/cblas-reference/cblas-reference-20110218-r1.ebuild |
1647 |
@@ -4,8 +4,9 @@ |
1648 |
|
1649 |
EAPI=5 |
1650 |
|
1651 |
-EBASE_PROFNAME="refcblas" |
1652 |
-inherit eutils alternatives-2 flag-o-matic toolchain-funcs versionator multilib fortran-2 multilib-build fortran-int64 |
1653 |
+NUMERIC_MODULE_NAME="refcblas" |
1654 |
+ |
1655 |
+inherit alternatives-2 flag-o-matic fortran-2 multilib numeric numeric-int64-multibuild toolchain-funcs versionator |
1656 |
|
1657 |
MYPN="${PN/-reference/}" |
1658 |
|
1659 |
@@ -15,13 +16,12 @@ SRC_URI="http://www.netlib.org/blas/blast-forum/${MYPN}.tgz -> ${P}.tgz" |
1660 |
|
1661 |
SLOT="0" |
1662 |
LICENSE="public-domain" |
1663 |
-IUSE="int64 static-libs" |
1664 |
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" |
1665 |
+IUSE="static-libs" |
1666 |
|
1667 |
RDEPEND="virtual/blas" |
1668 |
DEPEND="${RDEPEND} |
1669 |
virtual/pkgconfig" |
1670 |
-PDEPEND=">=virtual/cblas-2.0-r2[int64?]" |
1671 |
|
1672 |
S="${WORKDIR}/CBLAS" |
1673 |
|
1674 |
@@ -31,7 +31,7 @@ MULTILIB_WRAPPED_HEADERS=( |
1675 |
|
1676 |
static_to_shared() { |
1677 |
local libstatic=$1 |
1678 |
- shift |
1679 |
+ shift ||Â die |
1680 |
local libname=$(basename ${libstatic%.a}) |
1681 |
local soname=${libname}$(get_libname $(get_version_component_range 1-2)) |
1682 |
local libdir=$(dirname ${libstatic}) |
1683 |
@@ -55,22 +55,20 @@ static_to_shared() { |
1684 |
} |
1685 |
|
1686 |
src_prepare() { |
1687 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1688 |
- fortran-int64_ensure_blas |
1689 |
+ numeric-int64_ensure_blas_int_support |
1690 |
find . -name Makefile -exec sed -i \ |
1691 |
-e 's:make:$(MAKE):g' '{}' \; ||Â die |
1692 |
- multibuild_copy_sources |
1693 |
+ numeric-int64-multibuild_copy_sources |
1694 |
} |
1695 |
|
1696 |
src_configure() { |
1697 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1698 |
- my_configure() { |
1699 |
- local profname=$(fortran-int64_get_profname) |
1700 |
+ cblas_configure() { |
1701 |
+ local profname=$(numeric-int64_get_module_name) |
1702 |
local libname="${profname//-/_}" |
1703 |
append-cflags -DADD_ |
1704 |
cat > Makefile.in <<-EOF |
1705 |
- BLLIB=$($(tc-getPKG_CONFIG) --libs $(fortran-int64_get_blas_provider)) |
1706 |
- FC=$(tc-getFC) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags) |
1707 |
+ BLLIB=$($(tc-getPKG_CONFIG) --libs $(numeric-int64_get_blas_alternative)) |
1708 |
+ FC=$(tc-getFC) $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags) |
1709 |
CC=$(tc-getCC) |
1710 |
CBLIB=../lib/lib${libname}.a |
1711 |
LOADER=\$(FC) |
1712 |
@@ -79,79 +77,69 @@ src_configure() { |
1713 |
RANLIB=$(tc-getRANLIB) |
1714 |
EOF |
1715 |
} |
1716 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure |
1717 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir cblas_configure |
1718 |
} |
1719 |
|
1720 |
src_compile() { |
1721 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1722 |
- my_src_compile() { |
1723 |
- local profname=$(fortran-int64_get_profname) |
1724 |
+ cblas_src_compile() { |
1725 |
+ local profname=$(numeric-int64_get_module_name) |
1726 |
local libname="${profname//-/_}" |
1727 |
emake \ |
1728 |
FFLAGS="${FFLAGS} -fPIC" \ |
1729 |
CFLAGS="${CFLAGS} -fPIC" \ |
1730 |
alllib |
1731 |
- static_to_shared lib/lib${libname}.a $($(tc-getPKG_CONFIG) --libs $(fortran-int64_get_blas_profname)) |
1732 |
+ static_to_shared lib/lib${libname}.a $($(tc-getPKG_CONFIG) --libs $(numeric-int64_get_blas_alternative)) |
1733 |
if use static-libs; then |
1734 |
emake clean |
1735 |
emake alllib |
1736 |
fi |
1737 |
} |
1738 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile |
1739 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir cblas_src_compile |
1740 |
} |
1741 |
|
1742 |
src_test() { |
1743 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1744 |
- my_src_test () { |
1745 |
- local profname=$(fortran-int64_get_profname) |
1746 |
+ cblas_src_test () { |
1747 |
+ local profname=$(numeric-int64_get_module_name) |
1748 |
local libname="${profname//-/_}" |
1749 |
cd testing || die |
1750 |
- default |
1751 |
- emake run |
1752 |
+ emake && emake run |
1753 |
} |
1754 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test |
1755 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir cblas_src_test |
1756 |
} |
1757 |
|
1758 |
src_install() { |
1759 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
1760 |
- my_src_install() { |
1761 |
- local profname=$(fortran-int64_get_profname) |
1762 |
+ cblas_src_install() { |
1763 |
+ local profname=$(numeric-int64_get_module_name) |
1764 |
local libname="${profname//-/_}" |
1765 |
- local provider=$(fortran-int64_get_cblas_provider) |
1766 |
# On linux dynamic libraries are of the form .so.${someversion} |
1767 |
# On OS X dynamic libraries are of the form ${someversion}.dylib |
1768 |
- dolib.so lib/lib${libname}*$(get_libname)* |
1769 |
- use static-libs && dolib.a lib/lib${libname}.a |
1770 |
- insinto /usr/include/cblas |
1771 |
- doins include/cblas.h |
1772 |
- cat <<-EOF > ${profname}.pc |
1773 |
- prefix=${EPREFIX}/usr |
1774 |
- libdir=\${prefix}/$(get_libdir) |
1775 |
- includedir=\${prefix}/include |
1776 |
- Name: ${profname} |
1777 |
- Description: ${DESCRIPTION} |
1778 |
- Version: ${PV} |
1779 |
- URL: ${HOMEPAGE} |
1780 |
- Libs: -L\${libdir} -l${libname} |
1781 |
- Private: -lm |
1782 |
- Cflags: -I\${includedir}/cblas |
1783 |
- Requires: $(fortran-int64_get_blas_profname) |
1784 |
- Fflags=$(fortran-int64_get_fortran_int64_abi_fflags) |
1785 |
- EOF |
1786 |
- insinto /usr/$(get_libdir)/pkgconfig |
1787 |
- doins ${profname}.pc |
1788 |
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
1789 |
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc \ |
1790 |
- /usr/include/cblas.h cblas/cblas.h |
1791 |
+ if numeric-int64_is_static_build; then |
1792 |
+ dolib.a lib/lib${libname}.a |
1793 |
+ else |
1794 |
+ dolib.so lib/lib${libname}*$(get_libname)* |
1795 |
+ insinto /usr/include/cblas |
1796 |
+ doins include/cblas.h |
1797 |
+ create_pkgconfig \ |
1798 |
+ --name "${profname}" \ |
1799 |
+ --libs "-L\${libdir} -l${libname}" \ |
1800 |
+ --libs-private "-lm" \ |
1801 |
+ --cflags "-I\${includedir}/cblas $(numeric-int64_get_fortran_int64_abi_fflags)" \ |
1802 |
+ --requires $(numeric-int64_get_blas_alternative) \ |
1803 |
+ ${profname} |
1804 |
+ fi |
1805 |
+ |
1806 |
if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then |
1807 |
multilib_prepare_wrappers |
1808 |
multilib_check_headers |
1809 |
fi |
1810 |
} |
1811 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install |
1812 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir cblas_src_install |
1813 |
+ |
1814 |
+ numeric-int64-multibuild_install_alternative cblas reference /usr/include/cblas.h cblas/cblas.h |
1815 |
+ |
1816 |
multilib_install_wrappers |
1817 |
|
1818 |
dodoc README |
1819 |
- insinto /usr/share/doc/${PF} |
1820 |
- doins examples/*.c |
1821 |
+ docinto examples |
1822 |
+ dodoc examples/*.c |
1823 |
} |
1824 |
|
1825 |
diff --git a/sci-libs/cblas-reference/cblas-reference-20110218.ebuild b/sci-libs/cblas-reference/cblas-reference-20110218.ebuild |
1826 |
deleted file mode 100644 |
1827 |
index c2c9b6f..0000000 |
1828 |
--- a/sci-libs/cblas-reference/cblas-reference-20110218.ebuild |
1829 |
+++ /dev/null |
1830 |
@@ -1,116 +0,0 @@ |
1831 |
-# Copyright 1999-2014 Gentoo Foundation |
1832 |
-# Distributed under the terms of the GNU General Public License v2 |
1833 |
-# $Id$ |
1834 |
- |
1835 |
-EAPI=5 |
1836 |
- |
1837 |
-inherit eutils alternatives-2 flag-o-matic toolchain-funcs versionator multilib fortran-2 |
1838 |
- |
1839 |
-MYPN="${PN/-reference/}" |
1840 |
- |
1841 |
-DESCRIPTION="C wrapper interface to the F77 reference BLAS implementation" |
1842 |
-HOMEPAGE="http://www.netlib.org/blas/" |
1843 |
-SRC_URI="http://www.netlib.org/blas/blast-forum/${MYPN}.tgz -> ${P}.tgz" |
1844 |
- |
1845 |
-SLOT="0" |
1846 |
-LICENSE="public-domain" |
1847 |
-IUSE="static-libs" |
1848 |
-KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" |
1849 |
- |
1850 |
-RDEPEND="virtual/blas" |
1851 |
-DEPEND="${RDEPEND} |
1852 |
- virtual/pkgconfig" |
1853 |
- |
1854 |
-S="${WORKDIR}/CBLAS" |
1855 |
- |
1856 |
-LIBNAME=refcblas |
1857 |
- |
1858 |
-static_to_shared() { |
1859 |
- local libstatic=$1 |
1860 |
- shift |
1861 |
- local libname=$(basename ${libstatic%.a}) |
1862 |
- local soname=${libname}$(get_libname $(get_version_component_range 1-2)) |
1863 |
- local libdir=$(dirname ${libstatic}) |
1864 |
- |
1865 |
- einfo "Making ${soname} from ${libstatic}" |
1866 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
1867 |
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \ |
1868 |
- -dynamiclib -install_name "${EPREFIX}"/usr/lib/${soname} \ |
1869 |
- -Wl,-all_load -Wl,${libstatic} \ |
1870 |
- "$@" -o ${libdir}/${soname} || die "${soname} failed" |
1871 |
- else |
1872 |
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \ |
1873 |
- -shared -Wl,-soname=${soname} \ |
1874 |
- -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \ |
1875 |
- "$@" -o ${libdir}/${soname} || die "${soname} failed" |
1876 |
- if [[ $(get_version_component_count) -gt 1 ]]; then |
1877 |
- ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version)) || die |
1878 |
- fi |
1879 |
- fi |
1880 |
- ln -s ${soname} ${libdir}/${libname}$(get_libname) || die |
1881 |
-} |
1882 |
- |
1883 |
-src_prepare() { |
1884 |
- find . -name Makefile -exec sed -i \ |
1885 |
- -e 's:make:$(MAKE):g' '{}' \; ||Â die |
1886 |
- append-cflags -DADD_ |
1887 |
- cat > Makefile.in <<-EOF |
1888 |
- BLLIB=$($(tc-getPKG_CONFIG) --libs blas) |
1889 |
- FC=$(tc-getFC) |
1890 |
- CC=$(tc-getCC) |
1891 |
- CBLIB=../lib/lib${LIBNAME}.a |
1892 |
- LOADER=\$(FC) |
1893 |
- ARCH=$(tc-getAR) |
1894 |
- ARCHFLAGS=cr |
1895 |
- RANLIB=$(tc-getRANLIB) |
1896 |
- EOF |
1897 |
-} |
1898 |
- |
1899 |
-src_compile() { |
1900 |
- emake \ |
1901 |
- FFLAGS="${FFLAGS} -fPIC" \ |
1902 |
- CFLAGS="${CFLAGS} -fPIC" \ |
1903 |
- CBLIB=../lib/lib${LIBNAME}.a \ |
1904 |
- alllib |
1905 |
- static_to_shared lib/lib${LIBNAME}.a $($(tc-getPKG_CONFIG) --libs blas) |
1906 |
- if use static-libs; then |
1907 |
- emake clean |
1908 |
- emake alllib |
1909 |
- fi |
1910 |
-} |
1911 |
- |
1912 |
-src_test() { |
1913 |
- cd testing || die |
1914 |
- default |
1915 |
- emake run |
1916 |
-} |
1917 |
- |
1918 |
-src_install() { |
1919 |
- # On linux dynamic libraries are of the form .so.${someversion} |
1920 |
- # On OS X dynamic libraries are of the form ${someversion}.dylib |
1921 |
- dolib.so lib/lib${LIBNAME}*$(get_libname)* |
1922 |
- use static-libs && dolib.a lib/lib${LIBNAME}.a |
1923 |
- insinto /usr/include/cblas |
1924 |
- doins include/cblas.h |
1925 |
- cat <<-EOF > ${LIBNAME}.pc |
1926 |
- prefix=${EPREFIX}/usr |
1927 |
- libdir=\${prefix}/$(get_libdir) |
1928 |
- includedir=\${prefix}/include |
1929 |
- Name: ${LIBNAME} |
1930 |
- Description: ${DESCRIPTION} |
1931 |
- Version: ${PV} |
1932 |
- URL: ${HOMEPAGE} |
1933 |
- Libs: -L\${libdir} -l${LIBNAME} |
1934 |
- Private: -lm |
1935 |
- Cflags: -I\${includedir}/cblas |
1936 |
- Requires: blas |
1937 |
- EOF |
1938 |
- insinto /usr/$(get_libdir)/pkgconfig |
1939 |
- doins ${LIBNAME}.pc |
1940 |
- dodoc README |
1941 |
- insinto /usr/share/doc/${PF} |
1942 |
- doins examples/*.c |
1943 |
- alternatives_for cblas reference 0 \ |
1944 |
- /usr/$(get_libdir)/pkgconfig/cblas.pc ${LIBNAME}.pc \ |
1945 |
- /usr/include/cblas.h cblas/cblas.h |
1946 |
-} |
1947 |
|
1948 |
diff --git a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild |
1949 |
index e95dfbf..997a220 100644 |
1950 |
--- a/sci-libs/gotoblas2/gotoblas2-1.13.ebuild |
1951 |
+++ b/sci-libs/gotoblas2/gotoblas2-1.13.ebuild |
1952 |
@@ -4,7 +4,9 @@ |
1953 |
|
1954 |
EAPI=5 |
1955 |
|
1956 |
-inherit eutils toolchain-funcs alternatives-2 multilib |
1957 |
+NUMERIC_MODULE_NAME=goto2 |
1958 |
+ |
1959 |
+inherit eutils numeric-int64-multibuild fortran-2 multilib toolchain-funcs |
1960 |
|
1961 |
MYPN="GotoBLAS2" |
1962 |
MYP="${MYPN}-${PV}_bsd" |
1963 |
@@ -17,11 +19,9 @@ SRC_URI="http://dev.gentoo.org/~bicatali/${MYP}.tar.gz" |
1964 |
LICENSE="BSD" |
1965 |
SLOT="0" |
1966 |
KEYWORDS="~amd64 ~x86 ~x86-macos ~ppc-macos ~x64-macos" |
1967 |
+IUSE="+incblas +openmp static-libs threads" |
1968 |
|
1969 |
-IUSE="+incblas int64 dynamic openmp static-libs threads" |
1970 |
- |
1971 |
-RDEPEND="virtual/fortran" |
1972 |
-DEPEND="${RDEPEND}" |
1973 |
+REQUIRED_USE="|| ( openmp threads )" |
1974 |
|
1975 |
S="${WORKDIR}/${MYPN}" |
1976 |
|
1977 |
@@ -29,11 +29,9 @@ src_prepare() { |
1978 |
epatch "${FILESDIR}"/${P}-{dynamic,sharedlibs,fcheck,aliasing}.patch |
1979 |
# respect LDFLAGS |
1980 |
sed -i -e '/^LDFLAGS\s*=/d' Makefile.* || die |
1981 |
- if ! use dynamic; then |
1982 |
- sed -i \ |
1983 |
- -e "/^COMMON_OPT/s/-O2/${CFLAGS}/" \ |
1984 |
- Makefile.rule || die |
1985 |
- fi |
1986 |
+ sed -i \ |
1987 |
+ -e "/^COMMON_OPT/s/-O2/${CFLAGS}/" \ |
1988 |
+ Makefile.rule || die |
1989 |
# fix executable stacks |
1990 |
local i |
1991 |
for i in $(find . -name \*.S); do |
1992 |
@@ -43,80 +41,89 @@ src_prepare() { |
1993 |
#endif |
1994 |
EOF |
1995 |
done |
1996 |
+ numeric-int64-multibuild_copy_sources |
1997 |
} |
1998 |
|
1999 |
src_configure() { |
2000 |
- local use_openmp=$(use openmp && echo 1) |
2001 |
- use threads && use openmp && use_openmp="" && \ |
2002 |
- einfo "openmp and threads enabled: using threads" |
2003 |
- sed -i \ |
2004 |
- -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ |
2005 |
- -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \ |
2006 |
- -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \ |
2007 |
- -e "s:^#\s*\(USE_THREAD\)\s*=.*:\1=$(use threads && echo 1 || echo 0):" \ |
2008 |
- -e "s:^#\s*\(USE_OPENMP\)\s*=.*:\1=${use_openmp}:" \ |
2009 |
- -e "s:^#\s*\(DYNAMIC_ARCH\)\s*=.*:\1=$(use dynamic && echo 1):" \ |
2010 |
- -e "s:^#\s*\(INTERFACE64\)\s*=.*:\1=$(use int64 && echo 1):" \ |
2011 |
- -e "s:^#\s*\(NO_CBLAS\)\s*=.*:\1=$(use incblas || echo 1):" \ |
2012 |
- Makefile.rule || die |
2013 |
+ myconfigure() { |
2014 |
+ sed \ |
2015 |
+ -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ |
2016 |
+ -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \ |
2017 |
+ -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \ |
2018 |
+ -e "s:^#\s*\(USE_THREAD\)\s*=.*:\1=$(usex threads 1 0):" \ |
2019 |
+ -e "s:^#\s*\(USE_OPENMP\)\s*=.*:\1=$(usex openmp 1 ""):" \ |
2020 |
+ -e "s:^#\s*\(DYNAMIC_ARCH\)\s*=.*:\1=1:" \ |
2021 |
+ -e "s:^#\s*\(INTERFACE64\)\s*=.*:\1=$(numeric-int64_is_int64_build && echo 1 || echo ""):" \ |
2022 |
+ -e "s:^#\s*\(NO_CBLAS\)\s*=.*:\1=$(usex incblas 1 ""):" \ |
2023 |
+ -i Makefile.rule || die |
2024 |
+ if numeric-int64_is_int64_build; then |
2025 |
+ sed \ |
2026 |
+ -e 's:libgoto2:libgoto2_int64:g' \ |
2027 |
+ -i Makefile* || die |
2028 |
+ fi |
2029 |
+ } |
2030 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir myconfigure |
2031 |
} |
2032 |
|
2033 |
src_compile() { |
2034 |
- mkdir solibs |
2035 |
- emake libs shared && mv *$(get_libname) solibs/ |
2036 |
- use static-libs && emake clean && emake libs NEED_PIC= |
2037 |
+ mycompile() { |
2038 |
+ if numeric-int64_is_static_build; then |
2039 |
+ use static-libs && emake clean && emake libs NEED_PIC= |
2040 |
+ else |
2041 |
+ mkdir solibs || die |
2042 |
+ emake libs shared && mv *$(get_libname) solibs/ || die |
2043 |
+ fi |
2044 |
+ } |
2045 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir mycompile |
2046 |
} |
2047 |
|
2048 |
src_test() { |
2049 |
- emake tests |
2050 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir emake tests |
2051 |
} |
2052 |
|
2053 |
src_install() { |
2054 |
- local profname=${PN} threads |
2055 |
- use int64 && profname=${profname}-int64 |
2056 |
- if use threads; then |
2057 |
- threads="-pthread" |
2058 |
- profname=${profname}-threads |
2059 |
- elif use openmp; then |
2060 |
- profname=${profname}-openmp |
2061 |
- fi |
2062 |
- |
2063 |
- dolib.so solibs/lib*$(get_libname) |
2064 |
- use static-libs && dolib.a lib*.a |
2065 |
- |
2066 |
- # create pkg-config file and associated eselect file |
2067 |
- cat <<-EOF > ${profname}.pc |
2068 |
- prefix=${EPREFIX}/usr |
2069 |
- libdir=\${prefix}/$(get_libdir) |
2070 |
- includedir=\${prefix}/include |
2071 |
- Name: ${MYPN} |
2072 |
- Description: ${DESCRIPTION} |
2073 |
- Version: ${PV} |
2074 |
- URL: ${HOMEPAGE} |
2075 |
- Libs: -L\${libdir} -lgoto2 -lm ${threads} |
2076 |
- EOF |
2077 |
- |
2078 |
- alternatives_for blas ${profname} 0 \ |
2079 |
- "/usr/$(get_libdir)/pkgconfig/blas.pc" "${profname}.pc" |
2080 |
- |
2081 |
- if use incblas; then |
2082 |
- insinto /usr/include/${PN} |
2083 |
- doins cblas.h |
2084 |
- echo >> ${profname}.pc "Cflags: -I\${includedir}/${PN}" |
2085 |
- alternatives_for cblas ${profname} 0 \ |
2086 |
- "/usr/$(get_libdir)/pkgconfig/cblas.pc" "${profname}.pc" \ |
2087 |
- "/usr/include/cblas.h" "${PN}/cblas.h" |
2088 |
- fi |
2089 |
+ myinstall() { |
2090 |
+ local profname=$(numeric-int64_get_module_name) |
2091 |
+ local libname=libgoto2 |
2092 |
+ local libs="-L\${libdir} -lm" |
2093 |
+ if numeric-int64_is_int64_build; then |
2094 |
+ libs+=" -lgoto2_int64" |
2095 |
+ else |
2096 |
+ libs+=" -lgoto2" |
2097 |
+ fi |
2098 |
+ use threads && libs+=" -pthread" |
2099 |
+ |
2100 |
+ numeric-int64_is_static_build && libname=libgoto2_int64 |
2101 |
+ |
2102 |
+ if numeric-int64_is_static_build; then |
2103 |
+ dolib.a lib*.a |
2104 |
+ else |
2105 |
+ dolib.so solibs/lib*$(get_libname) |
2106 |
+ |
2107 |
+ create_pkgconfig \ |
2108 |
+ --name "${MYPN}" \ |
2109 |
+ --libs "${libs}" \ |
2110 |
+ --cflags "-I\${includedir}/${PN}" \ |
2111 |
+ ${profname} |
2112 |
+ fi |
2113 |
+ |
2114 |
+ if use incblas; then |
2115 |
+ insinto /usr/include/${PN} |
2116 |
+ doins cblas.h |
2117 |
+ fi |
2118 |
+ } |
2119 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir myinstall |
2120 |
+ |
2121 |
+ numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} /usr/include/cblas.h ${PN}/cblas.h |
2122 |
|
2123 |
- insinto /usr/$(get_libdir)/pkgconfig |
2124 |
- doins ${profname}.pc |
2125 |
dodoc 01Readme.txt 03FAQ.txt 05LargePage 06WeirdPerformance |
2126 |
|
2127 |
if [[ ${CHOST} == *-darwin* ]] ; then |
2128 |
- cd "${ED}"/usr/$(get_libdir) |
2129 |
+ cd "${ED}"/usr/$(get_libdir) || die |
2130 |
+ local d |
2131 |
for d in *.dylib ; do |
2132 |
ebegin "correcting install_name of ${d}" |
2133 |
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" |
2134 |
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" ||Â die |
2135 |
eend $? |
2136 |
done |
2137 |
fi |
2138 |
|
2139 |
diff --git a/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild b/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild |
2140 |
deleted file mode 100644 |
2141 |
index e81c5a2..0000000 |
2142 |
--- a/sci-libs/lapack-reference/lapack-reference-3.4.2.ebuild |
2143 |
+++ /dev/null |
2144 |
@@ -1,139 +0,0 @@ |
2145 |
-# Copyright 1999-2014 Gentoo Foundation |
2146 |
-# Distributed under the terms of the GNU General Public License v2 |
2147 |
-# $Id$ |
2148 |
- |
2149 |
-EAPI=5 |
2150 |
-EBASE_PROFNAME="reflapack" |
2151 |
-ESTATIC_MULTIBUILD=1 |
2152 |
-inherit fortran-2 cmake-utils multibuild alternatives-2 multilib-build toolchain-funcs fortran-int64 |
2153 |
- |
2154 |
-if [[ ${PV} == "9999" ]] ; then |
2155 |
- # The master ESVN_REPO_URI is difficult to access, the git mirror is easier |
2156 |
- # ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk" |
2157 |
- # MY_PN=lapack |
2158 |
- # inherit subversion |
2159 |
- EGIT_REPO_URI="https://github.com/nschloe/lapack.git" |
2160 |
- MY_PN=lapack-reference |
2161 |
- MYP=${MY_PN}-${PV} |
2162 |
- inherit git-r3 |
2163 |
- KEYWORDS="" |
2164 |
-else |
2165 |
- MY_PN=lapack |
2166 |
- MYP=${MY_PN}-${PV} |
2167 |
- SRC_URI="http://www.netlib.org/lapack/${MYP}.tgz" |
2168 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
2169 |
-fi |
2170 |
- |
2171 |
-DESCRIPTION="Reference implementation of LAPACK" |
2172 |
-HOMEPAGE="http://www.netlib.org/lapack/" |
2173 |
- |
2174 |
-LICENSE="BSD" |
2175 |
-SLOT="0" |
2176 |
- |
2177 |
-IUSE="int64 static-libs test xblas" |
2178 |
- |
2179 |
-RDEPEND=" |
2180 |
- >=virtual/blas-2.1-r3[int64?] |
2181 |
- xblas? ( sci-libs/xblas[fortran,int64?] )" |
2182 |
-DEPEND="${RDEPEND} |
2183 |
- virtual/pkgconfig" |
2184 |
-PDEPEND=" |
2185 |
- >=virtual/lapack-3.5-r2[int64?]" |
2186 |
- |
2187 |
-S="${WORKDIR}/${MYP}" |
2188 |
- |
2189 |
-src_prepare() { |
2190 |
- fortran-int64_ensure_blas |
2191 |
- |
2192 |
- # rename library to avoid collision with other lapack implementations |
2193 |
- # ${PROFNAME}, ${LIBNAME} and ${BLAS_REQUIRES} are not defined here, they |
2194 |
- # are in single quotes in the following seds. They are set later by |
2195 |
- # defining a cmake variables with -DPROFNAME etc in src_configure. |
2196 |
- sed -i \ |
2197 |
- -e 's:BINARY_DIR}/lapack.pc:BINARY_DIR}/${PROFNAME}.pc:' \ |
2198 |
- -e '/ALL_TARGETS/s:lapack):${LIBNAME}):' \ |
2199 |
- -e '/LAPACK_LIBRARIES/s:lapack:${LIBNAME}:g' \ |
2200 |
- CMakeLists.txt || die |
2201 |
- sed -i \ |
2202 |
- -e 's:(lapack:(${LIBNAME}:g' \ |
2203 |
- SRC/CMakeLists.txt || die |
2204 |
- sed -i \ |
2205 |
- -e '/Name: /s:lapack:${PROFNAME}:' \ |
2206 |
- -e 's:-llapack:-l${LIBNAME}:g' \ |
2207 |
- -e '/Requires: /s:blas:${BLAS_REQUIRES}\nFflags=${LAPACK_PKGCONFIG_FFLAGS}:' \ |
2208 |
- lapack.pc.in || die |
2209 |
- # some string does not get passed properly |
2210 |
- sed -i \ |
2211 |
- -e '/lapack_testing.py/d' \ |
2212 |
- CTestCustom.cmake.in || die |
2213 |
- # separate ebuild to tmglib |
2214 |
- sed -i \ |
2215 |
- -e '/lapack_install_library(tmglib)/d' \ |
2216 |
- TESTING/MATGEN/CMakeLists.txt || die |
2217 |
-} |
2218 |
- |
2219 |
-src_configure() { |
2220 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2221 |
- my_src_configure() { |
2222 |
- local profname=$(fortran-int64_get_profname) |
2223 |
- local libname="${profname//-/_}" |
2224 |
- local blas_profname=$(fortran-int64_get_blas_profname) |
2225 |
- local xblas_profname=$(fortran-int64_get_xblas_profname) |
2226 |
- local xblas_libname="${xblas_profname//-/_}" |
2227 |
- local blas_requires="${blas_profname}" |
2228 |
- use xblas && \ |
2229 |
- blas_requires+=" ${xblas_profname}" |
2230 |
- local mycmakeargs=( |
2231 |
- -DPROFNAME="${profname}" |
2232 |
- -DBLAS_REQUIRES="${blas_requires}" |
2233 |
- -DLIBNAME="${libname}" |
2234 |
- -DUSE_OPTIMIZED_BLAS=ON |
2235 |
- -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})" |
2236 |
- $(cmake-utils_use_build test TESTING) |
2237 |
- $(cmake-utils_use_use xblas XBLAS) |
2238 |
- -DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CFLAGS}" |
2239 |
- -DCMAKE_CXX_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CXXFLAGS}" |
2240 |
- -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" |
2241 |
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)" |
2242 |
- ) |
2243 |
- use xblas && \ |
2244 |
- mycmakeargs+=( -DXBLAS_LIBRARY:FILEPATH="${EROOT}usr/$(get_libdir)/lib${xblas_libname}.so" ) |
2245 |
- if $(fortran-int64_is_static_build); then |
2246 |
- mycmakeargs+=( |
2247 |
- -DBUILD_SHARED_LIBS=OFF |
2248 |
- -DBUILD_STATIC_LIBS=ON |
2249 |
- ) |
2250 |
- else |
2251 |
- mycmakeargs+=( |
2252 |
- -DBUILD_SHARED_LIBS=ON |
2253 |
- -DBUILD_STATIC_LIBS=OFF |
2254 |
- ) |
2255 |
- fi |
2256 |
- cmake-utils_src_configure |
2257 |
- } |
2258 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_configure |
2259 |
-} |
2260 |
- |
2261 |
-src_compile() { |
2262 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2263 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile |
2264 |
-} |
2265 |
- |
2266 |
-src_test() { |
2267 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2268 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_test |
2269 |
-} |
2270 |
- |
2271 |
-src_install() { |
2272 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2273 |
- my_src_install() { |
2274 |
- cmake-utils_src_install |
2275 |
- if ! $(fortran-int64_is_static_build); then |
2276 |
- local profname=$(fortran-int64_get_profname) |
2277 |
- local provider=$(fortran-int64_get_lapack_provider) |
2278 |
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
2279 |
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc |
2280 |
- fi |
2281 |
- } |
2282 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install |
2283 |
-} |
2284 |
|
2285 |
diff --git a/sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild b/sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild |
2286 |
index e81c5a2..30458b5 100644 |
2287 |
--- a/sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild |
2288 |
+++ b/sci-libs/lapack-reference/lapack-reference-3.5.0.ebuild |
2289 |
@@ -1,49 +1,40 @@ |
2290 |
-# Copyright 1999-2014 Gentoo Foundation |
2291 |
+# Copyright 1999-2015 Gentoo Foundation |
2292 |
# Distributed under the terms of the GNU General Public License v2 |
2293 |
# $Id$ |
2294 |
|
2295 |
EAPI=5 |
2296 |
-EBASE_PROFNAME="reflapack" |
2297 |
-ESTATIC_MULTIBUILD=1 |
2298 |
-inherit fortran-2 cmake-utils multibuild alternatives-2 multilib-build toolchain-funcs fortran-int64 |
2299 |
- |
2300 |
-if [[ ${PV} == "9999" ]] ; then |
2301 |
- # The master ESVN_REPO_URI is difficult to access, the git mirror is easier |
2302 |
- # ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk" |
2303 |
- # MY_PN=lapack |
2304 |
- # inherit subversion |
2305 |
- EGIT_REPO_URI="https://github.com/nschloe/lapack.git" |
2306 |
- MY_PN=lapack-reference |
2307 |
- MYP=${MY_PN}-${PV} |
2308 |
- inherit git-r3 |
2309 |
- KEYWORDS="" |
2310 |
-else |
2311 |
- MY_PN=lapack |
2312 |
- MYP=${MY_PN}-${PV} |
2313 |
- SRC_URI="http://www.netlib.org/lapack/${MYP}.tgz" |
2314 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
2315 |
-fi |
2316 |
+ |
2317 |
+PYTHON_COMPAT=( python2_7 ) |
2318 |
+ |
2319 |
+NUMERIC_MODULE_NAME="reflapack" |
2320 |
+ |
2321 |
+inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 |
2322 |
+ |
2323 |
+MY_PN=lapack |
2324 |
+MYP=${MY_PN}-${PV} |
2325 |
|
2326 |
DESCRIPTION="Reference implementation of LAPACK" |
2327 |
HOMEPAGE="http://www.netlib.org/lapack/" |
2328 |
+SRC_URI="http://www.netlib.org/lapack/${MYP}.tgz" |
2329 |
|
2330 |
LICENSE="BSD" |
2331 |
SLOT="0" |
2332 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
2333 |
+IUSE="static-libs test xblas" |
2334 |
|
2335 |
-IUSE="int64 static-libs test xblas" |
2336 |
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" |
2337 |
|
2338 |
RDEPEND=" |
2339 |
- >=virtual/blas-2.1-r3[int64?] |
2340 |
+ >=virtual/blas-2.1-r3[int64?,${MULTILIB_USEDEP}] |
2341 |
xblas? ( sci-libs/xblas[fortran,int64?] )" |
2342 |
DEPEND="${RDEPEND} |
2343 |
- virtual/pkgconfig" |
2344 |
-PDEPEND=" |
2345 |
- >=virtual/lapack-3.5-r2[int64?]" |
2346 |
+ virtual/pkgconfig |
2347 |
+ test? ( ${PYTHON_DEPS} )" |
2348 |
|
2349 |
S="${WORKDIR}/${MYP}" |
2350 |
|
2351 |
src_prepare() { |
2352 |
- fortran-int64_ensure_blas |
2353 |
+ numeric-int64_ensure_blas_int_support |
2354 |
|
2355 |
# rename library to avoid collision with other lapack implementations |
2356 |
# ${PROFNAME}, ${LIBNAME} and ${BLAS_REQUIRES} are not defined here, they |
2357 |
@@ -73,12 +64,11 @@ src_prepare() { |
2358 |
} |
2359 |
|
2360 |
src_configure() { |
2361 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2362 |
- my_src_configure() { |
2363 |
- local profname=$(fortran-int64_get_profname) |
2364 |
+ lapack_configure() { |
2365 |
+ local profname=$(numeric-int64_get_module_name) |
2366 |
local libname="${profname//-/_}" |
2367 |
- local blas_profname=$(fortran-int64_get_blas_profname) |
2368 |
- local xblas_profname=$(fortran-int64_get_xblas_profname) |
2369 |
+ local blas_profname=$(numeric-int64_get_blas_alternative) |
2370 |
+ local xblas_profname=$(numeric-int64_get_xblas_alternative) |
2371 |
local xblas_libname="${xblas_profname//-/_}" |
2372 |
local blas_requires="${blas_profname}" |
2373 |
use xblas && \ |
2374 |
@@ -93,12 +83,12 @@ src_configure() { |
2375 |
$(cmake-utils_use_use xblas XBLAS) |
2376 |
-DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CFLAGS}" |
2377 |
-DCMAKE_CXX_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CXXFLAGS}" |
2378 |
- -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" |
2379 |
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)" |
2380 |
+ -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" |
2381 |
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)" |
2382 |
) |
2383 |
use xblas && \ |
2384 |
mycmakeargs+=( -DXBLAS_LIBRARY:FILEPATH="${EROOT}usr/$(get_libdir)/lib${xblas_libname}.so" ) |
2385 |
- if $(fortran-int64_is_static_build); then |
2386 |
+ if $(numeric-int64_is_static_build); then |
2387 |
mycmakeargs+=( |
2388 |
-DBUILD_SHARED_LIBS=OFF |
2389 |
-DBUILD_STATIC_LIBS=ON |
2390 |
@@ -111,29 +101,18 @@ src_configure() { |
2391 |
fi |
2392 |
cmake-utils_src_configure |
2393 |
} |
2394 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_configure |
2395 |
+ numeric-int64-multibuild_foreach_all_abi_variants lapack_configure |
2396 |
} |
2397 |
|
2398 |
src_compile() { |
2399 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2400 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile |
2401 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_compile |
2402 |
} |
2403 |
|
2404 |
src_test() { |
2405 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2406 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_test |
2407 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test |
2408 |
} |
2409 |
|
2410 |
src_install() { |
2411 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2412 |
- my_src_install() { |
2413 |
- cmake-utils_src_install |
2414 |
- if ! $(fortran-int64_is_static_build); then |
2415 |
- local profname=$(fortran-int64_get_profname) |
2416 |
- local provider=$(fortran-int64_get_lapack_provider) |
2417 |
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
2418 |
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc |
2419 |
- fi |
2420 |
- } |
2421 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install |
2422 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install |
2423 |
+ numeric-int64-multibuild_install_alternative lapack reference |
2424 |
} |
2425 |
|
2426 |
diff --git a/sci-libs/lapack-reference/lapack-reference-9999.ebuild b/sci-libs/lapack-reference/lapack-reference-9999.ebuild |
2427 |
index e81c5a2..466c762 100644 |
2428 |
--- a/sci-libs/lapack-reference/lapack-reference-9999.ebuild |
2429 |
+++ b/sci-libs/lapack-reference/lapack-reference-9999.ebuild |
2430 |
@@ -1,49 +1,45 @@ |
2431 |
-# Copyright 1999-2014 Gentoo Foundation |
2432 |
+# Copyright 1999-2015 Gentoo Foundation |
2433 |
# Distributed under the terms of the GNU General Public License v2 |
2434 |
# $Id$ |
2435 |
|
2436 |
EAPI=5 |
2437 |
-EBASE_PROFNAME="reflapack" |
2438 |
-ESTATIC_MULTIBUILD=1 |
2439 |
-inherit fortran-2 cmake-utils multibuild alternatives-2 multilib-build toolchain-funcs fortran-int64 |
2440 |
- |
2441 |
-if [[ ${PV} == "9999" ]] ; then |
2442 |
- # The master ESVN_REPO_URI is difficult to access, the git mirror is easier |
2443 |
- # ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk" |
2444 |
- # MY_PN=lapack |
2445 |
- # inherit subversion |
2446 |
- EGIT_REPO_URI="https://github.com/nschloe/lapack.git" |
2447 |
- MY_PN=lapack-reference |
2448 |
- MYP=${MY_PN}-${PV} |
2449 |
- inherit git-r3 |
2450 |
- KEYWORDS="" |
2451 |
-else |
2452 |
- MY_PN=lapack |
2453 |
- MYP=${MY_PN}-${PV} |
2454 |
- SRC_URI="http://www.netlib.org/lapack/${MYP}.tgz" |
2455 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
2456 |
-fi |
2457 |
+ |
2458 |
+PYTHON_COMPAT=( python2_7 ) |
2459 |
+ |
2460 |
+NUMERIC_MODULE_NAME="reflapack" |
2461 |
+ |
2462 |
+inherit alternatives-2 cmake-utils fortran-2 git-r3 numeric-int64-multibuild python-any-r1 |
2463 |
+ |
2464 |
+# The master ESVN_REPO_URI is difficult to access, the git mirror is easier |
2465 |
+# ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk" |
2466 |
+# MY_PN=lapack |
2467 |
+# inherit subversion |
2468 |
+ |
2469 |
+MY_PN=lapack-reference |
2470 |
+MYP=${MY_PN}-${PV} |
2471 |
|
2472 |
DESCRIPTION="Reference implementation of LAPACK" |
2473 |
HOMEPAGE="http://www.netlib.org/lapack/" |
2474 |
+EGIT_REPO_URI="https://github.com/nschloe/lapack.git" |
2475 |
|
2476 |
LICENSE="BSD" |
2477 |
SLOT="0" |
2478 |
+KEYWORDS="" |
2479 |
+IUSE="static-libs test xblas" |
2480 |
|
2481 |
-IUSE="int64 static-libs test xblas" |
2482 |
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" |
2483 |
|
2484 |
RDEPEND=" |
2485 |
- >=virtual/blas-2.1-r3[int64?] |
2486 |
+ >=virtual/blas-2.1-r3[int64?,${MULTILIB_USEDEP}] |
2487 |
xblas? ( sci-libs/xblas[fortran,int64?] )" |
2488 |
DEPEND="${RDEPEND} |
2489 |
- virtual/pkgconfig" |
2490 |
-PDEPEND=" |
2491 |
- >=virtual/lapack-3.5-r2[int64?]" |
2492 |
+ virtual/pkgconfig |
2493 |
+ test? ( ${PYTHON_DEPS} )" |
2494 |
|
2495 |
S="${WORKDIR}/${MYP}" |
2496 |
|
2497 |
src_prepare() { |
2498 |
- fortran-int64_ensure_blas |
2499 |
+ numeric-int64_ensure_blas_int_support |
2500 |
|
2501 |
# rename library to avoid collision with other lapack implementations |
2502 |
# ${PROFNAME}, ${LIBNAME} and ${BLAS_REQUIRES} are not defined here, they |
2503 |
@@ -73,12 +69,11 @@ src_prepare() { |
2504 |
} |
2505 |
|
2506 |
src_configure() { |
2507 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2508 |
- my_src_configure() { |
2509 |
- local profname=$(fortran-int64_get_profname) |
2510 |
+ lapack_configure() { |
2511 |
+ local profname=$(numeric-int64_get_module_name) |
2512 |
local libname="${profname//-/_}" |
2513 |
- local blas_profname=$(fortran-int64_get_blas_profname) |
2514 |
- local xblas_profname=$(fortran-int64_get_xblas_profname) |
2515 |
+ local blas_profname=$(numeric-int64_get_blas_alternative) |
2516 |
+ local xblas_profname=$(numeric-int64_get_xblas_alternative) |
2517 |
local xblas_libname="${xblas_profname//-/_}" |
2518 |
local blas_requires="${blas_profname}" |
2519 |
use xblas && \ |
2520 |
@@ -93,12 +88,12 @@ src_configure() { |
2521 |
$(cmake-utils_use_use xblas XBLAS) |
2522 |
-DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CFLAGS}" |
2523 |
-DCMAKE_CXX_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CXXFLAGS}" |
2524 |
- -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" |
2525 |
- -DLAPACK_PKGCONFIG_FFLAGS="$(fortran-int64_get_fortran_int64_abi_fflags)" |
2526 |
+ -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" |
2527 |
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)" |
2528 |
) |
2529 |
use xblas && \ |
2530 |
mycmakeargs+=( -DXBLAS_LIBRARY:FILEPATH="${EROOT}usr/$(get_libdir)/lib${xblas_libname}.so" ) |
2531 |
- if $(fortran-int64_is_static_build); then |
2532 |
+ if $(numeric-int64_is_static_build); then |
2533 |
mycmakeargs+=( |
2534 |
-DBUILD_SHARED_LIBS=OFF |
2535 |
-DBUILD_STATIC_LIBS=ON |
2536 |
@@ -111,29 +106,18 @@ src_configure() { |
2537 |
fi |
2538 |
cmake-utils_src_configure |
2539 |
} |
2540 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_configure |
2541 |
+ numeric-int64-multibuild_foreach_all_abi_variants lapack_configure |
2542 |
} |
2543 |
|
2544 |
src_compile() { |
2545 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2546 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_compile |
2547 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_compile |
2548 |
} |
2549 |
|
2550 |
src_test() { |
2551 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2552 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper cmake-utils_src_test |
2553 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test |
2554 |
} |
2555 |
|
2556 |
src_install() { |
2557 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2558 |
- my_src_install() { |
2559 |
- cmake-utils_src_install |
2560 |
- if ! $(fortran-int64_is_static_build); then |
2561 |
- local profname=$(fortran-int64_get_profname) |
2562 |
- local provider=$(fortran-int64_get_lapack_provider) |
2563 |
- alternatives_for ${provider} $(fortran-int64_get_profname "reference") 0 \ |
2564 |
- /usr/$(get_libdir)/pkgconfig/${provider}.pc ${profname}.pc |
2565 |
- fi |
2566 |
- } |
2567 |
- multibuild_foreach_variant fortran-int64_multilib_multibuild_wrapper my_src_install |
2568 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install |
2569 |
+ numeric-int64-multibuild_install_alternative lapack reference |
2570 |
} |
2571 |
|
2572 |
diff --git a/sci-libs/openblas/openblas-0.2.11.ebuild b/sci-libs/openblas/openblas-0.2.11.ebuild |
2573 |
deleted file mode 100644 |
2574 |
index 3b7d0b7..0000000 |
2575 |
--- a/sci-libs/openblas/openblas-0.2.11.ebuild |
2576 |
+++ /dev/null |
2577 |
@@ -1,227 +0,0 @@ |
2578 |
-# Copyright 1999-2015 Gentoo Foundation |
2579 |
-# Distributed under the terms of the GNU General Public License v2 |
2580 |
-# $Id$ |
2581 |
- |
2582 |
-EAPI=5 |
2583 |
- |
2584 |
-EBASE_PROFNAME="openblas" |
2585 |
-inherit alternatives-2 eutils multilib fortran-2 multibuild multilib-build toolchain-funcs fortran-int64 |
2586 |
- |
2587 |
-SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" |
2588 |
-if [[ ${PV} == "9999" ]] ; then |
2589 |
- EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git" |
2590 |
- EGIT_BRANCH="develop" |
2591 |
- inherit git-r3 |
2592 |
- KEYWORDS="" |
2593 |
-else |
2594 |
- SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz" |
2595 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos" |
2596 |
-fi |
2597 |
- |
2598 |
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2" |
2599 |
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/" |
2600 |
-LICENSE="BSD" |
2601 |
-SLOT="0" |
2602 |
-IUSE="dynamic int64 openmp static-libs threads" |
2603 |
- |
2604 |
-RDEPEND="" |
2605 |
-DEPEND="${RDEPEND} |
2606 |
- virtual/pkgconfig" |
2607 |
-PDEPEND=" |
2608 |
- >=virtual/blas-2.1-r2[int64?] |
2609 |
- >=virtual/cblas-2.0-r1[int64?]" |
2610 |
- |
2611 |
-MULTILIB_WRAPPED_HEADERS=( |
2612 |
- /usr/include/openblas/cblas.h |
2613 |
- /usr/include/openblas/f77blas.h |
2614 |
- /usr/include/openblas/openblas_config.h |
2615 |
-) |
2616 |
- |
2617 |
-get_openblas_flags() { |
2618 |
- local openblas_flags="" |
2619 |
- use dynamic && \ |
2620 |
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1" |
2621 |
- $(fortran-int64_is_int64_build) && \ |
2622 |
- openblas_flags+=" INTERFACE64=1" |
2623 |
- # choose posix threads over openmp when the two are set |
2624 |
- # yet to see the need of having the two profiles simultaneously |
2625 |
- if use threads; then |
2626 |
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0" |
2627 |
- elif use openmp; then |
2628 |
- openblas_flags+=" USE_THREAD=0 USE_OPENMP=1" |
2629 |
- fi |
2630 |
- local profname=$(fortran-int64_get_profname) |
2631 |
- local libname="${profname//-/_}" |
2632 |
- local underscoresuffix="${libname#${PN}}" |
2633 |
- if [[ "${underscoresuffix}" != "_" ]]; then |
2634 |
- local libnamesuffix="${underscoresuffix#_}" |
2635 |
- openblas_flags+=" LIBNAMESUFFIX=${libnamesuffix}" |
2636 |
- fi |
2637 |
- echo "${openblas_flags}" |
2638 |
-} |
2639 |
- |
2640 |
-get_openblas_abi_cflags() { |
2641 |
- local openblas_abi_cflags="" |
2642 |
- if [[ "${ABI}" == "x86" ]]; then |
2643 |
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1" |
2644 |
- else |
2645 |
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1" |
2646 |
- fi |
2647 |
- $(fortran-int64_is_int64_build) && \ |
2648 |
- openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT" |
2649 |
- echo "${openblas_abi_cflags}" |
2650 |
-} |
2651 |
- |
2652 |
-src_unpack() { |
2653 |
- if [[ ${PV} == "9999" ]] ; then |
2654 |
- git-r3_src_unpack |
2655 |
- else |
2656 |
- default |
2657 |
- if [[ ${PV} != "9999" ]] ; then |
2658 |
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ |
2659 |
- mv "${WORKDIR}"/*OpenBLAS* "${S}" |
2660 |
- fi |
2661 |
- fi |
2662 |
-} |
2663 |
- |
2664 |
-src_prepare() { |
2665 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2666 |
- epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch" |
2667 |
- if [[ ${PV} == "0.2.11" ]] ; then |
2668 |
- epatch "${FILESDIR}/${PN}-0.2.11-cpuid_x86.patch" |
2669 |
- fi |
2670 |
- # lapack and lapacke are not modified from upstream lapack |
2671 |
- sed \ |
2672 |
- -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ |
2673 |
- -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ |
2674 |
- -i Makefile.rule || die |
2675 |
- multibuild_copy_sources |
2676 |
-} |
2677 |
- |
2678 |
-src_configure() { |
2679 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2680 |
- my_configure() { |
2681 |
- local openblas_abi_cflags="$(get_openblas_abi_cflags)" |
2682 |
- local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" |
2683 |
- sed \ |
2684 |
- -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \ |
2685 |
- -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \ |
2686 |
- -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ |
2687 |
- -i Makefile.rule || die |
2688 |
- } |
2689 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure |
2690 |
-} |
2691 |
- |
2692 |
-src_compile() { |
2693 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2694 |
- # openblas already does multi-jobs |
2695 |
- MAKEOPTS+=" -j1" |
2696 |
- my_src_compile () { |
2697 |
- local openblas_flags=$(get_openblas_flags) |
2698 |
- local profname=$(fortran-int64_get_profname) |
2699 |
- local libname="${profname//-/_}" |
2700 |
- einfo "Compiling profile ${profname}" |
2701 |
- # cflags already defined twice |
2702 |
- unset CFLAGS |
2703 |
- emake clean |
2704 |
- emake libs shared ${openblas_flags} |
2705 |
- mkdir -p libs && mv libopenblas* libs/ |
2706 |
- # avoid pic when compiling static libraries, so re-compiling |
2707 |
- if use static-libs; then |
2708 |
- emake clean |
2709 |
- emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= |
2710 |
- mv libopenblas* libs/ |
2711 |
- fi |
2712 |
- # Fix Bug 524612 - [science overlay] sci-libs/openblas-0.2.11 - Assembler messages: |
2713 |
- # ../kernel/x86_64/gemm_kernel_8x4_barcelona.S:451: Error: missing ')' |
2714 |
- # The problem is applying this patch in src_prepare() causes build failures on |
2715 |
- # assembler code as the assembler does not understand sizeof(float). So |
2716 |
- # delay applying the patch until after building the libraries. |
2717 |
- epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch" |
2718 |
- rm -f config.h config_last.h |
2719 |
- # Note: prints this spurious warning: make: Nothing to be done for 'config.h'. |
2720 |
- emake config.h |
2721 |
- cp config.h config_last.h || die |
2722 |
- cat <<-EOF > ${profname}.pc |
2723 |
- prefix=${EPREFIX}/usr |
2724 |
- libdir=\${prefix}/$(get_libdir) |
2725 |
- includedir=\${prefix}/include |
2726 |
- Name: ${profname} |
2727 |
- Description: ${DESCRIPTION} |
2728 |
- Version: ${PV} |
2729 |
- URL: ${HOMEPAGE} |
2730 |
- Libs: -L\${libdir} -l${libname} |
2731 |
- Libs.private: -lm |
2732 |
- EOF |
2733 |
- local openblas_abi_cflags=$(get_openblas_abi_cflags) |
2734 |
- local openblas_abi_fflags=$(fortran-int64_get_fortran_int64_abi_fflags) |
2735 |
- cat <<-EOF >> ${profname}.pc |
2736 |
- Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags} |
2737 |
- Fflags=${openblas_abi_fflags} |
2738 |
- EOF |
2739 |
- mv libs/libopenblas* . || die |
2740 |
- } |
2741 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile |
2742 |
-} |
2743 |
- |
2744 |
-src_test() { |
2745 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2746 |
- my_src_test () { |
2747 |
- local openblas_flags=$(get_openblas_flags) |
2748 |
- emake tests ${openblas_flags} |
2749 |
- } |
2750 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test |
2751 |
-} |
2752 |
- |
2753 |
-src_install() { |
2754 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2755 |
- my_src_install() { |
2756 |
- local openblas_flags=$(get_openblas_flags) |
2757 |
- local profname=$(fortran-int64_get_profname) |
2758 |
- local pcfile |
2759 |
- for pcfile in *.pc; do |
2760 |
- local profname=${pcfile%.pc} |
2761 |
- # The file /usr/include/openblas/openblas_config.h is generated during the install. |
2762 |
- # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT |
2763 |
- # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 |
2764 |
- # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in |
2765 |
- # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. |
2766 |
- sed -e '/#define USE64BITINT/d' \ |
2767 |
- -e '/#define ARCH_X86/d' \ |
2768 |
- -e '/#define __\(32\|64\)BIT__/d' \ |
2769 |
- -i config_last.h \ |
2770 |
- || die "Could not ensure there is no definition of USE64BITINT in config_last.h" |
2771 |
- emake install \ |
2772 |
- PREFIX="${ED}"usr ${openblas_flags} \ |
2773 |
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \ |
2774 |
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir) |
2775 |
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a |
2776 |
- alternatives_for $(fortran-int64_get_blas_provider) ${profname} 0 \ |
2777 |
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_blas_provider).pc ${pcfile} |
2778 |
- alternatives_for $(fortran-int64_get_cblas_provider) ${profname} 0 \ |
2779 |
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_cblas_provider).pc ${pcfile} \ |
2780 |
- /usr/include/cblas.h ${PN}/cblas.h |
2781 |
- insinto /usr/$(get_libdir)/pkgconfig |
2782 |
- doins ${pcfile} |
2783 |
- done |
2784 |
- |
2785 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
2786 |
- cd "${ED}"/usr/$(get_libdir) |
2787 |
- local d |
2788 |
- for d in *.dylib ; do |
2789 |
- ebegin "Correcting install_name of ${d}" |
2790 |
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" |
2791 |
- eend $? |
2792 |
- done |
2793 |
- fi |
2794 |
- if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then |
2795 |
- multilib_prepare_wrappers |
2796 |
- multilib_check_headers |
2797 |
- fi |
2798 |
- } |
2799 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install |
2800 |
- multilib_install_wrappers |
2801 |
- |
2802 |
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt |
2803 |
- dodoc *md Changelog.txt |
2804 |
-} |
2805 |
|
2806 |
diff --git a/sci-libs/openblas/openblas-0.2.12.ebuild b/sci-libs/openblas/openblas-0.2.12.ebuild |
2807 |
deleted file mode 100644 |
2808 |
index 91736c8..0000000 |
2809 |
--- a/sci-libs/openblas/openblas-0.2.12.ebuild |
2810 |
+++ /dev/null |
2811 |
@@ -1,227 +0,0 @@ |
2812 |
-# Copyright 1999-2015 Gentoo Foundation |
2813 |
-# Distributed under the terms of the GNU General Public License v2 |
2814 |
-# $Id$ |
2815 |
- |
2816 |
-EAPI=5 |
2817 |
- |
2818 |
-EBASE_PROFNAME="openblas" |
2819 |
-inherit alternatives-2 eutils multilib fortran-2 multibuild multilib-build toolchain-funcs fortran-int64 |
2820 |
- |
2821 |
-SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" |
2822 |
-if [[ ${PV} == "9999" ]] ; then |
2823 |
- EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git" |
2824 |
- EGIT_BRANCH="develop" |
2825 |
- inherit git-r3 |
2826 |
- KEYWORDS="" |
2827 |
-else |
2828 |
- SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz" |
2829 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos" |
2830 |
-fi |
2831 |
- |
2832 |
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2" |
2833 |
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/" |
2834 |
-LICENSE="BSD" |
2835 |
-SLOT="0" |
2836 |
-IUSE="dynamic int64 openmp static-libs threads" |
2837 |
- |
2838 |
-RDEPEND="" |
2839 |
-DEPEND="${RDEPEND} |
2840 |
- virtual/pkgconfig" |
2841 |
-PDEPEND=" |
2842 |
- >=virtual/blas-2.1-r2[int64?] |
2843 |
- >=virtual/cblas-2.0-r1[int64?]" |
2844 |
- |
2845 |
-MULTILIB_WRAPPED_HEADERS=( |
2846 |
- /usr/include/openblas/cblas.h |
2847 |
- /usr/include/openblas/f77blas.h |
2848 |
- /usr/include/openblas/openblas_config.h |
2849 |
-) |
2850 |
- |
2851 |
-get_openblas_flags() { |
2852 |
- local openblas_flags="" |
2853 |
- use dynamic && \ |
2854 |
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1" |
2855 |
- $(fortran-int64_is_int64_build) && \ |
2856 |
- openblas_flags+=" INTERFACE64=1" |
2857 |
- # choose posix threads over openmp when the two are set |
2858 |
- # yet to see the need of having the two profiles simultaneously |
2859 |
- if use threads; then |
2860 |
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0" |
2861 |
- elif use openmp; then |
2862 |
- openblas_flags+=" USE_OPENMP=1" |
2863 |
- fi |
2864 |
- local profname=$(fortran-int64_get_profname) |
2865 |
- local libname="${profname//-/_}" |
2866 |
- local underscoresuffix="${libname#${PN}}" |
2867 |
- if [[ "${underscoresuffix}" != "_" ]]; then |
2868 |
- local libnamesuffix="${underscoresuffix#_}" |
2869 |
- openblas_flags+=" LIBNAMESUFFIX=${libnamesuffix}" |
2870 |
- fi |
2871 |
- echo "${openblas_flags}" |
2872 |
-} |
2873 |
- |
2874 |
-get_openblas_abi_cflags() { |
2875 |
- local openblas_abi_cflags="" |
2876 |
- if [[ "${ABI}" == "x86" ]]; then |
2877 |
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1" |
2878 |
- else |
2879 |
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1" |
2880 |
- fi |
2881 |
- $(fortran-int64_is_int64_build) && \ |
2882 |
- openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT" |
2883 |
- echo "${openblas_abi_cflags}" |
2884 |
-} |
2885 |
- |
2886 |
-src_unpack() { |
2887 |
- if [[ ${PV} == "9999" ]] ; then |
2888 |
- git-r3_src_unpack |
2889 |
- else |
2890 |
- default |
2891 |
- if [[ ${PV} != "9999" ]] ; then |
2892 |
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ |
2893 |
- mv "${WORKDIR}"/*OpenBLAS* "${S}" |
2894 |
- fi |
2895 |
- fi |
2896 |
-} |
2897 |
- |
2898 |
-src_prepare() { |
2899 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2900 |
- epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch" |
2901 |
- if [[ ${PV} == "0.2.11" ]] ; then |
2902 |
- epatch "${FILESDIR}/${PN}-0.2.11-cpuid_x86.patch" |
2903 |
- fi |
2904 |
- # lapack and lapacke are not modified from upstream lapack |
2905 |
- sed \ |
2906 |
- -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ |
2907 |
- -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ |
2908 |
- -i Makefile.rule || die |
2909 |
- multibuild_copy_sources |
2910 |
-} |
2911 |
- |
2912 |
-src_configure() { |
2913 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2914 |
- my_configure() { |
2915 |
- local openblas_abi_cflags="$(get_openblas_abi_cflags)" |
2916 |
- local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" |
2917 |
- sed \ |
2918 |
- -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \ |
2919 |
- -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \ |
2920 |
- -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ |
2921 |
- -i Makefile.rule || die |
2922 |
- } |
2923 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure |
2924 |
-} |
2925 |
- |
2926 |
-src_compile() { |
2927 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2928 |
- # openblas already does multi-jobs |
2929 |
- MAKEOPTS+=" -j1" |
2930 |
- my_src_compile () { |
2931 |
- local openblas_flags=$(get_openblas_flags) |
2932 |
- local profname=$(fortran-int64_get_profname) |
2933 |
- local libname="${profname//-/_}" |
2934 |
- einfo "Compiling profile ${profname}" |
2935 |
- # cflags already defined twice |
2936 |
- unset CFLAGS |
2937 |
- emake clean |
2938 |
- emake libs shared ${openblas_flags} |
2939 |
- mkdir -p libs && mv libopenblas* libs/ |
2940 |
- # avoid pic when compiling static libraries, so re-compiling |
2941 |
- if use static-libs; then |
2942 |
- emake clean |
2943 |
- emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= |
2944 |
- mv libopenblas* libs/ |
2945 |
- fi |
2946 |
- # Fix Bug 524612 - [science overlay] sci-libs/openblas-0.2.11 - Assembler messages: |
2947 |
- # ../kernel/x86_64/gemm_kernel_8x4_barcelona.S:451: Error: missing ')' |
2948 |
- # The problem is applying this patch in src_prepare() causes build failures on |
2949 |
- # assembler code as the assembler does not understand sizeof(float). So |
2950 |
- # delay applying the patch until after building the libraries. |
2951 |
- epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch" |
2952 |
- rm -f config.h config_last.h |
2953 |
- # Note: prints this spurious warning: make: Nothing to be done for 'config.h'. |
2954 |
- emake config.h |
2955 |
- cp config.h config_last.h || die |
2956 |
- cat <<-EOF > ${profname}.pc |
2957 |
- prefix=${EPREFIX}/usr |
2958 |
- libdir=\${prefix}/$(get_libdir) |
2959 |
- includedir=\${prefix}/include |
2960 |
- Name: ${profname} |
2961 |
- Description: ${DESCRIPTION} |
2962 |
- Version: ${PV} |
2963 |
- URL: ${HOMEPAGE} |
2964 |
- Libs: -L\${libdir} -l${libname} |
2965 |
- Libs.private: -lm |
2966 |
- EOF |
2967 |
- local openblas_abi_cflags=$(get_openblas_abi_cflags) |
2968 |
- local openblas_abi_fflags=$(fortran-int64_get_fortran_int64_abi_fflags) |
2969 |
- cat <<-EOF >> ${profname}.pc |
2970 |
- Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags} |
2971 |
- Fflags=${openblas_abi_fflags} |
2972 |
- EOF |
2973 |
- mv libs/libopenblas* . || die |
2974 |
- } |
2975 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile |
2976 |
-} |
2977 |
- |
2978 |
-src_test() { |
2979 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2980 |
- my_src_test () { |
2981 |
- local openblas_flags=$(get_openblas_flags) |
2982 |
- emake tests ${openblas_flags} |
2983 |
- } |
2984 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test |
2985 |
-} |
2986 |
- |
2987 |
-src_install() { |
2988 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
2989 |
- my_src_install() { |
2990 |
- local openblas_flags=$(get_openblas_flags) |
2991 |
- local profname=$(fortran-int64_get_profname) |
2992 |
- local pcfile |
2993 |
- for pcfile in *.pc; do |
2994 |
- local profname=${pcfile%.pc} |
2995 |
- # The file /usr/include/openblas/openblas_config.h is generated during the install. |
2996 |
- # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT |
2997 |
- # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 |
2998 |
- # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in |
2999 |
- # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. |
3000 |
- sed -e '/#define USE64BITINT/d' \ |
3001 |
- -e '/#define ARCH_X86/d' \ |
3002 |
- -e '/#define __\(32\|64\)BIT__/d' \ |
3003 |
- -i config_last.h \ |
3004 |
- || die "Could not ensure there is no definition of USE64BITINT in config_last.h" |
3005 |
- emake install \ |
3006 |
- PREFIX="${ED}"usr ${openblas_flags} \ |
3007 |
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \ |
3008 |
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir) |
3009 |
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a |
3010 |
- alternatives_for $(fortran-int64_get_blas_provider) ${profname} 0 \ |
3011 |
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_blas_provider).pc ${pcfile} |
3012 |
- alternatives_for $(fortran-int64_get_cblas_provider) ${profname} 0 \ |
3013 |
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_cblas_provider).pc ${pcfile} \ |
3014 |
- /usr/include/cblas.h ${PN}/cblas.h |
3015 |
- insinto /usr/$(get_libdir)/pkgconfig |
3016 |
- doins ${pcfile} |
3017 |
- done |
3018 |
- |
3019 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
3020 |
- cd "${ED}"/usr/$(get_libdir) |
3021 |
- local d |
3022 |
- for d in *.dylib ; do |
3023 |
- ebegin "Correcting install_name of ${d}" |
3024 |
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" |
3025 |
- eend $? |
3026 |
- done |
3027 |
- fi |
3028 |
- if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then |
3029 |
- multilib_prepare_wrappers |
3030 |
- multilib_check_headers |
3031 |
- fi |
3032 |
- } |
3033 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install |
3034 |
- multilib_install_wrappers |
3035 |
- |
3036 |
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt |
3037 |
- dodoc *md Changelog.txt |
3038 |
-} |
3039 |
|
3040 |
diff --git a/sci-libs/openblas/openblas-0.2.14.ebuild b/sci-libs/openblas/openblas-0.2.14.ebuild |
3041 |
index 91736c8..3a92aef 100644 |
3042 |
--- a/sci-libs/openblas/openblas-0.2.14.ebuild |
3043 |
+++ b/sci-libs/openblas/openblas-0.2.14.ebuild |
3044 |
@@ -4,32 +4,24 @@ |
3045 |
|
3046 |
EAPI=5 |
3047 |
|
3048 |
-EBASE_PROFNAME="openblas" |
3049 |
-inherit alternatives-2 eutils multilib fortran-2 multibuild multilib-build toolchain-funcs fortran-int64 |
3050 |
- |
3051 |
-SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" |
3052 |
-if [[ ${PV} == "9999" ]] ; then |
3053 |
- EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git" |
3054 |
- EGIT_BRANCH="develop" |
3055 |
- inherit git-r3 |
3056 |
- KEYWORDS="" |
3057 |
-else |
3058 |
- SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz" |
3059 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos" |
3060 |
-fi |
3061 |
+NUMERIC_MODULE_NAME="openblas" |
3062 |
+ |
3063 |
+inherit alternatives-2 numeric numeric-int64-multibuild |
3064 |
|
3065 |
DESCRIPTION="Optimized BLAS library based on GotoBLAS2" |
3066 |
HOMEPAGE="http://xianyi.github.com/OpenBLAS/" |
3067 |
+SRC_URI=" |
3068 |
+ http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz |
3069 |
+ http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" |
3070 |
+ |
3071 |
LICENSE="BSD" |
3072 |
SLOT="0" |
3073 |
-IUSE="dynamic int64 openmp static-libs threads" |
3074 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos" |
3075 |
+IUSE="dynamic openmp static-libs threads" |
3076 |
|
3077 |
RDEPEND="" |
3078 |
DEPEND="${RDEPEND} |
3079 |
virtual/pkgconfig" |
3080 |
-PDEPEND=" |
3081 |
- >=virtual/blas-2.1-r2[int64?] |
3082 |
- >=virtual/cblas-2.0-r1[int64?]" |
3083 |
|
3084 |
MULTILIB_WRAPPED_HEADERS=( |
3085 |
/usr/include/openblas/cblas.h |
3086 |
@@ -38,69 +30,59 @@ MULTILIB_WRAPPED_HEADERS=( |
3087 |
) |
3088 |
|
3089 |
get_openblas_flags() { |
3090 |
- local openblas_flags="" |
3091 |
+ local openblas_flags=() |
3092 |
use dynamic && \ |
3093 |
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1" |
3094 |
- $(fortran-int64_is_int64_build) && \ |
3095 |
- openblas_flags+=" INTERFACE64=1" |
3096 |
+ openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 ) |
3097 |
+ $(numeric-int64_is_int64_build) && \ |
3098 |
+ openblas_flags+=( INTERFACE64=1 ) |
3099 |
# choose posix threads over openmp when the two are set |
3100 |
# yet to see the need of having the two profiles simultaneously |
3101 |
if use threads; then |
3102 |
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0" |
3103 |
+ openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 ) |
3104 |
elif use openmp; then |
3105 |
- openblas_flags+=" USE_OPENMP=1" |
3106 |
+ openblas_flags+=( USE_OPENMP=1 ) |
3107 |
fi |
3108 |
- local profname=$(fortran-int64_get_profname) |
3109 |
+ local profname=$(numeric-int64_get_module_name) |
3110 |
local libname="${profname//-/_}" |
3111 |
local underscoresuffix="${libname#${PN}}" |
3112 |
if [[ "${underscoresuffix}" != "_" ]]; then |
3113 |
local libnamesuffix="${underscoresuffix#_}" |
3114 |
- openblas_flags+=" LIBNAMESUFFIX=${libnamesuffix}" |
3115 |
+ openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} ) |
3116 |
fi |
3117 |
- echo "${openblas_flags}" |
3118 |
+ echo "${openblas_flags[@]}" |
3119 |
} |
3120 |
|
3121 |
get_openblas_abi_cflags() { |
3122 |
- local openblas_abi_cflags="" |
3123 |
+ local openblas_abi_cflags=() |
3124 |
if [[ "${ABI}" == "x86" ]]; then |
3125 |
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1" |
3126 |
+ openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 ) |
3127 |
else |
3128 |
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1" |
3129 |
+ openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 ) |
3130 |
fi |
3131 |
- $(fortran-int64_is_int64_build) && \ |
3132 |
- openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT" |
3133 |
- echo "${openblas_abi_cflags}" |
3134 |
+ $(numeric-int64_is_int64_build) && \ |
3135 |
+ openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT ) |
3136 |
+ echo "${openblas_abi_cflags[@]}" |
3137 |
} |
3138 |
|
3139 |
src_unpack() { |
3140 |
- if [[ ${PV} == "9999" ]] ; then |
3141 |
- git-r3_src_unpack |
3142 |
- else |
3143 |
- default |
3144 |
- if [[ ${PV} != "9999" ]] ; then |
3145 |
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ |
3146 |
- mv "${WORKDIR}"/*OpenBLAS* "${S}" |
3147 |
- fi |
3148 |
- fi |
3149 |
+ default |
3150 |
+ find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ |
3151 |
+ mv "${WORKDIR}"/*OpenBLAS* "${S}" || die |
3152 |
} |
3153 |
|
3154 |
src_prepare() { |
3155 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3156 |
epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch" |
3157 |
- if [[ ${PV} == "0.2.11" ]] ; then |
3158 |
- epatch "${FILESDIR}/${PN}-0.2.11-cpuid_x86.patch" |
3159 |
- fi |
3160 |
+ |
3161 |
# lapack and lapacke are not modified from upstream lapack |
3162 |
sed \ |
3163 |
-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ |
3164 |
-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ |
3165 |
-i Makefile.rule || die |
3166 |
- multibuild_copy_sources |
3167 |
+ numeric-int64-multibuild_copy_sources |
3168 |
} |
3169 |
|
3170 |
src_configure() { |
3171 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3172 |
- my_configure() { |
3173 |
+ blas_configure() { |
3174 |
local openblas_abi_cflags="$(get_openblas_abi_cflags)" |
3175 |
local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" |
3176 |
sed \ |
3177 |
@@ -109,28 +91,23 @@ src_configure() { |
3178 |
-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ |
3179 |
-i Makefile.rule || die |
3180 |
} |
3181 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure |
3182 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure |
3183 |
} |
3184 |
|
3185 |
src_compile() { |
3186 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3187 |
# openblas already does multi-jobs |
3188 |
MAKEOPTS+=" -j1" |
3189 |
my_src_compile () { |
3190 |
local openblas_flags=$(get_openblas_flags) |
3191 |
- local profname=$(fortran-int64_get_profname) |
3192 |
- local libname="${profname//-/_}" |
3193 |
- einfo "Compiling profile ${profname}" |
3194 |
# cflags already defined twice |
3195 |
- unset CFLAGS |
3196 |
- emake clean |
3197 |
- emake libs shared ${openblas_flags} |
3198 |
- mkdir -p libs && mv libopenblas* libs/ |
3199 |
+ unset CFLAGS || die |
3200 |
+ emake clean && emake libs shared ${openblas_flags} |
3201 |
+ mkdir -p libs && mv libopenblas* libs/ ||Â die |
3202 |
# avoid pic when compiling static libraries, so re-compiling |
3203 |
if use static-libs; then |
3204 |
emake clean |
3205 |
emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= |
3206 |
- mv libopenblas* libs/ |
3207 |
+ mv libopenblas* libs/ ||Â die |
3208 |
fi |
3209 |
# Fix Bug 524612 - [science overlay] sci-libs/openblas-0.2.11 - Assembler messages: |
3210 |
# ../kernel/x86_64/gemm_kernel_8x4_barcelona.S:451: Error: missing ')' |
3211 |
@@ -138,79 +115,64 @@ src_compile() { |
3212 |
# assembler code as the assembler does not understand sizeof(float). So |
3213 |
# delay applying the patch until after building the libraries. |
3214 |
epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch" |
3215 |
- rm -f config.h config_last.h |
3216 |
+ rm -f config.h config_last.h || die |
3217 |
# Note: prints this spurious warning: make: Nothing to be done for 'config.h'. |
3218 |
emake config.h |
3219 |
cp config.h config_last.h || die |
3220 |
- cat <<-EOF > ${profname}.pc |
3221 |
- prefix=${EPREFIX}/usr |
3222 |
- libdir=\${prefix}/$(get_libdir) |
3223 |
- includedir=\${prefix}/include |
3224 |
- Name: ${profname} |
3225 |
- Description: ${DESCRIPTION} |
3226 |
- Version: ${PV} |
3227 |
- URL: ${HOMEPAGE} |
3228 |
- Libs: -L\${libdir} -l${libname} |
3229 |
- Libs.private: -lm |
3230 |
- EOF |
3231 |
- local openblas_abi_cflags=$(get_openblas_abi_cflags) |
3232 |
- local openblas_abi_fflags=$(fortran-int64_get_fortran_int64_abi_fflags) |
3233 |
- cat <<-EOF >> ${profname}.pc |
3234 |
- Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags} |
3235 |
- Fflags=${openblas_abi_fflags} |
3236 |
- EOF |
3237 |
+ |
3238 |
mv libs/libopenblas* . || die |
3239 |
} |
3240 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile |
3241 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile |
3242 |
} |
3243 |
|
3244 |
src_test() { |
3245 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3246 |
my_src_test () { |
3247 |
local openblas_flags=$(get_openblas_flags) |
3248 |
emake tests ${openblas_flags} |
3249 |
} |
3250 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test |
3251 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test |
3252 |
} |
3253 |
|
3254 |
src_install() { |
3255 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3256 |
my_src_install() { |
3257 |
local openblas_flags=$(get_openblas_flags) |
3258 |
- local profname=$(fortran-int64_get_profname) |
3259 |
+ local profname=$(numeric-int64_get_module_name) |
3260 |
local pcfile |
3261 |
- for pcfile in *.pc; do |
3262 |
- local profname=${pcfile%.pc} |
3263 |
- # The file /usr/include/openblas/openblas_config.h is generated during the install. |
3264 |
- # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT |
3265 |
- # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 |
3266 |
- # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in |
3267 |
- # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. |
3268 |
- sed -e '/#define USE64BITINT/d' \ |
3269 |
- -e '/#define ARCH_X86/d' \ |
3270 |
- -e '/#define __\(32\|64\)BIT__/d' \ |
3271 |
- -i config_last.h \ |
3272 |
- || die "Could not ensure there is no definition of USE64BITINT in config_last.h" |
3273 |
- emake install \ |
3274 |
- PREFIX="${ED}"usr ${openblas_flags} \ |
3275 |
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \ |
3276 |
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir) |
3277 |
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a |
3278 |
- alternatives_for $(fortran-int64_get_blas_provider) ${profname} 0 \ |
3279 |
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_blas_provider).pc ${pcfile} |
3280 |
- alternatives_for $(fortran-int64_get_cblas_provider) ${profname} 0 \ |
3281 |
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_cblas_provider).pc ${pcfile} \ |
3282 |
- /usr/include/cblas.h ${PN}/cblas.h |
3283 |
- insinto /usr/$(get_libdir)/pkgconfig |
3284 |
- doins ${pcfile} |
3285 |
- done |
3286 |
+ # The file /usr/include/openblas/openblas_config.h is generated during the install. |
3287 |
+ # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT |
3288 |
+ # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 |
3289 |
+ # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in |
3290 |
+ # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. |
3291 |
+ sed -e '/#define USE64BITINT/d' \ |
3292 |
+ -e '/#define ARCH_X86/d' \ |
3293 |
+ -e '/#define __\(32\|64\)BIT__/d' \ |
3294 |
+ -i config_last.h \ |
3295 |
+ || die "Could not ensure there is no definition of USE64BITINT in config_last.h" |
3296 |
+ emake install \ |
3297 |
+ PREFIX="${ED}"usr ${openblas_flags} \ |
3298 |
+ OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \ |
3299 |
+ OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir) |
3300 |
+ if ! use static-libs; then |
3301 |
+ rm "${ED}"usr/$(get_libdir)/lib*.a || die |
3302 |
+ fi |
3303 |
+ |
3304 |
+ local openblas_abi_cflags=$(get_openblas_abi_cflags) |
3305 |
+ local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags) |
3306 |
+ local libname="${profname//-/_}" |
3307 |
+ |
3308 |
+ create_pkgconfig \ |
3309 |
+ --name "${profname}" \ |
3310 |
+ --libs "-L\${libdir} -l${libname}" \ |
3311 |
+ --libs-private "-lm" \ |
3312 |
+ --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \ |
3313 |
+ ${profname} |
3314 |
|
3315 |
if [[ ${CHOST} == *-darwin* ]] ; then |
3316 |
- cd "${ED}"/usr/$(get_libdir) |
3317 |
+ cd "${ED}"/usr/$(get_libdir) ||Â die |
3318 |
local d |
3319 |
- for d in *.dylib ; do |
3320 |
+ for d in *.dylib; do |
3321 |
ebegin "Correcting install_name of ${d}" |
3322 |
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" |
3323 |
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die |
3324 |
eend $? |
3325 |
done |
3326 |
fi |
3327 |
@@ -219,9 +181,13 @@ src_install() { |
3328 |
multilib_check_headers |
3329 |
fi |
3330 |
} |
3331 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install |
3332 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install |
3333 |
+ |
3334 |
+ printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh ||Â die |
3335 |
+ numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} |
3336 |
+ numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME} |
3337 |
+ |
3338 |
multilib_install_wrappers |
3339 |
|
3340 |
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt |
3341 |
- dodoc *md Changelog.txt |
3342 |
+ dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt |
3343 |
} |
3344 |
|
3345 |
diff --git a/sci-libs/openblas/openblas-0.2.8.ebuild b/sci-libs/openblas/openblas-0.2.8.ebuild |
3346 |
deleted file mode 100644 |
3347 |
index 05c420f..0000000 |
3348 |
--- a/sci-libs/openblas/openblas-0.2.8.ebuild |
3349 |
+++ /dev/null |
3350 |
@@ -1,126 +0,0 @@ |
3351 |
-# Copyright 1999-2015 Gentoo Foundation |
3352 |
-# Distributed under the terms of the GNU General Public License v2 |
3353 |
-# $Id$ |
3354 |
- |
3355 |
-EAPI=5 |
3356 |
- |
3357 |
-inherit eutils multilib toolchain-funcs alternatives-2 multilib fortran-2 |
3358 |
- |
3359 |
-DESCRIPTION="Optimized BLAS library based on GotoBLAS2" |
3360 |
-HOMEPAGE="http://xianyi.github.com/OpenBLAS/" |
3361 |
-SRC_URI="http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz" |
3362 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos" |
3363 |
- |
3364 |
-LICENSE="BSD" |
3365 |
-SLOT="0" |
3366 |
- |
3367 |
-IUSE="int64 dynamic openmp static-libs threads" |
3368 |
- |
3369 |
-RDEPEND="" |
3370 |
-DEPEND="${RDEPEND}" |
3371 |
- |
3372 |
-src_unpack() { |
3373 |
- default |
3374 |
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ |
3375 |
- mv "${WORKDIR}"/*OpenBLAS* "${S}" |
3376 |
-} |
3377 |
- |
3378 |
-src_configure() { |
3379 |
- # lapack and lapacke are not modified from upstream lapack |
3380 |
- sed -i \ |
3381 |
- -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \ |
3382 |
- -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \ |
3383 |
- -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS}:" \ |
3384 |
- -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ |
3385 |
- -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ |
3386 |
- Makefile.rule || die |
3387 |
-} |
3388 |
- |
3389 |
-openblas_compile() { |
3390 |
- local profname=$1 |
3391 |
- einfo "Compiling profile ${profname}" |
3392 |
- # cflags already defined twice |
3393 |
- unset CFLAGS |
3394 |
- emake clean |
3395 |
- emake libs shared ${openblas_flags} |
3396 |
- mkdir -p libs && mv libopenblas* libs/ |
3397 |
- # avoid pic when compiling static libraries, so re-compiling |
3398 |
- if use static-libs; then |
3399 |
- emake clean |
3400 |
- emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= |
3401 |
- mv libopenblas* libs/ |
3402 |
- fi |
3403 |
- cat <<-EOF > ${profname}.pc |
3404 |
- prefix=${EPREFIX}/usr |
3405 |
- libdir=\${prefix}/$(get_libdir) |
3406 |
- includedir=\${prefix}/include |
3407 |
- Name: ${PN} |
3408 |
- Description: ${DESCRIPTION} |
3409 |
- Version: ${PV} |
3410 |
- URL: ${HOMEPAGE} |
3411 |
- Libs: -L\${libdir} -lopenblas |
3412 |
- Libs.private: -lm |
3413 |
- Cflags: -I\${includedir}/${PN} |
3414 |
- EOF |
3415 |
-} |
3416 |
- |
3417 |
-src_compile() { |
3418 |
- # openblas already does multi-jobs |
3419 |
- MAKEOPTS+=" -j1" |
3420 |
- openblas_flags="" |
3421 |
- local openblas_name=openblas |
3422 |
- use dynamic && \ |
3423 |
- openblas_name+="-dynamic" && \ |
3424 |
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1" |
3425 |
- use int64 && \ |
3426 |
- openblas_name+="-int64" && \ |
3427 |
- openblas_flags+=" INTERFACE64=1" |
3428 |
- |
3429 |
- # choose posix threads over openmp when the two are set |
3430 |
- # yet to see the need of having the two profiles simultaneously |
3431 |
- if use threads; then |
3432 |
- openblas_name+="-threads" |
3433 |
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0" |
3434 |
- elif use openmp; then |
3435 |
- openblas_name+="-openmp" |
3436 |
- openblas_flags+=" USE_THREAD=0 USE_OPENMP=1" |
3437 |
- fi |
3438 |
- openblas_compile ${openblas_name} |
3439 |
- mv libs/libopenblas* . || die |
3440 |
-} |
3441 |
- |
3442 |
-src_test() { |
3443 |
- emake tests ${openblas_flags} |
3444 |
-} |
3445 |
- |
3446 |
-src_install() { |
3447 |
- local pcfile |
3448 |
- for pcfile in *.pc; do |
3449 |
- local profname=${pcfile%.pc} |
3450 |
- emake install \ |
3451 |
- PREFIX="${ED}"usr ${openblas_flags} \ |
3452 |
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \ |
3453 |
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir) |
3454 |
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a |
3455 |
- alternatives_for blas ${profname} 0 \ |
3456 |
- /usr/$(get_libdir)/pkgconfig/blas.pc ${pcfile} |
3457 |
- alternatives_for cblas ${profname} 0 \ |
3458 |
- /usr/$(get_libdir)/pkgconfig/cblas.pc ${pcfile} \ |
3459 |
- /usr/include/cblas.h ${PN}/cblas.h |
3460 |
- insinto /usr/$(get_libdir)/pkgconfig |
3461 |
- doins ${pcfile} |
3462 |
- done |
3463 |
- |
3464 |
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt |
3465 |
- dodoc *md Changelog.txt |
3466 |
- |
3467 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
3468 |
- cd "${ED}"/usr/$(get_libdir) |
3469 |
- local d |
3470 |
- for d in *.dylib ; do |
3471 |
- ebegin "Correcting install_name of ${d}" |
3472 |
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" |
3473 |
- eend $? |
3474 |
- done |
3475 |
- fi |
3476 |
-} |
3477 |
|
3478 |
diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild |
3479 |
index 91736c8..25ccea3 100644 |
3480 |
--- a/sci-libs/openblas/openblas-9999.ebuild |
3481 |
+++ b/sci-libs/openblas/openblas-9999.ebuild |
3482 |
@@ -4,32 +4,24 @@ |
3483 |
|
3484 |
EAPI=5 |
3485 |
|
3486 |
-EBASE_PROFNAME="openblas" |
3487 |
-inherit alternatives-2 eutils multilib fortran-2 multibuild multilib-build toolchain-funcs fortran-int64 |
3488 |
- |
3489 |
-SRC_URI+="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" |
3490 |
-if [[ ${PV} == "9999" ]] ; then |
3491 |
- EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git" |
3492 |
- EGIT_BRANCH="develop" |
3493 |
- inherit git-r3 |
3494 |
- KEYWORDS="" |
3495 |
-else |
3496 |
- SRC_URI+=" http://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz" |
3497 |
- KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~ppc-macos ~x64-macos" |
3498 |
-fi |
3499 |
+NUMERIC_MODULE_NAME="openblas" |
3500 |
+ |
3501 |
+inherit alternatives-2 git-r3 numeric numeric-int64-multibuild |
3502 |
|
3503 |
DESCRIPTION="Optimized BLAS library based on GotoBLAS2" |
3504 |
HOMEPAGE="http://xianyi.github.com/OpenBLAS/" |
3505 |
+SRC_URI="http://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" |
3506 |
+EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git" |
3507 |
+EGIT_BRANCH="develop" |
3508 |
+ |
3509 |
LICENSE="BSD" |
3510 |
SLOT="0" |
3511 |
-IUSE="dynamic int64 openmp static-libs threads" |
3512 |
+KEYWORDS="" |
3513 |
+IUSE="dynamic openmp static-libs threads" |
3514 |
|
3515 |
RDEPEND="" |
3516 |
DEPEND="${RDEPEND} |
3517 |
virtual/pkgconfig" |
3518 |
-PDEPEND=" |
3519 |
- >=virtual/blas-2.1-r2[int64?] |
3520 |
- >=virtual/cblas-2.0-r1[int64?]" |
3521 |
|
3522 |
MULTILIB_WRAPPED_HEADERS=( |
3523 |
/usr/include/openblas/cblas.h |
3524 |
@@ -38,69 +30,53 @@ MULTILIB_WRAPPED_HEADERS=( |
3525 |
) |
3526 |
|
3527 |
get_openblas_flags() { |
3528 |
- local openblas_flags="" |
3529 |
+ local openblas_flags=() |
3530 |
use dynamic && \ |
3531 |
- openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1" |
3532 |
- $(fortran-int64_is_int64_build) && \ |
3533 |
- openblas_flags+=" INTERFACE64=1" |
3534 |
+ openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 ) |
3535 |
+ $(numeric-int64_is_int64_build) && \ |
3536 |
+ openblas_flags+=( INTERFACE64=1 ) |
3537 |
# choose posix threads over openmp when the two are set |
3538 |
# yet to see the need of having the two profiles simultaneously |
3539 |
if use threads; then |
3540 |
- openblas_flags+=" USE_THREAD=1 USE_OPENMP=0" |
3541 |
+ openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 ) |
3542 |
elif use openmp; then |
3543 |
- openblas_flags+=" USE_OPENMP=1" |
3544 |
+ openblas_flags+=( USE_OPENMP=1 ) |
3545 |
fi |
3546 |
- local profname=$(fortran-int64_get_profname) |
3547 |
+ local profname=$(numeric-int64_get_module_name) |
3548 |
local libname="${profname//-/_}" |
3549 |
local underscoresuffix="${libname#${PN}}" |
3550 |
if [[ "${underscoresuffix}" != "_" ]]; then |
3551 |
local libnamesuffix="${underscoresuffix#_}" |
3552 |
- openblas_flags+=" LIBNAMESUFFIX=${libnamesuffix}" |
3553 |
+ openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} ) |
3554 |
fi |
3555 |
- echo "${openblas_flags}" |
3556 |
+ echo "${openblas_flags[@]}" |
3557 |
} |
3558 |
|
3559 |
get_openblas_abi_cflags() { |
3560 |
- local openblas_abi_cflags="" |
3561 |
+ local openblas_abi_cflags=() |
3562 |
if [[ "${ABI}" == "x86" ]]; then |
3563 |
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1" |
3564 |
- else |
3565 |
- openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1" |
3566 |
- fi |
3567 |
- $(fortran-int64_is_int64_build) && \ |
3568 |
- openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT" |
3569 |
- echo "${openblas_abi_cflags}" |
3570 |
-} |
3571 |
- |
3572 |
-src_unpack() { |
3573 |
- if [[ ${PV} == "9999" ]] ; then |
3574 |
- git-r3_src_unpack |
3575 |
+ openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 ) |
3576 |
else |
3577 |
- default |
3578 |
- if [[ ${PV} != "9999" ]] ; then |
3579 |
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ |
3580 |
- mv "${WORKDIR}"/*OpenBLAS* "${S}" |
3581 |
- fi |
3582 |
+ openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 ) |
3583 |
fi |
3584 |
+ $(numeric-int64_is_int64_build) && \ |
3585 |
+ openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT ) |
3586 |
+ echo "${openblas_abi_cflags[@]}" |
3587 |
} |
3588 |
|
3589 |
src_prepare() { |
3590 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3591 |
epatch "${DISTDIR}/${PN}-0.2.11-gentoo.patch" |
3592 |
- if [[ ${PV} == "0.2.11" ]] ; then |
3593 |
- epatch "${FILESDIR}/${PN}-0.2.11-cpuid_x86.patch" |
3594 |
- fi |
3595 |
+ |
3596 |
# lapack and lapacke are not modified from upstream lapack |
3597 |
sed \ |
3598 |
-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ |
3599 |
-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ |
3600 |
-i Makefile.rule || die |
3601 |
- multibuild_copy_sources |
3602 |
+ numeric-int64-multibuild_copy_sources |
3603 |
} |
3604 |
|
3605 |
src_configure() { |
3606 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3607 |
- my_configure() { |
3608 |
+ blas_configure() { |
3609 |
local openblas_abi_cflags="$(get_openblas_abi_cflags)" |
3610 |
local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" |
3611 |
sed \ |
3612 |
@@ -109,28 +85,23 @@ src_configure() { |
3613 |
-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ |
3614 |
-i Makefile.rule || die |
3615 |
} |
3616 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure |
3617 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure |
3618 |
} |
3619 |
|
3620 |
src_compile() { |
3621 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3622 |
# openblas already does multi-jobs |
3623 |
MAKEOPTS+=" -j1" |
3624 |
my_src_compile () { |
3625 |
local openblas_flags=$(get_openblas_flags) |
3626 |
- local profname=$(fortran-int64_get_profname) |
3627 |
- local libname="${profname//-/_}" |
3628 |
- einfo "Compiling profile ${profname}" |
3629 |
# cflags already defined twice |
3630 |
- unset CFLAGS |
3631 |
- emake clean |
3632 |
- emake libs shared ${openblas_flags} |
3633 |
- mkdir -p libs && mv libopenblas* libs/ |
3634 |
+ unset CFLAGS || die |
3635 |
+ emake clean && emake libs shared ${openblas_flags} |
3636 |
+ mkdir -p libs && mv libopenblas* libs/ ||Â die |
3637 |
# avoid pic when compiling static libraries, so re-compiling |
3638 |
if use static-libs; then |
3639 |
emake clean |
3640 |
emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= |
3641 |
- mv libopenblas* libs/ |
3642 |
+ mv libopenblas* libs/ ||Â die |
3643 |
fi |
3644 |
# Fix Bug 524612 - [science overlay] sci-libs/openblas-0.2.11 - Assembler messages: |
3645 |
# ../kernel/x86_64/gemm_kernel_8x4_barcelona.S:451: Error: missing ')' |
3646 |
@@ -138,79 +109,64 @@ src_compile() { |
3647 |
# assembler code as the assembler does not understand sizeof(float). So |
3648 |
# delay applying the patch until after building the libraries. |
3649 |
epatch "${FILESDIR}/${PN}-0.2.11-openblas_config_header_same_between_ABIs.patch" |
3650 |
- rm -f config.h config_last.h |
3651 |
+ rm -f config.h config_last.h || die |
3652 |
# Note: prints this spurious warning: make: Nothing to be done for 'config.h'. |
3653 |
emake config.h |
3654 |
cp config.h config_last.h || die |
3655 |
- cat <<-EOF > ${profname}.pc |
3656 |
- prefix=${EPREFIX}/usr |
3657 |
- libdir=\${prefix}/$(get_libdir) |
3658 |
- includedir=\${prefix}/include |
3659 |
- Name: ${profname} |
3660 |
- Description: ${DESCRIPTION} |
3661 |
- Version: ${PV} |
3662 |
- URL: ${HOMEPAGE} |
3663 |
- Libs: -L\${libdir} -l${libname} |
3664 |
- Libs.private: -lm |
3665 |
- EOF |
3666 |
- local openblas_abi_cflags=$(get_openblas_abi_cflags) |
3667 |
- local openblas_abi_fflags=$(fortran-int64_get_fortran_int64_abi_fflags) |
3668 |
- cat <<-EOF >> ${profname}.pc |
3669 |
- Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags} |
3670 |
- Fflags=${openblas_abi_fflags} |
3671 |
- EOF |
3672 |
+ |
3673 |
mv libs/libopenblas* . || die |
3674 |
} |
3675 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile |
3676 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile |
3677 |
} |
3678 |
|
3679 |
src_test() { |
3680 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3681 |
my_src_test () { |
3682 |
local openblas_flags=$(get_openblas_flags) |
3683 |
emake tests ${openblas_flags} |
3684 |
} |
3685 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test |
3686 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test |
3687 |
} |
3688 |
|
3689 |
src_install() { |
3690 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3691 |
my_src_install() { |
3692 |
local openblas_flags=$(get_openblas_flags) |
3693 |
- local profname=$(fortran-int64_get_profname) |
3694 |
+ local profname=$(numeric-int64_get_module_name) |
3695 |
local pcfile |
3696 |
- for pcfile in *.pc; do |
3697 |
- local profname=${pcfile%.pc} |
3698 |
- # The file /usr/include/openblas/openblas_config.h is generated during the install. |
3699 |
- # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT |
3700 |
- # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 |
3701 |
- # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in |
3702 |
- # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. |
3703 |
- sed -e '/#define USE64BITINT/d' \ |
3704 |
- -e '/#define ARCH_X86/d' \ |
3705 |
- -e '/#define __\(32\|64\)BIT__/d' \ |
3706 |
- -i config_last.h \ |
3707 |
- || die "Could not ensure there is no definition of USE64BITINT in config_last.h" |
3708 |
- emake install \ |
3709 |
- PREFIX="${ED}"usr ${openblas_flags} \ |
3710 |
- OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \ |
3711 |
- OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir) |
3712 |
- use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a |
3713 |
- alternatives_for $(fortran-int64_get_blas_provider) ${profname} 0 \ |
3714 |
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_blas_provider).pc ${pcfile} |
3715 |
- alternatives_for $(fortran-int64_get_cblas_provider) ${profname} 0 \ |
3716 |
- /usr/$(get_libdir)/pkgconfig/$(fortran-int64_get_cblas_provider).pc ${pcfile} \ |
3717 |
- /usr/include/cblas.h ${PN}/cblas.h |
3718 |
- insinto /usr/$(get_libdir)/pkgconfig |
3719 |
- doins ${pcfile} |
3720 |
- done |
3721 |
+ # The file /usr/include/openblas/openblas_config.h is generated during the install. |
3722 |
+ # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT |
3723 |
+ # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 |
3724 |
+ # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in |
3725 |
+ # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. |
3726 |
+ sed -e '/#define USE64BITINT/d' \ |
3727 |
+ -e '/#define ARCH_X86/d' \ |
3728 |
+ -e '/#define __\(32\|64\)BIT__/d' \ |
3729 |
+ -i config_last.h \ |
3730 |
+ || die "Could not ensure there is no definition of USE64BITINT in config_last.h" |
3731 |
+ emake install \ |
3732 |
+ PREFIX="${ED}"usr ${openblas_flags} \ |
3733 |
+ OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \ |
3734 |
+ OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir) |
3735 |
+ if ! use static-libs; then |
3736 |
+ rm "${ED}"usr/$(get_libdir)/lib*.a || die |
3737 |
+ fi |
3738 |
+ |
3739 |
+ local openblas_abi_cflags=$(get_openblas_abi_cflags) |
3740 |
+ local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags) |
3741 |
+ local libname="${profname//-/_}" |
3742 |
+ |
3743 |
+ create_pkgconfig \ |
3744 |
+ --name "${profname}" \ |
3745 |
+ --libs "-L\${libdir} -l${libname}" \ |
3746 |
+ --libs-private "-lm" \ |
3747 |
+ --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \ |
3748 |
+ ${profname} |
3749 |
|
3750 |
if [[ ${CHOST} == *-darwin* ]] ; then |
3751 |
- cd "${ED}"/usr/$(get_libdir) |
3752 |
+ cd "${ED}"/usr/$(get_libdir) ||Â die |
3753 |
local d |
3754 |
- for d in *.dylib ; do |
3755 |
+ for d in *.dylib; do |
3756 |
ebegin "Correcting install_name of ${d}" |
3757 |
- install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" |
3758 |
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die |
3759 |
eend $? |
3760 |
done |
3761 |
fi |
3762 |
@@ -219,9 +175,13 @@ src_install() { |
3763 |
multilib_check_headers |
3764 |
fi |
3765 |
} |
3766 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install |
3767 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install |
3768 |
+ |
3769 |
+ printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh |
3770 |
+ numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} |
3771 |
+ numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME} |
3772 |
+ |
3773 |
multilib_install_wrappers |
3774 |
|
3775 |
- dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt |
3776 |
- dodoc *md Changelog.txt |
3777 |
+ dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt |
3778 |
} |
3779 |
|
3780 |
diff --git a/sci-libs/xblas/xblas-1.0.248-r1.ebuild b/sci-libs/xblas/xblas-1.0.248-r1.ebuild |
3781 |
index 5005e9d..93ecafd 100644 |
3782 |
--- a/sci-libs/xblas/xblas-1.0.248-r1.ebuild |
3783 |
+++ b/sci-libs/xblas/xblas-1.0.248-r1.ebuild |
3784 |
@@ -4,8 +4,10 @@ |
3785 |
|
3786 |
EAPI=5 |
3787 |
|
3788 |
-EBASE_PROFNAME="xblas" |
3789 |
-inherit eutils flag-o-matic fortran-2 fortran-int64 multibuild multilib multilib-build toolchain-funcs versionator |
3790 |
+NUMERIC_MODULE_NAME="xblas" |
3791 |
+FORTRAN_NEEDED=fortran |
3792 |
+ |
3793 |
+inherit flag-o-matic fortran-2 numeric-int64-multibuild toolchain-funcs versionator |
3794 |
|
3795 |
DESCRIPTION="Extra Precise Basic Linear Algebra Subroutines" |
3796 |
HOMEPAGE="http://www.netlib.org/xblas" |
3797 |
@@ -14,9 +16,9 @@ SRC_URI="${HOMEPAGE}/${P}.tar.gz" |
3798 |
LICENSE="BSD" |
3799 |
SLOT="0" |
3800 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
3801 |
-IUSE="doc fortran int64 static-libs" |
3802 |
+IUSE="doc fortran static-libs" |
3803 |
|
3804 |
-RDEPEND="fortran? ( virtual/fortran )" |
3805 |
+RDEPEND="" |
3806 |
DEPEND="${RDEPEND} |
3807 |
sys-devel/m4" |
3808 |
|
3809 |
@@ -38,8 +40,8 @@ static_to_shared() { |
3810 |
-Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \ |
3811 |
"$@" -o ${libdir}/${soname} || die "${soname} failed" |
3812 |
[[ $(get_version_component_count) -gt 1 ]] && \ |
3813 |
- ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version)) |
3814 |
- ln -s ${soname} ${libdir}/${libname}$(get_libname) |
3815 |
+ ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version)) || die |
3816 |
+ ln -s ${soname} ${libdir}/${libname}$(get_libname) || die |
3817 |
fi |
3818 |
} |
3819 |
|
3820 |
@@ -48,23 +50,20 @@ pkg_setup() { |
3821 |
} |
3822 |
|
3823 |
src_prepare() { |
3824 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3825 |
- multibuild_copy_sources |
3826 |
+ numeric-int64-multibuild_copy_sources |
3827 |
} |
3828 |
|
3829 |
src_configure() { |
3830 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3831 |
- my_configure() { |
3832 |
- export FCFLAGS="${FCFLAGS} $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags)" |
3833 |
+ xblas_configure() { |
3834 |
+ export FCFLAGS="${FCFLAGS} $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags)" |
3835 |
econf $(use_enable fortran) |
3836 |
} |
3837 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure |
3838 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_configure |
3839 |
} |
3840 |
|
3841 |
src_compile() { |
3842 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3843 |
- my_src_compile() { |
3844 |
- local profname=$(fortran-int64_get_profname) |
3845 |
+ xblas_src_compile() { |
3846 |
+ local profname=$(numeric-int64_get_module_name) |
3847 |
local libname="${profname//-/_}" |
3848 |
# default target builds and runs tests - split |
3849 |
# build first static libs because of fPIC afterwards |
3850 |
@@ -81,42 +80,31 @@ src_compile() { |
3851 |
emake lib XBLASLIB=lib${libname}.a |
3852 |
static_to_shared lib${libname}.a |
3853 |
} |
3854 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile |
3855 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_src_compile |
3856 |
} |
3857 |
|
3858 |
src_test() { |
3859 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3860 |
- my_src_test () { |
3861 |
- emake tests |
3862 |
- } |
3863 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test |
3864 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir emake tests |
3865 |
} |
3866 |
|
3867 |
src_install() { |
3868 |
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) ) |
3869 |
- my_src_install() { |
3870 |
- local profname=$(fortran-int64_get_profname) |
3871 |
+ xblas_src_install() { |
3872 |
+ local profname=$(numeric-int64_get_module_name) |
3873 |
local libname="${profname//-/_}" |
3874 |
- dolib.so lib${libname}$(get_libname)* |
3875 |
- use static-libs && newlib.a lib${libname}_nonpic.a lib${libname}.a |
3876 |
- dodoc README README.devel |
3877 |
- use doc && dodoc doc/report.ps |
3878 |
- |
3879 |
- # pkg-config file for our multliple numeric stuff |
3880 |
- cat > ${profname}.pc <<-EOF |
3881 |
- prefix=${EPREFIX}/usr |
3882 |
- libdir=\${prefix}/$(get_libdir) |
3883 |
- includedir=\${prefix}/include/${PN} |
3884 |
- Name: ${profname} |
3885 |
- Description: ${DESCRIPTION} |
3886 |
- Version: ${PV} |
3887 |
- URL: ${HOMEPAGE} |
3888 |
- Libs: -L\${libdir} -l${libname} |
3889 |
- Cflags: -I\${includedir} |
3890 |
- Fflags=$(fortran-int64_get_fortran_int64_abi_fflags) |
3891 |
- EOF |
3892 |
- insinto /usr/$(get_libdir)/pkgconfig |
3893 |
- doins ${profname}.pc |
3894 |
+ if numeric-int64_is_static_build; then |
3895 |
+ use static-libs && newlib.a lib${libname}_nonpic.a lib${libname}.a |
3896 |
+ else |
3897 |
+ dolib.so lib${libname}$(get_libname)* |
3898 |
+ |
3899 |
+ create_pkgconfig \ |
3900 |
+ --name ${profname} \ |
3901 |
+ --libs "-L\${libdir} -l${libname}" \ |
3902 |
+ --cflags "-I\${includedir} $(numeric-int64_get_fortran_int64_abi_fflags)" \ |
3903 |
+ ${profname} |
3904 |
+ fi |
3905 |
} |
3906 |
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install |
3907 |
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_src_install |
3908 |
+ |
3909 |
+ dodoc README README.devel |
3910 |
+ use doc && dodoc doc/report.ps |
3911 |
} |
3912 |
|
3913 |
diff --git a/sci-libs/xblas/xblas-1.0.248.ebuild b/sci-libs/xblas/xblas-1.0.248.ebuild |
3914 |
deleted file mode 100644 |
3915 |
index 609d8b9..0000000 |
3916 |
--- a/sci-libs/xblas/xblas-1.0.248.ebuild |
3917 |
+++ /dev/null |
3918 |
@@ -1,93 +0,0 @@ |
3919 |
-# Copyright 1999-2014 Gentoo Foundation |
3920 |
-# Distributed under the terms of the GNU General Public License v2 |
3921 |
-# $Id$ |
3922 |
- |
3923 |
-EAPI=5 |
3924 |
- |
3925 |
-inherit eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator |
3926 |
- |
3927 |
-DESCRIPTION="Extra Precise Basic Linear Algebra Subroutines" |
3928 |
-HOMEPAGE="http://www.netlib.org/xblas" |
3929 |
-SRC_URI="${HOMEPAGE}/${P}.tar.gz" |
3930 |
- |
3931 |
-LICENSE="BSD" |
3932 |
-SLOT="0" |
3933 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
3934 |
-IUSE="doc fortran static-libs" |
3935 |
- |
3936 |
-RDEPEND="fortran? ( virtual/fortran )" |
3937 |
-DEPEND="${RDEPEND}" |
3938 |
- |
3939 |
-static_to_shared() { |
3940 |
- local libstatic=${1}; shift |
3941 |
- local libname=$(basename ${libstatic%.a}) |
3942 |
- local soname=${libname}$(get_libname $(get_version_component_range 1-2)) |
3943 |
- local libdir=$(dirname ${libstatic}) |
3944 |
- |
3945 |
- einfo "Making ${soname} from ${libstatic}" |
3946 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
3947 |
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \ |
3948 |
- -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \ |
3949 |
- -Wl,-all_load -Wl,${libstatic} \ |
3950 |
- "$@" -o ${libdir}/${soname} || die "${soname} failed" |
3951 |
- else |
3952 |
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \ |
3953 |
- -shared -Wl,-soname=${soname} \ |
3954 |
- -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \ |
3955 |
- "$@" -o ${libdir}/${soname} || die "${soname} failed" |
3956 |
- [[ $(get_version_component_count) -gt 1 ]] && \ |
3957 |
- ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version)) |
3958 |
- ln -s ${soname} ${libdir}/${libname}$(get_libname) |
3959 |
- fi |
3960 |
-} |
3961 |
- |
3962 |
-pkg_setup() { |
3963 |
- use fortran && fortran-2_pkg_setup |
3964 |
-} |
3965 |
- |
3966 |
-src_configure() { |
3967 |
- econf $(use_enable fortran) |
3968 |
-} |
3969 |
- |
3970 |
-src_compile() { |
3971 |
- # default target builds and runs tests - split |
3972 |
- # build first static libs because of fPIC afterwards |
3973 |
- # and we link tests with shared ones |
3974 |
- if use static-libs; then |
3975 |
- emake makefiles |
3976 |
- emake lib XBLASLIB=lib${PN}_nonpic.a |
3977 |
- emake clean |
3978 |
- fi |
3979 |
- sed -i \ |
3980 |
- -e 's:\(CFLAGS.*\).*:\1 -fPIC:' \ |
3981 |
- make.inc || die |
3982 |
- emake makefiles |
3983 |
- emake lib |
3984 |
- static_to_shared lib${PN}.a |
3985 |
-} |
3986 |
- |
3987 |
-src_test() { |
3988 |
- emake tests |
3989 |
-} |
3990 |
- |
3991 |
-src_install() { |
3992 |
- dolib.so lib${PN}$(get_libname)* |
3993 |
- use static-libs && newlib.a lib${PN}_nonpic.a lib${PN}.a |
3994 |
- dodoc README README.devel |
3995 |
- use doc && dodoc doc/report.ps |
3996 |
- |
3997 |
- # pkg-config file for our multliple numeric stuff |
3998 |
- cat > ${PN}.pc <<-EOF |
3999 |
- prefix=${EPREFIX}/usr |
4000 |
- libdir=\${prefix}/$(get_libdir) |
4001 |
- includedir=\${prefix}/include/${PN} |
4002 |
- Name: ${PN} |
4003 |
- Description: ${DESCRIPTION} |
4004 |
- Version: ${PV} |
4005 |
- URL: ${HOMEPAGE} |
4006 |
- Libs: -L\${libdir} -l${PN} |
4007 |
- Cflags: -I\${includedir} |
4008 |
- EOF |
4009 |
- insinto /usr/$(get_libdir)/pkgconfig |
4010 |
- doins ${PN}.pc |
4011 |
-} |
4012 |
|
4013 |
diff --git a/virtual/blas/blas-2.1-r1.ebuild b/virtual/blas/blas-2.1-r1.ebuild |
4014 |
deleted file mode 100644 |
4015 |
index 7b846bd..0000000 |
4016 |
--- a/virtual/blas/blas-2.1-r1.ebuild |
4017 |
+++ /dev/null |
4018 |
@@ -1,38 +0,0 @@ |
4019 |
-# Copyright 1999-2014 Gentoo Foundation |
4020 |
-# Distributed under the terms of the GNU General Public License v2 |
4021 |
-# $Id$ |
4022 |
- |
4023 |
-EAPI=5 |
4024 |
- |
4025 |
-inherit multilib |
4026 |
- |
4027 |
-DESCRIPTION="Virtual for FORTRAN 77 BLAS implementation" |
4028 |
-HOMEPAGE="" |
4029 |
-SRC_URI="" |
4030 |
- |
4031 |
-LICENSE="" |
4032 |
-SLOT="0" |
4033 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
4034 |
-IUSE="doc" |
4035 |
- |
4036 |
-RDEPEND=" |
4037 |
- || ( |
4038 |
- >=sci-libs/blas-reference-20110417 |
4039 |
- >=dev-cpp/eigen-3.1.2 |
4040 |
- sci-libs/atlas[fortran] |
4041 |
- sci-libs/openblas |
4042 |
- >=sci-libs/acml-4.4 |
4043 |
- sci-libs/gotoblas2 |
4044 |
- >=sci-libs/mkl-10.3 |
4045 |
- ) |
4046 |
- doc? ( >=app-doc/blas-docs-3.2 )" |
4047 |
-DEPEND="" |
4048 |
- |
4049 |
-pkg_pretend() { |
4050 |
- if [[ -e "${EROOT%/}"/usr/$(get_libdir)/lib${PN}.so ]]; then |
4051 |
- ewarn "You have still the old ${PN} library symlink present" |
4052 |
- ewarn "Please delete" |
4053 |
- ewarn "${EROOT%/}/usr/$(get_libdir)/lib${PN}.so" |
4054 |
- ewarn "to avoid problems with new ${PN} structure" |
4055 |
- fi |
4056 |
-} |
4057 |
|
4058 |
diff --git a/virtual/blas/blas-2.1-r2.ebuild b/virtual/blas/blas-2.1-r2.ebuild |
4059 |
deleted file mode 100644 |
4060 |
index b7380d0..0000000 |
4061 |
--- a/virtual/blas/blas-2.1-r2.ebuild |
4062 |
+++ /dev/null |
4063 |
@@ -1,41 +0,0 @@ |
4064 |
-# Copyright 1999-2014 Gentoo Foundation |
4065 |
-# Distributed under the terms of the GNU General Public License v2 |
4066 |
-# $Id$ |
4067 |
- |
4068 |
-EAPI=5 |
4069 |
- |
4070 |
-inherit multilib |
4071 |
- |
4072 |
-DESCRIPTION="Virtual for FORTRAN 77 BLAS implementation" |
4073 |
-HOMEPAGE="" |
4074 |
-SRC_URI="" |
4075 |
- |
4076 |
-LICENSE="" |
4077 |
-SLOT="0" |
4078 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
4079 |
-IUSE="doc int64" |
4080 |
- |
4081 |
-RDEPEND=" |
4082 |
- int64? ( |
4083 |
- sci-libs/openblas[int64] |
4084 |
- ) |
4085 |
- || ( |
4086 |
- >=sci-libs/blas-reference-20110417 |
4087 |
- >=dev-cpp/eigen-3.1.2 |
4088 |
- sci-libs/atlas[fortran] |
4089 |
- sci-libs/openblas[int64?] |
4090 |
- >=sci-libs/acml-4.4 |
4091 |
- sci-libs/gotoblas2 |
4092 |
- >=sci-libs/mkl-10.3 |
4093 |
- ) |
4094 |
- doc? ( >=app-doc/blas-docs-3.2 )" |
4095 |
-DEPEND="" |
4096 |
- |
4097 |
-pkg_pretend() { |
4098 |
- if [[ -e "${EROOT%/}"/usr/$(get_libdir)/lib${PN}.so ]]; then |
4099 |
- ewarn "You have still the old ${PN} library symlink present" |
4100 |
- ewarn "Please delete" |
4101 |
- ewarn "${EROOT%/}/usr/$(get_libdir)/lib${PN}.so" |
4102 |
- ewarn "to avoid problems with new ${PN} structure" |
4103 |
- fi |
4104 |
-} |
4105 |
|
4106 |
diff --git a/virtual/blas/blas-2.1-r3.ebuild b/virtual/blas/blas-2.1-r3.ebuild |
4107 |
index 8c83e53..48f4d0e 100644 |
4108 |
--- a/virtual/blas/blas-2.1-r3.ebuild |
4109 |
+++ b/virtual/blas/blas-2.1-r3.ebuild |
4110 |
@@ -4,7 +4,7 @@ |
4111 |
|
4112 |
EAPI=5 |
4113 |
|
4114 |
-inherit multilib |
4115 |
+inherit multilib-build |
4116 |
|
4117 |
DESCRIPTION="Virtual for FORTRAN 77 BLAS implementation" |
4118 |
HOMEPAGE="" |
4119 |
@@ -18,15 +18,15 @@ IUSE="doc int64" |
4120 |
RDEPEND=" |
4121 |
int64? ( |
4122 |
|| ( |
4123 |
- >=sci-libs/openblas-0.2.11[int64] |
4124 |
- >=sci-libs/blas-reference-20131116-r1[int64] |
4125 |
+ sci-libs/blas-reference[int64,${MULTILIB_USEDEP}] |
4126 |
+ >=sci-libs/openblas-0.2.11[int64,${MULTILIB_USEDEP}] |
4127 |
) |
4128 |
) |
4129 |
|| ( |
4130 |
- >=sci-libs/blas-reference-20131116-r1[int64?] |
4131 |
+ sci-libs/blas-reference[int64?,${MULTILIB_USEDEP}] |
4132 |
+ >=sci-libs/openblas-0.2.11[int64?,${MULTILIB_USEDEP}] |
4133 |
>=dev-cpp/eigen-3.1.4 |
4134 |
sci-libs/atlas[fortran] |
4135 |
- >=sci-libs/openblas-0.2.11[int64?] |
4136 |
>=sci-libs/acml-4.4 |
4137 |
sci-libs/gotoblas2 |
4138 |
>=sci-libs/mkl-10.3 |
4139 |
@@ -40,5 +40,6 @@ pkg_pretend() { |
4140 |
ewarn "Please delete" |
4141 |
ewarn "${EROOT%/}/usr/$(get_libdir)/lib${PN}.so" |
4142 |
ewarn "to avoid problems with new ${PN} structure" |
4143 |
+ die "Old lib${PN} detected" |
4144 |
fi |
4145 |
} |
4146 |
|
4147 |
diff --git a/virtual/blas/metadata.xml b/virtual/blas/metadata.xml |
4148 |
index a27bb5a..cc94dad 100644 |
4149 |
--- a/virtual/blas/metadata.xml |
4150 |
+++ b/virtual/blas/metadata.xml |
4151 |
@@ -6,8 +6,8 @@ |
4152 |
Gentoo virtual package for the Basic Linear Algebra Subprograms |
4153 |
FORTRAN 77 implementation. |
4154 |
</longdescription> |
4155 |
-<use> |
4156 |
- <flag name="int64">Add eselect module for blas libraries built with 64 bits |
4157 |
+ <use> |
4158 |
+ <flag name="int64">Add eselect module for blas libraries built with 64 bits |
4159 |
integer ABI</flag> |
4160 |
-</use> |
4161 |
+ </use> |
4162 |
</pkgmetadata> |
4163 |
|
4164 |
diff --git a/virtual/cblas/cblas-2.0-r1.ebuild b/virtual/cblas/cblas-2.0-r1.ebuild |
4165 |
deleted file mode 100644 |
4166 |
index aab813f..0000000 |
4167 |
--- a/virtual/cblas/cblas-2.0-r1.ebuild |
4168 |
+++ /dev/null |
4169 |
@@ -1,28 +0,0 @@ |
4170 |
-# Copyright 1999-2014 Gentoo Foundation |
4171 |
-# Distributed under the terms of the GNU General Public License v2 |
4172 |
-# $Id$ |
4173 |
- |
4174 |
-EAPI=5 |
4175 |
- |
4176 |
-DESCRIPTION="Virtual for BLAS C implementation" |
4177 |
-HOMEPAGE="" |
4178 |
-SRC_URI="" |
4179 |
- |
4180 |
-LICENSE="" |
4181 |
-SLOT="0" |
4182 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
4183 |
-IUSE="int64" |
4184 |
- |
4185 |
-RDEPEND=" |
4186 |
- int64? ( |
4187 |
- sci-libs/openblas[int64] |
4188 |
- ) |
4189 |
- || ( |
4190 |
- >=sci-libs/cblas-reference-20110218 |
4191 |
- sci-libs/openblas[int64?] |
4192 |
- >=sci-libs/gsl-1.15-r3[-cblas-external] |
4193 |
- >=sci-libs/gotoblas2-1.13 |
4194 |
- >=sci-libs/atlas-3.9.34 |
4195 |
- >=sci-libs/mkl-10.3 |
4196 |
- )" |
4197 |
-DEPEND="" |
4198 |
|
4199 |
diff --git a/virtual/cblas/cblas-2.0-r2.ebuild b/virtual/cblas/cblas-2.0-r2.ebuild |
4200 |
deleted file mode 100644 |
4201 |
index a4772e2..0000000 |
4202 |
--- a/virtual/cblas/cblas-2.0-r2.ebuild |
4203 |
+++ /dev/null |
4204 |
@@ -1,31 +0,0 @@ |
4205 |
-# Copyright 1999-2014 Gentoo Foundation |
4206 |
-# Distributed under the terms of the GNU General Public License v2 |
4207 |
-# $Id$ |
4208 |
- |
4209 |
-EAPI=5 |
4210 |
- |
4211 |
-DESCRIPTION="Virtual for BLAS C implementation" |
4212 |
-HOMEPAGE="" |
4213 |
-SRC_URI="" |
4214 |
- |
4215 |
-LICENSE="" |
4216 |
-SLOT="0" |
4217 |
-KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" |
4218 |
-IUSE="int64" |
4219 |
- |
4220 |
-RDEPEND=" |
4221 |
- int64? ( |
4222 |
- || ( |
4223 |
- >=sci-libs/openblas-0.2.11[int64] |
4224 |
- >=sci-libs/cblas-reference-20110218-r1[int64] |
4225 |
- ) |
4226 |
- ) |
4227 |
- || ( |
4228 |
- >=sci-libs/cblas-reference-20110218-r1[int64?] |
4229 |
- >=sci-libs/openblas-0.2.11[int64?] |
4230 |
- >=sci-libs/gsl-1.15-r3[-cblas-external] |
4231 |
- >=sci-libs/gotoblas2-1.13 |
4232 |
- >=sci-libs/atlas-3.9.34 |
4233 |
- >=sci-libs/mkl-10.3 |
4234 |
- )" |
4235 |
-DEPEND="" |
4236 |
|
4237 |
diff --git a/virtual/cblas/cblas-2.0-r3.ebuild b/virtual/cblas/cblas-2.0-r3.ebuild |
4238 |
index 252154d..852a70f 100644 |
4239 |
--- a/virtual/cblas/cblas-2.0-r3.ebuild |
4240 |
+++ b/virtual/cblas/cblas-2.0-r3.ebuild |
4241 |
@@ -26,10 +26,14 @@ RDEPEND=" |
4242 |
>=sci-libs/cblas-reference-20110218-r1[int64?,${MULTILIB_USEDEP}] |
4243 |
>=sci-libs/openblas-0.2.11[int64?,${MULTILIB_USEDEP}] |
4244 |
>=sci-libs/gsl-1.16-r2[-cblas-external,${MULTILIB_USEDEP}] |
4245 |
- abi_x86_64? ( !abi_x86_32? ( || ( |
4246 |
- >=sci-libs/gotoblas2-1.13 |
4247 |
- >=sci-libs/atlas-3.9.34 |
4248 |
- >=sci-libs/mkl-10.3 |
4249 |
- ) ) ) |
4250 |
+ abi_x86_64? ( |
4251 |
+ !abi_x86_32? ( |
4252 |
+ || ( |
4253 |
+ >=sci-libs/gotoblas2-1.13 |
4254 |
+ >=sci-libs/atlas-3.9.34 |
4255 |
+ >=sci-libs/mkl-10.3 |
4256 |
+ ) |
4257 |
+ ) |
4258 |
+ ) |
4259 |
)" |
4260 |
DEPEND="" |
4261 |
|
4262 |
diff --git a/virtual/cblas/cblas-2.0.ebuild b/virtual/cblas/cblas-2.0.ebuild |
4263 |
deleted file mode 100644 |
4264 |
index cb1449e..0000000 |
4265 |
--- a/virtual/cblas/cblas-2.0.ebuild |
4266 |
+++ /dev/null |
4267 |
@@ -1,24 +0,0 @@ |
4268 |
-# Copyright 1999-2014 Gentoo Foundation |
4269 |
-# Distributed under the terms of the GNU General Public License v2 |
4270 |
-# $Id$ |
4271 |
- |
4272 |
-EAPI=5 |
4273 |
- |
4274 |
-DESCRIPTION="Virtual for BLAS C implementation" |
4275 |
-HOMEPAGE="" |
4276 |
-SRC_URI="" |
4277 |
- |
4278 |
-LICENSE="" |
4279 |
-SLOT="0" |
4280 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
4281 |
-IUSE="" |
4282 |
- |
4283 |
-RDEPEND="|| ( |
4284 |
- >=sci-libs/cblas-reference-20110218 |
4285 |
- sci-libs/openblas |
4286 |
- >=sci-libs/gsl-1.15-r3[-cblas-external] |
4287 |
- >=sci-libs/gotoblas2-1.13 |
4288 |
- >=sci-libs/atlas-3.9.34 |
4289 |
- >=sci-libs/mkl-10.3 |
4290 |
- )" |
4291 |
-DEPEND="" |
4292 |
|
4293 |
diff --git a/virtual/lapack/lapack-3.4-r1.ebuild b/virtual/lapack/lapack-3.4-r1.ebuild |
4294 |
deleted file mode 100644 |
4295 |
index 57124ab..0000000 |
4296 |
--- a/virtual/lapack/lapack-3.4-r1.ebuild |
4297 |
+++ /dev/null |
4298 |
@@ -1,35 +0,0 @@ |
4299 |
-# Copyright 1999-2014 Gentoo Foundation |
4300 |
-# Distributed under the terms of the GNU General Public License v2 |
4301 |
-# $Id$ |
4302 |
- |
4303 |
-EAPI=5 |
4304 |
- |
4305 |
-inherit multilib |
4306 |
- |
4307 |
-DESCRIPTION="Virtual for Linear Algebra Package FORTRAN 77 implementation" |
4308 |
-HOMEPAGE="" |
4309 |
-SRC_URI="" |
4310 |
- |
4311 |
-LICENSE="" |
4312 |
-SLOT="0" |
4313 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux" |
4314 |
-IUSE="doc" |
4315 |
- |
4316 |
-RDEPEND=" |
4317 |
- || ( |
4318 |
- >=sci-libs/lapack-reference-${PV} |
4319 |
- >=sci-libs/atlas-3.10.1[lapack] |
4320 |
- >=sci-libs/mkl-11.0 |
4321 |
- >=sci-libs/acml-5.3 |
4322 |
- ) |
4323 |
- doc? ( >=app-doc/lapack-docs-3.3 )" |
4324 |
-DEPEND="" |
4325 |
- |
4326 |
-pkg_pretend() { |
4327 |
- if [[ -e "${EPREFIX}"/usr/$(get_libdir)/lib${PN}.so ]]; then |
4328 |
- ewarn "You have still the old ${PN} library symlink present" |
4329 |
- ewarn "Please delete" |
4330 |
- ewarn "${EPREFIX}/usr/$(get_libdir)/lib${PN}.so" |
4331 |
- ewarn "to avoid problems with new ${PN} structure" |
4332 |
- fi |
4333 |
-} |
4334 |
|
4335 |
diff --git a/virtual/lapack/lapack-3.5-r1.ebuild b/virtual/lapack/lapack-3.5-r1.ebuild |
4336 |
deleted file mode 100644 |
4337 |
index 2c127c0..0000000 |
4338 |
--- a/virtual/lapack/lapack-3.5-r1.ebuild |
4339 |
+++ /dev/null |
4340 |
@@ -1,33 +0,0 @@ |
4341 |
-# Copyright 1999-2014 Gentoo Foundation |
4342 |
-# Distributed under the terms of the GNU General Public License v2 |
4343 |
-# $Id$ |
4344 |
- |
4345 |
-EAPI=5 |
4346 |
- |
4347 |
-inherit multilib |
4348 |
- |
4349 |
-DESCRIPTION="Virtual for Linear Algebra Package FORTRAN 77 implementation" |
4350 |
-HOMEPAGE="" |
4351 |
-SRC_URI="" |
4352 |
- |
4353 |
-LICENSE="" |
4354 |
-SLOT="0" |
4355 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
4356 |
-IUSE="doc" |
4357 |
- |
4358 |
-RDEPEND=" |
4359 |
- || ( |
4360 |
- >=sci-libs/lapack-reference-${PV} |
4361 |
- >=sci-libs/atlas-3.10.1[lapack] |
4362 |
- ) |
4363 |
- doc? ( >=app-doc/lapack-docs-3.3 )" |
4364 |
-DEPEND="" |
4365 |
- |
4366 |
-pkg_pretend() { |
4367 |
- if [[ -e "${EROOT%/}"/usr/$(get_libdir)/lib${PN}.so ]]; then |
4368 |
- ewarn "You have still the old ${PN} library symlink present" |
4369 |
- ewarn "Please delete" |
4370 |
- ewarn "${EROOT%/}/usr/$(get_libdir)/lib${PN}.so" |
4371 |
- ewarn "to avoid problems with new ${PN} structure" |
4372 |
- fi |
4373 |
-} |
4374 |
|
4375 |
diff --git a/virtual/lapack/lapack-3.5-r2.ebuild b/virtual/lapack/lapack-3.5-r2.ebuild |
4376 |
index 2282d98..7bbf0a1 100644 |
4377 |
--- a/virtual/lapack/lapack-3.5-r2.ebuild |
4378 |
+++ b/virtual/lapack/lapack-3.5-r2.ebuild |
4379 |
@@ -4,7 +4,7 @@ |
4380 |
|
4381 |
EAPI=5 |
4382 |
|
4383 |
-inherit multilib |
4384 |
+inherit multilib-build |
4385 |
|
4386 |
DESCRIPTION="Virtual for Linear Algebra Package FORTRAN 77 implementation" |
4387 |
HOMEPAGE="" |
4388 |
@@ -17,10 +17,10 @@ IUSE="doc int64" |
4389 |
|
4390 |
RDEPEND=" |
4391 |
|| ( |
4392 |
- >=sci-libs/lapack-reference-${PV}[int64?] |
4393 |
+ >=sci-libs/lapack-reference-${PV}[int64?,${MULTILIB_USEDEP}] |
4394 |
>=sci-libs/atlas-3.10.1[lapack] |
4395 |
) |
4396 |
- int64? ( >=sci-libs/lapack-reference-${PV}[int64] ) |
4397 |
+ int64? ( >=sci-libs/lapack-reference-${PV}[int64,${MULTILIB_USEDEP}] ) |
4398 |
doc? ( >=app-doc/lapack-docs-3.3 )" |
4399 |
DEPEND="" |