commit:     a6073612557924c3945efdac632cbe0423f37f81
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Mon Nov 10 20:57:28 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 10 23:56:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6073612

sci-libs/rocSOLVER: change SRC_URI and fix compilation with USE=sparse

* Switch SRC_URI to ROCm/rocm-libraries monorepo (ROCm/rocSOLVER is
  misaligned/not updated properly in this release)
* fix-includes patch is not needed for *real* release
* Update LICENSE (LICENSE file contains 2 licenses)
* Fix compilation with USE=sparse

Closes: https://bugs.gentoo.org/965913
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44581
Closes: https://github.com/gentoo/gentoo/pull/44581
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/rocSOLVER/Manifest                        |  2 +-
 .../files/rocSOLVER-7.1.0-fix-sparse.patch         | 22 ++++++++++++++++++++++
 ...LVER-7.1.0.ebuild => rocSOLVER-7.1.0-r1.ebuild} | 18 ++++++++++--------
 3 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/sci-libs/rocSOLVER/Manifest b/sci-libs/rocSOLVER/Manifest
index 0f29d5d3042a..5c61642645f7 100644
--- a/sci-libs/rocSOLVER/Manifest
+++ b/sci-libs/rocSOLVER/Manifest
@@ -1,4 +1,4 @@
 DIST rocSOLVER-6.3.3.tar.gz 3077208 BLAKE2B 
b3c5a8377b503b2639f81ae7457d233dd225f8422a9134148826d875cacac2cb03429734915c25ca8971c651c31071daccfad9ad4fcb66a034f38b5b991380aa
 SHA512 
5effc07c9ed5a22bfbb114fc9777e61e9b524c439ea98e0802e63490a27d4e17747de5eee74df59138bf8dcb8700b00a9074079ee3666bba630af2bab800a541
 DIST rocSOLVER-6.4.3.tar.gz 3151118 BLAKE2B 
84e533a9af91a6b12c1b7f967c7879c5a3d59a46e12aacb6814905f99f7de7c2cd1b429dd41e5b33b0eb63a5fae1ef6fb7d20a0508466b960a2d5c59b81c7a9a
 SHA512 
84a37d94ca55edfc5038425f1dc6f6658e34fbbfdd3e32be3f3668307e5590895c09c4e0769e4cd89af74a2a651c6311df7124b1bedf1a7375fa519560d95e9f
 DIST rocSOLVER-7.0.2.tar.gz 3195696 BLAKE2B 
65dae68611804184f82e6828dfd54905f7da0ad4cd56d1aa72f24e35b546e827884965d7acc94d8aba875db84726cb5da92ca8c5676777bfbd9250ccb8c37687
 SHA512 
8b4f9aa74dbb744daa33536872ae8c78098875533779ea7f5439a3422a0d1fdbb5d8158d3705946e6f19640ace847258b48fe0b612582f4037786dd845d7dae0
-DIST rocSOLVER-7.1.0.tar.gz 3169373 BLAKE2B 
3e2fc86a22be6d6c51fed69a16de1d79c404da0e09647b28428bd0da0bc8a0e810a75e74dfed953f9af37607dc7ec383082807f83239fe8ec1480144d069e527
 SHA512 
d9fb990c3bbfa00da14d77b130993391268b96764bff167179333563e84ccb2f49187e2601da8ca5fff01fdba9d5974c4e4ee1b133ce9bad565fa0d3b176b1b3
+DIST rocm-libraries-7.1.0.tar.gz 685280964 BLAKE2B 
ff19e082dc4452372b6a1c27bef15585946ae27d7ec03b0bbd598de66870a889fd4807b7baac4d74d37cfad066f41b5a3585f603fa42931d6e2563c64f245186
 SHA512 
2be789ada4fcba179dec1b23cdde86dcc8539e360b343f46ff8cd28cd817502244445e3b792cea48d707cc5384f605a00cb34796e569def9e7064f7b02c0e717

