Gentoo Archives: gentoo-commits

From: "Jakov Smolić" <jsmolic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/openblas/
Date: Wed, 06 Oct 2021 08:33:29
Message-Id: 1633509097.7563c02ff3ac1ecc830b18e8e7bd698b8352fd48.jsmolic@gentoo
1 commit: 7563c02ff3ac1ecc830b18e8e7bd698b8352fd48
2 Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 6 07:56:13 2021 +0000
4 Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 6 08:31:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7563c02f
7
8 sci-libs/openblas: drop 0.3.12-r1, 0.3.13, 0.3.14
9
10 Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
11
12 sci-libs/openblas/Manifest | 3 -
13 sci-libs/openblas/openblas-0.3.12-r1.ebuild | 198 ----------------------------
14 sci-libs/openblas/openblas-0.3.13.ebuild | 198 ----------------------------
15 sci-libs/openblas/openblas-0.3.14.ebuild | 198 ----------------------------
16 4 files changed, 597 deletions(-)
17
18 diff --git a/sci-libs/openblas/Manifest b/sci-libs/openblas/Manifest
19 index f25ea9b5b2b..b0a64a31bb4 100644
20 --- a/sci-libs/openblas/Manifest
21 +++ b/sci-libs/openblas/Manifest
22 @@ -1,5 +1,2 @@
23 -DIST openblas-0.3.12.tar.gz 12325103 BLAKE2B 3d6706e59e83f87dd58b287753bf697de99e83c8a4484453f120d8f8c9c69ea5b481a143db04342a1dcb1779ce548a49618cf4941d08d636e12ed481305e8fb5 SHA512 1ff5a065c41f7e460857f8428fc77900b189f051fa8129eea9ae93237f234d387cc1c6e627c2c95636164f512d4d721d4229729f04a04e8d5f655abbf5463d98
24 -DIST openblas-0.3.13.tar.gz 12437434 BLAKE2B d8f9d3296506c6148cd506278f0b6a2a4fe50975a7fd3f54108e98e88a13002b1035f5697322ba73df7c6397faee6d0772c1d4d46b66db8e862f17b980dbdf97 SHA512 86e7f496587cc35d7feede99cbe3cf627ef690dd7489bb03b95f7d15ed758e32baf17d79f17b1de187184394233f60a8249a64dd53c3d59a9540db92269b7ee4
25 -DIST openblas-0.3.14.tar.gz 12460465 BLAKE2B 9505ff6e132581ecc86159fb84192c6bbce0f2974293eaf1b4aca6b96b5da85823bfc1bced65a96930674fd4781ea3e375aed09cbdc9930cef26694c9f8e1c80 SHA512 c7d5947ada525a32bc6e97ff94272df9730fa5fb06102e06e80472baedc1a9119d82050cdaede192db15f816ae7143784d7801b61b64fab5b5cf97cdbd5e625e
26 DIST openblas-0.3.17.tar.gz 12513037 BLAKE2B bb3a89500f242613a6bed73519702995cf1e82dcfec49f9469ecfd6647121260a4364582dbc257a75212320b5690ba93e75a0f2762dce7f398ef6443b169b4e4 SHA512 a97745c1f050ea44fce5f1722810de469612d374a29796a874d12673d6ad189872160cc2b5d0885790e6562d9d7ade629144c86f2649e668b0d4def36aa74495
27 DIST openblas-0.3.18.tar.gz 12619822 BLAKE2B 38a5e7b861eb0063a4494c1cfb6f7f5723741437ecdd5cb1fb42645eb73bceb472b3a8c11eec3d0ba4f676981ac89de4ff1ee0d7ea42d1e234746f34ce8fb6b8 SHA512 df9a14026a61bdc5285636bfd7a52dce244d24fcf4a0c870ef4e58b8b50e412849828ca5aeac2a2435f635e78e60559762e8bae22ea7bc5dff2e865a96d81152
28
29 diff --git a/sci-libs/openblas/openblas-0.3.12-r1.ebuild b/sci-libs/openblas/openblas-0.3.12-r1.ebuild
30 deleted file mode 100644
31 index 4d8d73725fd..00000000000
32 --- a/sci-libs/openblas/openblas-0.3.12-r1.ebuild
33 +++ /dev/null
34 @@ -1,198 +0,0 @@
35 -# Copyright 1999-2021 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=7
39 -
40 -inherit flag-o-matic fortran-2 toolchain-funcs
41 -
42 -DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
43 -HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
44 -SRC_URI="https://github.com/xianyi/OpenBLAS/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 -S="${WORKDIR}"/OpenBLAS-${PV}
46 -
47 -LICENSE="BSD"
48 -SLOT="0"
49 -KEYWORDS="amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
50 -IUSE="dynamic eselect-ldso index-64bit openmp pthread relapack test"
51 -REQUIRED_USE="?? ( openmp pthread )"
52 -RESTRICT="!test? ( test )"
53 -
54 -RDEPEND="
55 - eselect-ldso? (
56 - >=app-eselect/eselect-blas-0.2
57 - >=app-eselect/eselect-lapack-0.2
58 - )
59 -"
60 -BDEPEND="virtual/pkgconfig"
61 -
62 -PATCHES=(
63 - "${FILESDIR}/${PN}-0.3.12-shared-blas-lapack.patch"
64 - "${FILESDIR}/${PN}-0.3.10-dont-clobber-fflags.patch"
65 -)
66 -
67 -pkg_pretend() {
68 - elog "This software has a massive number of options that"
69 - elog "are configurable and it is *impossible* for all of"
70 - elog "those to fit inside any manageable ebuild."
71 - elog "The Gentoo provided package has enough to build"
72 - elog "a fully optimized library for your targeted CPU."
73 - elog "You can set the CPU target using the environment"
74 - elog "variable - OPENBLAS_TARGET or it will be detected"
75 - elog "automatically from the target toolchain (supports"
76 - elog "cross compilation toolchains)."
77 - elog "You can control the maximum number of threads"
78 - elog "using OPENBLAS_NTHREAD, default=64 and number of "
79 - elog "parallel calls to allow before further calls wait"
80 - elog "using OPENBLAS_NPARALLEL, default=8."
81 -}
82 -
83 -pkg_setup() {
84 - fortran-2_pkg_setup
85 -
86 - # List of most configurable options - Makefile.rule
87 -
88 - # https://github.com/xianyi/OpenBLAS/pull/2663
89 - tc-export CC FC LD AR AS RANLIB
90 -
91 - # HOSTCC is used for scripting
92 - export HOSTCC=$(tc-getBUILD_CC)
93 -
94 - # threading options
95 - use openmp && tc-check-openmp
96 - USE_THREAD=0
97 - if use openmp; then
98 - USE_THREAD=1; USE_OPENMP=1;
99 - elif use pthread; then
100 - USE_THREAD=1; USE_OPENMP=0;
101 - fi
102 - export USE_THREAD USE_OPENMP
103 -
104 - # We need to filter these while building the library, and not just
105 - # while building the test suite. Will hopefully get fixed upstream:
106 - # https://github.com/xianyi/OpenBLAS/issues/2657
107 - use test && filter-flags "-fbounds-check" "-fcheck=bounds" "-fcheck=all"
108 -
109 - # disable submake with -j and default optimization flags
110 - # in Makefile.system
111 - # Makefile.rule says to not modify COMMON_OPT/FCOMMON_OPT...
112 - export MAKE_NB_JOBS=-1 \
113 - COMMON_OPT=" " \
114 - FCOMMON_OPT=" "
115 -
116 - # Target CPU ARCH options
117 - # generally detected automatically from cross toolchain
118 - use dynamic && \
119 - export DYNAMIC_ARCH=1 \
120 - NO_AFFINITY=1 \
121 - TARGET=GENERIC
122 -
123 - export NUM_PARALLEL=${OPENBLAS_NPARALLEL:-8} \
124 - NUM_THREADS=${OPENBLAS_NTHREAD:-64}
125 -
126 - # setting OPENBLAS_TARGET to override auto detection
127 - # in case the toolchain is not enough to detect
128 - # https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt
129 - if ! use dynamic && [[ ! -z "${OPENBLAS_TARGET}" ]] ; then
130 - export TARGET="${OPENBLAS_TARGET}"
131 - fi
132 -
133 - export NO_STATIC=1
134 -
135 - BUILD_RELAPACK=1
136 - if ! use relapack; then
137 - BUILD_RELAPACK=0
138 - fi
139 -
140 - export PREFIX="${EPREFIX}/usr" BUILD_RELAPACK
141 -}
142 -
143 -src_prepare() {
144 - default
145 -
146 - # Disable tests by default
147 - sed -e "/^all ::/s/tests //" -i Makefile || die
148 -
149 - # if 64bit-index is needed, create second library
150 - # with LIBPREFIX=libopenblas64
151 - if use index-64bit; then
152 - cp -aL "${S}" "${S}-index-64bit" || die
153 - fi
154 -}
155 -
156 -src_compile() {
157 - default
158 - cd interface || die
159 - emake shared-blas-lapack
160 -
161 - if use index-64bit; then
162 - emake -C"${S}-index-64bit" \
163 - INTERFACE64=1 \
164 - LIBPREFIX=libopenblas64
165 - fi
166 -}
167 -
168 -src_test() {
169 - emake tests
170 -}
171 -
172 -src_install() {
173 - emake install DESTDIR="${D}" \
174 - OPENBLAS_INCLUDE_DIR='$(PREFIX)'/include/${PN} \
175 - OPENBLAS_LIBRARY_DIR='$(PREFIX)'/$(get_libdir)
176 -
177 - dodoc GotoBLAS_*.txt *.md Changelog.txt
178 -
179 - if use index-64bit; then
180 - dolib.so "${S}-index-64bit"/libopenblas64*.so*
181 - fi
182 -
183 - if use eselect-ldso; then
184 - insinto /usr/$(get_libdir)/blas/openblas/
185 - doins interface/libblas.so.3
186 - dosym libblas.so.3 usr/$(get_libdir)/blas/openblas/libblas.so
187 - doins interface/libcblas.so.3
188 - dosym libcblas.so.3 usr/$(get_libdir)/blas/openblas/libcblas.so
189 -
190 - insinto /usr/$(get_libdir)/lapack/openblas/
191 - doins interface/liblapack.so.3
192 - dosym liblapack.so.3 usr/$(get_libdir)/lapack/openblas/liblapack.so
193 - doins interface/liblapacke.so.3
194 - dosym liblapacke.so.3 usr/$(get_libdir)/lapack/openblas/liblapacke.so
195 - fi
196 -}
197 -
198 -pkg_postinst() {
199 - use eselect-ldso || return
200 - local libdir=$(get_libdir) me="openblas"
201 -
202 - # check blas
203 - eselect blas add ${libdir} "${EROOT}"/usr/${libdir}/blas/${me} ${me}
204 - local current_blas=$(eselect blas show ${libdir} | cut -d' ' -f2)
205 - if [[ ${current_blas} == "${me}" || -z ${current_blas} ]]; then
206 - eselect blas set ${libdir} ${me}
207 - elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
208 - else
209 - elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
210 - elog "To use blas [${me}] implementation, you have to issue (as root):"
211 - elog "\t eselect blas set ${libdir} ${me}"
212 - fi
213 -
214 - # check lapack
215 - eselect lapack add ${libdir} "${EROOT}"/usr/${libdir}/lapack/${me} ${me}
216 - local current_lapack=$(eselect lapack show ${libdir} | cut -d' ' -f2)
217 - if [[ ${current_lapack} == "${me}" || -z ${current_lapack} ]]; then
218 - eselect lapack set ${libdir} ${me}
219 - elog "Current eselect: LAPACK ($libdir) -> [${current_lapack}]."
220 - else
221 - elog "Current eselect: LAPACK ($libdir) -> [${current_lapack}]."
222 - elog "To use lapack [${me}] implementation, you have to issue (as root):"
223 - elog "\t eselect lapack set ${libdir} ${me}"
224 - fi
225 -}
226 -
227 -pkg_postrm() {
228 - if use eselect-ldso; then
229 - eselect blas validate
230 - eselect lapack validate
231 - fi
232 -}
233
234 diff --git a/sci-libs/openblas/openblas-0.3.13.ebuild b/sci-libs/openblas/openblas-0.3.13.ebuild
235 deleted file mode 100644
236 index 4566f928af8..00000000000
237 --- a/sci-libs/openblas/openblas-0.3.13.ebuild
238 +++ /dev/null
239 @@ -1,198 +0,0 @@
240 -# Copyright 1999-2021 Gentoo Authors
241 -# Distributed under the terms of the GNU General Public License v2
242 -
243 -EAPI=7
244 -
245 -inherit flag-o-matic fortran-2 toolchain-funcs
246 -
247 -DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
248 -HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
249 -SRC_URI="https://github.com/xianyi/OpenBLAS/archive/v${PV}.tar.gz -> ${P}.tar.gz"
250 -S="${WORKDIR}"/OpenBLAS-${PV}
251 -
252 -LICENSE="BSD"
253 -SLOT="0"
254 -KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
255 -IUSE="dynamic eselect-ldso index-64bit openmp pthread relapack test"
256 -REQUIRED_USE="?? ( openmp pthread )"
257 -RESTRICT="!test? ( test )"
258 -
259 -RDEPEND="
260 - eselect-ldso? (
261 - >=app-eselect/eselect-blas-0.2
262 - >=app-eselect/eselect-lapack-0.2
263 - )
264 -"
265 -BDEPEND="virtual/pkgconfig"
266 -
267 -PATCHES=(
268 - "${FILESDIR}/${PN}-0.3.12-shared-blas-lapack.patch"
269 - "${FILESDIR}/${PN}-0.3.10-dont-clobber-fflags.patch"
270 -)
271 -
272 -pkg_pretend() {
273 - elog "This software has a massive number of options that"
274 - elog "are configurable and it is *impossible* for all of"
275 - elog "those to fit inside any manageable ebuild."
276 - elog "The Gentoo provided package has enough to build"
277 - elog "a fully optimized library for your targeted CPU."
278 - elog "You can set the CPU target using the environment"
279 - elog "variable - OPENBLAS_TARGET or it will be detected"
280 - elog "automatically from the target toolchain (supports"
281 - elog "cross compilation toolchains)."
282 - elog "You can control the maximum number of threads"
283 - elog "using OPENBLAS_NTHREAD, default=64 and number of "
284 - elog "parallel calls to allow before further calls wait"
285 - elog "using OPENBLAS_NPARALLEL, default=8."
286 -}
287 -
288 -pkg_setup() {
289 - fortran-2_pkg_setup
290 -
291 - # List of most configurable options - Makefile.rule
292 -
293 - # https://github.com/xianyi/OpenBLAS/pull/2663
294 - tc-export CC FC LD AR AS RANLIB
295 -
296 - # HOSTCC is used for scripting
297 - export HOSTCC=$(tc-getBUILD_CC)
298 -
299 - # threading options
300 - use openmp && tc-check-openmp
301 - USE_THREAD=0
302 - if use openmp; then
303 - USE_THREAD=1; USE_OPENMP=1;
304 - elif use pthread; then
305 - USE_THREAD=1; USE_OPENMP=0;
306 - fi
307 - export USE_THREAD USE_OPENMP
308 -
309 - # We need to filter these while building the library, and not just
310 - # while building the test suite. Will hopefully get fixed upstream:
311 - # https://github.com/xianyi/OpenBLAS/issues/2657
312 - use test && filter-flags "-fbounds-check" "-fcheck=bounds" "-fcheck=all"
313 -
314 - # disable submake with -j and default optimization flags
315 - # in Makefile.system
316 - # Makefile.rule says to not modify COMMON_OPT/FCOMMON_OPT...
317 - export MAKE_NB_JOBS=-1 \
318 - COMMON_OPT=" " \
319 - FCOMMON_OPT=" "
320 -
321 - # Target CPU ARCH options
322 - # generally detected automatically from cross toolchain
323 - use dynamic && \
324 - export DYNAMIC_ARCH=1 \
325 - NO_AFFINITY=1 \
326 - TARGET=GENERIC
327 -
328 - export NUM_PARALLEL=${OPENBLAS_NPARALLEL:-8} \
329 - NUM_THREADS=${OPENBLAS_NTHREAD:-64}
330 -
331 - # setting OPENBLAS_TARGET to override auto detection
332 - # in case the toolchain is not enough to detect
333 - # https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt
334 - if ! use dynamic && [[ ! -z "${OPENBLAS_TARGET}" ]] ; then
335 - export TARGET="${OPENBLAS_TARGET}"
336 - fi
337 -
338 - export NO_STATIC=1
339 -
340 - BUILD_RELAPACK=1
341 - if ! use relapack; then
342 - BUILD_RELAPACK=0
343 - fi
344 -
345 - export PREFIX="${EPREFIX}/usr" BUILD_RELAPACK
346 -}
347 -
348 -src_prepare() {
349 - default
350 -
351 - # Disable tests by default
352 - sed -e "/^all ::/s/tests //" -i Makefile || die
353 -
354 - # if 64bit-index is needed, create second library
355 - # with LIBPREFIX=libopenblas64
356 - if use index-64bit; then
357 - cp -aL "${S}" "${S}-index-64bit" || die
358 - fi
359 -}
360 -
361 -src_compile() {
362 - default
363 - cd interface || die
364 - emake shared-blas-lapack
365 -
366 - if use index-64bit; then
367 - emake -C"${S}-index-64bit" \
368 - INTERFACE64=1 \
369 - LIBPREFIX=libopenblas64
370 - fi
371 -}
372 -
373 -src_test() {
374 - emake tests
375 -}
376 -
377 -src_install() {
378 - emake install DESTDIR="${D}" \
379 - OPENBLAS_INCLUDE_DIR='$(PREFIX)'/include/${PN} \
380 - OPENBLAS_LIBRARY_DIR='$(PREFIX)'/$(get_libdir)
381 -
382 - dodoc GotoBLAS_*.txt *.md Changelog.txt
383 -
384 - if use index-64bit; then
385 - dolib.so "${S}-index-64bit"/libopenblas64*.so*
386 - fi
387 -
388 - if use eselect-ldso; then
389 - insinto /usr/$(get_libdir)/blas/openblas/
390 - doins interface/libblas.so.3
391 - dosym libblas.so.3 usr/$(get_libdir)/blas/openblas/libblas.so
392 - doins interface/libcblas.so.3
393 - dosym libcblas.so.3 usr/$(get_libdir)/blas/openblas/libcblas.so
394 -
395 - insinto /usr/$(get_libdir)/lapack/openblas/
396 - doins interface/liblapack.so.3
397 - dosym liblapack.so.3 usr/$(get_libdir)/lapack/openblas/liblapack.so
398 - doins interface/liblapacke.so.3
399 - dosym liblapacke.so.3 usr/$(get_libdir)/lapack/openblas/liblapacke.so
400 - fi
401 -}
402 -
403 -pkg_postinst() {
404 - use eselect-ldso || return
405 - local libdir=$(get_libdir) me="openblas"
406 -
407 - # check blas
408 - eselect blas add ${libdir} "${EROOT}"/usr/${libdir}/blas/${me} ${me}
409 - local current_blas=$(eselect blas show ${libdir} | cut -d' ' -f2)
410 - if [[ ${current_blas} == "${me}" || -z ${current_blas} ]]; then
411 - eselect blas set ${libdir} ${me}
412 - elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
413 - else
414 - elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
415 - elog "To use blas [${me}] implementation, you have to issue (as root):"
416 - elog "\t eselect blas set ${libdir} ${me}"
417 - fi
418 -
419 - # check lapack
420 - eselect lapack add ${libdir} "${EROOT}"/usr/${libdir}/lapack/${me} ${me}
421 - local current_lapack=$(eselect lapack show ${libdir} | cut -d' ' -f2)
422 - if [[ ${current_lapack} == "${me}" || -z ${current_lapack} ]]; then
423 - eselect lapack set ${libdir} ${me}
424 - elog "Current eselect: LAPACK ($libdir) -> [${current_lapack}]."
425 - else
426 - elog "Current eselect: LAPACK ($libdir) -> [${current_lapack}]."
427 - elog "To use lapack [${me}] implementation, you have to issue (as root):"
428 - elog "\t eselect lapack set ${libdir} ${me}"
429 - fi
430 -}
431 -
432 -pkg_postrm() {
433 - if use eselect-ldso; then
434 - eselect blas validate
435 - eselect lapack validate
436 - fi
437 -}
438
439 diff --git a/sci-libs/openblas/openblas-0.3.14.ebuild b/sci-libs/openblas/openblas-0.3.14.ebuild
440 deleted file mode 100644
441 index 4d8d73725fd..00000000000
442 --- a/sci-libs/openblas/openblas-0.3.14.ebuild
443 +++ /dev/null
444 @@ -1,198 +0,0 @@
445 -# Copyright 1999-2021 Gentoo Authors
446 -# Distributed under the terms of the GNU General Public License v2
447 -
448 -EAPI=7
449 -
450 -inherit flag-o-matic fortran-2 toolchain-funcs
451 -
452 -DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
453 -HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
454 -SRC_URI="https://github.com/xianyi/OpenBLAS/archive/v${PV}.tar.gz -> ${P}.tar.gz"
455 -S="${WORKDIR}"/OpenBLAS-${PV}
456 -
457 -LICENSE="BSD"
458 -SLOT="0"
459 -KEYWORDS="amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
460 -IUSE="dynamic eselect-ldso index-64bit openmp pthread relapack test"
461 -REQUIRED_USE="?? ( openmp pthread )"
462 -RESTRICT="!test? ( test )"
463 -
464 -RDEPEND="
465 - eselect-ldso? (
466 - >=app-eselect/eselect-blas-0.2
467 - >=app-eselect/eselect-lapack-0.2
468 - )
469 -"
470 -BDEPEND="virtual/pkgconfig"
471 -
472 -PATCHES=(
473 - "${FILESDIR}/${PN}-0.3.12-shared-blas-lapack.patch"
474 - "${FILESDIR}/${PN}-0.3.10-dont-clobber-fflags.patch"
475 -)
476 -
477 -pkg_pretend() {
478 - elog "This software has a massive number of options that"
479 - elog "are configurable and it is *impossible* for all of"
480 - elog "those to fit inside any manageable ebuild."
481 - elog "The Gentoo provided package has enough to build"
482 - elog "a fully optimized library for your targeted CPU."
483 - elog "You can set the CPU target using the environment"
484 - elog "variable - OPENBLAS_TARGET or it will be detected"
485 - elog "automatically from the target toolchain (supports"
486 - elog "cross compilation toolchains)."
487 - elog "You can control the maximum number of threads"
488 - elog "using OPENBLAS_NTHREAD, default=64 and number of "
489 - elog "parallel calls to allow before further calls wait"
490 - elog "using OPENBLAS_NPARALLEL, default=8."
491 -}
492 -
493 -pkg_setup() {
494 - fortran-2_pkg_setup
495 -
496 - # List of most configurable options - Makefile.rule
497 -
498 - # https://github.com/xianyi/OpenBLAS/pull/2663
499 - tc-export CC FC LD AR AS RANLIB
500 -
501 - # HOSTCC is used for scripting
502 - export HOSTCC=$(tc-getBUILD_CC)
503 -
504 - # threading options
505 - use openmp && tc-check-openmp
506 - USE_THREAD=0
507 - if use openmp; then
508 - USE_THREAD=1; USE_OPENMP=1;
509 - elif use pthread; then
510 - USE_THREAD=1; USE_OPENMP=0;
511 - fi
512 - export USE_THREAD USE_OPENMP
513 -
514 - # We need to filter these while building the library, and not just
515 - # while building the test suite. Will hopefully get fixed upstream:
516 - # https://github.com/xianyi/OpenBLAS/issues/2657
517 - use test && filter-flags "-fbounds-check" "-fcheck=bounds" "-fcheck=all"
518 -
519 - # disable submake with -j and default optimization flags
520 - # in Makefile.system
521 - # Makefile.rule says to not modify COMMON_OPT/FCOMMON_OPT...
522 - export MAKE_NB_JOBS=-1 \
523 - COMMON_OPT=" " \
524 - FCOMMON_OPT=" "
525 -
526 - # Target CPU ARCH options
527 - # generally detected automatically from cross toolchain
528 - use dynamic && \
529 - export DYNAMIC_ARCH=1 \
530 - NO_AFFINITY=1 \
531 - TARGET=GENERIC
532 -
533 - export NUM_PARALLEL=${OPENBLAS_NPARALLEL:-8} \
534 - NUM_THREADS=${OPENBLAS_NTHREAD:-64}
535 -
536 - # setting OPENBLAS_TARGET to override auto detection
537 - # in case the toolchain is not enough to detect
538 - # https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt
539 - if ! use dynamic && [[ ! -z "${OPENBLAS_TARGET}" ]] ; then
540 - export TARGET="${OPENBLAS_TARGET}"
541 - fi
542 -
543 - export NO_STATIC=1
544 -
545 - BUILD_RELAPACK=1
546 - if ! use relapack; then
547 - BUILD_RELAPACK=0
548 - fi
549 -
550 - export PREFIX="${EPREFIX}/usr" BUILD_RELAPACK
551 -}
552 -
553 -src_prepare() {
554 - default
555 -
556 - # Disable tests by default
557 - sed -e "/^all ::/s/tests //" -i Makefile || die
558 -
559 - # if 64bit-index is needed, create second library
560 - # with LIBPREFIX=libopenblas64
561 - if use index-64bit; then
562 - cp -aL "${S}" "${S}-index-64bit" || die
563 - fi
564 -}
565 -
566 -src_compile() {
567 - default
568 - cd interface || die
569 - emake shared-blas-lapack
570 -
571 - if use index-64bit; then
572 - emake -C"${S}-index-64bit" \
573 - INTERFACE64=1 \
574 - LIBPREFIX=libopenblas64
575 - fi
576 -}
577 -
578 -src_test() {
579 - emake tests
580 -}
581 -
582 -src_install() {
583 - emake install DESTDIR="${D}" \
584 - OPENBLAS_INCLUDE_DIR='$(PREFIX)'/include/${PN} \
585 - OPENBLAS_LIBRARY_DIR='$(PREFIX)'/$(get_libdir)
586 -
587 - dodoc GotoBLAS_*.txt *.md Changelog.txt
588 -
589 - if use index-64bit; then
590 - dolib.so "${S}-index-64bit"/libopenblas64*.so*
591 - fi
592 -
593 - if use eselect-ldso; then
594 - insinto /usr/$(get_libdir)/blas/openblas/
595 - doins interface/libblas.so.3
596 - dosym libblas.so.3 usr/$(get_libdir)/blas/openblas/libblas.so
597 - doins interface/libcblas.so.3
598 - dosym libcblas.so.3 usr/$(get_libdir)/blas/openblas/libcblas.so
599 -
600 - insinto /usr/$(get_libdir)/lapack/openblas/
601 - doins interface/liblapack.so.3
602 - dosym liblapack.so.3 usr/$(get_libdir)/lapack/openblas/liblapack.so
603 - doins interface/liblapacke.so.3
604 - dosym liblapacke.so.3 usr/$(get_libdir)/lapack/openblas/liblapacke.so
605 - fi
606 -}
607 -
608 -pkg_postinst() {
609 - use eselect-ldso || return
610 - local libdir=$(get_libdir) me="openblas"
611 -
612 - # check blas
613 - eselect blas add ${libdir} "${EROOT}"/usr/${libdir}/blas/${me} ${me}
614 - local current_blas=$(eselect blas show ${libdir} | cut -d' ' -f2)
615 - if [[ ${current_blas} == "${me}" || -z ${current_blas} ]]; then
616 - eselect blas set ${libdir} ${me}
617 - elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
618 - else
619 - elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
620 - elog "To use blas [${me}] implementation, you have to issue (as root):"
621 - elog "\t eselect blas set ${libdir} ${me}"
622 - fi
623 -
624 - # check lapack
625 - eselect lapack add ${libdir} "${EROOT}"/usr/${libdir}/lapack/${me} ${me}
626 - local current_lapack=$(eselect lapack show ${libdir} | cut -d' ' -f2)
627 - if [[ ${current_lapack} == "${me}" || -z ${current_lapack} ]]; then
628 - eselect lapack set ${libdir} ${me}
629 - elog "Current eselect: LAPACK ($libdir) -> [${current_lapack}]."
630 - else
631 - elog "Current eselect: LAPACK ($libdir) -> [${current_lapack}]."
632 - elog "To use lapack [${me}] implementation, you have to issue (as root):"
633 - elog "\t eselect lapack set ${libdir} ${me}"
634 - fi
635 -}
636 -
637 -pkg_postrm() {
638 - if use eselect-ldso; then
639 - eselect blas validate
640 - eselect lapack validate
641 - fi
642 -}