3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit cmake fortran-2
|
|
6 |
# Some additional tests are run if Python is found
|
|
7 |
PYTHON_COMPAT=( python3_{10..11} )
|
|
8 |
inherit cmake fortran-2 python-any-r1
|
7 |
9 |
|
8 |
10 |
DESCRIPTION="BLAS,CBLAS,LAPACK,LAPACKE reference implementations"
|
9 |
11 |
HOMEPAGE="https://www.netlib.org/lapack/"
|
... | ... | |
11 |
13 |
|
12 |
14 |
LICENSE="BSD"
|
13 |
15 |
SLOT="0"
|
14 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
|
16 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
|
15 |
17 |
# TODO: static-libs 64bit-index
|
16 |
18 |
IUSE="lapacke deprecated doc eselect-ldso test"
|
17 |
19 |
RESTRICT="!test? ( test )"
|
18 |
20 |
|
19 |
|
BDEPEND="virtual/pkgconfig"
|
20 |
21 |
RDEPEND="
|
21 |
22 |
!app-eselect/eselect-cblas
|
22 |
23 |
virtual/fortran
|
... | ... | |
24 |
25 |
>=app-eselect/eselect-blas-0.2
|
25 |
26 |
>=app-eselect/eselect-lapack-0.2
|
26 |
27 |
)
|
27 |
|
doc? ( app-doc/blas-docs )"
|
|
28 |
doc? ( app-doc/blas-docs )
|
|
29 |
"
|
28 |
30 |
DEPEND="${RDEPEND}"
|
|
31 |
BDEPEND="
|
|
32 |
virtual/pkgconfig
|
|
33 |
test? ( ${PYTHON_DEPS} )
|
|
34 |
"
|
|
35 |
|
|
36 |
pkg_setup() {
|
|
37 |
fortran-2_pkg_setup
|
|
38 |
use test && python-any-r1_pkg_setup
|
|
39 |
}
|
29 |
40 |
|
30 |
41 |
src_configure() {
|
31 |
42 |
local mycmakeargs=(
|
... | ... | |
34 |
45 |
-DBUILD_DEPRECATED=$(usex deprecated)
|
35 |
46 |
-DBUILD_SHARED_LIBS=ON
|
36 |
47 |
-DBUILD_TESTING=$(usex test)
|
|
48 |
|
|
49 |
# Breaks cross, will default to OFF in next release.
|
|
50 |
-DTEST_FORTRAN_COMPILER=OFF
|
37 |
51 |
)
|
38 |
52 |
|
39 |
53 |
cmake_src_configure
|
... | ... | |
61 |
75 |
|
62 |
76 |
local me=reference libdir=$(get_libdir)
|
63 |
77 |
# check eselect-blas
|
64 |
|
eselect blas add ${libdir} "${EROOT}"/usr/${libdir}/blas/${me} ${me}
|
|
78 |
eselect blas add ${libdir} "${EPREFIX}"/usr/${libdir}/blas/${me} ${me}
|
65 |
79 |
local current_blas=$(eselect blas show ${libdir} | cut -d' ' -f2)
|
66 |
80 |
if [[ ${current_blas} == ${me} || -z ${current_blas} ]]; then
|
67 |
81 |
eselect blas set ${libdir} ${me}
|
... | ... | |
73 |
87 |
fi
|
74 |
88 |
|
75 |
89 |
# check eselect-lapack
|
76 |
|
eselect lapack add ${libdir} "${EROOT}"/usr/${libdir}/lapack/${me} ${me}
|
|
90 |
eselect lapack add ${libdir} "${EPREFIX}"/usr/${libdir}/lapack/${me} ${me}
|
77 |
91 |
local current_lapack=$(eselect lapack show ${libdir} | cut -d' ' -f2)
|
78 |
92 |
if [[ ${current_lapack} == ${me} || -z ${current_lapack} ]]; then
|
79 |
93 |
eselect lapack set ${libdir} ${me}
|