commit:     0a697ca6cc1ebec0419162e59cfc3170b622e124
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 22 14:18:09 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Aug 22 18:40:16 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a697ca6

sci-libs/flexiblas: Bump to 3.4.82

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sci-libs/flexiblas/Manifest                |   1 +
 sci-libs/flexiblas/flexiblas-3.4.82.ebuild | 100 +++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+)

diff --git a/sci-libs/flexiblas/Manifest b/sci-libs/flexiblas/Manifest
index 327f749153db..cc20f586aef8 100644
--- a/sci-libs/flexiblas/Manifest
+++ b/sci-libs/flexiblas/Manifest
@@ -1 +1,2 @@
 DIST flexiblas-3.4.5.tar.xz 16793688 BLAKE2B 
a01c2d02c96d67ccfd560e6623fb1f7f5058fb272b097591b5a62424c04bcf3927669e3b6bf2714adce80822655b9a3a415550365a46a26c8047635e944e8685
 SHA512 
7a6367d452775d29426c1811b00188030c0e192330357d99a75ec8336d1da923450717c18bcc0949f86d7c8584552c3ad7d662e433437fc98f5490c403f072d1
+DIST flexiblas-release-v3.4.82.tar.bz2 80430275 BLAKE2B 
60791aa3a77ce7ad1e9e0ad1a6739e7c9d187328b78bb49014cfbf6d57316b8edd721141a8687e783d0cb78bbd8f6e0911b2557afaba1c262d9771d68c1679bf
 SHA512 
2af8159e7a43265e4276cf759a75526c2294682276e186c73e22551dbbb1804d1e9e9414f9213c80589fb81d96510156bedd11db0c1e5ff10091da9e624b9f89

diff --git a/sci-libs/flexiblas/flexiblas-3.4.82.ebuild 
b/sci-libs/flexiblas/flexiblas-3.4.82.ebuild
new file mode 100644
index 000000000000..4567dfaaddb1
--- /dev/null
+++ b/sci-libs/flexiblas/flexiblas-3.4.82.ebuild
@@ -0,0 +1,100 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+MY_P=flexiblas-release-v${PV}
+DESCRIPTION="A BLAS and LAPACK wrapper library with runtime exchangable 
backends"
+HOMEPAGE="
+       https://www.mpi-magdeburg.mpg.de/projects/flexiblas/
+       https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release/
+"
+SRC_URI="
+       
https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release/-/archive/v${PV}/${MY_P}.tar.bz2
+"
+S=${WORKDIR}/${MY_P}
+
+# BSD for vendored cblas/lapacke
+LICENSE="LGPL-3+ BSD"
+SLOT="0"
+# TODO: mkl, 64bit-index
+IUSE="blis openblas openmp test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       sci-libs/lapack:=[deprecated]
+       blis? ( sci-libs/blis:=[-64bit-index] )
+       openblas? ( sci-libs/openblas:= )
+"
+RDEPEND="
+       ${DEPEND}
+"
+
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
+               tc-check-openmp
+       fi
+}
+
+pkg_setup() {
+       if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
+               tc-check-openmp
+       fi
+}
+
+src_prepare() {
+       cmake_src_prepare
+
+       # remove bundled netlib blas/lapack
+       # (we still need vendored cblas/lapacke)
+       rm -r contributed/lapack-* || die
+}
+
+src_configure() {
+       EXTRA_BACKENDS=( $(usev blis) $(usev openblas) )
+       local extra=${EXTRA_BACKENDS[*]}
+       local libdir="${ESYSROOT}/usr/$(get_libdir)"
+       local mycmakeargs=(
+               -DTESTS=$(usex test)
+               -DCBLAS=ON
+               # TODO: ILP64 variant
+               -DINTEGER8=OFF
+               -DLAPACK=ON
+               -DLINK_OPENMP=$(usex openmp)
+               -DEXAMPLES=OFF
+               # disable autodetection, we don't want automagic deps
+               # plus openblas/blis gets hardcoded as openmp/pthread/serial
+               -DBLAS_AUTO_DETECT=OFF
+               -DEXTRA="${extra// /;}"
+               # respect CFLAGS
+               -DLTO=OFF
+               # use system sci-libs/lapack
+               -DSYS_BLAS_LIBRARY="${libdir}/libblas.so"
+               -DSYS_LAPACK_LIBRARY="${libdir}/liblapack.so"
+               # these are used only with -DEXTRA
+               -Dblis_LIBRARY="${libdir}/libblis.so"
+               -Dopenblas_LIBRARY="${libdir}/libopenblas.so"
+       )
+
+       cmake_src_configure
+}
+
+src_test() {
+       # We run tests in parallel, so avoid having n^2 threads.
+       local -x BLIS_NUM_THREADS=1
+       local -x OMP_NUM_THREADS=1
+       local -x OPENBLAS_NUM_THREADS=1
+
+       local backend
+       for backend in netlib "${EXTRA_BACKENDS[@]}"; do
+               local -x FLEXIBLAS_TEST=${backend}
+               local log=${BUILD_DIR}/Testing/Temporary/LastTest.log
+               einfo "Testing backend ${backend}"
+               cmake_src_test
+               if grep -q 'BLAS backend .* not found' "${log}"; then
+                       die "Backend ${backend} failed to load while testing, 
see ${log}"
+               fi
+       done
+}

Reply via email to