From 48c2e7dbc3447577ebfe80e2475ec2ec2a90a810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 30 Sep 2025 12:55:40 +0200 Subject: [PATCH] sci-libs/blas-lapack-aux-wrapper: Update the wrappers to avoid DT_AUXILIARY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../blas-lapack-aux-wrapper-0-r1.ebuild | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sci-libs/blas-lapack-aux-wrapper/blas-lapack-aux-wrapper-0-r1.ebuild 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 0000000000000..fe8145a3b8a80 --- /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 +}