1 |
cardoe 08/02/28 15:35:48 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nvidia-drivers-169.12.ebuild |
5 |
Log: |
6 |
version bump |
7 |
(Portage version: 2.1.4.4) |
8 |
|
9 |
Revision Changes Path |
10 |
1.85 x11-drivers/nvidia-drivers/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.85&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.85&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?r1=1.84&r2=1.85 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v |
19 |
retrieving revision 1.84 |
20 |
retrieving revision 1.85 |
21 |
diff -u -r1.84 -r1.85 |
22 |
--- ChangeLog 23 Feb 2008 20:42:52 -0000 1.84 |
23 |
+++ ChangeLog 28 Feb 2008 15:35:48 -0000 1.85 |
24 |
@@ -1,6 +1,11 @@ |
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.84 2008/02/23 20:42:52 vapier Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.85 2008/02/28 15:35:48 cardoe Exp $ |
29 |
+ |
30 |
+*nvidia-drivers-169.12 (28 Feb 2008) |
31 |
+ |
32 |
+ 28 Feb 2008; Doug Klima <cardoe@g.o> +nvidia-drivers-169.12.ebuild: |
33 |
+ version bump |
34 |
|
35 |
18 Feb 2008; Doug Klima <cardoe@g.o> |
36 |
nvidia-drivers-169.09-r1.ebuild: |
37 |
|
38 |
|
39 |
|
40 |
1.1 x11-drivers/nvidia-drivers/nvidia-drivers-169.12.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-169.12.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-169.12.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: nvidia-drivers-169.12.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2008 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-169.12.ebuild,v 1.1 2008/02/28 15:35:48 cardoe 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? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) |
60 |
amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) |
61 |
x86-fbsd? ( http://us.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 |
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 |
cd "${WORKDIR}" |
238 |
bash "${DISTDIR}"/${NV_PACKAGE}${PKG_V}.run --extract-only |
239 |
else |
240 |
unpack ${A} |
241 |
fi |
242 |
|
243 |
# Patches go below here, add brief description |
244 |
cd "${S}" |
245 |
use x86-fbsd && cd doc |
246 |
|
247 |
# Use the correct defines to make gtkglext build work |
248 |
epatch "${FILESDIR}"/NVIDIA_glx-defines.patch |
249 |
# Use some more sensible gl headers and make way for new glext.h |
250 |
epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch |
251 |
|
252 |
# allow on board sensors to work with lm_sensors |
253 |
if use kernel_linux; then |
254 |
epatch "${FILESDIR}"/NVIDIA_i2c-hwmon.patch |
255 |
fi |
256 |
|
257 |
if use kernel_linux; then |
258 |
# Quiet down warnings the user does not need to see |
259 |
sed -i \ |
260 |
-e 's:-Wpointer-arith::g' \ |
261 |
-e 's:-Wsign-compare::g' \ |
262 |
"${NV_SRC}"/Makefile.kbuild |
263 |
|
264 |
# If you set this then it's your own fault when stuff breaks :) |
265 |
use custom-cflags && sed -i "s:-O:${CFLAGS}:" Makefile.* |
266 |
|
267 |
# If greater than 2.6.5 use M= instead of SUBDIR= |
268 |
convert_to_m "${NV_SRC}"/Makefile.kbuild |
269 |
fi |
270 |
} |
271 |
|
272 |
src_compile() { |
273 |
# This is already the default on Linux, as there's no toplevel Makefile, but |
274 |
# on FreeBSD there's one and triggers the kernel module build, as we install |
275 |
# it by itself, pass this. |
276 |
|
277 |
cd "${NV_SRC}" |
278 |
if use x86-fbsd; then |
279 |
MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ |
280 |
LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die |
281 |
elif use kernel_linux; then |
282 |
linux-mod_src_compile |
283 |
fi |
284 |
} |
285 |
|
286 |
src_install() { |
287 |
local MLTEST=$(type dyn_unpack) |
288 |
|
289 |
cd "${S}" |
290 |
|
291 |
if use kernel_linux; then |
292 |
linux-mod_src_install |
293 |
|
294 |
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" |
295 |
if [ -z "$VIDEOGROUP" ]; then |
296 |
eerror "Failed to determine the video group gid." |
297 |
die "Failed to determine the video group gid." |
298 |
fi |
299 |
|
300 |
# Add the aliases |
301 |
[ -f "${FILESDIR}/nvidia" ] || die "nvidia missing in FILESDIR" |
302 |
sed -e 's:PACKAGE:'${PF}':g' \ |
303 |
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ |
304 |
"${WORKDIR}"/nvidia |
305 |
insinto /etc/modules.d |
306 |
doins "${WORKDIR}"/nvidia || die |
307 |
elif use x86-fbsd; then |
308 |
insinto /boot/modules |
309 |
doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die |
310 |
|
311 |
exeinto /boot/modules |
312 |
doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die |
313 |
fi |
314 |
|
315 |
if has_multilib_profile ; then |
316 |
local OABI=${ABI} |
317 |
for ABI in $(get_install_abis) ; do |
318 |
src_install-libs |
319 |
done |
320 |
ABI=${OABI} |
321 |
unset OABI |
322 |
elif use amd64 ; then |
323 |
src_install-libs lib32 $(get_multilibdir) |
324 |
src_install-libs lib $(get_libdir) |
325 |
|
326 |
rm -rf "${D}"/usr/$(get_multilibdir)/opengl/nvidia/include |
327 |
rm -rf "${D}"/usr/$(get_multilibdir)/opengl/nvidia/extensions |
328 |
else |
329 |
src_install-libs |
330 |
fi |
331 |
|
332 |
is_final_abi || return 0 |
333 |
|
334 |
# Documentation |
335 |
dodoc "${NV_DOC}"/{XF86Config.sample,Copyrights} |
336 |
dohtml "${NV_DOC}"/html/* |
337 |
if use x86-fbsd; then |
338 |
dodoc "${NV_DOC}/README" |
339 |
else |
340 |
# Docs |
341 |
newdoc "${NV_DOC}/README.txt" README |
342 |
dodoc "${NV_DOC}/NVIDIA_Changelog" |
343 |
fi |
344 |
|
345 |
# Helper Apps |
346 |
dobin ${NV_EXEC}/nvidia-xconfig || die |
347 |
dobin ${NV_EXEC}/nvidia-bug-report.sh || die |
348 |
} |
349 |
|
350 |
# Install nvidia library: |
351 |
# the first parameter is the place where to install it |
352 |
# the second parameter is the base name of the library |
353 |
# the third parameter is the provided soversion |
354 |
donvidia() { |
355 |
dodir $1 |
356 |
exeinto $1 |
357 |
|
358 |
libname=$(basename $2) |
359 |
|
360 |
doexe $2.$3 |
361 |
dosym ${libname}.$3 $1/${libname} |
362 |
|
363 |
[[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 |
364 |
} |
365 |
|
366 |
src_install-libs() { |
367 |
local pkglibdir=lib |
368 |
local inslibdir=$(get_libdir) |
369 |
|
370 |
if [[ ${#} -eq 2 ]] ; then |
371 |
pkglibdir=${1} |
372 |
inslibdir=${2} |
373 |
elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then |
374 |
pkglibdir=lib32 |
375 |
fi |
376 |
|
377 |
local usrpkglibdir=usr/${pkglibdir} |
378 |
local libdir=usr/X11R6/${pkglibdir} |
379 |
local drvdir=${libdir}/modules/drivers |
380 |
local extdir=${libdir}/modules/extensions |
381 |
local incdir=usr/include/GL |
382 |
local sover=${PV} |
383 |
local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" |
384 |
local NO_TLS_ROOT="${NV_ROOT}/no-tls" |
385 |
local TLS_ROOT="${NV_ROOT}/tls" |
386 |
local X11_LIB_DIR="/usr/${inslibdir}/xorg" |
387 |
|
388 |
if use x86-fbsd; then |
389 |
# on FreeBSD everything is on obj/ |
390 |
pkglibdir=obj |
391 |
usrpkglibdir=obj |
392 |
x11pkglibdir=obj |
393 |
drvdir=obj |
394 |
extdir=obj |
395 |
|
396 |
# don't ask me why the headers are there.. glxext.h is missing |
397 |
incdir=doc |
398 |
|
399 |
# on FreeBSD it has just .1 suffix |
400 |
sover=1 |
401 |
fi |
402 |
|
403 |
# The GLX libraries |
404 |
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover} |
405 |
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover} |
406 |
|
407 |
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover} |
408 |
|
409 |
dodir ${NO_TLS_ROOT} |
410 |
donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover} |
411 |
|
412 |
if ! use x86-fbsd; then |
413 |
donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover} |
414 |
fi |
415 |
|
416 |
if want_tls ; then |
417 |
dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib |
418 |
dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib |
419 |
dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib |
420 |
else |
421 |
dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib |
422 |
dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib |
423 |
dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib |
424 |
fi |
425 |
|
426 |
if ! use x86-fbsd; then |
427 |
# Install the .la file for libtool, to prevent e.g. bug #176423 |
428 |
[ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR" |
429 |
local ver1=$(get_version_component_range 1) |
430 |
local ver2=$(get_version_component_range 2) |
431 |
local ver3=$(get_version_component_range 3) |
432 |
sed -e "s:\${PV}:${PV}:" \ |
433 |
-e "s:\${ver1}:${ver1}:" \ |
434 |
-e "s:\${ver2}:${ver2}:" \ |
435 |
-e "s:\${ver3}:${ver3}:" \ |
436 |
-e "s:\${libdir}:${inslibdir}:" \ |
437 |
"${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la |
438 |
fi |
439 |
|
440 |
exeinto ${X11_LIB_DIR}/modules/drivers |
441 |
|
442 |
[[ -f ${drvdir}/nvidia_drv.so ]] && \ |
443 |
doexe ${drvdir}/nvidia_drv.so |
444 |
|
445 |
insinto /usr/${inslibdir} |
446 |
[[ -f ${libdir}/libXvMCNVIDIA.a ]] && \ |
447 |
doins ${libdir}/libXvMCNVIDIA.a |
448 |
exeinto /usr/${inslibdir} |
449 |
# fix Bug 131315 |
450 |
[[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \ |
451 |
doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \ |
452 |
dosym libXvMCNVIDIA.so.${PV} \ |
453 |
/usr/${inslibdir}/libXvMCNVIDIA.so |
454 |
|
455 |
exeinto ${NV_ROOT}/extensions |
456 |
[[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \ |
457 |
newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so |
458 |
[[ -f ${extdir}/libglx.so.${sover} ]] && \ |
459 |
newexe ${extdir}/libglx.so.${sover} libglx.so |
460 |
|
461 |
# Includes |
462 |
insinto ${NV_ROOT}/include |
463 |
doins ${incdir}/*.h |
464 |
|
465 |
#cuda |
466 |
if [[ -f usr/include/cuda/cuda.h ]]; then |
467 |
dodir /usr/include/cuda |
468 |
insinto /usr/include/cuda |
469 |
doins usr/include/cuda/*.h |
470 |
|
471 |
dolib.so usr/${pkglibdir}/libcuda.so.${PV} |
472 |
dosym libcuda.so.${PV} /usr/${inslibdir}/libcuda.so.1 |
473 |
dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so |
474 |
fi |
475 |
} |
476 |
|
477 |
pkg_preinst() { |
478 |
|
479 |
# Clean the dynamic libGL stuff's home to ensure |
480 |
# we dont have stale libs floating around |
481 |
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then |
482 |
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* |
483 |
fi |
484 |
# Make sure we nuke the old nvidia-glx's env.d file |
485 |
if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then |
486 |
rm -f "${ROOT}"/etc/env.d/09nvidia |
487 |
fi |
488 |
} |
489 |
|
490 |
pkg_postinst() { |
491 |
if use kernel_linux; then |
492 |
linux-mod_pkg_postinst |
493 |
fi |
494 |
|
495 |
# Switch to the nvidia implementation |
496 |
eselect opengl set --use-old nvidia |
497 |
|
498 |
echo |
499 |
elog "You must be in the video group to use the NVIDIA device" |
500 |
elog "For more info, read the docs at" |
501 |
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" |
502 |
elog |
503 |
|
504 |
elog "This ebuild installs a kernel module and X driver. Both must" |
505 |
elog "match explicitly in their version. This means, if you restart" |
506 |
elog "X, you most modprobe -r nvidia before starting it back up" |
507 |
elog |
508 |
|
509 |
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" |
510 |
elog |
511 |
elog "nVidia has requested that any bug reports submitted have the" |
512 |
elog "output of /usr/bin/nvidia-bug-report.sh included." |
513 |
elog |
514 |
elog "To work with compiz, you must enable the AddARGBGLXVisuals option." |
515 |
elog |
516 |
elog "If you are having resolution problems, try disabling DynamicTwinView." |
517 |
echo |
518 |
} |
519 |
|
520 |
want_tls() { |
521 |
# For uclibc or anything non glibc, return false |
522 |
has_version sys-libs/glibc || return 1 |
523 |
|
524 |
# Old versions of glibc were lt/no-tls only |
525 |
has_version '<sys-libs/glibc-2.3.2' && return 1 |
526 |
|
527 |
if use x86 ; then |
528 |
case ${CHOST/-*} in |
529 |
i486|i586|i686) ;; |
530 |
*) return 1 ;; |
531 |
esac |
532 |
fi |
533 |
|
534 |
# If we've got nptl, we've got tls |
535 |
built_with_use --missing true sys-libs/glibc nptl && return 0 |
536 |
|
537 |
# 2.3.5 turned off tls for linuxthreads glibc on i486 and i586 |
538 |
if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then |
539 |
case ${CHOST/-*} in |
540 |
i486|i586) return 1 ;; |
541 |
esac |
542 |
fi |
543 |
|
544 |
# These versions built linuxthreads version to support tls, too |
545 |
has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0 |
546 |
|
547 |
return 1 |
548 |
} |
549 |
|
550 |
pkg_postrm() { |
551 |
if use kernel_linux; then |
552 |
linux-mod_pkg_postrm |
553 |
fi |
554 |
eselect opengl set --use-old xorg-x11 |
555 |
} |
556 |
|
557 |
|
558 |
|
559 |
-- |
560 |
gentoo-commits@l.g.o mailing list |