Gentoo Archives: gentoo-commits

From: Marius Brehler <marbre@××××××××××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-util/nvidia-cuda-gdk/
Date: Mon, 30 May 2016 08:11:40
Message-Id: 1464595776.740b9eb9229aad32bad485be9341b3b3829c437b.marbre@gentoo
1 commit: 740b9eb9229aad32bad485be9341b3b3829c437b
2 Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
3 AuthorDate: Mon May 30 08:09:02 2016 +0000
4 Commit: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
5 CommitDate: Mon May 30 08:09:36 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=740b9eb9
7
8 dev-util/nvidia-cuda-gdk: Version bump; Bump to EAPI=6
9
10 Package-Manager: portage-2.2.28
11
12 .../nvidia-cuda-gdk/nvidia-cuda-gdk-352.79.ebuild | 191 +++++++++++++++++++++
13 1 file changed, 191 insertions(+)
14
15 diff --git a/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-352.79.ebuild b/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-352.79.ebuild
16 new file mode 100644
17 index 0000000..0263db0
18 --- /dev/null
19 +++ b/dev-util/nvidia-cuda-gdk/nvidia-cuda-gdk-352.79.ebuild
20 @@ -0,0 +1,191 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=6
26 +
27 +inherit eutils portability toolchain-funcs unpacker versionator
28 +
29 +MYD=$(get_version_component_range 1)_$(get_version_component_range 2)
30 +
31 +HEALTMON_PV="${PV}"
32 +NVVS_PV="${PV}"
33 +
34 +DESCRIPTION="NVIDIA GPU Deployment Kit"
35 +HOMEPAGE="http://developer.nvidia.com/cuda"
36 +SRC_URI="http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_${MYD}_gdk_linux.run"
37 +
38 +LICENSE="NVIDIA-gdk"
39 +SLOT="0"
40 +KEYWORDS="-* ~amd64"
41 +IUSE="+healthmon +nvml +doc examples +nvvs"
42 +
43 +RDEPEND="
44 + >=dev-util/nvidia-cuda-toolkit-7.5
45 + media-libs/freeglut
46 + examples? ( >=x11-drivers/nvidia-drivers-352.79[uvm] )
47 + nvvs? (
48 + >=x11-drivers/nvidia-drivers-352.79[uvm]
49 + <x11-drivers/nvidia-drivers-355.00[uvm]
50 + )
51 + "
52 +DEPEND="${RDEPEND}"
53 +
54 +S="${WORKDIR}/payload"
55 +
56 +QA_PREBUILT="/opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon
57 + /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/gpu_rdma_bw
58 + /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/ibv_rdma_bw
59 + /opt/cuda/gdk/nvml/lib/libnvidia-ml.so.1
60 + /opt/cuda/gdk/nvvs/plugins/libPcie.so.1
61 + /opt/cuda/gdk/nvvs/plugins/libSmPerformance.so.1
62 + /opt/cuda/gdk/nvvs/plugins/libPerformance.so
63 + /opt/cuda/gdk/nvvs/plugins/libPower.so.1
64 + /opt/cuda/gdk/nvvs/plugins/libMemory.so.1
65 + /opt/cuda/gdk/nvvs/plugins/libPerformance.so.1
66 + /opt/cuda/gdk/nvvs/plugins/libDeployment.so.1
67 + /opt/cuda/gdk/nvvs/plugins/libSmPerformance.so
68 + /opt/cuda/gdk/nvvs/plugins/libPower.so
69 + /opt/cuda/gdk/nvvs/nvvs
70 + "
71 +
72 +src_unpack() {
73 + unpacker
74 +}
75 +
76 +src_compile() {
77 + use examples || return
78 + cd "${S}"/nvml/example || die
79 + default
80 +}
81 +
82 +src_install() {
83 + local i j f t
84 +
85 + if use doc; then
86 + if use healthmon ; then
87 + ebegin "Installing healthmon docs..."
88 + doman nvidia-healthmon/docs/man/man8/nvidia-healthmon.8
89 + cd "${S}/nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}" || die
90 + treecopy \
91 + $(find -type f \( -name README.txt -name COPYING.txt -o -name "*.pdf" \)) \
92 + "${ED}"/usr/share/doc/${PF}/nvidia-healthmon/
93 + docompress -x \
94 + $(find "${ED}"/usr/share/doc/${PF}/nvidia-healthmon/ -type f -name readme.txt | sed -e "s:${ED}::")
95 + cd "${S}/" || die
96 + eend
97 + fi
98 +
99 + if use nvml ; then
100 + ebegin "Installing nvml docs..."
101 + doman nvml/doc/man/man3/*.3
102 + cd "${S}/nvml/" || die
103 + treecopy \
104 + $(find -type f \( -name README.txt -name COPYRIGHT.txt -o -name "*.pdf" \)) \
105 + "${ED}"/usr/share/doc/${PF}/nvml/
106 + docompress -x \
107 + $(find "${ED}"/usr/share/doc/${PF}/nvml/ -type f -name readme.txt | sed -e "s:${ED}::")
108 + cd "${S}/" || die
109 + eend
110 + fi
111 +
112 + if use nvvs ; then
113 + ebegin "Installing validation suite docs..."
114 + dodoc "nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/docs/NVIDIA_Validation_Suite_User_Guide.pdf"
115 + doman "nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/docs/man/man8/nvvs.8"
116 + eend
117 + fi
118 +
119 + fi
120 +
121 + ebegin "Cleaning before installation..."
122 + find -type f \
123 + \( -name "*.o" -o -name "*.pdf" -o -name "*.txt" -o -name "*.3" -o -name "*.8" \) -delete \
124 + || die
125 + rm -f "${S}"/nvml/lib/libnvidia-ml.so
126 + rm -f "${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libDeployment.so
127 + rm -f "${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libMemory.so
128 + rm -f "${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libPcie.so
129 + rm -f "${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libPerformance.so
130 + rm -f "${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libPower.so
131 + rm -f "${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/plugins"/libSmPerformance.so
132 + rm -f "${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}"/nvidia-vs
133 + eend
134 +
135 + if use healthmon; then
136 + ebegin "Installing nvidia-healthmon"
137 + exeinto /opt/cuda/gdk/nvidia-healthmon/nvidia-healthmon-tests/
138 + doexe "nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}/bin"/{*,*.*}
139 + exeinto /opt/cuda/gdk/nvidia-healthmon/
140 + doexe "nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}"/nvidia-healthmon
141 + insinto /etc/nvidia-healthmon/
142 + doins "nvidia-healthmon/nvidia-healthmon-amd64-${HEALTMON_PV}"/nvidia-healthmon.conf
143 +
144 + # install launch script
145 + exeinto /opt/bin
146 + doexe "${FILESDIR}"/nvidia-healthmon
147 + eend
148 + fi
149 +
150 + if use nvml; then
151 + ebegin "Installing nvml"
152 + cd "${S}/nvml" || die
153 + for f in $(find .); do
154 + local t="$(dirname ${f})"
155 + if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
156 + continue
157 + fi
158 +
159 + if [[ ! -d "${f}" ]]; then
160 + if [[ -x "${f}" ]]; then
161 + exeinto "/opt/cuda/gdk/nvml/${t}"
162 + doexe "${f}"
163 + else
164 + insinto "/opt/cuda/gdk/nvml/${t}"
165 + doins "${f}"
166 + fi
167 + fi
168 + done
169 +
170 + dosym libnvidia-ml.so.1 /opt/cuda/gdk/nvml/lib/libnvidia-ml.so
171 + cd "${S}/" || die
172 + eend
173 + fi
174 +
175 + if use nvvs; then
176 + ebegin "Installing validation suite"
177 + cd "${S}/nvidia-validation-suite/nvidia-validation-suite-amd64-${NVVS_PV}/" || die
178 +
179 + insinto /etc/nvidia-validation-suite/
180 + doins nvvs.conf
181 + rm nvvs.conf || die
182 +
183 + for f in $(find .); do
184 + local t="$(dirname ${f})"
185 + if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
186 + continue
187 + fi
188 +
189 + if [[ ! -d "${f}" ]]; then
190 + if [[ -x "${f}" ]]; then
191 + exeinto "/opt/cuda/gdk/nvvs/${t}"
192 + doexe "${f}"
193 + else
194 + insinto "/opt/cuda/gdk/nvvs/${t}"
195 + doins "${f}"
196 + fi
197 + fi
198 + done
199 +
200 + dosym libDeployment.so.1 /opt/cuda/gdk/nvvs/plugins/libDeployment.so
201 + dosym libMemory.so.1 /opt/cuda/gdk/nvvs/plugins/libMemory.so
202 + dosym libPcie.so.1 /opt/cuda/gdk/nvvs/plugins/libPcie.so
203 + dosym libPerformance.so.1 /opt/cuda/gdk/nvvs/plugins/libPerformance.so
204 + dosym libPower.so.1 /opt/cuda/gdk/nvvs/plugins/libPower.so
205 + dosym libSmPerformance.so.1 /opt/cuda/gdk/nvvs/plugins/libSmPerformance.so
206 +
207 + dosym /opt/cuda/gdk/nvvs/nvvs /opt/bin/nvidia-vs
208 + cd "${S}/" || die
209 + eend
210 + fi
211 +}