1 |
jlec 10/04/25 08:31:20 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nvidia-drivers-195.36.24.ebuild |
5 |
Log: |
6 |
Version Bump on permission, #315141 |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.229 x11-drivers/nvidia-drivers/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.229&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.229&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?r1=1.228&r2=1.229 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v |
19 |
retrieving revision 1.228 |
20 |
retrieving revision 1.229 |
21 |
diff -u -r1.228 -r1.229 |
22 |
--- ChangeLog 24 Mar 2010 17:24:38 -0000 1.228 |
23 |
+++ ChangeLog 25 Apr 2010 08:31:20 -0000 1.229 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for x11-drivers/nvidia-drivers |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.228 2010/03/24 17:24:38 cardoe Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.229 2010/04/25 08:31:20 jlec Exp $ |
29 |
+ |
30 |
+*nvidia-drivers-195.36.24 (25 Apr 2010) |
31 |
+ |
32 |
+ 25 Apr 2010; Justin Lecher <jlec@g.o> |
33 |
+ +nvidia-drivers-195.36.24.ebuild: |
34 |
+ Version Bump on permission, #315141 |
35 |
|
36 |
24 Mar 2010; Doug Goldstein <cardoe@g.o> |
37 |
nvidia-drivers-195.36.15.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 x11-drivers/nvidia-drivers/nvidia-drivers-195.36.24.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-195.36.24.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-195.36.24.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: nvidia-drivers-195.36.24.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2010 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-195.36.24.ebuild,v 1.1 2010/04/25 08:31:20 jlec Exp $ |
51 |
|
52 |
EAPI="2" |
53 |
|
54 |
inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver |
55 |
|
56 |
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" |
57 |
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" |
58 |
X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" |
59 |
|
60 |
DESCRIPTION="NVIDIA X11 driver and GLX libraries" |
61 |
HOMEPAGE="http://www.nvidia.com/" |
62 |
SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) |
63 |
amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) |
64 |
x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" |
65 |
|
66 |
LICENSE="NVIDIA" |
67 |
SLOT="0" |
68 |
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
69 |
IUSE="acpi custom-cflags gtk multilib kernel_linux" |
70 |
RESTRICT="strip" |
71 |
EMULTILIB_PKG="true" |
72 |
|
73 |
COMMON="<x11-base/xorg-server-1.8.99 |
74 |
kernel_linux? ( >=sys-libs/glibc-2.6.1 ) |
75 |
multilib? ( app-emulation/emul-linux-x86-xlibs ) |
76 |
>=app-admin/eselect-opengl-1.0.9" |
77 |
DEPEND="${COMMON} |
78 |
kernel_linux? ( virtual/linux-sources )" |
79 |
RDEPEND="${COMMON} |
80 |
kernel_linux? ( virtual/modutils ) |
81 |
acpi? ( sys-power/acpid )" |
82 |
PDEPEND=">=x11-libs/libvdpau-0.3-r1 |
83 |
gtk? ( media-video/nvidia-settings )" |
84 |
|
85 |
QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
86 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
87 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
88 |
usr/lib/opengl/nvidia/extensions/libglx.so.${PV} |
89 |
usr/lib/xorg/modules/drivers/nvidia_drv.so |
90 |
usr/lib/libcuda.so.${PV} |
91 |
usr/lib/libnvidia-cfg.so.${PV} |
92 |
usr/lib/libvdpau_nvidia.so.${PV} |
93 |
usr/lib/libOpenCL.so.1.0.0 |
94 |
usr/lib/libnvidia-compiler.so.${PV}" |
95 |
|
96 |
QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko |
97 |
usr/lib/opengl/nvidia/lib/libGL.so.1 |
98 |
usr/lib/opengl/nvidia/lib/libGLcore.so.1 |
99 |
usr/lib/libnvidia-cfg.so.1 |
100 |
usr/lib/opengl/nvidia/extensions/libglx.so.1 |
101 |
usr/lib/xorg/modules/drivers/nvidia_drv.so" |
102 |
|
103 |
QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
104 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
105 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
106 |
usr/lib32/libcuda.so.${PV} |
107 |
usr/lib32/libvdpau_nvidia.so.${PV} |
108 |
usr/lib32/libOpenCL.so.1.0.0 |
109 |
usr/lib32/libnvidia-compiler.so.${PV}" |
110 |
|
111 |
QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
112 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
113 |
usr/lib/opengl/nvidia/extensions/libglx.so.${PV} |
114 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
115 |
usr/lib/libXvMCNVIDIA.a:NVXVMC.o |
116 |
usr/lib/libnvidia-compiler.so.${PV}" |
117 |
|
118 |
QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
119 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
120 |
usr/lib32/libnvidia-compiler.so.${PV} |
121 |
usr/lib64/libnvidia-compiler.so.${PV} |
122 |
usr/lib64/libXvMCNVIDIA.a:NVXVMC.o |
123 |
usr/lib64/libnvidia-cfg.so.${PV} |
124 |
usr/lib64/libvdpau_nvidia.so.${PV} |
125 |
usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
126 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
127 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
128 |
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} |
129 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
130 |
usr/bin/nvidia-smi |
131 |
usr/bin/nvidia-xconfig" |
132 |
|
133 |
QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
134 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
135 |
usr/lib/opengl/nvidia/extensions/libglx.so.${PV} |
136 |
usr/lib/libXvMCNVIDIA.a |
137 |
usr/lib64/libXvMCNVIDIA.so.${PV}" |
138 |
|
139 |
QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
140 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
141 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
142 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
143 |
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} |
144 |
usr/lib64/libXvMCNVIDIA.so.${PV}" |
145 |
|
146 |
QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}" |
147 |
|
148 |
QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV} |
149 |
usr/lib32/libnvidia-compiler.so.${PV}" |
150 |
|
151 |
QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} |
152 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
153 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
154 |
usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
155 |
usr/lib32/libvdpau_nvidia.so.${PV} |
156 |
usr/lib32/libOpenCL.so.1.0.0 |
157 |
usr/lib32/libnvidia-compiler.so.${PV} |
158 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
159 |
usr/lib64/libcuda.so.${PV} |
160 |
usr/lib64/libnvidia-cfg.so.${PV} |
161 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
162 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
163 |
usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
164 |
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} |
165 |
usr/lib64/xorg/modules/drivers/nvidia_drv.so |
166 |
usr/lib64/libvdpau_nvidia.so.${PV} |
167 |
usr/lib64/libOpenCL.so.1.0.0 |
168 |
usr/lib64/libnvidia-compiler.so.${PV} |
169 |
usr/bin/nvidia-smi |
170 |
usr/bin/nvidia-xconfig" |
171 |
|
172 |
QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} |
173 |
usr/lib/libnvidia-cfg.so.${PV} |
174 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
175 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
176 |
usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
177 |
usr/lib/opengl/nvidia/extensions/libglx.so.${PV} |
178 |
usr/lib/xorg/modules/drivers/nvidia_drv.so |
179 |
usr/lib/libXvMCNVIDIA.so.${PV} |
180 |
usr/lib/libvdpau_nvidia.so.${PV} |
181 |
usr/lib/libOpenCL.so.1.0.0 |
182 |
usr/lib/libnvidia-compiler.so.${PV} |
183 |
usr/bin/nvidia-smi |
184 |
usr/bin/nvidia-xconfig" |
185 |
|
186 |
if use x86; then |
187 |
PKG_V="-pkg0" |
188 |
NV_PACKAGE="${X86_NV_PACKAGE}" |
189 |
elif use amd64; then |
190 |
PKG_V="-pkg2" |
191 |
NV_PACKAGE="${AMD64_NV_PACKAGE}" |
192 |
elif use x86-fbsd; then |
193 |
PKG_V="" |
194 |
NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" |
195 |
fi |
196 |
|
197 |
S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" |
198 |
|
199 |
mtrr_check() { |
200 |
ebegin "Checking for MTRR support" |
201 |
linux_chkconfig_present MTRR |
202 |
eend $? |
203 |
|
204 |
if [[ $? -ne 0 ]] ; then |
205 |
eerror "Please enable MTRR support in your kernel config, found at:" |
206 |
eerror |
207 |
eerror " Processor type and features" |
208 |
eerror " [*] MTRR (Memory Type Range Register) support" |
209 |
eerror |
210 |
eerror "and recompile your kernel ..." |
211 |
die "MTRR support not detected!" |
212 |
fi |
213 |
} |
214 |
|
215 |
lockdep_check() { |
216 |
if linux_chkconfig_present LOCKDEP; then |
217 |
eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." |
218 |
eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only" |
219 |
eerror "which will prevent ${P} from compiling." |
220 |
eerror "Please make sure the following options have been unset:" |
221 |
eerror " Kernel hacking --->" |
222 |
eerror " [ ] Lock debugging: detect incorrect freeing of live locks" |
223 |
eerror " [ ] Lock debugging: prove locking correctness" |
224 |
eerror " [ ] Lock usage statistics" |
225 |
eerror "in 'menuconfig'" |
226 |
die "LOCKDEP enabled" |
227 |
fi |
228 |
} |
229 |
|
230 |
pkg_setup() { |
231 |
# try to turn off distcc and ccache for people that have a problem with it |
232 |
export DISTCC_DISABLE=1 |
233 |
export CCACHE_DISABLE=1 |
234 |
|
235 |
if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then |
236 |
eerror "This ebuild doesn't currently support changing your default abi." |
237 |
die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" |
238 |
fi |
239 |
|
240 |
if use kernel_linux; then |
241 |
linux-mod_pkg_setup |
242 |
MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" |
243 |
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ |
244 |
SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" |
245 |
mtrr_check |
246 |
lockdep_check |
247 |
fi |
248 |
|
249 |
# On BSD userland it wants real make command |
250 |
use userland_BSD && MAKE="$(get_bmake)" |
251 |
|
252 |
export _POSIX2_VERSION="199209" |
253 |
|
254 |
# Since Nvidia ships 3 different series of drivers, we need to give the user |
255 |
# some kind of guidance as to what version they should install. This tries |
256 |
# to point the user in the right direction but can't be perfect. check |
257 |
# nvidia-driver.eclass |
258 |
nvidia-driver-check-warning |
259 |
|
260 |
# set variables to where files are in the package structure |
261 |
if use kernel_FreeBSD; then |
262 |
NV_DOC="${S}/doc" |
263 |
NV_EXEC="${S}/obj" |
264 |
NV_LIB="${S}/obj" |
265 |
NV_SRC="${S}/src" |
266 |
NV_MAN="${S}/x11/man" |
267 |
NV_X11="${S}/obj" |
268 |
NV_X11_DRV="${NV_X11}" |
269 |
NV_X11_EXT="${NV_X11}" |
270 |
NV_SOVER=1 |
271 |
elif use kernel_linux; then |
272 |
NV_DOC="${S}/usr/share/doc" |
273 |
NV_EXEC="${S}/usr/bin" |
274 |
NV_LIB="${S}/usr/lib" |
275 |
NV_SRC="${S}/usr/src/nv" |
276 |
NV_MAN="${S}/usr/share/man/man1" |
277 |
NV_X11="${S}/usr/X11R6/lib" |
278 |
NV_X11_DRV="${NV_X11}/modules/drivers" |
279 |
NV_X11_EXT="${NV_X11}/modules/extensions" |
280 |
NV_SOVER=${PV} |
281 |
else |
282 |
die "Could not determine proper NVIDIA package" |
283 |
fi |
284 |
} |
285 |
|
286 |
src_unpack() { |
287 |
if use kernel_linux && kernel_is lt 2 6 7; then |
288 |
echo |
289 |
ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" |
290 |
ewarn "This is not officially supported for ${P}. It is likely you" |
291 |
ewarn "will not be able to compile or use the kernel module." |
292 |
ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" |
293 |
echo |
294 |
ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." |
295 |
fi |
296 |
|
297 |
if ! use x86-fbsd; then |
298 |
mkdir "${S}" |
299 |
cd "${S}" |
300 |
unpack_makeself |
301 |
else |
302 |
unpack ${A} |
303 |
fi |
304 |
} |
305 |
|
306 |
src_prepare() { |
307 |
# Please add a brief description for every added patch |
308 |
use x86-fbsd && cd doc |
309 |
|
310 |
# Use the correct defines to make gtkglext build work |
311 |
epatch "${FILESDIR}"/NVIDIA_glx-defines.patch |
312 |
# Use some more sensible gl headers and make way for new glext.h |
313 |
epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch |
314 |
|
315 |
# Add support for the 'x86' unified kernel arch in conftest.sh |
316 |
epatch "${FILESDIR}"/195.30-unified-arch.patch |
317 |
|
318 |
if use kernel_linux; then |
319 |
# Quiet down warnings the user does not need to see |
320 |
sed -i \ |
321 |
-e 's:-Wpointer-arith::g' \ |
322 |
-e 's:-Wsign-compare::g' \ |
323 |
"${NV_SRC}"/Makefile.kbuild |
324 |
|
325 |
# If you set this then it's your own fault when stuff breaks :) |
326 |
use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.* |
327 |
|
328 |
# If greater than 2.6.5 use M= instead of SUBDIR= |
329 |
convert_to_m "${NV_SRC}"/Makefile.kbuild |
330 |
fi |
331 |
} |
332 |
|
333 |
src_compile() { |
334 |
# This is already the default on Linux, as there's no toplevel Makefile, but |
335 |
# on FreeBSD there's one and triggers the kernel module build, as we install |
336 |
# it by itself, pass this. |
337 |
|
338 |
cd "${NV_SRC}" |
339 |
if use x86-fbsd; then |
340 |
MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ |
341 |
LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die |
342 |
elif use kernel_linux; then |
343 |
linux-mod_src_compile |
344 |
fi |
345 |
} |
346 |
|
347 |
src_install() { |
348 |
if use kernel_linux; then |
349 |
linux-mod_src_install |
350 |
|
351 |
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" |
352 |
if [ -z "$VIDEOGROUP" ]; then |
353 |
eerror "Failed to determine the video group gid." |
354 |
die "Failed to determine the video group gid." |
355 |
fi |
356 |
|
357 |
# Add the aliases |
358 |
[ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" |
359 |
sed -e 's:PACKAGE:'${PF}':g' \ |
360 |
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ |
361 |
"${WORKDIR}"/nvidia |
362 |
insinto /etc/modprobe.d |
363 |
newins "${WORKDIR}"/nvidia nvidia.conf || die |
364 |
elif use x86-fbsd; then |
365 |
insinto /boot/modules |
366 |
doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die |
367 |
|
368 |
exeinto /boot/modules |
369 |
doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die |
370 |
fi |
371 |
|
372 |
# NVIDIA kernel <-> userspace driver config lib |
373 |
dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ |
374 |
die "failed to install libnvidia-cfg" |
375 |
|
376 |
# Xorg DDX driver |
377 |
insinto /usr/$(get_libdir)/xorg/modules/drivers |
378 |
doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" |
379 |
|
380 |
# Xorg GLX driver |
381 |
insinto /usr/$(get_libdir)/opengl/nvidia/extensions |
382 |
doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ |
383 |
die "failed to install libglx.so" |
384 |
dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ |
385 |
/usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ |
386 |
die "failed to create libglx.so symlink" |
387 |
|
388 |
# XvMC driver |
389 |
dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ |
390 |
die "failed to install libXvMCNVIDIA.so" |
391 |
dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ |
392 |
die "failed to install libXvMCNVIDIA.so" |
393 |
dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ |
394 |
die "failed to create libXvMCNVIDIA.so symlink" |
395 |
|
396 |
# CUDA headers (driver to come) |
397 |
if use kernel_linux; then |
398 |
dodir /usr/include/cuda |
399 |
insinto /usr/include/cuda |
400 |
doins usr/include/cuda/*.h || die "failed to install cuda headers" |
401 |
fi |
402 |
|
403 |
# OpenCL headers (driver to come) |
404 |
if [[ -d ${S}/usr/include/CL ]]; then |
405 |
dodir /usr/include/CL |
406 |
insinto /usr/include/CL |
407 |
doins usr/include/CL/*.h || die "failed to install OpenCL headers" |
408 |
|
409 |
# OpenCL ICD for NVIDIA |
410 |
dodir /etc/OpenCL/vendors |
411 |
insinto /etc/OpenCL/vendors |
412 |
doins etc/OpenCL/vendors/nvidia.icd |
413 |
fi |
414 |
|
415 |
# Documentation |
416 |
dodoc ${NV_DOC}/XF86Config.sample |
417 |
dohtml ${NV_DOC}/html/* |
418 |
if use x86-fbsd; then |
419 |
dodoc "${NV_DOC}/README" |
420 |
doman "${NV_MAN}/nvidia-xconfig.1" |
421 |
else |
422 |
# Docs |
423 |
newdoc "${NV_DOC}/README.txt" README |
424 |
dodoc "${NV_DOC}/NVIDIA_Changelog" |
425 |
doman "${NV_MAN}/nvidia-smi.1.gz" |
426 |
doman "${NV_MAN}/nvidia-xconfig.1.gz" |
427 |
fi |
428 |
|
429 |
# Helper Apps |
430 |
dobin ${NV_EXEC}/nvidia-xconfig || die |
431 |
dobin ${NV_EXEC}/nvidia-bug-report.sh || die |
432 |
if use kernel_linux; then |
433 |
dobin ${NV_EXEC}/nvidia-smi || die |
434 |
fi |
435 |
|
436 |
if has_multilib_profile ; then |
437 |
local OABI=${ABI} |
438 |
for ABI in $(get_install_abis) ; do |
439 |
src_install-libs |
440 |
done |
441 |
ABI=${OABI} |
442 |
unset OABI |
443 |
else |
444 |
src_install-libs |
445 |
fi |
446 |
|
447 |
is_final_abi || die "failed to iterate through all ABIs" |
448 |
} |
449 |
|
450 |
# Install nvidia library: |
451 |
# the first parameter is the place where to install it |
452 |
# the second parameter is the base name of the library |
453 |
# the third parameter is the provided soversion |
454 |
donvidia() { |
455 |
dodir $1 |
456 |
exeinto $1 |
457 |
|
458 |
libname=$(basename $2) |
459 |
|
460 |
doexe $2.$3 || die "failed to install $2" |
461 |
dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" |
462 |
[[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 |
463 |
} |
464 |
|
465 |
src_install-libs() { |
466 |
local inslibdir=$(get_libdir) |
467 |
local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" |
468 |
local libdir= sover= |
469 |
|
470 |
if use kernel_linux; then |
471 |
if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then |
472 |
libdir=usr/lib32 |
473 |
else |
474 |
libdir=usr/lib |
475 |
fi |
476 |
sover=${PV} |
477 |
else |
478 |
libdir=obj |
479 |
# on FreeBSD it has just .1 suffix |
480 |
sover=1 |
481 |
fi |
482 |
|
483 |
# The GLX libraries |
484 |
donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} |
485 |
donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} |
486 |
if use x86-fbsd; then |
487 |
donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} |
488 |
else |
489 |
donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} |
490 |
fi |
491 |
|
492 |
#cuda |
493 |
if [[ -f ${libdir}/libcuda.so.${sover} ]]; then |
494 |
dolib.so ${libdir}/libcuda.so.${sover} |
495 |
[[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 |
496 |
dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so |
497 |
fi |
498 |
|
499 |
#vdpau |
500 |
if [[ -f ${libdir}/vdpau/libvdpau_nvidia.so.${sover} ]]; then |
501 |
insinto /usr/${inslibdir}/vdpau |
502 |
dolib.so ${libdir}/vdpau/libvdpau_nvidia.so.${sover} |
503 |
dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so.1 |
504 |
fi |
505 |
|
506 |
# OpenCL |
507 |
if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then |
508 |
dolib.so ${libdir}/libnvidia-compiler.so.${sover} |
509 |
[[ "${sover}" != "1" ]] && dosym libnvidia-compiler.so.${sover} /usr/${inslibdir}/libnvidia-compiler.so.1 |
510 |
dosym libnvidia-compiler.so.1 /usr/${inslibdir}/libnvidia-compiler.so |
511 |
|
512 |
dolib.so ${libdir}/libOpenCL.so.1.0.0 |
513 |
dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 |
514 |
dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so |
515 |
fi |
516 |
} |
517 |
|
518 |
pkg_preinst() { |
519 |
if use kernel_linux; then |
520 |
linux-mod_pkg_postinst |
521 |
fi |
522 |
|
523 |
# Clean the dynamic libGL stuff's home to ensure |
524 |
# we dont have stale libs floating around |
525 |
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then |
526 |
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* |
527 |
fi |
528 |
# Make sure we nuke the old nvidia-glx's env.d file |
529 |
if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then |
530 |
rm -f "${ROOT}"/etc/env.d/09nvidia |
531 |
fi |
532 |
} |
533 |
|
534 |
pkg_postinst() { |
535 |
if use kernel_linux; then |
536 |
linux-mod_pkg_postinst |
537 |
fi |
538 |
|
539 |
# Switch to the nvidia implementation |
540 |
eselect opengl set --use-old nvidia |
541 |
|
542 |
echo |
543 |
elog "You must be in the video group to use the NVIDIA device" |
544 |
elog "For more info, read the docs at" |
545 |
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" |
546 |
elog |
547 |
|
548 |
elog "This ebuild installs a kernel module and X driver. Both must" |
549 |
elog "match explicitly in their version. This means, if you restart" |
550 |
elog "X, you must modprobe -r nvidia before starting it back up" |
551 |
elog |
552 |
|
553 |
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" |
554 |
elog |
555 |
elog "NVIDIA has requested that any bug reports submitted have the" |
556 |
elog "output of /usr/bin/nvidia-bug-report.sh included." |
557 |
elog |
558 |
elog "To work with compiz, you must enable the AddARGBGLXVisuals option." |
559 |
elog |
560 |
elog "If you are having resolution problems, try disabling DynamicTwinView." |
561 |
echo |
562 |
} |
563 |
|
564 |
pkg_postrm() { |
565 |
if use kernel_linux; then |
566 |
linux-mod_pkg_postrm |
567 |
fi |
568 |
eselect opengl set --use-old xorg-x11 |
569 |
} |