1 |
commit: e3006c4d1fd8b391598a5b7e138ebe57fe7aa35a |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 24 09:26:10 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 24 09:26:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3006c4d |
7 |
|
8 |
dev-util/nvidia-cuda-toolkit: drop 11.1.1-r2, 11.2.2, 11.3.1, 11.4.0, 11.4.1-r2 |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/22352 |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
dev-util/nvidia-cuda-toolkit/Manifest | 5 - |
14 |
.../nvidia-cuda-toolkit-11.1.1-r2.ebuild | 227 ------------------ |
15 |
.../nvidia-cuda-toolkit-11.2.2.ebuild | 253 --------------------- |
16 |
.../nvidia-cuda-toolkit-11.3.1.ebuild | 252 -------------------- |
17 |
.../nvidia-cuda-toolkit-11.4.0.ebuild | 252 -------------------- |
18 |
.../nvidia-cuda-toolkit-11.4.1-r2.ebuild | 252 -------------------- |
19 |
6 files changed, 1241 deletions(-) |
20 |
|
21 |
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest |
22 |
index 0afbfad0db5..ecde3cae13e 100644 |
23 |
--- a/dev-util/nvidia-cuda-toolkit/Manifest |
24 |
+++ b/dev-util/nvidia-cuda-toolkit/Manifest |
25 |
@@ -1,7 +1,2 @@ |
26 |
DIST cuda_10.2.89_440.33.01_linux.run 2645419389 BLAKE2B 236aa70a7b45e3636c2c229fffa7d1ca0699ab4365865a73edab607a209c42c2899133dd6a83c61c5929fa754668ad15aec4d847639af1c00a8e6657c8487c77 SHA512 ad8da539ff5df7caf411d1e497ff3d6978cfa8a1fd9150fa4846089e92a604ea56be8631f3efdfe7229a655b8d2d28e6edb32f5731530a77d6f00241cc7aab6e |
27 |
-DIST cuda_11.1.1_455.32.00_linux.run 3532172082 BLAKE2B f4af6bd87c419c002b4913ea7cfcbc84c78e3da485a7ac7dff0da483347cb38bde020e70c7352fe995a2efe0b8e97a156e0536f87aef69ff13fdf6e75fa634d1 SHA512 3da629e6f63548d06050a77d6ad2dbf314db33b2bf4e7d1659f039b3d9ad2ad3f87a6e506ec54db9ca2d21ac7b5ec576748082684bbab3b6642c03d2793d73a9 |
28 |
-DIST cuda_11.2.2_460.32.03_linux.run 3057439068 BLAKE2B c3f3cd9eaaa4f91eb8080e7cafe1280f9bbc9cfc71ce1a6115af1dd348b83d30eed945609bf87e00d4873bede1fa9136fc4a7f393fd31db4e6406dc76086bc22 SHA512 e28d7d2eabd96df9e18f8e55f61adda39b07c2223605f77a6c2d92a02f7b57e9ce8b83d4b4de1124faa5670509d204d3db70c03b18af5cc5964b6ed6653d6a22 |
29 |
-DIST cuda_11.3.1_465.19.01_linux.run 3158494112 BLAKE2B 0316c6a9bf062f2503c94604b51dea9a8d19c516e304e43ccdbc79f305a242664b7f029f7b7086edd7adc37d92a3bae074f005b3be412e1361917794cb824686 SHA512 e2db8b4dcb5f6aee2c3e8a8a6848186cdcdd7cd9d5f4bfd069bd3dc2ea500797c66a4592f0e28dcbee6c3611d1f88b6fda6afcd734aa9ef45f4aa17a1527aedb |
30 |
-DIST cuda_11.4.0_470.42.01_linux.run 3773273383 BLAKE2B 2e466728b6ca9d17dc3caadce13b58c8ba1464c2adeb09739f428aea96f5794c87bf84ca2b81c1019d45223ff5e519503d798032a800a370c7e41517d790f5c4 SHA512 17165102e7f64da77588fd47feeee5ce3f3151a2b482bdc005427ad77ada5d0ff5a51dcd40a27a467cd5988968469476ba90b0191aed993806d284833a08ccb1 |
31 |
-DIST cuda_11.4.1_470.57.02_linux.run 3796641626 BLAKE2B da6a454bb1765833af8c01f2106a1e0f3e33a6a91354a527006fd0335655872b499bb51662c8e224437368ee37c3bf15f0cf0c4bccc02750e46480ceb6b84677 SHA512 a7a2415e6a0ce6a841e15fccc5c6126d8f134ebb7045e11e49d136aed264c236b91cc959320f763d0d7d878d9d83e09310a51c0ac30c926007dae07242a952de |
32 |
DIST cuda_11.4.2_470.57.02_linux.run 3833993301 BLAKE2B b12710da9f31e3255f31dd6b0dab8545463983a4cd1c4432bea027d4e5cc4d1ad9183e09b70ac4ea19c7d3e959df0d19bb41ea896d726e877fd3917a3045a9a4 SHA512 50c80141bfe458aa7216173d9d548f25ade03c68fff59ffe63f842773e5afba7635fb8fd79eda416507e1e88b5fe28b39ac8bdc66b168c73a72995824af5c689 |
33 |
|
34 |
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.1.1-r2.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.1.1-r2.ebuild |
35 |
deleted file mode 100644 |
36 |
index c1df314703c..00000000000 |
37 |
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.1.1-r2.ebuild |
38 |
+++ /dev/null |
39 |
@@ -1,227 +0,0 @@ |
40 |
-# Copyright 1999-2021 Gentoo Authors |
41 |
-# Distributed under the terms of the GNU General Public License v2 |
42 |
- |
43 |
-EAPI=7 |
44 |
- |
45 |
-inherit check-reqs toolchain-funcs unpacker |
46 |
- |
47 |
-DRIVER_PV="455.32.00" |
48 |
- |
49 |
-DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" |
50 |
-HOMEPAGE="https://developer.nvidia.com/cuda-zone" |
51 |
-SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" |
52 |
- |
53 |
-LICENSE="NVIDIA-CUDA" |
54 |
-SLOT="0/${PV}" |
55 |
-KEYWORDS="-* ~amd64 ~amd64-linux" |
56 |
-IUSE="debugger nsight profiler vis-profiler sanitizer" |
57 |
-RESTRICT="bindist mirror" |
58 |
- |
59 |
-BDEPEND="" |
60 |
-RDEPEND=" |
61 |
- <sys-devel/gcc-11_pre[cxx] |
62 |
- >=x11-drivers/nvidia-drivers-${DRIVER_PV} |
63 |
- debugger? ( |
64 |
- dev-libs/openssl |
65 |
- sys-libs/libtermcap-compat |
66 |
- sys-libs/ncurses-compat:5[tinfo] |
67 |
- ) |
68 |
- vis-profiler? ( |
69 |
- dev-libs/openssl |
70 |
- >=virtual/jre-1.8:* |
71 |
- )" |
72 |
- |
73 |
-S="${WORKDIR}" |
74 |
- |
75 |
-QA_PREBUILT="opt/cuda/*" |
76 |
- |
77 |
-CHECKREQS_DISK_BUILD="6800M" |
78 |
- |
79 |
-pkg_setup() { |
80 |
- check-reqs_pkg_setup |
81 |
-} |
82 |
- |
83 |
-src_prepare() { |
84 |
- local cuda_supported_gcc |
85 |
- |
86 |
- # ATTENTION: change requires revbump |
87 |
- cuda_supported_gcc="4.7 4.8 4.9 5.3 5.4 6.3 6.4 7.2 7.3 8.2 8.3 8.4 9.2 9.3 10.2" |
88 |
- |
89 |
- sed \ |
90 |
- -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ |
91 |
- "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die |
92 |
- |
93 |
- default |
94 |
-} |
95 |
- |
96 |
-src_install() { |
97 |
- local cudadir=/opt/cuda |
98 |
- local ecudadir="${EPREFIX}${cudadir}" |
99 |
- dodir ${cudadir} |
100 |
- into ${cudadir} |
101 |
- |
102 |
- # Install standard sub packages |
103 |
- local builddirs=( |
104 |
- builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx} |
105 |
- builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} |
106 |
- $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") |
107 |
- $(usex vis-profiler "builds/cuda_nvvp" "") |
108 |
- $(usex debugger "builds/cuda_gdb" "") |
109 |
- ) |
110 |
- |
111 |
- local d |
112 |
- for d in "${builddirs[@]}"; do |
113 |
- ebegin "Installing ${d}" |
114 |
- [[ -d ${d} ]] || die "Directory does not exist: ${d}" |
115 |
- |
116 |
- if [[ -d ${d}/bin ]]; then |
117 |
- local f |
118 |
- for f in ${d}/bin/*; do |
119 |
- if [[ -f ${f} ]]; then |
120 |
- dobin "${f}" |
121 |
- else |
122 |
- insinto ${cudadir}/bin |
123 |
- doins -r "${f}" |
124 |
- fi |
125 |
- done |
126 |
- fi |
127 |
- |
128 |
- insinto ${cudadir} |
129 |
- if [[ -d ${d}/targets ]]; then |
130 |
- doins -r "${d}"/targets |
131 |
- fi |
132 |
- if [[ -d ${d}/share ]]; then |
133 |
- doins -r "${d}"/share |
134 |
- fi |
135 |
- if [[ -d ${d}/extras ]]; then |
136 |
- doins -r "${d}"/extras |
137 |
- fi |
138 |
- eend |
139 |
- done |
140 |
- dobin "${T}"/cuda-config |
141 |
- |
142 |
- doins builds/EULA.txt |
143 |
- # nvml and nvvm need special handling |
144 |
- ebegin "Installing nvvm" |
145 |
- doins -r builds/cuda_nvcc/nvvm |
146 |
- exeinto ${cudadir}/nvvm/bin |
147 |
- doexe builds/cuda_nvcc/nvvm/bin/cicc |
148 |
- eend |
149 |
- |
150 |
- ebegin "Installing nvml" |
151 |
- doins -r builds/cuda_nvml_dev/nvml |
152 |
- eend |
153 |
- |
154 |
- if use sanitizer; then |
155 |
- ebegin "Installing sanitizer" |
156 |
- dobin builds/integration/Sanitizer/compute-sanitizer |
157 |
- doins -r builds/cuda_sanitizer_api/Sanitizer |
158 |
- # special handling for the executable |
159 |
- exeinto ${cudadir}/Sanitizer |
160 |
- doexe builds/cuda_sanitizer_api/Sanitizer/compute-sanitizer |
161 |
- eend |
162 |
- fi |
163 |
- |
164 |
- if use vis-profiler; then |
165 |
- ebegin "Installing libnvvp" |
166 |
- doins -r builds/cuda_nvvp/libnvvp |
167 |
- # special handling for the executable |
168 |
- exeinto ${cudadir}/libnvvp |
169 |
- doexe builds/cuda_nvvp/libnvvp/nvvp |
170 |
- eend |
171 |
- fi |
172 |
- |
173 |
- if use nsight; then |
174 |
- local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
175 |
- ebegin "Installing ${ncu_dir}" |
176 |
- mv builds/nsight_compute builds/${ncu_dir} || die |
177 |
- doins -r builds/${ncu_dir} |
178 |
- |
179 |
- exeinto ${cudadir}/${ncu_dir} |
180 |
- doexe builds/${ncu_dir}/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} |
181 |
- |
182 |
- exeinto ${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64 |
183 |
- doexe builds/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/{ncu-ui,ncu-ui.bin,CrashReporter} |
184 |
- dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} |
185 |
- eend |
186 |
- |
187 |
- local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
188 |
- ebegin "Installing ${nsys_dir}" |
189 |
- mv builds/nsight_systems builds/${nsys_dir} || die |
190 |
- doins -r builds/${nsys_dir} |
191 |
- exeinto ${cudadir}/${nsys_dir}/target-linux-x64 |
192 |
- doexe builds/${nsys_dir}/target-linux-x64/nsys |
193 |
- |
194 |
- exeinto ${cudadir}/${nsys_dir}/host-linux-x64 |
195 |
- doexe builds/${nsys_dir}/host-linux-x64/{nsight-sys,nsight-sys.bin,nsys-ui,CrashReporter,ImportNvtxt,QdstrmImporter,ResolveSymbols} |
196 |
- dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} |
197 |
- eend |
198 |
- # TODO: unbundle qt5 |
199 |
- # TODO: unbundle boost |
200 |
- # TODO: unbundle icu |
201 |
- # TODO: unbundle openssl |
202 |
- # TODO: unbundle mesa |
203 |
- # TODO: unbundle libz |
204 |
- # TODO: unbundle libstdc++ |
205 |
- # TODO: unbundle libSshClient |
206 |
- # TODO: unbundle sqlite |
207 |
- # TODO: unbundle libpfm ? |
208 |
- fi |
209 |
- |
210 |
- # Add include and lib symlinks |
211 |
- dosym "targets/x86_64-linux/include" ${cudadir}/include |
212 |
- dosym "targets/x86_64-linux/lib" ${cudadir}/lib64 |
213 |
- |
214 |
- newenvd - 99cuda <<-EOF |
215 |
- PATH=${ecudadir}/bin$(usex vis-profiler ":${ecudadir}/libnvvp" "") |
216 |
- ROOTPATH=${ecudadir}/bin |
217 |
- LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64$(usex profiler ":${ecudadir}/extras/CUPTI/lib64" "") |
218 |
- EOF |
219 |
- |
220 |
- # Cuda prepackages libraries, don't revdep-build on them |
221 |
- insinto /etc/revdep-rebuild |
222 |
- newins - 80${PN} <<-EOF |
223 |
- SEARCH_DIRS_MASK="${ecudadir}" |
224 |
- EOF |
225 |
- # TODO: Find a better way to add +x permission to installed executables |
226 |
- # TODO: Add pkgconfig files for installed libraries |
227 |
-} |
228 |
- |
229 |
-pkg_postinst_check() { |
230 |
- local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" |
231 |
- local b="0.0" |
232 |
- local v |
233 |
- for v in ${a}; do |
234 |
- ver_test "${v}" -gt "${b}" && b="${v}" |
235 |
- done |
236 |
- |
237 |
- # if gcc and if not gcc-version is at least greatest supported |
238 |
- if tc-is-gcc && \ |
239 |
- ver_test $(gcc-version) -gt "${b}"; then |
240 |
- ewarn |
241 |
- ewarn "gcc > ${b} will not work with CUDA" |
242 |
- ewarn "Make sure you set an earlier version of gcc with gcc-config" |
243 |
- ewarn "or append --compiler-bindir= pointing to a gcc bindir like" |
244 |
- ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" |
245 |
- ewarn "to the nvcc compiler flags" |
246 |
- ewarn |
247 |
- fi |
248 |
-} |
249 |
- |
250 |
-pkg_postinst() { |
251 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
252 |
- pkg_postinst_check |
253 |
- fi |
254 |
- |
255 |
- if use profiler || use nsight; then |
256 |
- einfo |
257 |
- einfo "nvidia-drivers restrict access to performance counters." |
258 |
- einfo "You'll need to either run profiling tools (nvprof, nsight) " |
259 |
- einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " |
260 |
- einfo "a modprobe configuration file " |
261 |
- einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " |
262 |
- einfo |
263 |
- einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" |
264 |
- einfo |
265 |
- fi |
266 |
-} |
267 |
|
268 |
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.2.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.2.ebuild |
269 |
deleted file mode 100644 |
270 |
index a4f5c24e3b1..00000000000 |
271 |
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.2.ebuild |
272 |
+++ /dev/null |
273 |
@@ -1,253 +0,0 @@ |
274 |
-# Copyright 1999-2021 Gentoo Authors |
275 |
-# Distributed under the terms of the GNU General Public License v2 |
276 |
- |
277 |
-EAPI=7 |
278 |
- |
279 |
-inherit check-reqs toolchain-funcs unpacker |
280 |
- |
281 |
-DRIVER_PV="460.32.03" |
282 |
- |
283 |
-DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" |
284 |
-HOMEPAGE="https://developer.nvidia.com/cuda-zone" |
285 |
-SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" |
286 |
- |
287 |
-LICENSE="NVIDIA-CUDA" |
288 |
-SLOT="0/${PV}" |
289 |
-KEYWORDS="-* ~amd64 ~amd64-linux" |
290 |
-IUSE="debugger nsight profiler vis-profiler sanitizer" |
291 |
-RESTRICT="bindist mirror" |
292 |
- |
293 |
-BDEPEND="" |
294 |
-RDEPEND=" |
295 |
- <sys-devel/gcc-11_pre[cxx] |
296 |
- >=x11-drivers/nvidia-drivers-${DRIVER_PV} |
297 |
- debugger? ( |
298 |
- dev-libs/openssl |
299 |
- sys-libs/libtermcap-compat |
300 |
- sys-libs/ncurses-compat:5[tinfo] |
301 |
- ) |
302 |
- vis-profiler? ( |
303 |
- dev-libs/openssl |
304 |
- >=virtual/jre-1.8:* |
305 |
- )" |
306 |
- |
307 |
-S="${WORKDIR}" |
308 |
- |
309 |
-QA_PREBUILT="opt/cuda/*" |
310 |
-CHECKREQS_DISK_BUILD="6800M" |
311 |
- |
312 |
-pkg_setup() { |
313 |
- check-reqs_pkg_setup |
314 |
-} |
315 |
- |
316 |
-src_prepare() { |
317 |
- # ATTENTION: change requires revbump |
318 |
- local cuda_supported_gcc="6.5 7.5 8.4 9.3 10.2 10.3" |
319 |
- |
320 |
- sed \ |
321 |
- -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ |
322 |
- "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die |
323 |
- |
324 |
- default |
325 |
-} |
326 |
- |
327 |
-src_install() { |
328 |
- local cudadir=/opt/cuda |
329 |
- local ecudadir="${EPREFIX}${cudadir}" |
330 |
- local pathextradirs ldpathextradirs |
331 |
- dodir ${cudadir} |
332 |
- into ${cudadir} |
333 |
- |
334 |
- # Install standard sub packages |
335 |
- local builddirs=( |
336 |
- builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx} |
337 |
- builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} |
338 |
- $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") |
339 |
- $(usex vis-profiler "builds/cuda_nvvp" "") |
340 |
- $(usex debugger "builds/cuda_gdb" "") |
341 |
- ) |
342 |
- |
343 |
- local d f |
344 |
- for d in "${builddirs[@]}"; do |
345 |
- ebegin "Installing ${d}" |
346 |
- [[ -d ${d} ]] || die "Directory does not exist: ${d}" |
347 |
- |
348 |
- if [[ -d ${d}/bin ]]; then |
349 |
- for f in ${d}/bin/*; do |
350 |
- if [[ -f ${f} ]]; then |
351 |
- dobin "${f}" |
352 |
- else |
353 |
- insinto ${cudadir}/bin |
354 |
- doins -r "${f}" |
355 |
- fi |
356 |
- done |
357 |
- fi |
358 |
- |
359 |
- insinto ${cudadir} |
360 |
- if [[ -d ${d}/targets ]]; then |
361 |
- doins -r "${d}"/targets |
362 |
- fi |
363 |
- if [[ -d ${d}/share ]]; then |
364 |
- doins -r "${d}"/share |
365 |
- fi |
366 |
- if [[ -d ${d}/extras ]]; then |
367 |
- doins -r "${d}"/extras |
368 |
- fi |
369 |
- eend |
370 |
- done |
371 |
- dobin "${T}"/cuda-config |
372 |
- |
373 |
- doins builds/EULA.txt |
374 |
- # nvml and nvvm need special handling |
375 |
- ebegin "Installing nvvm" |
376 |
- doins -r builds/cuda_nvcc/nvvm |
377 |
- fperms +x ${cudadir}/nvvm/bin/cicc |
378 |
- eend |
379 |
- |
380 |
- ebegin "Installing nvml" |
381 |
- doins -r builds/cuda_nvml_dev/nvml |
382 |
- eend |
383 |
- |
384 |
- if use sanitizer; then |
385 |
- ebegin "Installing sanitizer" |
386 |
- dobin builds/integration/Sanitizer/compute-sanitizer |
387 |
- doins -r builds/cuda_sanitizer_api/compute-sanitizer |
388 |
- # special handling for the executable |
389 |
- fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer |
390 |
- eend |
391 |
- fi |
392 |
- |
393 |
- use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" |
394 |
- |
395 |
- if use vis-profiler; then |
396 |
- ebegin "Installing libnvvp" |
397 |
- doins -r builds/cuda_nvvp/libnvvp |
398 |
- # special handling for the executable |
399 |
- fperms +x ${cudadir}/libnvvp/nvvp |
400 |
- eend |
401 |
- pathextradirs+=":${ecudadir}/libnvvp" |
402 |
- fi |
403 |
- |
404 |
- if use nsight; then |
405 |
- local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
406 |
- ebegin "Installing ${ncu_dir}" |
407 |
- mv builds/nsight_compute builds/${ncu_dir} || die |
408 |
- doins -r builds/${ncu_dir} |
409 |
- |
410 |
- # check this list on every bump |
411 |
- local exes=( |
412 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess |
413 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter |
414 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui |
415 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin |
416 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper |
417 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper |
418 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu |
419 |
- ) |
420 |
- |
421 |
- dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} |
422 |
- eend |
423 |
- |
424 |
- local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
425 |
- ebegin "Installing ${nsys_dir}" |
426 |
- mv builds/nsight_systems builds/${nsys_dir} || die |
427 |
- doins -r builds/${nsys_dir} |
428 |
- |
429 |
- # check this list on every bump |
430 |
- exes+=( |
431 |
- ${nsys_dir}/host-linux-x64/nsys-ui |
432 |
- ${nsys_dir}/host-linux-x64/nsys-ui.bin |
433 |
- ${nsys_dir}/host-linux-x64/ResolveSymbols |
434 |
- ${nsys_dir}/host-linux-x64/ImportNvtxt |
435 |
- ${nsys_dir}/host-linux-x64/CrashReporter |
436 |
- ${nsys_dir}/host-linux-x64/QdstrmImporter |
437 |
- ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess |
438 |
- ${nsys_dir}/target-linux-x64/nsys |
439 |
- ${nsys_dir}/target-linux-x64/launcher |
440 |
- ${nsys_dir}/target-linux-x64/nvgpucs |
441 |
- ${nsys_dir}/target-linux-x64/nsys-launcher |
442 |
- ${nsys_dir}/target-linux-x64/sqlite3 |
443 |
- ${nsys_dir}/target-linux-x64/python/bin/python |
444 |
- ) |
445 |
- |
446 |
- dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} |
447 |
- eend |
448 |
- |
449 |
- # nsight scripts and binaries need to have their executable bit set, #691284 |
450 |
- for f in "${exes[@]}"; do |
451 |
- fperms +x ${cudadir}/${f} |
452 |
- done |
453 |
- |
454 |
- # remove foreign archs (triggers SONAME warning, #749903) |
455 |
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die |
456 |
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die |
457 |
- rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die |
458 |
- |
459 |
- # TODO: unbundle qt5 |
460 |
- # TODO: unbundle boost |
461 |
- # TODO: unbundle icu |
462 |
- # TODO: unbundle openssl |
463 |
- # TODO: unbundle mesa |
464 |
- # TODO: unbundle libz |
465 |
- # TODO: unbundle libstdc++ |
466 |
- # TODO: unbundle libSshClient |
467 |
- # TODO: unbundle sqlite |
468 |
- # TODO: unbundle libpfm ? |
469 |
- fi |
470 |
- |
471 |
- # Add include and lib symlinks |
472 |
- dosym targets/x86_64-linux/include ${cudadir}/include |
473 |
- dosym targets/x86_64-linux/lib ${cudadir}/lib64 |
474 |
- |
475 |
- newenvd - 99cuda <<-EOF |
476 |
- PATH=${ecudadir}/bin${pathextradirs} |
477 |
- ROOTPATH=${ecudadir}/bin |
478 |
- LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} |
479 |
- EOF |
480 |
- |
481 |
- # Cuda prepackages libraries, don't revdep-build on them |
482 |
- insinto /etc/revdep-rebuild |
483 |
- newins - 80${PN} <<-EOF |
484 |
- SEARCH_DIRS_MASK="${ecudadir}" |
485 |
- EOF |
486 |
- # TODO: Add pkgconfig files for installed libraries |
487 |
-} |
488 |
- |
489 |
-pkg_postinst_check() { |
490 |
- local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" |
491 |
- local b="0.0" |
492 |
- local v |
493 |
- for v in ${a}; do |
494 |
- ver_test "${v}" -gt "${b}" && b="${v}" |
495 |
- done |
496 |
- |
497 |
- # if gcc and if not gcc-version is at least greatest supported |
498 |
- if tc-is-gcc && \ |
499 |
- ver_test $(gcc-version) -gt "${b}"; then |
500 |
- ewarn |
501 |
- ewarn "gcc > ${b} will not work with CUDA" |
502 |
- ewarn "Make sure you set an earlier version of gcc with gcc-config" |
503 |
- ewarn "or append --compiler-bindir= pointing to a gcc bindir like" |
504 |
- ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" |
505 |
- ewarn "to the nvcc compiler flags" |
506 |
- ewarn |
507 |
- fi |
508 |
-} |
509 |
- |
510 |
-pkg_postinst() { |
511 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
512 |
- pkg_postinst_check |
513 |
- fi |
514 |
- |
515 |
- if use profiler || use nsight; then |
516 |
- einfo |
517 |
- einfo "nvidia-drivers restrict access to performance counters." |
518 |
- einfo "You'll need to either run profiling tools (nvprof, nsight) " |
519 |
- einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " |
520 |
- einfo "a modprobe configuration file " |
521 |
- einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " |
522 |
- einfo |
523 |
- einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" |
524 |
- einfo |
525 |
- fi |
526 |
-} |
527 |
|
528 |
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild |
529 |
deleted file mode 100644 |
530 |
index 73058bb4b3c..00000000000 |
531 |
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild |
532 |
+++ /dev/null |
533 |
@@ -1,252 +0,0 @@ |
534 |
-# Copyright 1999-2021 Gentoo Authors |
535 |
-# Distributed under the terms of the GNU General Public License v2 |
536 |
- |
537 |
-EAPI=7 |
538 |
- |
539 |
-inherit check-reqs toolchain-funcs unpacker |
540 |
- |
541 |
-DRIVER_PV="465.19.01" |
542 |
- |
543 |
-DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" |
544 |
-HOMEPAGE="https://developer.nvidia.com/cuda-zone" |
545 |
-SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" |
546 |
-S="${WORKDIR}" |
547 |
- |
548 |
-LICENSE="NVIDIA-CUDA" |
549 |
-SLOT="0/${PV}" |
550 |
-KEYWORDS="-* ~amd64 ~amd64-linux" |
551 |
-IUSE="debugger nsight profiler vis-profiler sanitizer" |
552 |
-RESTRICT="bindist mirror" |
553 |
- |
554 |
-BDEPEND="" |
555 |
-RDEPEND=" |
556 |
- <sys-devel/gcc-11_pre[cxx] |
557 |
- >=x11-drivers/nvidia-drivers-${DRIVER_PV} |
558 |
- debugger? ( |
559 |
- dev-libs/openssl |
560 |
- sys-libs/libtermcap-compat |
561 |
- sys-libs/ncurses-compat:5[tinfo] |
562 |
- ) |
563 |
- vis-profiler? ( |
564 |
- dev-libs/openssl |
565 |
- >=virtual/jre-1.8:* |
566 |
- )" |
567 |
- |
568 |
-QA_PREBUILT="opt/cuda/*" |
569 |
-CHECKREQS_DISK_BUILD="6800M" |
570 |
- |
571 |
-pkg_setup() { |
572 |
- check-reqs_pkg_setup |
573 |
-} |
574 |
- |
575 |
-src_prepare() { |
576 |
- # ATTENTION: change requires revbump |
577 |
- local cuda_supported_gcc="8.5 9.3 9.4 10.2 10.3" |
578 |
- |
579 |
- sed \ |
580 |
- -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ |
581 |
- "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die |
582 |
- |
583 |
- default |
584 |
-} |
585 |
- |
586 |
-src_install() { |
587 |
- local cudadir=/opt/cuda |
588 |
- local ecudadir="${EPREFIX}${cudadir}" |
589 |
- local pathextradirs ldpathextradirs |
590 |
- dodir ${cudadir} |
591 |
- into ${cudadir} |
592 |
- |
593 |
- # Install standard sub packages |
594 |
- local builddirs=( |
595 |
- builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,thrust} |
596 |
- builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} |
597 |
- $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") |
598 |
- $(usex vis-profiler "builds/cuda_nvvp" "") |
599 |
- $(usex debugger "builds/cuda_gdb" "") |
600 |
- ) |
601 |
- |
602 |
- local d f |
603 |
- for d in "${builddirs[@]}"; do |
604 |
- ebegin "Installing ${d}" |
605 |
- [[ -d ${d} ]] || die "Directory does not exist: ${d}" |
606 |
- |
607 |
- if [[ -d ${d}/bin ]]; then |
608 |
- for f in ${d}/bin/*; do |
609 |
- if [[ -f ${f} ]]; then |
610 |
- dobin "${f}" |
611 |
- else |
612 |
- insinto ${cudadir}/bin |
613 |
- doins -r "${f}" |
614 |
- fi |
615 |
- done |
616 |
- fi |
617 |
- |
618 |
- insinto ${cudadir} |
619 |
- if [[ -d ${d}/targets ]]; then |
620 |
- doins -r "${d}"/targets |
621 |
- fi |
622 |
- if [[ -d ${d}/share ]]; then |
623 |
- doins -r "${d}"/share |
624 |
- fi |
625 |
- if [[ -d ${d}/extras ]]; then |
626 |
- doins -r "${d}"/extras |
627 |
- fi |
628 |
- eend |
629 |
- done |
630 |
- dobin "${T}"/cuda-config |
631 |
- |
632 |
- doins builds/EULA.txt |
633 |
- # nvml and nvvm need special handling |
634 |
- ebegin "Installing nvvm" |
635 |
- doins -r builds/cuda_nvcc/nvvm |
636 |
- fperms +x ${cudadir}/nvvm/bin/cicc |
637 |
- eend |
638 |
- |
639 |
- ebegin "Installing nvml" |
640 |
- doins -r builds/cuda_nvml_dev/nvml |
641 |
- eend |
642 |
- |
643 |
- if use sanitizer; then |
644 |
- ebegin "Installing sanitizer" |
645 |
- dobin builds/integration/Sanitizer/compute-sanitizer |
646 |
- doins -r builds/cuda_sanitizer_api/compute-sanitizer |
647 |
- # special handling for the executable |
648 |
- fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer |
649 |
- eend |
650 |
- fi |
651 |
- |
652 |
- use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" |
653 |
- |
654 |
- if use vis-profiler; then |
655 |
- ebegin "Installing libnvvp" |
656 |
- doins -r builds/cuda_nvvp/libnvvp |
657 |
- # special handling for the executable |
658 |
- fperms +x ${cudadir}/libnvvp/nvvp |
659 |
- eend |
660 |
- pathextradirs+=":${ecudadir}/libnvvp" |
661 |
- fi |
662 |
- |
663 |
- if use nsight; then |
664 |
- local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
665 |
- ebegin "Installing ${ncu_dir}" |
666 |
- mv builds/nsight_compute builds/${ncu_dir} || die |
667 |
- doins -r builds/${ncu_dir} |
668 |
- |
669 |
- # check this list on every bump |
670 |
- local exes=( |
671 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess |
672 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter |
673 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui |
674 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin |
675 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper |
676 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper |
677 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu |
678 |
- ) |
679 |
- |
680 |
- dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} |
681 |
- eend |
682 |
- |
683 |
- local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
684 |
- ebegin "Installing ${nsys_dir}" |
685 |
- mv builds/nsight_systems builds/${nsys_dir} || die |
686 |
- doins -r builds/${nsys_dir} |
687 |
- |
688 |
- # check this list on every bump |
689 |
- exes+=( |
690 |
- ${nsys_dir}/host-linux-x64/nsys-ui |
691 |
- ${nsys_dir}/host-linux-x64/nsys-ui.bin |
692 |
- ${nsys_dir}/host-linux-x64/ResolveSymbols |
693 |
- ${nsys_dir}/host-linux-x64/ImportNvtxt |
694 |
- ${nsys_dir}/host-linux-x64/CrashReporter |
695 |
- ${nsys_dir}/host-linux-x64/QdstrmImporter |
696 |
- ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess |
697 |
- ${nsys_dir}/target-linux-x64/nsys |
698 |
- ${nsys_dir}/target-linux-x64/launcher |
699 |
- ${nsys_dir}/target-linux-x64/nvgpucs |
700 |
- ${nsys_dir}/target-linux-x64/nsys-launcher |
701 |
- ${nsys_dir}/target-linux-x64/sqlite3 |
702 |
- ${nsys_dir}/target-linux-x64/python/bin/python |
703 |
- ) |
704 |
- |
705 |
- dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} |
706 |
- eend |
707 |
- |
708 |
- # nsight scripts and binaries need to have their executable bit set, #691284 |
709 |
- for f in "${exes[@]}"; do |
710 |
- fperms +x ${cudadir}/${f} |
711 |
- done |
712 |
- |
713 |
- # remove foreign archs (triggers SONAME warning, #749903) |
714 |
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die |
715 |
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die |
716 |
- rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die |
717 |
- |
718 |
- # TODO: unbundle qt5 |
719 |
- # TODO: unbundle boost |
720 |
- # TODO: unbundle icu |
721 |
- # TODO: unbundle openssl |
722 |
- # TODO: unbundle mesa |
723 |
- # TODO: unbundle libz |
724 |
- # TODO: unbundle libstdc++ |
725 |
- # TODO: unbundle libSshClient |
726 |
- # TODO: unbundle sqlite |
727 |
- # TODO: unbundle libpfm ? |
728 |
- fi |
729 |
- |
730 |
- # Add include and lib symlinks |
731 |
- dosym targets/x86_64-linux/include ${cudadir}/include |
732 |
- dosym targets/x86_64-linux/lib ${cudadir}/lib64 |
733 |
- |
734 |
- newenvd - 99cuda <<-EOF |
735 |
- PATH=${ecudadir}/bin${pathextradirs} |
736 |
- ROOTPATH=${ecudadir}/bin |
737 |
- LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} |
738 |
- EOF |
739 |
- |
740 |
- # Cuda prepackages libraries, don't revdep-build on them |
741 |
- insinto /etc/revdep-rebuild |
742 |
- newins - 80${PN} <<-EOF |
743 |
- SEARCH_DIRS_MASK="${ecudadir}" |
744 |
- EOF |
745 |
- # TODO: Add pkgconfig files for installed libraries |
746 |
-} |
747 |
- |
748 |
-pkg_postinst_check() { |
749 |
- local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" |
750 |
- local b="0.0" |
751 |
- local v |
752 |
- for v in ${a}; do |
753 |
- ver_test "${v}" -gt "${b}" && b="${v}" |
754 |
- done |
755 |
- |
756 |
- # if gcc and if not gcc-version is at least greatest supported |
757 |
- if tc-is-gcc && \ |
758 |
- ver_test $(gcc-version) -gt "${b}"; then |
759 |
- ewarn |
760 |
- ewarn "gcc > ${b} will not work with CUDA" |
761 |
- ewarn "Make sure you set an earlier version of gcc with gcc-config" |
762 |
- ewarn "or append --compiler-bindir= pointing to a gcc bindir like" |
763 |
- ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" |
764 |
- ewarn "to the nvcc compiler flags" |
765 |
- ewarn |
766 |
- fi |
767 |
-} |
768 |
- |
769 |
-pkg_postinst() { |
770 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
771 |
- pkg_postinst_check |
772 |
- fi |
773 |
- |
774 |
- if use profiler || use nsight; then |
775 |
- einfo |
776 |
- einfo "nvidia-drivers restrict access to performance counters." |
777 |
- einfo "You'll need to either run profiling tools (nvprof, nsight) " |
778 |
- einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " |
779 |
- einfo "a modprobe configuration file " |
780 |
- einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " |
781 |
- einfo |
782 |
- einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" |
783 |
- einfo |
784 |
- fi |
785 |
-} |
786 |
|
787 |
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.0.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.0.ebuild |
788 |
deleted file mode 100644 |
789 |
index dc91226db34..00000000000 |
790 |
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.0.ebuild |
791 |
+++ /dev/null |
792 |
@@ -1,252 +0,0 @@ |
793 |
-# Copyright 1999-2021 Gentoo Authors |
794 |
-# Distributed under the terms of the GNU General Public License v2 |
795 |
- |
796 |
-EAPI=7 |
797 |
- |
798 |
-inherit check-reqs toolchain-funcs unpacker |
799 |
- |
800 |
-DRIVER_PV="470.42.01" |
801 |
- |
802 |
-DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" |
803 |
-HOMEPAGE="https://developer.nvidia.com/cuda-zone" |
804 |
-SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" |
805 |
-S="${WORKDIR}" |
806 |
- |
807 |
-LICENSE="NVIDIA-CUDA" |
808 |
-SLOT="0/${PV}" |
809 |
-KEYWORDS="-* ~amd64 ~amd64-linux" |
810 |
-IUSE="debugger nsight profiler vis-profiler sanitizer" |
811 |
-RESTRICT="bindist mirror" |
812 |
- |
813 |
-BDEPEND="" |
814 |
-RDEPEND=" |
815 |
- <sys-devel/gcc-11_pre[cxx] |
816 |
- >=x11-drivers/nvidia-drivers-${DRIVER_PV} |
817 |
- debugger? ( |
818 |
- dev-libs/openssl |
819 |
- sys-libs/libtermcap-compat |
820 |
- sys-libs/ncurses-compat:5[tinfo] |
821 |
- ) |
822 |
- vis-profiler? ( |
823 |
- dev-libs/openssl |
824 |
- >=virtual/jre-1.8:* |
825 |
- )" |
826 |
- |
827 |
-QA_PREBUILT="opt/cuda/*" |
828 |
-CHECKREQS_DISK_BUILD="6800M" |
829 |
- |
830 |
-pkg_setup() { |
831 |
- check-reqs_pkg_setup |
832 |
-} |
833 |
- |
834 |
-src_prepare() { |
835 |
- # ATTENTION: change requires revbump |
836 |
- local cuda_supported_gcc="8.5 9.3 9.4 10.2 10.3" |
837 |
- |
838 |
- sed \ |
839 |
- -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ |
840 |
- "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die |
841 |
- |
842 |
- default |
843 |
-} |
844 |
- |
845 |
-src_install() { |
846 |
- local cudadir=/opt/cuda |
847 |
- local ecudadir="${EPREFIX}${cudadir}" |
848 |
- local pathextradirs ldpathextradirs |
849 |
- dodir ${cudadir} |
850 |
- into ${cudadir} |
851 |
- |
852 |
- # Install standard sub packages |
853 |
- local builddirs=( |
854 |
- builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,thrust} |
855 |
- builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} |
856 |
- $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") |
857 |
- $(usex vis-profiler "builds/cuda_nvvp" "") |
858 |
- $(usex debugger "builds/cuda_gdb" "") |
859 |
- ) |
860 |
- |
861 |
- local d f |
862 |
- for d in "${builddirs[@]}"; do |
863 |
- ebegin "Installing ${d}" |
864 |
- [[ -d ${d} ]] || die "Directory does not exist: ${d}" |
865 |
- |
866 |
- if [[ -d ${d}/bin ]]; then |
867 |
- for f in ${d}/bin/*; do |
868 |
- if [[ -f ${f} ]]; then |
869 |
- dobin "${f}" |
870 |
- else |
871 |
- insinto ${cudadir}/bin |
872 |
- doins -r "${f}" |
873 |
- fi |
874 |
- done |
875 |
- fi |
876 |
- |
877 |
- insinto ${cudadir} |
878 |
- if [[ -d ${d}/targets ]]; then |
879 |
- doins -r "${d}"/targets |
880 |
- fi |
881 |
- if [[ -d ${d}/share ]]; then |
882 |
- doins -r "${d}"/share |
883 |
- fi |
884 |
- if [[ -d ${d}/extras ]]; then |
885 |
- doins -r "${d}"/extras |
886 |
- fi |
887 |
- eend |
888 |
- done |
889 |
- dobin "${T}"/cuda-config |
890 |
- |
891 |
- doins builds/EULA.txt |
892 |
- # nvml and nvvm need special handling |
893 |
- ebegin "Installing nvvm" |
894 |
- doins -r builds/cuda_nvcc/nvvm |
895 |
- fperms +x ${cudadir}/nvvm/bin/cicc |
896 |
- eend |
897 |
- |
898 |
- ebegin "Installing nvml" |
899 |
- doins -r builds/cuda_nvml_dev/nvml |
900 |
- eend |
901 |
- |
902 |
- if use sanitizer; then |
903 |
- ebegin "Installing sanitizer" |
904 |
- dobin builds/integration/Sanitizer/compute-sanitizer |
905 |
- doins -r builds/cuda_sanitizer_api/compute-sanitizer |
906 |
- # special handling for the executable |
907 |
- fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer |
908 |
- eend |
909 |
- fi |
910 |
- |
911 |
- use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" |
912 |
- |
913 |
- if use vis-profiler; then |
914 |
- ebegin "Installing libnvvp" |
915 |
- doins -r builds/cuda_nvvp/libnvvp |
916 |
- # special handling for the executable |
917 |
- fperms +x ${cudadir}/libnvvp/nvvp |
918 |
- eend |
919 |
- pathextradirs+=":${ecudadir}/libnvvp" |
920 |
- fi |
921 |
- |
922 |
- if use nsight; then |
923 |
- local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
924 |
- ebegin "Installing ${ncu_dir}" |
925 |
- mv builds/nsight_compute builds/${ncu_dir} || die |
926 |
- doins -r builds/${ncu_dir} |
927 |
- |
928 |
- # check this list on every bump |
929 |
- local exes=( |
930 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess |
931 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter |
932 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui |
933 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin |
934 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper |
935 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper |
936 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu |
937 |
- ) |
938 |
- |
939 |
- dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} |
940 |
- eend |
941 |
- |
942 |
- local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
943 |
- ebegin "Installing ${nsys_dir}" |
944 |
- mv builds/nsight_systems builds/${nsys_dir} || die |
945 |
- doins -r builds/${nsys_dir} |
946 |
- |
947 |
- # check this list on every bump |
948 |
- exes+=( |
949 |
- ${nsys_dir}/host-linux-x64/nsys-ui |
950 |
- ${nsys_dir}/host-linux-x64/nsys-ui.bin |
951 |
- ${nsys_dir}/host-linux-x64/ResolveSymbols |
952 |
- ${nsys_dir}/host-linux-x64/ImportNvtxt |
953 |
- ${nsys_dir}/host-linux-x64/CrashReporter |
954 |
- ${nsys_dir}/host-linux-x64/QdstrmImporter |
955 |
- ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess |
956 |
- ${nsys_dir}/target-linux-x64/nsys |
957 |
- ${nsys_dir}/target-linux-x64/launcher |
958 |
- ${nsys_dir}/target-linux-x64/nvgpucs |
959 |
- ${nsys_dir}/target-linux-x64/nsys-launcher |
960 |
- ${nsys_dir}/target-linux-x64/sqlite3 |
961 |
- ${nsys_dir}/target-linux-x64/python/bin/python |
962 |
- ) |
963 |
- |
964 |
- dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} |
965 |
- eend |
966 |
- |
967 |
- # nsight scripts and binaries need to have their executable bit set, #691284 |
968 |
- for f in "${exes[@]}"; do |
969 |
- fperms +x ${cudadir}/${f} |
970 |
- done |
971 |
- |
972 |
- # remove foreign archs (triggers SONAME warning, #749903) |
973 |
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die |
974 |
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die |
975 |
- rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die |
976 |
- |
977 |
- # TODO: unbundle qt5 |
978 |
- # TODO: unbundle boost |
979 |
- # TODO: unbundle icu |
980 |
- # TODO: unbundle openssl |
981 |
- # TODO: unbundle mesa |
982 |
- # TODO: unbundle libz |
983 |
- # TODO: unbundle libstdc++ |
984 |
- # TODO: unbundle libSshClient |
985 |
- # TODO: unbundle sqlite |
986 |
- # TODO: unbundle libpfm ? |
987 |
- fi |
988 |
- |
989 |
- # Add include and lib symlinks |
990 |
- dosym targets/x86_64-linux/include ${cudadir}/include |
991 |
- dosym targets/x86_64-linux/lib ${cudadir}/lib64 |
992 |
- |
993 |
- newenvd - 99cuda <<-EOF |
994 |
- PATH=${ecudadir}/bin${pathextradirs} |
995 |
- ROOTPATH=${ecudadir}/bin |
996 |
- LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} |
997 |
- EOF |
998 |
- |
999 |
- # Cuda prepackages libraries, don't revdep-build on them |
1000 |
- insinto /etc/revdep-rebuild |
1001 |
- newins - 80${PN} <<-EOF |
1002 |
- SEARCH_DIRS_MASK="${ecudadir}" |
1003 |
- EOF |
1004 |
- # TODO: Add pkgconfig files for installed libraries |
1005 |
-} |
1006 |
- |
1007 |
-pkg_postinst_check() { |
1008 |
- local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" |
1009 |
- local b="0.0" |
1010 |
- local v |
1011 |
- for v in ${a}; do |
1012 |
- ver_test "${v}" -gt "${b}" && b="${v}" |
1013 |
- done |
1014 |
- |
1015 |
- # if gcc and if not gcc-version is at least greatest supported |
1016 |
- if tc-is-gcc && \ |
1017 |
- ver_test $(gcc-version) -gt "${b}"; then |
1018 |
- ewarn |
1019 |
- ewarn "gcc > ${b} will not work with CUDA" |
1020 |
- ewarn "Make sure you set an earlier version of gcc with gcc-config" |
1021 |
- ewarn "or append --compiler-bindir= pointing to a gcc bindir like" |
1022 |
- ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" |
1023 |
- ewarn "to the nvcc compiler flags" |
1024 |
- ewarn |
1025 |
- fi |
1026 |
-} |
1027 |
- |
1028 |
-pkg_postinst() { |
1029 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
1030 |
- pkg_postinst_check |
1031 |
- fi |
1032 |
- |
1033 |
- if use profiler || use nsight; then |
1034 |
- einfo |
1035 |
- einfo "nvidia-drivers restrict access to performance counters." |
1036 |
- einfo "You'll need to either run profiling tools (nvprof, nsight) " |
1037 |
- einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " |
1038 |
- einfo "a modprobe configuration file " |
1039 |
- einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " |
1040 |
- einfo |
1041 |
- einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" |
1042 |
- einfo |
1043 |
- fi |
1044 |
-} |
1045 |
|
1046 |
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.1-r2.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.1-r2.ebuild |
1047 |
deleted file mode 100644 |
1048 |
index 1bb05e3bd74..00000000000 |
1049 |
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.1-r2.ebuild |
1050 |
+++ /dev/null |
1051 |
@@ -1,252 +0,0 @@ |
1052 |
-# Copyright 1999-2021 Gentoo Authors |
1053 |
-# Distributed under the terms of the GNU General Public License v2 |
1054 |
- |
1055 |
-EAPI=7 |
1056 |
- |
1057 |
-inherit check-reqs toolchain-funcs unpacker |
1058 |
- |
1059 |
-DRIVER_PV="470.57.02" |
1060 |
- |
1061 |
-DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" |
1062 |
-HOMEPAGE="https://developer.nvidia.com/cuda-zone" |
1063 |
-SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" |
1064 |
-S="${WORKDIR}" |
1065 |
- |
1066 |
-LICENSE="NVIDIA-CUDA" |
1067 |
-SLOT="0/${PV}" |
1068 |
-KEYWORDS="-* ~amd64 ~amd64-linux" |
1069 |
-IUSE="debugger nsight profiler vis-profiler sanitizer" |
1070 |
-RESTRICT="bindist mirror" |
1071 |
- |
1072 |
-BDEPEND="" |
1073 |
-RDEPEND=" |
1074 |
- <sys-devel/gcc-12_pre[cxx] |
1075 |
- >=x11-drivers/nvidia-drivers-${DRIVER_PV} |
1076 |
- debugger? ( |
1077 |
- dev-libs/openssl |
1078 |
- sys-libs/libtermcap-compat |
1079 |
- sys-libs/ncurses-compat:5[tinfo] |
1080 |
- ) |
1081 |
- vis-profiler? ( |
1082 |
- dev-libs/openssl |
1083 |
- >=virtual/jre-1.8:* |
1084 |
- )" |
1085 |
- |
1086 |
-QA_PREBUILT="opt/cuda/*" |
1087 |
-CHECKREQS_DISK_BUILD="6800M" |
1088 |
- |
1089 |
-pkg_setup() { |
1090 |
- check-reqs_pkg_setup |
1091 |
-} |
1092 |
- |
1093 |
-src_prepare() { |
1094 |
- # ATTENTION: change requires revbump |
1095 |
- local cuda_supported_gcc="8.5 9.4 10.3 11.1 11.2" |
1096 |
- |
1097 |
- sed \ |
1098 |
- -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ |
1099 |
- "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die |
1100 |
- |
1101 |
- default |
1102 |
-} |
1103 |
- |
1104 |
-src_install() { |
1105 |
- local cudadir=/opt/cuda |
1106 |
- local ecudadir="${EPREFIX}${cudadir}" |
1107 |
- local pathextradirs ldpathextradirs |
1108 |
- dodir ${cudadir} |
1109 |
- into ${cudadir} |
1110 |
- |
1111 |
- # Install standard sub packages |
1112 |
- local builddirs=( |
1113 |
- builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,thrust} |
1114 |
- builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} |
1115 |
- $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") |
1116 |
- $(usex vis-profiler "builds/cuda_nvvp" "") |
1117 |
- $(usex debugger "builds/cuda_gdb" "") |
1118 |
- ) |
1119 |
- |
1120 |
- local d f |
1121 |
- for d in "${builddirs[@]}"; do |
1122 |
- ebegin "Installing ${d}" |
1123 |
- [[ -d ${d} ]] || die "Directory does not exist: ${d}" |
1124 |
- |
1125 |
- if [[ -d ${d}/bin ]]; then |
1126 |
- for f in ${d}/bin/*; do |
1127 |
- if [[ -f ${f} ]]; then |
1128 |
- dobin "${f}" |
1129 |
- else |
1130 |
- insinto ${cudadir}/bin |
1131 |
- doins -r "${f}" |
1132 |
- fi |
1133 |
- done |
1134 |
- fi |
1135 |
- |
1136 |
- insinto ${cudadir} |
1137 |
- if [[ -d ${d}/targets ]]; then |
1138 |
- doins -r "${d}"/targets |
1139 |
- fi |
1140 |
- if [[ -d ${d}/share ]]; then |
1141 |
- doins -r "${d}"/share |
1142 |
- fi |
1143 |
- if [[ -d ${d}/extras ]]; then |
1144 |
- doins -r "${d}"/extras |
1145 |
- fi |
1146 |
- eend |
1147 |
- done |
1148 |
- dobin "${T}"/cuda-config |
1149 |
- |
1150 |
- doins builds/EULA.txt |
1151 |
- # nvml and nvvm need special handling |
1152 |
- ebegin "Installing nvvm" |
1153 |
- doins -r builds/cuda_nvcc/nvvm |
1154 |
- fperms +x ${cudadir}/nvvm/bin/cicc |
1155 |
- eend |
1156 |
- |
1157 |
- ebegin "Installing nvml" |
1158 |
- doins -r builds/cuda_nvml_dev/nvml |
1159 |
- eend |
1160 |
- |
1161 |
- if use sanitizer; then |
1162 |
- ebegin "Installing sanitizer" |
1163 |
- dobin builds/integration/Sanitizer/compute-sanitizer |
1164 |
- doins -r builds/cuda_sanitizer_api/compute-sanitizer |
1165 |
- # special handling for the executable |
1166 |
- fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer |
1167 |
- eend |
1168 |
- fi |
1169 |
- |
1170 |
- use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" |
1171 |
- |
1172 |
- if use vis-profiler; then |
1173 |
- ebegin "Installing libnvvp" |
1174 |
- doins -r builds/cuda_nvvp/libnvvp |
1175 |
- # special handling for the executable |
1176 |
- fperms +x ${cudadir}/libnvvp/nvvp |
1177 |
- eend |
1178 |
- pathextradirs+=":${ecudadir}/libnvvp" |
1179 |
- fi |
1180 |
- |
1181 |
- if use nsight; then |
1182 |
- local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
1183 |
- ebegin "Installing ${ncu_dir}" |
1184 |
- mv builds/nsight_compute builds/${ncu_dir} || die |
1185 |
- doins -r builds/${ncu_dir} |
1186 |
- |
1187 |
- # check this list on every bump |
1188 |
- local exes=( |
1189 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess |
1190 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter |
1191 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui |
1192 |
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin |
1193 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper |
1194 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper |
1195 |
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu |
1196 |
- ) |
1197 |
- |
1198 |
- dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} |
1199 |
- eend |
1200 |
- |
1201 |
- local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) |
1202 |
- ebegin "Installing ${nsys_dir}" |
1203 |
- mv builds/nsight_systems builds/${nsys_dir} || die |
1204 |
- doins -r builds/${nsys_dir} |
1205 |
- |
1206 |
- # check this list on every bump |
1207 |
- exes+=( |
1208 |
- ${nsys_dir}/host-linux-x64/nsys-ui |
1209 |
- ${nsys_dir}/host-linux-x64/nsys-ui.bin |
1210 |
- ${nsys_dir}/host-linux-x64/ResolveSymbols |
1211 |
- ${nsys_dir}/host-linux-x64/ImportNvtxt |
1212 |
- ${nsys_dir}/host-linux-x64/CrashReporter |
1213 |
- ${nsys_dir}/host-linux-x64/QdstrmImporter |
1214 |
- ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess |
1215 |
- ${nsys_dir}/target-linux-x64/nsys |
1216 |
- ${nsys_dir}/target-linux-x64/launcher |
1217 |
- ${nsys_dir}/target-linux-x64/nvgpucs |
1218 |
- ${nsys_dir}/target-linux-x64/nsys-launcher |
1219 |
- ${nsys_dir}/target-linux-x64/sqlite3 |
1220 |
- ${nsys_dir}/target-linux-x64/python/bin/python |
1221 |
- ) |
1222 |
- |
1223 |
- dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} |
1224 |
- eend |
1225 |
- |
1226 |
- # nsight scripts and binaries need to have their executable bit set, #691284 |
1227 |
- for f in "${exes[@]}"; do |
1228 |
- fperms +x ${cudadir}/${f} |
1229 |
- done |
1230 |
- |
1231 |
- # remove foreign archs (triggers SONAME warning, #749903) |
1232 |
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die |
1233 |
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die |
1234 |
- rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die |
1235 |
- |
1236 |
- # TODO: unbundle qt5 |
1237 |
- # TODO: unbundle boost |
1238 |
- # TODO: unbundle icu |
1239 |
- # TODO: unbundle openssl |
1240 |
- # TODO: unbundle mesa |
1241 |
- # TODO: unbundle libz |
1242 |
- # TODO: unbundle libstdc++ |
1243 |
- # TODO: unbundle libSshClient |
1244 |
- # TODO: unbundle sqlite |
1245 |
- # TODO: unbundle libpfm ? |
1246 |
- fi |
1247 |
- |
1248 |
- # Add include and lib symlinks |
1249 |
- dosym targets/x86_64-linux/include ${cudadir}/include |
1250 |
- dosym targets/x86_64-linux/lib ${cudadir}/lib64 |
1251 |
- |
1252 |
- newenvd - 99cuda <<-EOF |
1253 |
- PATH=${ecudadir}/bin${pathextradirs} |
1254 |
- ROOTPATH=${ecudadir}/bin |
1255 |
- LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} |
1256 |
- EOF |
1257 |
- |
1258 |
- # Cuda prepackages libraries, don't revdep-build on them |
1259 |
- insinto /etc/revdep-rebuild |
1260 |
- newins - 80${PN} <<-EOF |
1261 |
- SEARCH_DIRS_MASK="${ecudadir}" |
1262 |
- EOF |
1263 |
- # TODO: Add pkgconfig files for installed libraries |
1264 |
-} |
1265 |
- |
1266 |
-pkg_postinst_check() { |
1267 |
- local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" |
1268 |
- local b="0.0" |
1269 |
- local v |
1270 |
- for v in ${a}; do |
1271 |
- ver_test "${v}" -gt "${b}" && b="${v}" |
1272 |
- done |
1273 |
- |
1274 |
- # if gcc and if not gcc-version is at least greatest supported |
1275 |
- if tc-is-gcc && \ |
1276 |
- ver_test $(gcc-version) -gt "${b}"; then |
1277 |
- ewarn |
1278 |
- ewarn "gcc > ${b} will not work with CUDA" |
1279 |
- ewarn "Make sure you set an earlier version of gcc with gcc-config" |
1280 |
- ewarn "or append --compiler-bindir= pointing to a gcc bindir like" |
1281 |
- ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" |
1282 |
- ewarn "to the nvcc compiler flags" |
1283 |
- ewarn |
1284 |
- fi |
1285 |
-} |
1286 |
- |
1287 |
-pkg_postinst() { |
1288 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
1289 |
- pkg_postinst_check |
1290 |
- fi |
1291 |
- |
1292 |
- if use profiler || use nsight; then |
1293 |
- einfo |
1294 |
- einfo "nvidia-drivers restrict access to performance counters." |
1295 |
- einfo "You'll need to either run profiling tools (nvprof, nsight) " |
1296 |
- einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " |
1297 |
- einfo "a modprobe configuration file " |
1298 |
- einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " |
1299 |
- einfo |
1300 |
- einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" |
1301 |
- einfo |
1302 |
- fi |
1303 |
-} |