1 |
commit: 9974fd94f4fdc69679834e441c7f86a787effe8e |
2 |
Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> |
3 |
AuthorDate: Thu Oct 19 08:58:27 2017 +0000 |
4 |
Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 10 13:23:18 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9974fd94 |
7 |
|
8 |
dev-util/nvidia-cuda-sdk: Version bump to 9.0.176 |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/633440 |
11 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
12 |
|
13 |
dev-util/nvidia-cuda-sdk/Manifest | 1 + |
14 |
.../nvidia-cuda-sdk/nvidia-cuda-sdk-9.0.176.ebuild | 144 +++++++++++++++++++++ |
15 |
2 files changed, 145 insertions(+) |
16 |
|
17 |
diff --git a/dev-util/nvidia-cuda-sdk/Manifest b/dev-util/nvidia-cuda-sdk/Manifest |
18 |
index 16e212e90b0..3483e7de8f7 100644 |
19 |
--- a/dev-util/nvidia-cuda-sdk/Manifest |
20 |
+++ b/dev-util/nvidia-cuda-sdk/Manifest |
21 |
@@ -3,3 +3,4 @@ DIST cuda_6.5.19_linux_64.run 982446238 SHA256 5279bc159b72b7445d8aae5f289d24bb4 |
22 |
DIST cuda_7.5.18_linux.run 1195424633 SHA256 08411d536741075131a1858a68615b8b73c51988e616e83b835e4632eea75eec SHA512 97459dfd124060200f1c43f763e5bce0bea53e35ed4bef72bee6c8ba1c04ecffb8695af11755443513316f91fdb5cb4d35662f7b87bca7e3de85d562d4e49363 WHIRLPOOL 59d186f5e9176db25e5991e8088417ac778953c3ed2f0dcef034968f7ea695c5d4cfea81759ac0f7f1290c3842d9d0339b5b74d2d90ec8b333135aa1b986ca10 |
23 |
DIST cuda_8.0.44_linux.run 1457082926 SHA256 64dc4ab867261a0d690735c46d7cc9fc60d989da0d69dc04d1714e409cacbdf0 SHA512 1bf9d8e6b853c2a971b8d908a043adc5b11ec7033faed04a773c42680882753f98bc33b46f6b301c24c0f780f74bc237dce5766fc857f1a905e6c1f200728d86 WHIRLPOOL e90fa2088cd70aef2794c1ce2db126d6186bc3c44d14c1cf7cb4a66f889cbb4799485d1d71ab045e2dfaed9bfabcea224ca04b7f97e9bce061ac9fbd31c62fdd |
24 |
DIST cuda_8.0.61_375.26_linux.run 1465528129 SHA256 9ceca9c2397f841024e03410bfd6eabfd72b384256fbed1c1e4834b5b0ce9dc4 SHA512 d22303719a9feff64f95bf6a966f1caa2bf0cf8c955e475ce08ce54faa5e098d336c2db223ef0185c1f23b9c52b7d2f81a63515485219cfc016d72bda979248b WHIRLPOOL 650a0e8bc9ad2d0637cd4a82a057bf77e613559d1080a86009f594c73adb8879de62b26dac9d8e3f572806556bf878505382479e596d4ce91929ab94b882489a |
25 |
+DIST cuda_9.0.176_384.81_linux.run 1643293725 SHA256 96863423feaa50b5c1c5e1b9ec537ef7ba77576a3986652351ae43e66bcd080c SHA512 00e24638c02d049c575732dee5237db21f7c451b606f37cf95e44e89d47d0cb055255e9f70dc013298c9e0d224147f239488558904556b68572e3f31935489a9 WHIRLPOOL 714b4dea7cae742a97898bd9377e821a4448504119589e10bcdabce1f7f82a87a9f30f6e9291041f0d038eab70326893772859ee09891d62632afefac2e9240a |
26 |
|
27 |
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-9.0.176.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-9.0.176.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..3353dabc300 |
30 |
--- /dev/null |
31 |
+++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-9.0.176.ebuild |
32 |
@@ -0,0 +1,144 @@ |
33 |
+# Copyright 1999-2017 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+inherit cuda eutils flag-o-matic portability toolchain-funcs unpacker versionator |
39 |
+ |
40 |
+MYD=$(get_version_component_range 1-2) |
41 |
+DRIVER_PV="384.81" |
42 |
+ |
43 |
+DESCRIPTION="NVIDIA CUDA Software Development Kit" |
44 |
+HOMEPAGE="https://developer.nvidia.com/cuda-zone" |
45 |
+SRC_URI="https://developer.nvidia.com/compute/cuda/${MYD}/Prod2/local_installers/cuda_${PV}_${DRIVER_PV}_linux-run -> cuda_${PV}_${DRIVER_PV}_linux.run" |
46 |
+ |
47 |
+LICENSE="CUDPP" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~amd64-linux" |
50 |
+IUSE="+cuda debug +doc +examples opencl mpi" |
51 |
+ |
52 |
+RDEPEND=" |
53 |
+ ~dev-util/nvidia-cuda-toolkit-${PV} |
54 |
+ media-libs/freeglut |
55 |
+ examples? ( |
56 |
+ media-libs/freeimage |
57 |
+ media-libs/glew:0= |
58 |
+ >=x11-drivers/nvidia-drivers-384.81[uvm] |
59 |
+ mpi? ( virtual/mpi ) |
60 |
+ )" |
61 |
+DEPEND="${RDEPEND}" |
62 |
+ |
63 |
+RESTRICT="test" |
64 |
+ |
65 |
+S=${WORKDIR}/samples |
66 |
+ |
67 |
+QA_EXECSTACK=( |
68 |
+ opt/cuda/sdk/0_Simple/cdpSimplePrint/cdpSimplePrint |
69 |
+ opt/cuda/sdk/0_Simple/cdpSimpleQuicksort/cdpSimpleQuicksort |
70 |
+ opt/cuda/sdk/bin/x86_64/linux/release/cdpSimplePrint |
71 |
+ opt/cuda/sdk/bin/x86_64/linux/release/cdpSimpleQuicksort |
72 |
+ ) |
73 |
+ |
74 |
+src_unpack() { |
75 |
+ # We first need to unpack the cuda_${PV}_linux.run file |
76 |
+ # which includes the cuda-samples*run file. |
77 |
+ unpacker |
78 |
+ unpacker run_files/cuda-samples*run |
79 |
+} |
80 |
+ |
81 |
+pkg_setup() { |
82 |
+ if use cuda || use opencl; then |
83 |
+ cuda_pkg_setup |
84 |
+ fi |
85 |
+} |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ export RAWLDFLAGS="$(raw-ldflags)" |
89 |
+# epatch "${FILESDIR}"/${P}-asneeded.patch |
90 |
+ |
91 |
+ local file |
92 |
+ while IFS="" read -d $'\0' -r file; do |
93 |
+ sed \ |
94 |
+ -e 's:-O[23]::g' \ |
95 |
+ -e "/LINK/s:gcc:$(tc-getCC) ${LDFLAGS}:g" \ |
96 |
+ -e "/LINK/s:g++:$(tc-getCXX) ${LDFLAGS}:g" \ |
97 |
+ -e "/CC/s:gcc:$(tc-getCC):g" \ |
98 |
+ -e "/GCC/s:g++:$(tc-getCXX):g" \ |
99 |
+ -e "/NVCC /s|\(:=\).*|:= ${EPREFIX}/opt/cuda/bin/nvcc|g" \ |
100 |
+ -e "/ CFLAGS/s|\(:=\)|\1 ${CFLAGS}|g" \ |
101 |
+ -e "/ CXXFLAGS/s|\(:=\)|\1 ${CXXFLAGS}|g" \ |
102 |
+ -e "/NVCCFLAGS/s|\(:=\)|\1 ${NVCCFLAGS} |g" \ |
103 |
+ -e 's:-Wimplicit::g' \ |
104 |
+ -e "s|../../common/lib/linux/\$(OS_ARCH)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \ |
105 |
+ -e "s|../../common/lib/\$(OSLOWER)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \ |
106 |
+ -e "s|../../common/lib/\$(OSLOWER)/\$(OS_ARCH)/libGLEW.a|$($(tc-getPKG_CONFIG) --libs glew)|g" \ |
107 |
+ -i "${file}" || die |
108 |
+ # -e "/ALL_LDFLAGS/s|:=|:= ${RAWLDFLAGS} |g" \ |
109 |
+ done < <(find . -type f -name 'Makefile' -print0) |
110 |
+ |
111 |
+ rm -rf common/inc/GL || die |
112 |
+ find . -type f -name '*.a' -delete || die |
113 |
+ |
114 |
+ eapply_user |
115 |
+} |
116 |
+ |
117 |
+src_compile() { |
118 |
+ use examples || return |
119 |
+ local myopts=("verbose=1") |
120 |
+ use debug && myopts+=("dbg=1") |
121 |
+ export FAKEROOTKEY=1 # Workaround sandbox issue in #462602 |
122 |
+ emake \ |
123 |
+ cuda-install="${EPREFIX}/opt/cuda" \ |
124 |
+ CUDA_PATH="${EPREFIX}/opt/cuda/" \ |
125 |
+ MPI_GCC=10 \ |
126 |
+ "${myopts[@]}" |
127 |
+} |
128 |
+ |
129 |
+src_test() { |
130 |
+ addwrite /dev/nvidiactl |
131 |
+ addwrite /dev/nvidia0 |
132 |
+ |
133 |
+ local i |
134 |
+ for i in {0..9}*/*; do |
135 |
+ emake -C "${i}" run |
136 |
+ done |
137 |
+} |
138 |
+ |
139 |
+src_install() { |
140 |
+ local f t crap=( *.txt Samples.htm* ) |
141 |
+ |
142 |
+ if use doc; then |
143 |
+ ebegin "Installing docs ..." |
144 |
+ while IFS="" read -d $'\0' -r f; do |
145 |
+ treecopy "${f}" "${ED%/}"/usr/share/doc/${PF}/ |
146 |
+ done < <(find -type f \( -name 'readme.txt' -o -name '*.pdf' \) -print0) |
147 |
+ |
148 |
+ while IFS="" read -d $'\0' -r f; do |
149 |
+ docompress -x "${f#${ED%/}}" |
150 |
+ done < <(find "${ED%/}"/usr/share/doc/${PF}/ -type f -name 'readme.txt' -print0) |
151 |
+ eend |
152 |
+ fi |
153 |
+ |
154 |
+ ebegin "Cleaning before installation..." |
155 |
+ for f in "${crap[@]}"; do |
156 |
+ rm -f "${f}" || die |
157 |
+ done |
158 |
+ find -type f \( -name '*.o' -o -name '*.pdf' -o -name 'readme.txt' \) -delete || die |
159 |
+ eend |
160 |
+ |
161 |
+ ebegin "Moving files..." |
162 |
+ while IFS="" read -d $'\0' -r f; do |
163 |
+ t="$(dirname ${f})" |
164 |
+ if [[ ${t/obj\/} != ${t} || ${t##*.} == a ]]; then |
165 |
+ continue |
166 |
+ fi |
167 |
+ if [[ -x ${f} ]]; then |
168 |
+ exeinto /opt/cuda/sdk/"${t}" |
169 |
+ doexe "${f}" |
170 |
+ else |
171 |
+ insinto /opt/cuda/sdk/"${t}" |
172 |
+ doins "${f}" |
173 |
+ fi |
174 |
+ done < <(find . -type f -print0) |
175 |
+ eend |
176 |
+} |