blob: 6ae6d3c2c939f197e4492e0deadb13794d0d24b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="A High-Performance CUDA Library for Sparse Matrix-Matrix Multiplication"
HOMEPAGE="https://docs.nvidia.com/cuda/cusparselt/index.html"
SRC_URI="
amd64? (
https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-x86_64/libcusparse_lt-linux-x86_64-${PV}-archive.tar.xz
)
arm64? (
https://developer.download.nvidia.com/compute/cusparselt/redist/libcusparse_lt/linux-sbsa/libcusparse_lt-linux-sbsa-${PV}-archive.tar.xz
)
"
# 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-v2020.10.12 NVIDIA-cuSPARSELt-v2020.10.12"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~amd64-linux ~arm64-linux"
RESTRICT="bindist mirror test"
QA_PREBUILT="/opt/cuda*/targets/*-linux/lib/*"
pkg_setup() {
if use amd64; then
export narch="x86_64"
elif use arm64; then
export narch="sbsa"
fi
}
src_prepare() {
cd "libcusparse_lt-linux-${narch}-${PV}-archive" || die
eapply_user
}
src_configure() {
:
}
src_compile() {
:
}
src_install() {
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" \
|| die
}
|