commit: d0f332fd1a8d38b7704945bb073f72c08ea5c460
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 27 12:19:02 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Oct 27 12:19:02 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0f332fd
sci-libs/blas-lapack-aux-wrapper: Bump to v1
Bump to v1 which fixes the sysroot logic to use Meson's cross file
rather than the non-portable '${CC} --print-sysroot', and fixes
combining paths while at it.
Closes: https://bugs.gentoo.org/965157
Closes: https://bugs.gentoo.org/965172
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sci-libs/blas-lapack-aux-wrapper/Manifest | 1 +
.../blas-lapack-aux-wrapper-1.ebuild | 111 +++++++++++++++++++++
2 files changed, 112 insertions(+)
diff --git a/sci-libs/blas-lapack-aux-wrapper/Manifest
b/sci-libs/blas-lapack-aux-wrapper/Manifest
index 754a89557ad4..0e6433ca7ce2 100644
--- a/sci-libs/blas-lapack-aux-wrapper/Manifest
+++ b/sci-libs/blas-lapack-aux-wrapper/Manifest
@@ -1,2 +1,3 @@
DIST blas-lapack-aux-wrapper-0.tar.xz 8356 BLAKE2B
765c1efad487d449064892ba8213232b245cb33159dcc35c3fda2552f72d8097ff8e21e711b81c4598a9c76a6ce2314fd86a5a1f171917f079ddb008d5547d64
SHA512
412662a79f2c01a12a0ac4e656710675487036172704ab88093f04626c5adb4770503b65184ce8546ac10d8b522ee2241cb6e638ccfc10a005bf6d55597a3830
+DIST blas-lapack-aux-wrapper-1.tar.xz 8696 BLAKE2B
887a7a4868d7d3de281030f2cb7215490d70324ee3669f55a0416e4502227e7e79ca160a26e94f9a77656740664f35f7a8ed25910e62c2bcf53441c0220c37be
SHA512
4397e9bbd2f55dc07dc3a0c65413d61abc9b27fa1d38a298930064661abccdfa485fc66fc2755bff3db0847457754742a2045d216f6f31d54d631c89d2920302
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-1.ebuild
b/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-1.ebuild
new file mode 100644
index 000000000000..d3faec21c78b
--- /dev/null
+++ b/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-1.ebuild
@@ -0,0 +1,111 @@
+# 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() {
+ 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
+}