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