diff --git a/sci-libs/rocSOLVER/files/rocSOLVER-7.1.0-fix-sparse.patch 
b/sci-libs/rocSOLVER/files/rocSOLVER-7.1.0-fix-sparse.patch
new file mode 100644
index 000000000000..5d9a8709dea0
--- /dev/null
+++ b/sci-libs/rocSOLVER/files/rocSOLVER-7.1.0-fix-sparse.patch
@@ -0,0 +1,22 @@
+Mask unused dlopen/dlsym functions when rocsparse is linked directly
+https://github.com/ROCm/rocm-libraries/issues/2585
+--- a/library/src/refact/rocsolver_rfinfo.cpp
++++ b/library/src/refact/rocsolver_rfinfo.cpp
+@@ -62,6 +62,8 @@
+         }                                                          \
+     } while(0)
+ 
++#ifndef HAVE_ROCSPARSE
++
+ ROCSOLVER_BEGIN_NAMESPACE
+ 
+ template <typename Fn>
+@@ -217,6 +219,8 @@ static bool try_load_rocsparse()
+ 
+ ROCSOLVER_END_NAMESPACE
+ 
++#endif // HAVE_ROCSPARSE
++
+ extern "C" rocblas_status rocsolver_create_rfinfo(rocsolver_rfinfo* rfinfo, 
rocblas_handle handle)
+ {
+ #ifndef HAVE_ROCSPARSE

diff --git a/sci-libs/rocSOLVER/rocSOLVER-7.1.0.ebuild 
b/sci-libs/rocSOLVER/rocSOLVER-7.1.0-r1.ebuild
similarity index 80%
rename from sci-libs/rocSOLVER/rocSOLVER-7.1.0.ebuild
rename to sci-libs/rocSOLVER/rocSOLVER-7.1.0-r1.ebuild
index 04812f5361ed..58c63e2032d5 100644
--- a/sci-libs/rocSOLVER/rocSOLVER-7.1.0.ebuild
+++ b/sci-libs/rocSOLVER/rocSOLVER-7.1.0-r1.ebuild
@@ -9,10 +9,12 @@ inherit cmake edo flag-o-matic rocm
 
 DESCRIPTION="Implementation of a subset of LAPACK functionality on the ROCm 
platform"
 
HOMEPAGE="https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocsolver";
-SRC_URI="https://github.com/ROCm/rocSOLVER/archive/rocm-${PV}.tar.gz -> 
rocSOLVER-${PV}.tar.gz"
-S=${WORKDIR}/${PN}-rocm-${PV}
 
-LICENSE="BSD"
+# ROCm/rocSOLVER 7.1.0 release is incorrect - 
https://github.com/ROCm/rocm-libraries/issues/2582
+SRC_URI="https://github.com/ROCm/rocm-libraries/archive/refs/tags/rocm-${PV}.tar.gz
 -> rocm-libraries-${PV}.tar.gz"
+S="${WORKDIR}/rocm-libraries-rocm-${PV}/projects/rocsolver"
+
+LICENSE="BSD-2 BSD"
 SLOT="0/$(ver_cut 1-2)"
 KEYWORDS="~amd64"
 
@@ -39,9 +41,10 @@ BDEPEND="
 
 RESTRICT="!test? ( test )"
 
-PATCHES=(
-       "${FILESDIR}"/${PN}-7.0.1-fix-includes.patch
-)
+src_unpack() {
+       local ROCSOLVER="rocm-libraries-rocm-${PV}/projects/rocsolver"
+       tar -xzf "${DISTDIR}/${A}" "${ROCSOLVER}" -C "${WORKDIR}" || die
+}
 
 src_configure() {
        rocm_use_clang
@@ -52,13 +55,12 @@ src_configure() {
        local mycmakeargs=(
                -DCMAKE_SKIP_RPATH=ON
                -DAMDGPU_TARGETS="$(get_amdgpu_flags)"
-               -Wno-dev
-               -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
                -DROCM_SYMLINK_LIBS=OFF
                -DBUILD_CLIENTS_SAMPLES=OFF
                -DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
                -DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF)
                -DBUILD_WITH_SPARSE=$(usex sparse ON OFF)
+               -Wno-dev
        )
 
        if use benchmark || use test; then

Reply via email to