commit:     1f98ab5d5e517615a236f362df5e8fde24667702
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Wed May 21 21:28:14 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 22 16:07:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f98ab5d

dev-libs/cusparselt: fix install

Dropped the old S value when adding support for arm64. Given that S is not the
same for arm64 and amd64 we need to do some extra work.

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42196
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/cusparselt/cusparselt-0.7.1.0.ebuild | 34 ++++++++++++++++-----------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/dev-libs/cusparselt/cusparselt-0.7.1.0.ebuild 
b/dev-libs/cusparselt/cusparselt-0.7.1.0.ebuild
index 438f7fadd754..85894ad9e12a 100644
--- a/dev-libs/cusparselt/cusparselt-0.7.1.0.ebuild
+++ b/dev-libs/cusparselt/cusparselt-0.7.1.0.ebuild
@@ -14,38 +14,44 @@ SRC_URI="
        )
 "
 
+# The package contains a directory with the archive name minus the extension.
+# So to handle arm64/amd64 we use WORKDIR here
+S="${WORKDIR}"
+
 LICENSE="NVIDIA-SDK"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~amd64-linux ~arm64-linux"
 RESTRICT="bindist mirror test"
 
-RDEPEND="
-       dev-util/nvidia-cuda-toolkit
-"
-
 QA_PREBUILT="/opt/cuda*/targets/*-linux/lib/*"
 
-src_prepare(){
-       :
+pkg_setup() {
+       if use amd64; then
+               export narch="x86_64"
+       elif use arm64; then
+               export narch="sbsa"
+       fi
 }
 
-src_configure(){
+src_prepare() {
+       cd "libcusparse_lt-linux-${narch}-${PV}-archive" || die
+
+       eapply_user
+}
+
+src_configure() {
        :
 }
 
-src_compile(){
+src_compile() {
        :
 }
 
 src_install() {
-       local narch
-       if use amd64; then
-               narch="x86_64"
-       elif use arm64; then
-               narch="sbsa"
-       fi
+       cd "libcusparse_lt-linux-${narch}-${PV}-archive" || die
 
        # allow slotted install
+       mkdir -vp 
"${ED}${CUDNN_PATH:-${EPREFIX}/opt/cuda}/targets/${narch}-linux" || die
        mv \
                include lib \
                
"${ED}${CUDNN_PATH:-${EPREFIX}/opt/cuda}/targets/${narch}-linux" \

Reply via email to