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