Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-libs/magma/
Date: Mon, 30 May 2022 17:51:07
Message-Id: 1653933062.98dabfd6d95a616f9d0fb0489679d0440bc54340.Alessandro-Barbieri@gentoo
1 commit: 98dabfd6d95a616f9d0fb0489679d0440bc54340
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Mon May 30 17:50:22 2022 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Mon May 30 17:51:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=98dabfd6
7
8 sci-libs/magma: fixes
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 sci-libs/magma/magma-2.6.2-r1.ebuild | 29 +++++++++++++++++------------
13 1 file changed, 17 insertions(+), 12 deletions(-)
14
15 diff --git a/sci-libs/magma/magma-2.6.2-r1.ebuild b/sci-libs/magma/magma-2.6.2-r1.ebuild
16 index 05b6ad90f..aa31ea80a 100644
17 --- a/sci-libs/magma/magma-2.6.2-r1.ebuild
18 +++ b/sci-libs/magma/magma-2.6.2-r1.ebuild
19 @@ -31,7 +31,9 @@ IUSE="doc openblas test ${IUSE_AMDGPU}"
20 #IUSE="doc cuda hip openblas test ${IUSE_AMDGPU}"
21
22 # TODO: do not enforce openblas
23 +# hip? ( sci-libs/hipBLAS )
24 RDEPEND="
25 + sci-libs/hipBLAS
26 openblas? ( sci-libs/openblas )
27 !openblas? (
28 virtual/blas
29 @@ -62,7 +64,18 @@ pkg_setup() {
30 }
31
32 src_prepare() {
33 - rm -r blas_fix || die
34 + gpu=""
35 + #if use hip ; then
36 + for u in ${IUSE_AMDGPU} ; do
37 + if use ${u} ; then
38 + gpu="${gpu};${u/amdgpu_/}"
39 + fi
40 + done
41 + #fi
42 + # remove first character (;)
43 + gpu="${gpu:1}"
44 + export gpu
45 +
46 # distributed pc file not so useful so replace it
47 cat <<-EOF > ${PN}.pc
48 prefix=${EPREFIX}/usr
49 @@ -82,8 +95,11 @@ src_prepare() {
50 #use hip && echo -e 'BACKEND = hip' > make.inc
51 echo -e 'BACKEND = hip' > make.inc
52 echo -e 'FORT = true' >> make.inc
53 + echo -e "GPU_TARGET = ${gpu}" >> make.inc
54 emake generate
55
56 + rm -r blas_fix || die
57 +
58 cmake_src_prepare
59 }
60
61 @@ -92,17 +108,6 @@ src_configure() {
62 local blasvendor="Generic"
63 use openblas && blasvendor="OpenBLAS"
64
65 - local gpu=""
66 - #if use hip ; then
67 - for u in ${IUSE_AMDGPU} ; do
68 - if use ${u} ; then
69 - gpu="${gpu};${u/amdgpu_/}"
70 - fi
71 - done
72 - #fi
73 - # remove first character (;)
74 - gpu="${gpu:1}"
75 -
76 local mycmakeargs=(
77 -DBUILD_SHARED_LIBS=ON
78 -DCMAKE_CXX_COMPILER=hipcc