/[gentoo-x86]/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.39.ebuild
Gentoo

Contents of /x11-drivers/nvidia-drivers/nvidia-drivers-173.14.39.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sat May 30 12:30:31 2015 UTC (3 years, 6 months ago) by jer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +3 -8 lines
Drop emul-linux* dependencies (bug #544876).

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key A792A613)

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

  ViewVC Help
Powered by ViewVC 1.1.20