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