commit: 98dabfd6d95a616f9d0fb0489679d0440bc54340
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon May 30 17:50:22 2022 +0000
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Mon May 30 17:51:02 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=98dabfd6
sci-libs/magma: fixes
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
sci-libs/magma/magma-2.6.2-r1.ebuild | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/sci-libs/magma/magma-2.6.2-r1.ebuild
b/sci-libs/magma/magma-2.6.2-r1.ebuild
index 05b6ad90f..aa31ea80a 100644
--- a/sci-libs/magma/magma-2.6.2-r1.ebuild
+++ b/sci-libs/magma/magma-2.6.2-r1.ebuild
@@ -31,7 +31,9 @@ IUSE="doc openblas test ${IUSE_AMDGPU}"
#IUSE="doc cuda hip openblas test ${IUSE_AMDGPU}"
# TODO: do not enforce openblas
+# hip? ( sci-libs/hipBLAS )
RDEPEND="
+ sci-libs/hipBLAS
openblas? ( sci-libs/openblas )
!openblas? (
virtual/blas
@@ -62,7 +64,18 @@ pkg_setup() {
}
src_prepare() {
- rm -r blas_fix || die
+ gpu=""
+ #if use hip ; then
+ for u in ${IUSE_AMDGPU} ; do
+ if use ${u} ; then
+ gpu="${gpu};${u/amdgpu_/}"
+ fi
+ done
+ #fi
+ # remove first character (;)
+ gpu="${gpu:1}"
+ export gpu
+
# distributed pc file not so useful so replace it
cat <<-EOF > ${PN}.pc
prefix=${EPREFIX}/usr
@@ -82,8 +95,11 @@ src_prepare() {
#use hip && echo -e 'BACKEND = hip' > make.inc
echo -e 'BACKEND = hip' > make.inc
echo -e 'FORT = true' >> make.inc
+ echo -e "GPU_TARGET = ${gpu}" >> make.inc
emake generate
+ rm -r blas_fix || die
+
cmake_src_prepare
}
@@ -92,17 +108,6 @@ src_configure() {
local blasvendor="Generic"
use openblas && blasvendor="OpenBLAS"
- local gpu=""
- #if use hip ; then
- for u in ${IUSE_AMDGPU} ; do
- if use ${u} ; then
- gpu="${gpu};${u/amdgpu_/}"
- fi
- done
- #fi
- # remove first character (;)
- gpu="${gpu:1}"
-
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DCMAKE_CXX_COMPILER=hipcc