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