commit:     48c2e7dbc3447577ebfe80e2475ec2ec2a90a810
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 30 10:55:40 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Sep 30 11:02:41 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48c2e7db

sci-libs/blas-lapack-aux-wrapper: Update the wrappers to avoid DT_AUXILIARY

Update the wrapper approach to avoid DT_AUXILIARY in the default case.
Now, libblas.so.3 & co. are symlinks to the FlexiBLAS library, so that
packages use it directly; libblas.so & co. are symlinks to wrappers
placed in a subdirectory, so they are only used to construct the correct
DT_NEEDED entries at build time.  The advantage of this approach is that
it also works on musl, so we do not have to use two different solutions.

We are still using the full library symlink tree for the wrapper
to avoid another fight with Meson, and hopefully to reduce the risk
of compatibility issues.  The library still contains DT_AUXILIARY
section, and it could still be used if one dlopens the top-level .so
file directly (rather than the .so.3).

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

 .../blas-lapack-aux-wrapper-0-r1.ebuild            | 52 ++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git 
a/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-0-r1.ebuild 
b/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-0-r1.ebuild
new file mode 100644
index 000000000000..fe8145a3b8a8
--- /dev/null
+++ b/sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-0-r1.ebuild
@@ -0,0 +1,52 @@
+# 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
+
+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";
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="index64"
+
+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
+}
+
+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
+}

Reply via email to