1 |
reavertm 10/02/27 05:33:51 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nvidia-drivers-173.14.25.ebuild |
5 |
Log: |
6 |
Version 173.14.25 bump, bug 305713 |
7 |
(Portage version: 2.2_rc63/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.220 x11-drivers/nvidia-drivers/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.220&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.220&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?r1=1.219&r2=1.220 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v |
19 |
retrieving revision 1.219 |
20 |
retrieving revision 1.220 |
21 |
diff -u -r1.219 -r1.220 |
22 |
--- ChangeLog 15 Feb 2010 14:38:30 -0000 1.219 |
23 |
+++ ChangeLog 27 Feb 2010 05:33:50 -0000 1.220 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for x11-drivers/nvidia-drivers |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.219 2010/02/15 14:38:30 jer Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.220 2010/02/27 05:33:50 reavertm Exp $ |
29 |
+ |
30 |
+*nvidia-drivers-173.14.25 (27 Feb 2010) |
31 |
+ |
32 |
+ 27 Feb 2010; Maciej Mrozowski <reavertm@g.o> |
33 |
+ +nvidia-drivers-173.14.25.ebuild: |
34 |
+ Version bump, bug 305713 |
35 |
|
36 |
*nvidia-drivers-96.43.16 (15 Feb 2010) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 x11-drivers/nvidia-drivers/nvidia-drivers-173.14.25.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.25.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.25.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: nvidia-drivers-173.14.25.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2010 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.25.ebuild,v 1.1 2010/02/27 05:33:50 reavertm Exp $ |
51 |
|
52 |
EAPI="2" |
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? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) |
63 |
amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) |
64 |
x86-fbsd? ( ftp://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-1.7.99 |
74 |
kernel_linux? ( >=sys-libs/glibc-2.6.1 ) |
75 |
multilib? ( app-emulation/emul-linux-x86-xlibs ) |
76 |
>=app-admin/eselect-opengl-1.0.9" |
77 |
DEPEND="${COMMON} |
78 |
kernel_linux? ( virtual/linux-sources )" |
79 |
RDEPEND="${COMMON} |
80 |
kernel_linux? ( virtual/modutils ) |
81 |
acpi? ( sys-power/acpid )" |
82 |
PDEPEND="gtk? ( media-video/nvidia-settings )" |
83 |
|
84 |
QA_TEXTRELS_x86="usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
85 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
86 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
87 |
usr/lib/opengl/nvidia/extensions/libglx.so.${PV} |
88 |
usr/lib/xorg/modules/drivers/nvidia_drv.so |
89 |
usr/lib/libcuda.so.${PV} |
90 |
usr/lib/libnvidia-cfg.so.${PV} |
91 |
usr/lib/libvdpau_nvidia.so.${PV} |
92 |
usr/lib/libXvMCNVIDIA.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/libnvidia-cfg.so.1 |
98 |
usr/lib/opengl/nvidia/extensions/libglx.so.1 |
99 |
usr/lib/xorg/modules/drivers/nvidia_drv.so" |
100 |
|
101 |
QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
102 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
103 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
104 |
usr/lib32/libcuda.so.${PV} |
105 |
usr/lib32/libvdpau_nvidia.so.${PV}" |
106 |
|
107 |
QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
108 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
109 |
usr/lib/opengl/nvidia/extensions/libglx.so.${PV} |
110 |
usr/lib/xorg/modules/drivers/nvidia_drv.so |
111 |
usr/lib/libXvMCNVIDIA.a:NVXVMC.o" |
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/libnvcompiler.so.${PV} |
116 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
117 |
usr/lib64/libXvMCNVIDIA.a:NVXVMC.o |
118 |
usr/lib64/libnvidia-cfg.so.${PV} |
119 |
usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
120 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
121 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
122 |
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} |
123 |
usr/lib64/xorg/modules/drivers/nvidia_drv.so |
124 |
usr/bin/nvidia-smi |
125 |
usr/bin/nvidia-xconfig" |
126 |
|
127 |
QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
128 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
129 |
usr/lib/opengl/nvidia/extensions/libglx.so.${PV} |
130 |
usr/lib/libXvMCNVIDIA.a" |
131 |
|
132 |
QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
133 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
134 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
135 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
136 |
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}" |
137 |
|
138 |
QA_SONAME_amd64="usr/lib64/libnvcompiler.so.${PV}" |
139 |
|
140 |
QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV} |
141 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
142 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
143 |
usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
144 |
usr/lib32/libvdpau_nvidia.so.${PV} |
145 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
146 |
usr/lib64/libcuda.so.${PV} |
147 |
usr/lib64/libnvidia-cfg.so.${PV} |
148 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
149 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
150 |
usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
151 |
usr/lib64/opengl/nvidia/extensions/libglx.so.${PV} |
152 |
usr/lib64/xorg/modules/drivers/nvidia_drv.so |
153 |
usr/lib64/libvdpau_nvidia.so.${PV} |
154 |
usr/bin/nvidia-smi |
155 |
usr/bin/nvidia-xconfig" |
156 |
|
157 |
QA_DT_HASH_x86="usr/lib/libcuda.so.${PV} |
158 |
usr/lib/libnvidia-cfg.so.${PV} |
159 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
160 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
161 |
usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV} |
162 |
usr/lib/opengl/nvidia/extensions/libglx.so.${PV} |
163 |
usr/lib/xorg/modules/drivers/nvidia_drv.so |
164 |
usr/lib/libXvMCNVIDIA.so.${PV} |
165 |
usr/lib/libvdpau_nvidia.so.${PV} |
166 |
usr/bin/nvidia-smi |
167 |
usr/bin/nvidia-xconfig" |
168 |
|
169 |
if use x86; then |
170 |
PKG_V="-pkg0" |
171 |
NV_PACKAGE="${X86_NV_PACKAGE}" |
172 |
elif use amd64; then |
173 |
PKG_V="-pkg2" |
174 |
NV_PACKAGE="${AMD64_NV_PACKAGE}" |
175 |
elif use x86-fbsd; then |
176 |
PKG_V="" |
177 |
NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" |
178 |
fi |
179 |
|
180 |
S="${WORKDIR}/${NV_PACKAGE}${PKG_V}" |
181 |
|
182 |
mtrr_check() { |
183 |
ebegin "Checking for MTRR support" |
184 |
linux_chkconfig_present MTRR |
185 |
eend $? |
186 |
|
187 |
if [[ $? -ne 0 ]] ; then |
188 |
eerror "Please enable MTRR support in your kernel config, found at:" |
189 |
eerror |
190 |
eerror " Processor type and features" |
191 |
eerror " [*] MTRR (Memory Type Range Register) support" |
192 |
eerror |
193 |
eerror "and recompile your kernel ..." |
194 |
die "MTRR support not detected!" |
195 |
fi |
196 |
} |
197 |
|
198 |
lockdep_check() { |
199 |
if linux_chkconfig_present LOCKDEP; then |
200 |
eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." |
201 |
eerror "Unfortunately, this option exports the symbol 'lockdep_init_map' as GPL-only" |
202 |
eerror "which will prevent ${P} from compiling." |
203 |
eerror "Please make sure the following options have been unset:" |
204 |
eerror " Kernel hacking --->" |
205 |
eerror " [ ] Lock debugging: detect incorrect freeing of live locks" |
206 |
eerror " [ ] Lock debugging: prove locking correctness" |
207 |
eerror " [ ] Lock usage statistics" |
208 |
eerror "in 'menuconfig'" |
209 |
die "LOCKDEP enabled" |
210 |
fi |
211 |
} |
212 |
|
213 |
pkg_setup() { |
214 |
# try to turn off distcc and ccache for people that have a problem with it |
215 |
export DISTCC_DISABLE=1 |
216 |
export CCACHE_DISABLE=1 |
217 |
|
218 |
if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then |
219 |
eerror "This ebuild doesn't currently support changing your default abi." |
220 |
die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" |
221 |
fi |
222 |
|
223 |
if use kernel_linux; then |
224 |
linux-mod_pkg_setup |
225 |
MODULE_NAMES="nvidia(video:${S}/usr/src/nv)" |
226 |
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ |
227 |
SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)" |
228 |
mtrr_check |
229 |
lockdep_check |
230 |
fi |
231 |
|
232 |
# On BSD userland it wants real make command |
233 |
use userland_BSD && MAKE="$(get_bmake)" |
234 |
|
235 |
export _POSIX2_VERSION="199209" |
236 |
|
237 |
# Since Nvidia ships 3 different series of drivers, we need to give the user |
238 |
# some kind of guidance as to what version they should install. This tries |
239 |
# to point the user in the right direction but can't be perfect. check |
240 |
# nvidia-driver.eclass |
241 |
nvidia-driver-check-warning |
242 |
|
243 |
# set variables to where files are in the package structure |
244 |
if use kernel_FreeBSD; then |
245 |
NV_DOC="${S}/doc" |
246 |
NV_EXEC="${S}/obj" |
247 |
NV_LIB="${S}/obj" |
248 |
NV_SRC="${S}/src" |
249 |
NV_MAN="${S}/x11/man" |
250 |
NV_X11="${S}/obj" |
251 |
NV_X11_DRV="${NV_X11}" |
252 |
NV_X11_EXT="${NV_X11}" |
253 |
NV_SOVER=1 |
254 |
elif use kernel_linux; then |
255 |
NV_DOC="${S}/usr/share/doc" |
256 |
NV_EXEC="${S}/usr/bin" |
257 |
NV_LIB="${S}/usr/lib" |
258 |
NV_SRC="${S}/usr/src/nv" |
259 |
NV_MAN="${S}/usr/share/man/man1" |
260 |
NV_X11="${S}/usr/X11R6/lib" |
261 |
NV_X11_DRV="${NV_X11}/modules/drivers" |
262 |
NV_X11_EXT="${NV_X11}/modules/extensions" |
263 |
NV_SOVER=${PV} |
264 |
else |
265 |
die "Could not determine proper NVIDIA package" |
266 |
fi |
267 |
} |
268 |
|
269 |
src_unpack() { |
270 |
if use kernel_linux && kernel_is lt 2 6 7; then |
271 |
echo |
272 |
ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" |
273 |
ewarn "This is not officially supported for ${P}. It is likely you" |
274 |
ewarn "will not be able to compile or use the kernel module." |
275 |
ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" |
276 |
echo |
277 |
ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." |
278 |
fi |
279 |
|
280 |
if ! use x86-fbsd; then |
281 |
mkdir "${S}" |
282 |
cd "${S}" |
283 |
unpack_makeself |
284 |
else |
285 |
unpack ${A} |
286 |
fi |
287 |
} |
288 |
|
289 |
src_prepare() { |
290 |
# Please add a brief description for every added patch |
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 |
if use kernel_linux; then |
329 |
linux-mod_src_install |
330 |
|
331 |
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" |
332 |
if [ -z "$VIDEOGROUP" ]; then |
333 |
eerror "Failed to determine the video group gid." |
334 |
die "Failed to determine the video group gid." |
335 |
fi |
336 |
|
337 |
# Add the aliases |
338 |
[ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" |
339 |
sed -e 's:PACKAGE:'${PF}':g' \ |
340 |
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ |
341 |
"${WORKDIR}"/nvidia |
342 |
insinto /etc/modprobe.d |
343 |
newins "${WORKDIR}"/nvidia nvidia.conf || die |
344 |
elif use x86-fbsd; then |
345 |
insinto /boot/modules |
346 |
doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die |
347 |
|
348 |
exeinto /boot/modules |
349 |
doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die |
350 |
fi |
351 |
|
352 |
# NVIDIA kernel <-> userspace driver config lib |
353 |
dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \ |
354 |
die "failed to install libnvidia-cfg" |
355 |
|
356 |
# Xorg DDX driver |
357 |
insinto /usr/$(get_libdir)/xorg/modules/drivers |
358 |
doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so" |
359 |
|
360 |
# Xorg GLX driver |
361 |
insinto /usr/$(get_libdir)/opengl/nvidia/extensions |
362 |
doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \ |
363 |
die "failed to install libglx.so" |
364 |
dosym /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so.${NV_SOVER} \ |
365 |
/usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \ |
366 |
die "failed to create libglx.so symlink" |
367 |
|
368 |
# XvMC driver |
369 |
dolib.a ${NV_X11}/libXvMCNVIDIA.a || \ |
370 |
die "failed to install libXvMCNVIDIA.so" |
371 |
dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \ |
372 |
die "failed to install libXvMCNVIDIA.so" |
373 |
dosym libXvMCNVIDIA.so.${NV_SOVER} /usr/$(get_libdir)/libXvMCNVIDIA.so || \ |
374 |
die "failed to create libXvMCNVIDIA.so symlink" |
375 |
|
376 |
# CUDA headers (driver to come) |
377 |
if use kernel_linux; then |
378 |
dodir /usr/include/cuda |
379 |
insinto /usr/include/cuda |
380 |
doins usr/include/cuda/*.h || die "failed to install cuda headers" |
381 |
fi |
382 |
|
383 |
# OpenCL headers (driver to come) |
384 |
if [[ -d ${S}/usr/include/CL ]]; then |
385 |
dodir /usr/include/CL |
386 |
insinto /usr/include/CL |
387 |
doins usr/include/CL/*.h || die "failed to install OpenCL headers" |
388 |
fi |
389 |
|
390 |
# Documentation |
391 |
dodoc ${NV_DOC}/XF86Config.sample |
392 |
dohtml ${NV_DOC}/html/* |
393 |
if use x86-fbsd; then |
394 |
dodoc "${NV_DOC}/README" |
395 |
doman "${NV_MAN}/nvidia-xconfig.1" |
396 |
else |
397 |
# Docs |
398 |
newdoc "${NV_DOC}/README.txt" README |
399 |
dodoc "${NV_DOC}/NVIDIA_Changelog" |
400 |
# doman "${NV_MAN}/nvidia-smi.1.gz" |
401 |
doman "${NV_MAN}/nvidia-xconfig.1.gz" |
402 |
fi |
403 |
|
404 |
# Helper Apps |
405 |
dobin ${NV_EXEC}/nvidia-xconfig || die |
406 |
dobin ${NV_EXEC}/nvidia-bug-report.sh || die |
407 |
if use kernel_linux; then |
408 |
dobin ${NV_EXEC}/nvidia-smi || die |
409 |
fi |
410 |
|
411 |
if has_multilib_profile ; then |
412 |
local OABI=${ABI} |
413 |
for ABI in $(get_install_abis) ; do |
414 |
src_install-libs |
415 |
done |
416 |
ABI=${OABI} |
417 |
unset OABI |
418 |
else |
419 |
src_install-libs |
420 |
fi |
421 |
|
422 |
is_final_abi || die "failed to iterate through all ABIs" |
423 |
} |
424 |
|
425 |
# Install nvidia library: |
426 |
# the first parameter is the place where to install it |
427 |
# the second parameter is the base name of the library |
428 |
# the third parameter is the provided soversion |
429 |
donvidia() { |
430 |
dodir $1 |
431 |
exeinto $1 |
432 |
|
433 |
libname=$(basename $2) |
434 |
|
435 |
doexe $2.$3 || die "failed to install $2" |
436 |
dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2" |
437 |
[[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 |
438 |
} |
439 |
|
440 |
src_install-libs() { |
441 |
local inslibdir=$(get_libdir) |
442 |
local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" |
443 |
local libdir= sover= |
444 |
|
445 |
if use kernel_linux; then |
446 |
if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then |
447 |
libdir=usr/lib32 |
448 |
else |
449 |
libdir=usr/lib |
450 |
fi |
451 |
sover=${PV} |
452 |
else |
453 |
libdir=obj |
454 |
# on FreeBSD it has just .1 suffix |
455 |
sover=1 |
456 |
fi |
457 |
|
458 |
# The GLX libraries |
459 |
donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover} |
460 |
donvidia ${NV_ROOT}/lib ${libdir}/libGLcore.so ${sover} |
461 |
if use x86-fbsd; then |
462 |
donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover} |
463 |
else |
464 |
donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover} |
465 |
fi |
466 |
|
467 |
#cuda |
468 |
if [[ -f ${libdir}/libcuda.so.${sover} ]]; then |
469 |
dolib.so ${libdir}/libcuda.so.${sover} |
470 |
[[ "${sover}" != "1" ]] && dosym libcuda.so.${sover} /usr/${inslibdir}/libcuda.so.1 |
471 |
dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so |
472 |
fi |
473 |
|
474 |
#vdpau |
475 |
if [[ -f ${libdir}/libvdpau_nvidia.so.${sover} ]]; then |
476 |
dolib.so ${libdir}/libvdpau_nvidia.so.${sover} |
477 |
dosym libvdpau_nvidia.so.${sover} /usr/${inslibdir}/libvdpau_nvidia.so |
478 |
fi |
479 |
|
480 |
# OpenCL |
481 |
# NOTE: This isn't currently available in the publicly released drivers. |
482 |
if [[ -f ${libdir}/libOpenCL.so.1.0.0 ]]; then |
483 |
|
484 |
dolib.so ${libdir}/libnvcompiler.so.${sover} |
485 |
[[ "${sover}" != "1" ]] && dosym libnvcompiler.so.${sover} /usr/${inslibdir}/libnvcompiler.so.1 |
486 |
dosym libnvcompiler.so.1 /usr/${inslibdir}/libnvcompiler.so |
487 |
|
488 |
dolib.so ${libdir}/libOpenCL.so.1.0.0 |
489 |
dosym libOpenCL.so.1.0.0 /usr/${inslibdir}/libOpenCL.so.1 |
490 |
dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so |
491 |
fi |
492 |
} |
493 |
|
494 |
pkg_preinst() { |
495 |
if use kernel_linux; then |
496 |
linux-mod_pkg_postinst |
497 |
fi |
498 |
|
499 |
# Clean the dynamic libGL stuff's home to ensure |
500 |
# we dont have stale libs floating around |
501 |
if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then |
502 |
rm -rf "${ROOT}"/usr/lib/opengl/nvidia/* |
503 |
fi |
504 |
# Make sure we nuke the old nvidia-glx's env.d file |
505 |
if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then |
506 |
rm -f "${ROOT}"/etc/env.d/09nvidia |
507 |
fi |
508 |
} |
509 |
|
510 |
pkg_postinst() { |
511 |
if use kernel_linux; then |
512 |
linux-mod_pkg_postinst |
513 |
fi |
514 |
|
515 |
# Switch to the nvidia implementation |
516 |
eselect opengl set --use-old nvidia |
517 |
|
518 |
echo |
519 |
elog "You must be in the video group to use the NVIDIA device" |
520 |
elog "For more info, read the docs at" |
521 |
elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6" |
522 |
elog |
523 |
|
524 |
elog "This ebuild installs a kernel module and X driver. Both must" |
525 |
elog "match explicitly in their version. This means, if you restart" |
526 |
elog "X, you must modprobe -r nvidia before starting it back up" |
527 |
elog |
528 |
|
529 |
elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\"" |
530 |
elog |
531 |
elog "NVIDIA has requested that any bug reports submitted have the" |
532 |
elog "output of /usr/bin/nvidia-bug-report.sh included." |
533 |
elog |
534 |
elog "To work with compiz, you must enable the AddARGBGLXVisuals option." |
535 |
elog |
536 |
elog "If you are having resolution problems, try disabling DynamicTwinView." |
537 |
echo |
538 |
} |
539 |
|
540 |
pkg_postrm() { |
541 |
if use kernel_linux; then |
542 |
linux-mod_pkg_postrm |
543 |
fi |
544 |
eselect opengl set --use-old xorg-x11 |
545 |
} |