commit: dc91401986c339d0a451d70768e8e4c53a1ab169
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 14 18:29:53 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 14 18:34:44 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc914019
sci-libs/blas-lapack-aux-wrapper: Bump to 5
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sci-libs/blas-lapack-aux-wrapper/Manifest | 1 +
.../blas-lapack-aux-wrapper-5.ebuild | 116 +++++++++++++++++++++
2 files changed, 117 insertions(+)
diff --git a/sci-libs/blas-lapack-aux-wrapper/Manifest
b/sci-libs/blas-lapack-aux-wrapper/Manifest
index 3ab9314deb6c..df8df2bbc794 100644
--- a/sci-libs/blas-lapack-aux-wrapper/Manifest
+++ b/sci-libs/blas-lapack-aux-wrapper/Manifest
@@ -3,4 +3,5 @@ DIST blas-lapack-aux-wrapper-1.tar.xz 8696 BLAKE2B
887a7a4868d7d3de281030f2cb721
DIST blas-lapack-aux-wrapper-2.tar.xz 8684 BLAKE2B
194c182f690341756fcd801354e08f351fdf6d6ff9fec19270b022b2c4d033ab023631bc7b89f7e9c6898dc0df4df770f8db1c92d7fd697c315a25006c0a851e
SHA512
087b7ba6febee81221295494c2d8cdd285dc9d1d9c34725f87def1d1b3dfd6d32f0474b84b32159613c30ace0f29f79fe9230aaa37585db918ec176e2ef51809
DIST blas-lapack-aux-wrapper-3.tar.xz 8928 BLAKE2B
4c2bbd067b1aa0ffcc3d3d39d93ebeb6600212e7da4ea9a14338ba00079cbfd29414297b1f37e55df8009ed6f3d2de1812a84551e4a3916414c96ee76b68fc50
SHA512
d67099a82f7987eb6e4a5bf1563f5e6e7060b246a5220655427a97fb6d6e32c75a098436770fc9c89da99f5755d58b4393f757c7361f29834dde808ae8c7deea
DIST blas-lapack-aux-wrapper-4.tar.xz 8968 BLAKE2B
0bed19d783bcc4ec1d2e9f7d97356ac788044f16a01a7725924593ea36647869684afc940c497ac46a630742a8de9a096ed6732a543ec675c0cccf9bbb656f3e
SHA512
3abf61049a968d490a64452ff8b842455731c62592366eed7cc12750d64ede73abb8a353ee271560c162c3415b864caef341afd8df250e6ffaf6a19161ecbcf8
+DIST blas-lapack-aux-wrapper-5.tar.xz 9536 BLAKE2B
0e9ee1bcec2075bdde7252fb05f40d5578ca688d9953c422b2aa49728d0b07725590fba6f4a3e1ab5de8cd4a48cf6cc7ad36a5cc3a9d13efd57845938c4e74e9
SHA512
a899ef008fba50748faf1d8cf13f1fa78e707b58fc1baceb9f23fa44922d21e88e70be6fda4555290731bff8b3bdac9664a2bf1ee25b59bfe41cef42ab57dd5a
DIST lapack-3.12.1.tar.gz 8067087 BLAKE2B
13fd3bbb6d1f23eb0add0a71d302af7af172d608b3e2354031d0b13cb7fbf243017d85b53ca04322983c5ed069ad3773510833d231d533b2dc417962cc24a817
SHA512
9749976d773830eb635498611c7f1247af8dece23fe8c08446243aa39bdcc20dd35fdc670345643cd1ec6828e379d5c2152009817e0b486c10fd89a06602e0fb
diff --git a/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-5.ebuild
b/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-5.ebuild
new file mode 100644
index 000000000000..92c0166658fc
--- /dev/null
+++ b/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-5.ebuild
@@ -0,0 +1,116 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+
+inherit meson python-any-r1 toolchain-funcs
+
+LAPACK_VER=3.12.1
+DESCRIPTION="BLAS/LAPACK wrappers for FlexiBLAS"
+HOMEPAGE="https://gitweb.gentoo.org/proj/blas-lapack-aux-wrapper.git/"
+SRC_URI="
+ https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz
+ test? (
+
https://github.com/Reference-LAPACK/lapack/archive/v${LAPACK_VER}.tar.gz
+ -> lapack-${LAPACK_VER}.tar.gz
+ )
+"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="index64 test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sci-libs/lapack[-flexiblas(-)]
+ >=sci-libs/flexiblas-3.4.82-r4:=[index64(-)?]
+"
+DEPEND="
+ ${RDEPEND}
+ sci-libs/lapack:=[flexiblas(-),index64(-)?,lapacke]
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+"
+
+# we do not call the compiler, only the linker
+QA_FLAGS_IGNORED=".*"
+
+src_configure() {
+ # We rely on some specific linker features (bug #965199)
+ if ! tc-ld-is-bfd && ! tc-ld-is-lld; then
+ tc-ld-force-bfd
+ fi
+
+ local emesonargs=(
+ -Dilp64=$(usex index64 true false)
+ )
+
+ meson_src_configure
+}
+
+check_result() {
+ local f=${1}
+
+ if ! grep -q "flexiblas.*TRIGGER-WARNING" "${f}.out"; then
+ die "No FlexiBLAS output found in ${f}.out"
+ fi
+ if grep -q -i "FAIL" "${f}.out"; then
+ die "Test failed in ${f}.out"
+ fi
+}
+
+run_test() {
+ local f=${1}
+
+ einfo "Running ${f} ..."
+ "${f}" &> "${f}.out" || die "Running ${f} failed"
+ check_result "${f}"
+}
+
+src_test() {
+ # Force a nonexisting provider to:
+ # a. get indication that FlexiBLAS is actually used on stderr.
+ # b. force fallback to Netlib LAPACK.
+ local -x FLEXIBLAS=trigger-warning
+ tc-export CC FC AR RANLIB
+
+ cd "${WORKDIR}/lapack-${LAPACK_VER}" || die
+ cat > make.inc <<-EOF || die
+ FFLAGS_DRV = \$(FFLAGS)
+ FFLAGS_NOOPT = \$(FFLAGS) -O0
+ ARFLAGS = rv
+
+ BLASLIB = ${BUILD_DIR}/libblas.so
+ CBLASLIB = ${BUILD_DIR}/libcblas.so
+ LAPACKLIB = ${BUILD_DIR}/liblapack.so
+ TMGLIB = \$(TOPSRCDIR)/libtmglib.a
+ LAPACKELIB = ${BUILD_DIR}/liblapacke.so
+ EOF
+
+ emake -C BLAS/TESTING xblat1d
+ emake -C CBLAS include/cblas_mangling.h
+ run_test BLAS/TESTING/xblat1d
+
+ emake -C CBLAS/testing xdcblat1
+ run_test CBLAS/testing/xdcblat1
+
+ emake -C TESTING/MATGEN
+ emake -C TESTING dbb.out
+ check_result TESTING/dbb
+}
+
+src_install() {
+ meson_src_install
+
+ local f
+ cd "${ED}/usr/$(get_libdir)" || die
+ mkdir blas-lapack-aux-wrapper || die
+ mv lib* blas-lapack-aux-wrapper/ || die
+ for f in blas-lapack-aux-wrapper/*.so; do
+ ln -s "${f}" || die
+ done
+}