commit:     381a10c047f0c412cf53b187da7517c6aa415306
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Fri Jun 24 23:43:44 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun Jun 26 02:29:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=381a10c0

sci-libs/STRUMPACK: various fixes

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 ...PACK-6.3.1.ebuild => STRUMPACK-6.3.1-r1.ebuild} | 38 +++++++++++++++++-----
 sci-libs/STRUMPACK/metadata.xml                    |  2 +-
 2 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/sci-libs/STRUMPACK/STRUMPACK-6.3.1.ebuild 
b/sci-libs/STRUMPACK/STRUMPACK-6.3.1-r1.ebuild
similarity index 58%
rename from sci-libs/STRUMPACK/STRUMPACK-6.3.1.ebuild
rename to sci-libs/STRUMPACK/STRUMPACK-6.3.1-r1.ebuild
index 4039698f3..742f7fc41 100644
--- a/sci-libs/STRUMPACK/STRUMPACK-6.3.1.ebuild
+++ b/sci-libs/STRUMPACK/STRUMPACK-6.3.1-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake fortran-2
+inherit cmake flag-o-matic fortran-2
 
 DESCRIPTION="Structured Matrix Package (LBNL)"
 HOMEPAGE="https://github.com/pghysels/STRUMPACK";
@@ -12,19 +12,24 @@ 
SRC_URI="https://github.com/pghysels/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${
 KEYWORDS="~amd64"
 LICENSE="BSD"
 SLOT="0"
-IUSE="+butterflypack combblas count-flops +hip message-counters metis +mpi 
+openmp +scotch papi task-timers +zfp" # +cuda +slate +ptscotch +magma matlab
+IUSE="+butterflypack combblas count-flops +hip message-counter metis +mpi 
+openmp +scotch papi task-timers +zfp" # +cuda +slate +ptscotch +magma matlab
 
 RDEPEND="
-       butterflypack? ( sci-libs/ButterflyPACK )
+       butterflypack? ( sci-libs/ButterflyPACK )
+       combblas? ( sci-libs/CombBLAS )
        hip? (
-               sci-libs/hipBLAS
-               sci-libs/rocBLAS
-               sci-libs/rocSOLVER
+               dev-util/hip:=
+               sci-libs/hipBLAS:=
+               sci-libs/rocBLAS:=
+               sci-libs/rocSOLVER:=
        )
        metis? ( sci-libs/parmetis )
-       mpi? ( virtual/mpi )
+       mpi? (
+               sci-libs/scalapack
+               virtual/mpi
+       )
        papi? ( dev-libs/papi )
-       scotch? ( sci-libs/scotch )
+       scotch? ( sci-libs/scotch:= )
        zfp? ( dev-libs/zfp )
 
        sci-libs/metis
@@ -45,14 +50,24 @@ REQUIRED_USE="
 # magma? ( cuda )
 DOCS=( README.md CHANGELOG SUPPORT )
 
+src_prepare() {
+       sed \
+               -e "s|LIBRARY DESTINATION lib|LIBRARY DESTINATION 
$(get_libdir)|g" \
+               -e "s|lib/cmake|$(get_libdir)/cmake|g" \
+               -i CMakeLists.txt \
+               || die
+       cmake_src_prepare
+}
+
 src_configure() {
+       use combblas && append-cppflags '-I/usr/include/CombBLAS'
        local mycmakeargs=(
                -DTPL_ENABLE_MAGMA=NO
                -DTPL_ENABLE_PTSCOTCH=NO
                -DTPL_ENABLE_SLATE=NO
 
                -DSTRUMPACK_COUNT_FLOPS=$(usex count-flops)
-               -DSTRUMPACK_MESSAGE_COUNTERS=$(usex message-counters)
+               -DSTRUMPACK_MESSAGE_COUNTER=$(usex message-counter)
                -DSTRUMPACK_TASK_TIMERS=$(usex task-timers)
                -DSTRUMPACK_USE_HIP=$(usex hip)
                -DSTRUMPACK_USE_MPI=$(usex mpi)
@@ -64,5 +79,10 @@ src_configure() {
                -DTPL_ENABLE_SCOTCH=$(usex scotch)
                -DTPL_ENABLE_ZFP=$(usex zfp)
        )
+       if use hip; then
+               addpredict /dev/kfd
+               mycmakeargs+=( "-DHIP_ROOT_DIR=${EPREFIX}/usr" )
+       fi
+       use scotch && mycmakeargs+=( 
"-DSCOTCH_INCLUDE_DIR=${EPREFIX}/usr/include/scotch" )
        cmake_src_configure
 }

diff --git a/sci-libs/STRUMPACK/metadata.xml b/sci-libs/STRUMPACK/metadata.xml
index 48656f88c..6db77609c 100644
--- a/sci-libs/STRUMPACK/metadata.xml
+++ b/sci-libs/STRUMPACK/metadata.xml
@@ -19,7 +19,7 @@ The HODLR and Butterfly functionality in STRUMPACK is 
implemented through interf
         <flag name="combblas">Use CombBLAS for weighted matching</flag>
         <flag name="count-flops">Build with flop counters</flag>
         <flag name="hip">Use HIP for AMD or NVIDIA GPU acceleration</flag>
-        <flag name="message-counters">Build with counter for MPI 
messages</flag>
+        <flag name="message-counter">Build with counter for MPI messages</flag>
         <flag name="metis">Build with support for ParMetis</flag>
         <flag name="papi">Build with support for PAPI monitoring</flag>
         <flag name="scotch">Build with support for Scotch</flag>

Reply via email to