commit:     c6902b80403a506ebe337818c849f7d468294927
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  7 17:53:50 2021 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Sep  7 17:54:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6902b80

sci-libs/mumps: new revision to fix more underlinking.

When building without USE=mpi, the various lib*mumps libraries use
LAPACK symbols without actually linking to liblapack. There are
already a bunch of hacks in the mumps ebuild to work around these
issues, so all I've done is add one more. As a simple test case,
you can try to run the test suite for sci-libs/coinor-clp with
USE="mumps metis", which now works.

Closes: https://bugs.gentoo.org/777840
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-libs/mumps/{mumps-5.3.5.ebuild => mumps-5.3.5-r1.ebuild} | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sci-libs/mumps/mumps-5.3.5.ebuild 
b/sci-libs/mumps/mumps-5.3.5-r1.ebuild
similarity index 97%
rename from sci-libs/mumps/mumps-5.3.5.ebuild
rename to sci-libs/mumps/mumps-5.3.5-r1.ebuild
index 76f2dbe8d4d..8f970661e82 100644
--- a/sci-libs/mumps/mumps-5.3.5.ebuild
+++ b/sci-libs/mumps/mumps-5.3.5-r1.ebuild
@@ -25,6 +25,7 @@ RDEPEND="
                mpi? ( >=sci-libs/parmetis-4 )
        )
        mpi? ( sci-libs/scalapack )
+       !mpi? ( virtual/lapack )
        scotch? ( >=sci-libs/scotch-6.0.1:=[mpi=] )
 "
 DEPEND="${RDEPEND}"
@@ -83,6 +84,8 @@ src_prepare() {
 }
 
 src_configure() {
+       # We abuse LIBADD here to work around the fact that MUMPS is criminally
+       # underlinked.
        LIBADD="$($(tc-getPKG_CONFIG) --libs blas) -Llib -lpord"
        local ord="-Dpord"
 
@@ -132,6 +135,7 @@ src_configure() {
                        -e "s;^\(SCALAP\s*=\).*;\1;" \
                        -e 's;^LIBSEQNEEDED =;LIBSEQNEEDED = libseqneeded;g' \
                        Makefile.inc || die
+               LIBADD="${LIBADD} $($(tc-getPKG_CONFIG) --libs lapack)"
                export LINK="$(tc-getFC)"
        fi
        sed -i -e "s;^\s*\(ORDERINGSF\s*=\).*;\1 ${ord};" Makefile.inc || die

Reply via email to