Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-drivers/nvidia-drivers: nvidia-drivers-319.60.ebuild ChangeLog
Date: Wed, 02 Oct 2013 05:04:21
Message-Id: 20131002050415.C93102004C@flycatcher.gentoo.org
1 jer 13/10/02 05:04:15
2
3 Modified: ChangeLog
4 Added: nvidia-drivers-319.60.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A792A613)
9
10 Revision Changes Path
11 1.485 x11-drivers/nvidia-drivers/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.485&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.485&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?r1=1.484&r2=1.485
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v
20 retrieving revision 1.484
21 retrieving revision 1.485
22 diff -u -r1.484 -r1.485
23 --- ChangeLog 24 Sep 2013 13:27:41 -0000 1.484
24 +++ ChangeLog 2 Oct 2013 05:04:15 -0000 1.485
25 @@ -1,6 +1,11 @@
26 # ChangeLog for x11-drivers/nvidia-drivers
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.484 2013/09/24 13:27:41 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.485 2013/10/02 05:04:15 jer Exp $
30 +
31 +*nvidia-drivers-319.60 (02 Oct 2013)
32 +
33 + 02 Oct 2013; Jeroen Roovers <jer@g.o> +nvidia-drivers-319.60.ebuild:
34 + Version bump.
35
36 24 Sep 2013; Jeroen Roovers <jer@g.o> -nvidia-drivers-173.14.37.ebuild:
37 Old.
38
39
40
41 1.1 x11-drivers/nvidia-drivers/nvidia-drivers-319.60.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-319.60.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-319.60.ebuild?rev=1.1&content-type=text/plain
45
46 Index: nvidia-drivers-319.60.ebuild
47 ===================================================================
48 # Copyright 1999-2013 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-319.60.ebuild,v 1.1 2013/10/02 05:04:15 jer Exp $
51
52 EAPI=5
53
54 inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \
55 portability toolchain-funcs unpacker user udev
56
57 NV_URI="http://us.download.nvidia.com/XFree86/"
58 X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
59 AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
60 X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
61 AMD64_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86_64-${PV}"
62
63 DESCRIPTION="NVIDIA X11 driver and GLX libraries"
64 HOMEPAGE="http://www.nvidia.com/"
65 SRC_URI="
66 amd64-fbsd? ( ${NV_URI}FreeBSD-x86_64/${PV}/${AMD64_FBSD_NV_PACKAGE}.tar.gz )
67 amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
68 x86-fbsd? ( ${NV_URI}FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )
69 x86? ( ${NV_URI}Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
70 "
71
72 LICENSE="GPL-2 NVIDIA-r1"
73 SLOT="0"
74 KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
75 IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X"
76 RESTRICT="bindist mirror strip"
77 EMULTILIB_PKG="true"
78
79 COMMON="
80 app-admin/eselect-opencl
81 kernel_linux? ( >=sys-libs/glibc-2.6.1 )
82 X? (
83 >=app-admin/eselect-opengl-1.0.9
84 )
85 "
86 DEPEND="
87 ${COMMON}
88 app-arch/xz-utils
89 kernel_linux? ( virtual/linux-sources )
90 "
91 RDEPEND="
92 ${COMMON}
93 acpi? ( sys-power/acpid )
94 tools? (
95 dev-libs/atk
96 dev-libs/glib
97 x11-libs/gdk-pixbuf
98 x11-libs/gtk+:2
99 x11-libs/libX11
100 x11-libs/libXext
101 x11-libs/pango[X]
102 )
103 X? (
104 <x11-base/xorg-server-1.14.99
105 >=x11-libs/libvdpau-0.3-r1
106 multilib? (
107 || (
108 (
109 x11-libs/libX11[abi_x86_32]
110 x11-libs/libXext[abi_x86_32]
111 )
112 app-emulation/emul-linux-x86-xlibs
113 )
114 )
115 )
116 "
117
118 REQUIRED_USE="tools? ( X )"
119
120 QA_PREBUILT="opt/* usr/lib*"
121
122 S=${WORKDIR}/
123
124 pkg_pretend() {
125
126 if use amd64 && has_multilib_profile && \
127 [ "${DEFAULT_ABI}" != "amd64" ]; then
128 eerror "This ebuild doesn't currently support changing your default ABI"
129 die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
130 fi
131
132 if use kernel_linux && kernel_is ge 3 11 ; then
133 ewarn "Gentoo supports kernels which are supported by NVIDIA"
134 ewarn "which are limited to the following kernels:"
135 ewarn "<sys-kernel/gentoo-sources-3.11"
136 ewarn "<sys-kernel/vanilla-sources-3.11"
137 ewarn ""
138 ewarn "You are free to utilize epatch_user to provide whatever"
139 ewarn "support you feel is appropriate, but will not receive"
140 ewarn "support as a result of those changes."
141 ewarn ""
142 ewarn "Do not file a bug report about this."
143 fi
144
145 # Since Nvidia ships 3 different series of drivers, we need to give the user
146 # some kind of guidance as to what version they should install. This tries
147 # to point the user in the right direction but can't be perfect. check
148 # nvidia-driver.eclass
149 nvidia-driver-check-warning
150
151 # Kernel features/options to check for
152 CONFIG_CHECK="~ZONE_DMA ~MTRR ~SYSVIPC ~!LOCKDEP"
153 use x86 && CONFIG_CHECK+=" ~HIGHMEM"
154
155 # Now do the above checks
156 use kernel_linux && check_extra_config
157 }
158
159 pkg_setup() {
160 # try to turn off distcc and ccache for people that have a problem with it
161 export DISTCC_DISABLE=1
162 export CCACHE_DISABLE=1
163
164 if use kernel_linux; then
165 linux-mod_pkg_setup
166 MODULE_NAMES="nvidia(video:${S}/kernel)"
167 BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
168 SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)"
169 # linux-mod_src_compile calls set_arch_to_kernel, which
170 # sets the ARCH to x86 but NVIDIA's wrapping Makefile
171 # expects x86_64 or i386 and then converts it to x86
172 # later on in the build process
173 BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
174 fi
175
176 # set variables to where files are in the package structure
177 if use kernel_FreeBSD; then
178 use x86-fbsd && S="${WORKDIR}/${X86_FBSD_NV_PACKAGE}"
179 use amd64-fbsd && S="${WORKDIR}/${AMD64_FBSD_NV_PACKAGE}"
180 NV_DOC="${S}/doc"
181 NV_OBJ="${S}/obj"
182 NV_SRC="${S}/src"
183 NV_MAN="${S}/x11/man"
184 NV_X11="${S}/obj"
185 NV_SOVER=1
186 elif use kernel_linux; then
187 NV_DOC="${S}"
188 NV_OBJ="${S}"
189 NV_SRC="${S}/kernel"
190 NV_MAN="${S}"
191 NV_X11="${S}"
192 NV_SOVER=${PV}
193 else
194 die "Could not determine proper NVIDIA package"
195 fi
196 }
197
198 src_unpack() {
199 if ! use kernel_FreeBSD; then
200 cd "${S}"
201 unpack_makeself
202 else
203 unpack ${A}
204 fi
205 }
206
207 src_prepare() {
208 # Please add a brief description for every added patch
209
210 if use kernel_linux; then
211 if kernel_is lt 2 6 9 ; then
212 eerror "You must build this against 2.6.9 or higher kernels."
213 fi
214
215 # If greater than 2.6.5 use M= instead of SUBDIR=
216 convert_to_m "${NV_SRC}"/Makefile.kbuild
217 fi
218
219 if use pax_kernel; then
220 ewarn "Using PAX patches is not supported. You will be asked to"
221 ewarn "use a standard kernel should you have issues. Should you"
222 ewarn "need support with these patches, contact the PaX team."
223 epatch "${FILESDIR}"/${PN}-pax-const.patch
224 epatch "${FILESDIR}"/${PN}-pax-usercopy.patch
225 fi
226
227 # Allow user patches so they can support RC kernels and whatever else
228 epatch_user
229 }
230
231 src_compile() {
232 # This is already the default on Linux, as there's no toplevel Makefile, but
233 # on FreeBSD there's one and triggers the kernel module build, as we install
234 # it by itself, pass this.
235
236 cd "${NV_SRC}"
237 if use kernel_FreeBSD; then
238 MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
239 LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
240 elif use kernel_linux; then
241 linux-mod_src_compile
242 fi
243 }
244
245 # Install nvidia library:
246 # the first parameter is the library to install
247 # the second parameter is the provided soversion
248 # the third parameter is the target directory if its not /usr/lib
249 donvidia() {
250 # Full path to library minus SOVER
251 MY_LIB="$1"
252
253 # SOVER to use
254 MY_SOVER="$2"
255
256 # Where to install
257 MY_DEST="$3"
258
259 if [[ -z "${MY_DEST}" ]]; then
260 MY_DEST="/usr/$(get_libdir)"
261 action="dolib.so"
262 else
263 exeinto ${MY_DEST}
264 action="doexe"
265 fi
266
267 # Get just the library name
268 libname=$(basename $1)
269
270 # Install the library with the correct SOVER
271 ${action} ${MY_LIB}.${MY_SOVER} || \
272 die "failed to install ${libname}"
273
274 # If SOVER wasn't 1, then we need to create a .1 symlink
275 if [[ "${MY_SOVER}" != "1" ]]; then
276 dosym ${libname}.${MY_SOVER} \
277 ${MY_DEST}/${libname}.1 || \
278 die "failed to create ${libname} symlink"
279 fi
280
281 # Always create the symlink from the raw lib to the .1
282 dosym ${libname}.1 \
283 ${MY_DEST}/${libname} || \
284 die "failed to create ${libname} symlink"
285 }
286
287 src_install() {
288 if use kernel_linux; then
289 linux-mod_src_install
290
291 VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)"
292 if [ -z "$VIDEOGROUP" ]; then
293 eerror "Failed to determine the video group gid."
294 die "Failed to determine the video group gid."
295 fi
296
297 # Add the aliases
298 [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR"
299 sed -e 's:PACKAGE:'${PF}':g' \
300 -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \
301 "${WORKDIR}"/nvidia
302 insinto /etc/modprobe.d
303 newins "${WORKDIR}"/nvidia nvidia.conf
304
305 # Ensures that our device nodes are created when not using X
306 exeinto "$(udev_get_udevdir)"
307 doexe "${FILESDIR}"/nvidia-udev.sh
308 udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
309
310 elif use kernel_FreeBSD; then
311 if use x86-fbsd; then
312 insinto /boot/modules
313 doins "${S}/src/nvidia.kld"
314 fi
315
316 exeinto /boot/modules
317 doexe "${S}/src/nvidia.ko"
318 fi
319
320 # NVIDIA kernel <-> userspace driver config lib
321 donvidia ${NV_OBJ}/libnvidia-cfg.so ${NV_SOVER}
322
323 # NVIDIA video encode/decode <-> CUDA
324 if use kernel_linux; then
325 donvidia ${NV_OBJ}/libnvcuvid.so ${NV_SOVER}
326 donvidia ${NV_OBJ}/libnvidia-encode.so ${NV_SOVER}
327 fi
328
329 if use X; then
330 # Xorg DDX driver
331 insinto /usr/$(get_libdir)/xorg/modules/drivers
332 doins ${NV_X11}/nvidia_drv.so
333
334 # Xorg GLX driver
335 donvidia ${NV_X11}/libglx.so ${NV_SOVER} \
336 /usr/$(get_libdir)/opengl/nvidia/extensions
337 fi
338
339 # OpenCL ICD for NVIDIA
340 if use kernel_linux; then
341 insinto /etc/OpenCL/vendors
342 doins ${NV_OBJ}/nvidia.icd
343 fi
344
345 # Documentation
346 dohtml ${NV_DOC}/html/*
347 if use kernel_FreeBSD; then
348 dodoc "${NV_DOC}/README"
349 use X && doman "${NV_MAN}/nvidia-xconfig.1"
350 use tools && doman "${NV_MAN}/nvidia-settings.1"
351 else
352 # Docs
353 newdoc "${NV_DOC}/README.txt" README
354 dodoc "${NV_DOC}/NVIDIA_Changelog"
355 doman "${NV_MAN}/nvidia-smi.1.gz"
356 use X && doman "${NV_MAN}/nvidia-xconfig.1.gz"
357 use tools && doman "${NV_MAN}/nvidia-settings.1.gz"
358 doman "${NV_MAN}/nvidia-cuda-mps-control.1.gz"
359 fi
360
361 # Helper Apps
362 exeinto /opt/bin/
363
364 if use X; then
365 doexe ${NV_OBJ}/nvidia-xconfig
366 fi
367
368 if use kernel_linux ; then
369 doexe ${NV_OBJ}/nvidia-cuda-mps-control
370 doexe ${NV_OBJ}/nvidia-cuda-mps-server
371 doexe ${NV_OBJ}/nvidia-debugdump
372 doexe ${NV_OBJ}/nvidia-modprobe
373 doexe ${NV_OBJ}/nvidia-persistenced
374 doexe ${NV_OBJ}/nvidia-smi
375 doman nvidia-cuda-mps-control.1.gz
376 doman nvidia-modprobe.1.gz
377 doman nvidia-persistenced.1.gz
378 newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
379 fi
380
381 if use tools; then
382 doexe ${NV_OBJ}/nvidia-settings
383 fi
384
385 exeinto /usr/bin/
386 doexe ${NV_OBJ}/nvidia-bug-report.sh
387
388 # Desktop entries for nvidia-settings
389 if use tools ; then
390 # There is no icon in the FreeBSD tarball.
391 use kernel_FreeBSD || newicon ${NV_OBJ}/nvidia-settings.png ${PN}-settings.png
392 domenu "${FILESDIR}"/${PN}-settings.desktop
393 exeinto /etc/X11/xinit/xinitrc.d
394 doexe "${FILESDIR}"/95-nvidia-settings
395 fi
396
397 #doenvd "${FILESDIR}"/50nvidia-prelink-blacklist
398
399 if has_multilib_profile && use multilib ; then
400 local OABI=${ABI}
401 for ABI in $(get_install_abis) ; do
402 src_install-libs
403 done
404 ABI=${OABI}
405 unset OABI
406 else
407 src_install-libs
408 fi
409
410 is_final_abi || die "failed to iterate through all ABIs"
411 }
412
413 src_install-libs() {
414 local inslibdir=$(get_libdir)
415 local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
416 local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
417 local libdir=${NV_OBJ}
418
419 if use kernel_linux && has_multilib_profile && \
420 [[ ${ABI} == "x86" ]] ; then
421 libdir=${NV_OBJ}/32
422 fi
423
424 if use X; then
425 # The GLX libraries
426 donvidia ${libdir}/libGL.so ${NV_SOVER} ${GL_ROOT}
427 donvidia ${libdir}/libnvidia-glcore.so ${NV_SOVER}
428 if use kernel_FreeBSD; then
429 donvidia ${libdir}/libnvidia-tls.so ${NV_SOVER}
430 else
431 donvidia ${libdir}/tls/libnvidia-tls.so ${NV_SOVER}
432 fi
433
434 # VDPAU
435 donvidia ${libdir}/libvdpau_nvidia.so ${NV_SOVER}
436 fi
437
438 # NVIDIA monitoring library
439 if use kernel_linux ; then
440 donvidia ${libdir}/libnvidia-ml.so ${NV_SOVER}
441 fi
442
443 # CUDA & OpenCL
444 if use kernel_linux; then
445 donvidia ${libdir}/libcuda.so ${NV_SOVER}
446 donvidia ${libdir}/libnvidia-compiler.so ${NV_SOVER}
447 donvidia ${libdir}/libOpenCL.so 1.0.0 ${CL_ROOT}
448 donvidia ${libdir}/libnvidia-opencl.so ${NV_SOVER}
449 fi
450 }
451
452 pkg_preinst() {
453 use kernel_linux && linux-mod_pkg_preinst
454
455 # Clean the dynamic libGL stuff's home to ensure
456 # we dont have stale libs floating around
457 if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then
458 rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
459 fi
460 # Make sure we nuke the old nvidia-glx's env.d file
461 if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then
462 rm -f "${ROOT}"/etc/env.d/09nvidia
463 fi
464 }
465
466 pkg_postinst() {
467 use kernel_linux && linux-mod_pkg_postinst
468
469 # Switch to the nvidia implementation
470 use X && "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
471 "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
472
473 elog "You must be in the video group to use the NVIDIA device"
474 elog "For more info, read the docs at"
475 elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6"
476 elog
477 elog "This ebuild installs a kernel module and X driver. Both must"
478 elog "match explicitly in their version. This means, if you restart"
479 elog "X, you must modprobe -r nvidia before starting it back up"
480 elog
481 elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\""
482 elog
483 elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\""
484 elog
485 elog "NVIDIA has requested that any bug reports submitted have the"
486 elog "output of nvidia-bug-report.sh included."
487 elog
488 if ! use X; then
489 elog "You have elected to not install the X.org driver. Along with"
490 elog "this the OpenGL libraries and VDPAU libraries were not"
491 elog "installed. Additionally, once the driver is loaded your card"
492 elog "and fan will run at max speed which may not be desirable."
493 elog "Use the 'nvidia-smi' init script to have your card and fan"
494 elog "speed scale appropriately."
495 elog
496 fi
497 if ! use tools; then
498 elog "USE=tools controls whether the nvidia-settings application"
499 elog "is installed. If you would like to use it, enable that"
500 elog "flag and re-emerge this ebuild. Optionally you can install"
501 elog "media-video/nvidia-settings"
502 elog
503 fi
504 }
505
506 pkg_prerm() {
507 use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
508 }
509
510 pkg_postrm() {
511 use kernel_linux && linux-mod_pkg_postrm
512 use X && "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
513 }