diff options
| author | Michał Górny <mgorny@gentoo.org> | 2025-12-05 20:12:31 +0100 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2025-12-05 20:13:33 +0100 |
| commit | 2aa93166092d82889ac8fc1b8e63dfbaf86cacf8 (patch) | |
| tree | 712f35b8096e6c964281d7d3c41a327d9396a65a | |
| parent | 76d364576807fdd36900ec81188788b17b36cefc (diff) | |
| download | gentoo-2aa93166092d82889ac8fc1b8e63dfbaf86cacf8.tar.gz gentoo-2aa93166092d82889ac8fc1b8e63dfbaf86cacf8.tar.bz2 gentoo-2aa93166092d82889ac8fc1b8e63dfbaf86cacf8.zip | |
sci-libs/blas-lapack-aux-wrapper: Bump to 3
Bug: https://bugs.gentoo.org/967081
Signed-off-by: Michał Górny <mgorny@gentoo.org>
| -rw-r--r-- | sci-libs/blas-lapack-aux-wrapper/Manifest | 1 | ||||
| -rw-r--r-- | sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-3.ebuild | 116 |
2 files changed, 117 insertions, 0 deletions
diff --git a/sci-libs/blas-lapack-aux-wrapper/Manifest b/sci-libs/blas-lapack-aux-wrapper/Manifest index c4e176412126..d4802a1b7f99 100644 --- a/sci-libs/blas-lapack-aux-wrapper/Manifest +++ b/sci-libs/blas-lapack-aux-wrapper/Manifest @@ -1,4 +1,5 @@ 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 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 lapack-3.12.1.tar.gz 8067087 BLAKE2B 13fd3bbb6d1f23eb0add0a71d302af7af172d608b3e2354031d0b13cb7fbf243017d85b53ca04322983c5ed069ad3773510833d231d533b2dc417962cc24a817 SHA512 9749976d773830eb635498611c7f1247af8dece23fe8c08446243aa39bdcc20dd35fdc670345643cd1ec6828e379d5c2152009817e0b486c10fd89a06602e0fb diff --git a/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-3.ebuild b/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-3.ebuild new file mode 100644 index 000000000000..92c0166658fc --- /dev/null +++ b/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-3.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 +} |
