aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-05-30 19:50:22 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2022-05-30 19:51:02 +0200
commit98dabfd6d95a616f9d0fb0489679d0440bc54340 (patch)
treec311050f966df5b5187e145da1b1494d6bc083c0
parentsci-libs/CombBLAS: fix patching (diff)
downloadguru-98dabfd6.tar.gz
guru-98dabfd6.tar.bz2
guru-98dabfd6.zip
sci-libs/magma: fixes
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
-rw-r--r--sci-libs/magma/magma-2.6.2-r1.ebuild29
1 files 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 05b6ad90f7..aa31ea80a4 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