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