commit:     dd47d1b3ec10aa6779430d1c1142e64d462ee707
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 12 21:55:29 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Oct 12 22:22:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd47d1b3

sci-libs/sundials: implement USE=int64

What it already does:
 * allows changing the index size from 64 (default) to 32 bits
 * if USE=superlumt is set makes sure the state of USE=int64 in
   sci-libs/superlu_mt is the same as here, so that the assumption
   about index-type compatibility made in sunlinsol_superlumt.h is
   correct
 * allows test_sunlinsol_superlumt_300_0_1_0 and
    test_sunlinsol_superlumt_300_1_1_0 to pass *if USE=-int64*

What still needs work:
 * getting the two superlumt tests to pass for USE=int64 - they still
   fail with "COLAMD failed at line 58 in file get_perm_c.c"

Bug: https://bugs.gentoo.org/817680
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 sci-libs/sundials/metadata.xml          | 1 +
 sci-libs/sundials/sundials-5.8.0.ebuild | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sci-libs/sundials/metadata.xml b/sci-libs/sundials/metadata.xml
index ad709aab336..7e8359df030 100644
--- a/sci-libs/sundials/metadata.xml
+++ b/sci-libs/sundials/metadata.xml
@@ -16,6 +16,7 @@
   </longdescription>
   <use>
     <flag name="hypre">Build with <pkg>sci-libs/hypre</pkg> conditioners</flag>
+    <flag name="int64">Use index size of 64 rather than 32 bits</flag>
     <flag name="sparse">Enable support for <pkg>sci-libs/klu</pkg> sparse 
solver</flag>
     <flag name="superlumt">Build with <pkg>sci-libs/superlu_mt</pkg></flag>
   </use>

diff --git a/sci-libs/sundials/sundials-5.8.0.ebuild 
b/sci-libs/sundials/sundials-5.8.0.ebuild
index 894e7ef201c..5b64bd8198a 100644
--- a/sci-libs/sundials/sundials-5.8.0.ebuild
+++ b/sci-libs/sundials/sundials-5.8.0.ebuild
@@ -17,7 +17,7 @@ 
SRC_URI="https://github.com/LLNL/${PN}/releases/download/v${PV}/${P}.tar.gz";
 LICENSE="BSD"
 SLOT="0/$(ver_cut 1)"
 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc examples fortran hypre lapack mpi openmp sparse +static-libs 
superlumt threads"
+IUSE="doc examples fortran hypre +int64 lapack mpi openmp sparse +static-libs 
superlumt threads"
 REQUIRED_USE="
        fortran? ( static-libs )
        hypre? ( mpi )
@@ -31,7 +31,7 @@ RDEPEND="
                virtual/mpi[fortran?]
        )
        sparse? ( sci-libs/klu )
-       superlumt? ( sci-libs/superlu_mt:= )
+       superlumt? ( sci-libs/superlu_mt:=[int64=] )
 "
 DEPEND="${RDEPEND}"
 
@@ -69,6 +69,7 @@ src_configure() {
                -DENABLE_SUPERLUMT=$(usex superlumt)
                -DEXAMPLES_INSTALL=ON
                -DEXAMPLES_INSTALL_PATH="/usr/share/doc/${PF}/examples"
+               -DSUNDIALS_INDEX_SIZE="$(usex int64 64 32)"
                -DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt"
                -DSUPERLUMT_LIBRARY="-lsuperlu_mt"
                -DUSE_GENERIC_MATH=ON

Reply via email to