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