1 |
cardoe 07/09/27 21:53:35 |
2 |
|
3 |
Modified: ChangeLog nvidia-drivers-100.14.19.ebuild |
4 |
Added: nvidia-drivers-96.43.01.ebuild |
5 |
nvidia-drivers-71.86.01.ebuild |
6 |
Log: |
7 |
bump both nvidia legacy drivers to their latest revisions. Remove hack since it's no longer needed. |
8 |
(Portage version: 2.1.3.9) |
9 |
|
10 |
Revision Changes Path |
11 |
1.64 x11-drivers/nvidia-drivers/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.64&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.64&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?r1=1.63&r2=1.64 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v |
20 |
retrieving revision 1.63 |
21 |
retrieving revision 1.64 |
22 |
diff -u -r1.63 -r1.64 |
23 |
--- ChangeLog 20 Sep 2007 19:55:12 -0000 1.63 |
24 |
+++ ChangeLog 27 Sep 2007 21:53:35 -0000 1.64 |
25 |
@@ -1,6 +1,15 @@ |
26 |
# ChangeLog for x11-drivers/nvidia-drivers |
27 |
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.63 2007/09/20 19:55:12 wolf31o2 Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.64 2007/09/27 21:53:35 cardoe Exp $ |
30 |
+ |
31 |
+*nvidia-drivers-96.43.01 (27 Sep 2007) |
32 |
+*nvidia-drivers-71.86.01 (27 Sep 2007) |
33 |
+ |
34 |
+ 27 Sep 2007; Doug Goldstein <cardoe@g.o> |
35 |
+ +nvidia-drivers-71.86.01.ebuild, +nvidia-drivers-96.43.01.ebuild, |
36 |
+ nvidia-drivers-100.14.19.ebuild: |
37 |
+ bump both nvidia legacy drivers to their latest revisions. Remove hack since |
38 |
+ it's no longer needed. |
39 |
|
40 |
20 Sep 2007; Chris Gianelloni <wolf31o2@g.o> -files/nvidia-2, |
41 |
-files/NVIDIA_kernel-2.6.19.patch, files/nvidia, |
42 |
|
43 |
|
44 |
|
45 |
1.3 x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild?rev=1.3&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild?rev=1.3&content-type=text/plain |
49 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild?r1=1.2&r2=1.3 |
50 |
|
51 |
Index: nvidia-drivers-100.14.19.ebuild |
52 |
=================================================================== |
53 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild,v |
54 |
retrieving revision 1.2 |
55 |
retrieving revision 1.3 |
56 |
diff -u -r1.2 -r1.3 |
57 |
--- nvidia-drivers-100.14.19.ebuild 20 Sep 2007 19:55:12 -0000 1.2 |
58 |
+++ nvidia-drivers-100.14.19.ebuild 27 Sep 2007 21:53:35 -0000 1.3 |
59 |
@@ -1,18 +1,17 @@ |
60 |
# Copyright 1999-2007 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild,v 1.2 2007/09/20 19:55:12 wolf31o2 Exp $ |
63 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-100.14.19.ebuild,v 1.3 2007/09/27 21:53:35 cardoe Exp $ |
64 |
|
65 |
inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver |
66 |
|
67 |
-NV_V="${PV/1.0./1.0-}" |
68 |
-X86_NV_PACKAGE="NVIDIA-Linux-x86-${NV_V}" |
69 |
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${NV_V}" |
70 |
-X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${NV_V}" |
71 |
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" |
72 |
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" |
73 |
+X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" |
74 |
|
75 |
DESCRIPTION="NVIDIA X11 driver and GLX libraries" |
76 |
HOMEPAGE="http://www.nvidia.com/" |
77 |
-SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${NV_V}/${X86_NV_PACKAGE}-pkg0.run ) |
78 |
- amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${NV_V}/${AMD64_NV_PACKAGE}-pkg2.run )" |
79 |
+SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) |
80 |
+ amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run )" |
81 |
|
82 |
LICENSE="NVIDIA" |
83 |
SLOT="0" |
84 |
|
85 |
|
86 |
|
87 |
1.1 x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild |
88 |
|
89 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild?rev=1.1&view=markup |
90 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild?rev=1.1&content-type=text/plain |
91 |
|
92 |
Index: nvidia-drivers-96.43.01.ebuild |
93 |
=================================================================== |
94 |
# Copyright 1999-2007 Gentoo Foundation |
95 |
# Distributed under the terms of the GNU General Public License v2 |
96 |
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-96.43.01.ebuild,v 1.1 2007/09/27 21:53:35 cardoe Exp $ |
97 |
|
98 |
inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver |
99 |
|
100 |
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" |
101 |
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" |
102 |
X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" |
103 |
|
104 |
DESCRIPTION="NVIDIA X11 driver and GLX libraries" |
105 |
HOMEPAGE="http://www.nvidia.com/" |
106 |
SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) |
107 |
amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) |
108 |
x86-fbsd? ( http://us.download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" |
109 |
|
110 |
LICENSE="NVIDIA" |
111 |
SLOT="0" |
112 |
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
113 |
IUSE="gtk multilib" |
114 |
RESTRICT="strip" |
115 |
EMULTILIB_PKG="true" |
116 |
|
117 |
COMMON="x11-base/xorg-server |
118 |
multilib? ( app-emulation/emul-linux-x86-xlibs ) |
119 |
kernel_FreeBSD? ( !media-video/nvidia-freebsd ) |
120 |
!app-emulation/emul-linux-x86-nvidia |
121 |
!x11-drivers/nvidia-legacy-drivers" |
122 |
DEPEND="${COMMON} |
123 |
kernel_linux? ( virtual/linux-sources ) |
124 |
app-admin/eselect-opengl" |
125 |
RDEPEND="${COMMON} |
126 |
kernel_linux? ( virtual/modutils ) |
127 |
media-libs/mesa" |
128 |
PDEPEND="gtk? ( media-video/nvidia-settings )" |
129 |
|
130 |
QA_TEXTRELS_x86="usr/lib/xorg/libXvMCNVIDIA.so.${PV} |
131 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
132 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
133 |
usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
134 |
usr/lib/opengl/nvidia/tls/libnvidia-tls.so.${PV} |
135 |
usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} |
136 |
usr/lib/libXvMCNVIDIA.so.${PV} |
137 |
usr/lib/xorg/modules/drivers/nvidia_drv.so |
138 |
usr/lib/opengl/nvidia/extensions/libglx.so" |
139 |
|
140 |
QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko |
141 |
usr/lib/opengl/nvidia/lib/libGL.so.1 |
142 |
usr/lib/opengl/nvidia/lib/libGLcore.so.1 |
143 |
usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
144 |
usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.1 |
145 |
usr/lib/opengl/nvidia/extensions/libglx.so |
146 |
usr/lib/xorg/modules/drivers/nvidia_drv.so" |
147 |
|
148 |
QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
149 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
150 |
usr/lib/opengl/nvidia/extensions/libglx.so" |
151 |
|
152 |
QA_TEXTRELS_amd64="usr/lib64/xorg/libXvMCNVIDIA.so.${PV} |
153 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
154 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
155 |
usr/lib64/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
156 |
usr/lib64/opengl/nvidia/tls/libnvidia-tls.so.${PV} |
157 |
usr/lib64/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} |
158 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
159 |
usr/lib64/xorg/modules/drivers/nvidia_drv.so |
160 |
usr/lib64/opengl/nvidia/extensions/libglx.so |
161 |
usr/lib32/xorg/libXvMCNVIDIA.so.${PV} |
162 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
163 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
164 |
usr/lib32/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
165 |
usr/lib32/opengl/nvidia/tls/libnvidia-tls.so.${PV} |
166 |
usr/lib32/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} |
167 |
usr/lib32/libXvMCNVIDIA.so.${PV} |
168 |
usr/lib32/xorg/modules/drivers/nvidia_drv.so |
169 |
usr/lib32/opengl/nvidia/extensions/libglx.so" |
170 |
|
171 |
QA_WX_LOAD_amd64="usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
172 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
173 |
usr/lib64/opengl/nvidia/extensions/libglx.so |
174 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
175 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
176 |
usr/lib32/opengl/nvidia/extensions/libglx.so" |
177 |
|
178 |
QA_EXECSTACK_amd64="usr/lib64/xorg/modules/drivers/nvidia_drv.so |
179 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
180 |
usr/lib64/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
181 |
usr/lib64/opengl/nvidia/extensions/libglx.so |
182 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
183 |
usr/bin/nvidia-xconfig" |
184 |
|
185 |
QA_EXECSTACK_x86="usr/lib/xorg/modules/drivers/nvidia_drv.so |
186 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
187 |
usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
188 |
usr/lib/opengl/nvidia/extensions/libglx.so |
189 |
usr/lib/libXvMCNVIDIA.so.${PV} |
190 |
usr/bin/nvidia-xconfig" |
191 |
|
192 |
export _POSIX2_VERSION="199209" |
193 |
|
194 |
if use x86; then |
195 |
PKG_V="-pkg0" |
196 |
NV_PACKAGE="${X86_NV_PACKAGE}" |
197 |
elif use amd64; then |
198 |
PKG_V="-pkg2" |
199 |
NV_PACKAGE="${AMD64_NV_PACKAGE}" |
200 |
elif use x86-fbsd; then |
201 |
PKG_V="" |
202 |
NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" |
203 |
fi |
204 |
|
205 |
S="${WORKDIR}/${NV_PACKAGE}${PKG_V}/usr/src/nv" |
206 |
|
207 |
# On BSD userland it wants real make command |
208 |
MAKE="make" |
209 |
|
210 |
mtrr_check() { |
211 |
ebegin "Checking for MTRR support" |
212 |
linux_chkconfig_present MTRR |
213 |
eend $? |
214 |
|
215 |
if [[ $? -ne 0 ]] ; then |
216 |
eerror "This version needs MTRR support for most chipsets!" |
217 |
eerror "Please enable MTRR support in your kernel config, found at:" |
218 |
eerror |
219 |
eerror " Processor type and features" |
220 |
eerror " [*] MTRR (Memory Type Range Register) support" |
221 |
eerror |
222 |
eerror "and recompile your kernel ..." |
223 |
die "MTRR support not detected!" |
224 |
fi |
225 |
} |
226 |
|
227 |
pkg_setup() { |
228 |
if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then |
229 |
eerror "This ebuild doesn't currently support changing your default abi." |
230 |
die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" |
231 |
fi |
232 |
|
233 |
if ! use x86-fbsd; then |
234 |
linux-mod_pkg_setup |
235 |
MODULE_NAMES="nvidia(video:${S})" |
236 |
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} SYSOUT=${KV_OUT_DIR}" |
237 |
mtrr_check |
238 |
fi |
239 |
|
240 |
# Since Nvidia ships 3 different series of drivers, we need to give the user |
241 |
# some kind of guidance as to what version they should install. This tries |
242 |
# to point the user in the right direction but can't be perfect. check |
243 |
# nvidia-driver.eclass |
244 |
nvidia-driver-check-warning |
245 |
} |
246 |
|
247 |
src_unpack() { |
248 |
local NV_PATCH_PREFIX="${FILESDIR}/${PV}/NVIDIA-${PV}" |
249 |
|
250 |
if ! use x86-fbsd; then |
251 |
if [[ ${KV_MINOR} -eq 6 && ${KV_PATCH} -lt 7 ]] ; then |
252 |
echo |
253 |
ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" |
254 |
ewarn "This is not officially supported for ${P}. It is likely you" |
255 |
ewarn "will not be able to compile or use the kernel module." |
256 |
ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" |
257 |
echo |
258 |
ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." |
259 |
fi |
260 |
fi |
261 |
|
262 |
if ! use x86-fbsd; then |
263 |
cd "${WORKDIR}" |
264 |
bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only |
265 |
else |
266 |
unpack ${A} |
267 |
fi |
268 |
|
269 |
# Patches go below here, add brief description |
270 |
use x86-fbsd \ |
271 |
&& cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}/doc" \ |
272 |
|| cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}" |
273 |
# Use the correct defines to make gtkglext build work |
274 |
epatch "${FILESDIR}"/NVIDIA_glx-defines.patch |
275 |
# Use some more sensible gl headers and make way for new glext.h |
276 |
epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch |
277 |
# allow on board sensors to work with lm_sensors |
278 |
epatch "${FILESDIR}"/NVIDIA_i2c-hwmon.patch |
279 |
|
280 |
if ! use x86-fbsd; then |
281 |
# Quiet down warnings the user does not need to see |
282 |
sed -i \ |
283 |
-e 's:-Wpointer-arith::g' \ |
284 |
-e 's:-Wsign-compare::g' \ |
285 |
"${S}"/Makefile.kbuild |
286 |
|
287 |
# If you set this then it's your own fault when stuff breaks :) |
288 |
[[ -n ${USE_CRAZY_OPTS} ]] && sed -i "s:-O:${CFLAGS}:" Makefile.* |
289 |
|
290 |
# If greater than 2.6.5 use M= instead of SUBDIR= |
291 |
cd "${S}"; convert_to_m Makefile.kbuild |
292 |
fi |
293 |
} |
294 |
|
295 |
src_compile() { |
296 |
# This is already the default on Linux, as there's no toplevel Makefile, but |
297 |
# on FreeBSD there's one and triggers the kernel module build, as we install |
298 |
# it by itself, pass this. |
299 |
if use x86-fbsd; then |
300 |
cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}/src" |
301 |
echo LDFLAGS="$(raw-ldflags)" |
302 |
MAKE="$(get_bmake)" emake CC="$(tc-getCC)" LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die |
303 |
else |
304 |
linux-mod_src_compile |
305 |
fi |
306 |
} |
307 |
|
308 |
src_install() { |
309 |
local MLTEST=$(type dyn_unpack) |
310 |
|
311 |
cd "${WORKDIR}"/${NV_PACKAGE}${PKG_V} |
312 |
|
313 |
if ! use x86-fbsd; then |
314 |
linux-mod_src_install |
315 |
|
316 |
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" |
317 |
if [ -z "$VIDEOGROUP" ]; then |
318 |
eerror "Failed to determine the video group gid." |
319 |
die "Failed to determine the video group gid." |
320 |
fi |
321 |
|
322 |
# Add the aliases |
323 |
[ -f "${FILESDIR}/nvidia" ] || die "nvidia missing in FILESDIR" |
324 |
sed -e 's:PACKAGE:'${PF}':g' \ |
325 |
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia > \ |
326 |
"${WORKDIR}"/nvidia |
327 |
insinto /etc/modules.d |
328 |
doins "${WORKDIR}"/nvidia || die |
329 |
else |
330 |
insinto /boot/modules |
331 |
doins "${WORKDIR}/${X86_FBSD_NV_PACKAGE}/src/nvidia.kld" || die |
332 |
|
333 |
exeinto /boot/modules |
334 |
doexe "${WORKDIR}/${X86_FBSD_NV_PACKAGE}/src/nvidia.ko" || die |
335 |
fi |
336 |
|
337 |
if [[ "${MLTEST/set_abi}" == "${MLTEST}" ]] && has_multilib_profile ; then |
338 |
local OABI=${ABI} |
339 |
for ABI in $(get_install_abis) ; do |
340 |
src_install-libs |
341 |
done |
342 |
ABI=${OABI} |
343 |
unset OABI |
344 |
elif use amd64 ; then |
345 |
src_install-libs lib32 $(get_multilibdir) |
346 |
src_install-libs lib $(get_libdir) |
347 |
|
348 |
rm -rf "${D}"/usr/$(get_multilibdir)/opengl/nvidia/include |
349 |
rm -rf "${D}"/usr/$(get_multilibdir)/opengl/nvidia/extensions |
350 |
else |
351 |
src_install-libs |
352 |
fi |
353 |
|
354 |
is_final_abi || return 0 |
355 |
|
356 |
if ! use x86-fbsd; then |
357 |
# Docs |
358 |
newdoc usr/share/doc/README.txt README |
359 |
dodoc usr/share/doc/Copyrights usr/share/doc/NVIDIA_Changelog |
360 |
dodoc usr/share/doc/XF86Config.sample |
361 |
dohtml usr/share/doc/html/* |
362 |
|
363 |
# nVidia want bug reports using this script |
364 |
dobin usr/bin/nvidia-bug-report.sh || die |
365 |
else |
366 |
dodoc doc/{README,XF86Config.sample,Copyrights} |
367 |
dohtml doc/html/* |
368 |
fi |
369 |
|
370 |
# Taking nvidia-xconfig from nvidia-drivers to help config xorg.conf |
371 |
dobin usr/bin/nvidia-xconfig || die |
372 |
} |
373 |
|
374 |
# Install nvidia library: |
375 |
# the first parameter is the place where to install it |
376 |
# the second parameter is the base name of the library |
377 |
# the third parameter is the provided soversion |
378 |
donvidia() { |
379 |
dodir $1 |
380 |
exeinto $1 |
381 |
|
382 |
libname=$(basename $2) |
383 |
|
384 |
doexe $2.$3 |
385 |
dosym ${libname}.$3 $1/${libname} |
386 |
|
387 |
[[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 |
388 |
} |
389 |
|
390 |
src_install-libs() { |
391 |
local pkglibdir=lib |
392 |
local inslibdir=$(get_libdir) |
393 |
|
394 |
if [[ ${#} -eq 2 ]] ; then |
395 |
pkglibdir=${1} |
396 |
inslibdir=${2} |
397 |
elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then |
398 |
pkglibdir=lib32 |
399 |
fi |
400 |
|
401 |
local usrpkglibdir=usr/${pkglibdir} |
402 |
local libdir=usr/X11R6/${pkglibdir} |
403 |
local drvdir=${libdir}/modules/drivers |
404 |
local extdir=${libdir}/modules/extensions |
405 |
local incdir=usr/include/GL |
406 |
local sover=${PV} |
407 |
local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" |
408 |
local NO_TLS_ROOT="${NV_ROOT}/no-tls" |
409 |
local TLS_ROOT="${NV_ROOT}/tls" |
410 |
local X11_LIB_DIR="/usr/${inslibdir}/xorg" |
411 |
|
412 |
if ! has_version x11-base/xorg-server ; then |
413 |
X11_LIB_DIR="/usr/${inslibdir}" |
414 |
fi |
415 |
|
416 |
if use x86-fbsd; then |
417 |
# on FreeBSD everything is on obj/ |
418 |
pkglibdir=obj |
419 |
usrpkglibdir=obj |
420 |
x11pkglibdir=obj |
421 |
drvdir=obj |
422 |
extdir=obj |
423 |
|
424 |
# don't ask me why the headers are there.. glxext.h is missing |
425 |
incdir=doc |
426 |
|
427 |
# on FreeBSD it has just .1 suffix |
428 |
sover=1 |
429 |
fi |
430 |
|
431 |
# The GLX libraries |
432 |
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover} |
433 |
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover} |
434 |
|
435 |
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover} |
436 |
|
437 |
dodir ${NO_TLS_ROOT} |
438 |
donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover} |
439 |
|
440 |
if ! use x86-fbsd; then |
441 |
donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover} |
442 |
fi |
443 |
|
444 |
if want_tls ; then |
445 |
dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib |
446 |
dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib |
447 |
dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib |
448 |
else |
449 |
dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib |
450 |
dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib |
451 |
dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib |
452 |
fi |
453 |
|
454 |
if ! use x86-fbsd; then |
455 |
# Install the .la file for libtool, to prevent e.g. bug #176423 |
456 |
[ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR" |
457 |
local ver1=$(get_version_component_range 1) |
458 |
local ver2=$(get_version_component_range 2) |
459 |
local ver3=$(get_version_component_range 3) |
460 |
sed -e "s:\${PV}:${PV}:" \ |
461 |
-e "s:\${ver1}:${ver1}:" \ |
462 |
-e "s:\${ver2}:${ver2}:" \ |
463 |
-e "s:\${ver3}:${ver3}:" \ |
464 |
-e "s:\${libdir}:${inslibdir}:" \ |
465 |
"${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la |
466 |
fi |
467 |
|
468 |
exeinto ${X11_LIB_DIR}/modules/drivers |
469 |
|
470 |
[[ -f ${drvdir}/nvidia_drv.so ]] && \ |
471 |
doexe ${drvdir}/nvidia_drv.so |
472 |
|
473 |
insinto /usr/${inslibdir} |
474 |
[[ -f ${libdir}/libXvMCNVIDIA.a ]] && \ |
475 |
doins ${libdir}/libXvMCNVIDIA.a |
476 |
exeinto /usr/${inslibdir} |
477 |
# fix Bug 131315 |
478 |
[[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \ |
479 |
doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \ |
480 |
dosym libXvMCNVIDIA.so.${PV} \ |
481 |
/usr/${inslibdir}/libXvMCNVIDIA.so |
482 |
|
483 |
exeinto ${NV_ROOT}/extensions |
484 |
[[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \ |
485 |
newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so |
486 |
[[ -f ${extdir}/libglx.so.${sover} ]] && \ |
487 |
newexe ${extdir}/libglx.so.${sover} libglx.so |
488 |
|
489 |
# Includes |
490 |
insinto ${NV_ROOT}/include |
491 |
doins ${incdir}/*.h |
492 |
} |
493 |
|
494 |
pkg_preinst() { |
495 |
# Can we make up our minds ?!?!? |
496 |
local NV_D=${D} |
497 |
|
498 |
if ! has_version x11-base/xorg-server ; then |
499 |
for dir in lib lib32 lib64 ; do |
500 |
if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then |
501 |
mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} |
502 |
rmdir ${NV_D}/usr/${dir}/xorg |
503 |
fi |
504 |
done |
505 |
fi |
506 |
|
507 |
# Clean the dynamic libGL stuff's home to ensure |
508 |
# we dont have stale libs floating around |
509 |
if [[ -d ${ROOT}/usr/lib/opengl/nvidia ]] ; then |
510 |
rm -rf ${ROOT}/usr/lib/opengl/nvidia/* |
511 |
fi |
512 |
# Make sure we nuke the old nvidia-glx's env.d file |
513 |
if [[ -e ${ROOT}/etc/env.d/09nvidia ]] ; then |
514 |
rm -f ${ROOT}/etc/env.d/09nvidia |
515 |
fi |
516 |
} |
517 |
|
518 |
pkg_postinst() { |
519 |
if ! use x86-fbsd; then |
520 |
linux-mod_pkg_postinst |
521 |
fi |
522 |
|
523 |
# Switch to the nvidia implementation |
524 |
eselect opengl set --use-old nvidia |
525 |
|
526 |
echo |
527 |
elog "To use the Nvidia GLX, run \"eselect opengl set nvidia\"" |
528 |
elog |
529 |
elog "nVidia has requested that any bug reports submitted have the" |
530 |
elog "output of /usr/bin/nvidia-bug-report.sh included." |
531 |
elog |
532 |
elog "To work with compiz, you must enable the AddARGBGLXVisuals option." |
533 |
elog |
534 |
elog "If you are having resolution problems, try disabling DynamicTwinView." |
535 |
echo |
536 |
} |
537 |
|
538 |
want_tls() { |
539 |
# For uclibc or anything non glibc, return false |
540 |
has_version sys-libs/glibc || return 1 |
541 |
|
542 |
# Old versions of glibc were lt/no-tls only |
543 |
has_version '<sys-libs/glibc-2.3.2' && return 1 |
544 |
|
545 |
local valid_chost="true" |
546 |
if use x86 ; then |
547 |
case ${CHOST/-*} in |
548 |
i486|i586|i686) ;; |
549 |
*) valid_chost="false" |
550 |
esac |
551 |
fi |
552 |
|
553 |
[[ ${valid_chost} == "false" ]] && return 1 |
554 |
|
555 |
# If we've got nptl, we've got tls |
556 |
built_with_use --missing true sys-libs/glibc nptl && return 0 |
557 |
|
558 |
# 2.3.5 turned off tls for linuxthreads glibc on i486 and i586 |
559 |
if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then |
560 |
case ${CHOST/-*} in |
561 |
i486|i586) return 1 ;; |
562 |
esac |
563 |
fi |
564 |
|
565 |
# These versions built linuxthreads version to support tls, too |
566 |
has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0 |
567 |
|
568 |
return 1 |
569 |
} |
570 |
|
571 |
pkg_postrm() { |
572 |
if ! use x86-fbsd; then |
573 |
linux-mod_pkg_postrm |
574 |
fi |
575 |
eselect opengl set --use-old xorg-x11 |
576 |
} |
577 |
|
578 |
|
579 |
|
580 |
1.1 x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild |
581 |
|
582 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild?rev=1.1&view=markup |
583 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild?rev=1.1&content-type=text/plain |
584 |
|
585 |
Index: nvidia-drivers-71.86.01.ebuild |
586 |
=================================================================== |
587 |
# Copyright 1999-2007 Gentoo Foundation |
588 |
# Distributed under the terms of the GNU General Public License v2 |
589 |
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-71.86.01.ebuild,v 1.1 2007/09/27 21:53:35 cardoe Exp $ |
590 |
|
591 |
inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver |
592 |
|
593 |
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}" |
594 |
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}" |
595 |
X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}" |
596 |
|
597 |
DESCRIPTION="NVIDIA X11 driver and GLX libraries" |
598 |
HOMEPAGE="http://www.nvidia.com/" |
599 |
SRC_URI="x86? ( http://us.download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run ) |
600 |
amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run ) |
601 |
x86-fbsd? ( http://us.download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )" |
602 |
|
603 |
LICENSE="NVIDIA" |
604 |
SLOT="0" |
605 |
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
606 |
IUSE="gtk multilib" |
607 |
RESTRICT="strip" |
608 |
EMULTILIB_PKG="true" |
609 |
|
610 |
COMMON="x11-base/xorg-server |
611 |
multilib? ( app-emulation/emul-linux-x86-xlibs ) |
612 |
kernel_FreeBSD? ( !media-video/nvidia-freebsd ) |
613 |
!app-emulation/emul-linux-x86-nvidia |
614 |
!x11-drivers/nvidia-legacy-drivers" |
615 |
DEPEND="${COMMON} |
616 |
kernel_linux? ( virtual/linux-sources ) |
617 |
app-admin/eselect-opengl" |
618 |
RDEPEND="${COMMON} |
619 |
kernel_linux? ( virtual/modutils ) |
620 |
media-libs/mesa" |
621 |
PDEPEND="gtk? ( media-video/nvidia-settings )" |
622 |
|
623 |
QA_TEXTRELS_x86="usr/lib/xorg/libXvMCNVIDIA.so.${PV} |
624 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
625 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
626 |
usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
627 |
usr/lib/opengl/nvidia/tls/libnvidia-tls.so.${PV} |
628 |
usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} |
629 |
usr/lib/libXvMCNVIDIA.so.${PV} |
630 |
usr/lib/xorg/modules/drivers/nvidia_drv.so |
631 |
usr/lib/opengl/nvidia/extensions/libglx.so" |
632 |
|
633 |
QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko |
634 |
usr/lib/opengl/nvidia/lib/libGL.so.1 |
635 |
usr/lib/opengl/nvidia/lib/libGLcore.so.1 |
636 |
usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
637 |
usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.1 |
638 |
usr/lib/opengl/nvidia/extensions/libglx.so |
639 |
usr/lib/xorg/modules/drivers/nvidia_drv.so" |
640 |
|
641 |
QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
642 |
usr/lib/opengl/nvidia/lib/libGLcore.so.${PV} |
643 |
usr/lib/opengl/nvidia/extensions/libglx.so" |
644 |
|
645 |
QA_TEXTRELS_amd64="usr/lib64/xorg/libXvMCNVIDIA.so.${PV} |
646 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
647 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
648 |
usr/lib64/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
649 |
usr/lib64/opengl/nvidia/tls/libnvidia-tls.so.${PV} |
650 |
usr/lib64/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} |
651 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
652 |
usr/lib64/xorg/modules/drivers/nvidia_drv.so |
653 |
usr/lib64/opengl/nvidia/extensions/libglx.so |
654 |
usr/lib32/xorg/libXvMCNVIDIA.so.${PV} |
655 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
656 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
657 |
usr/lib32/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
658 |
usr/lib32/opengl/nvidia/tls/libnvidia-tls.so.${PV} |
659 |
usr/lib32/opengl/nvidia/no-tls/libnvidia-tls.so.${PV} |
660 |
usr/lib32/libXvMCNVIDIA.so.${PV} |
661 |
usr/lib32/xorg/modules/drivers/nvidia_drv.so |
662 |
usr/lib32/opengl/nvidia/extensions/libglx.so" |
663 |
|
664 |
QA_WX_LOAD_amd64="usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
665 |
usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV} |
666 |
usr/lib64/opengl/nvidia/extensions/libglx.so |
667 |
usr/lib32/opengl/nvidia/lib/libGL.so.${PV} |
668 |
usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV} |
669 |
usr/lib32/opengl/nvidia/extensions/libglx.so" |
670 |
|
671 |
QA_EXECSTACK_amd64="usr/lib64/xorg/modules/drivers/nvidia_drv.so |
672 |
usr/lib64/opengl/nvidia/lib/libGL.so.${PV} |
673 |
usr/lib64/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
674 |
usr/lib64/opengl/nvidia/extensions/libglx.so |
675 |
usr/lib64/libXvMCNVIDIA.so.${PV} |
676 |
usr/bin/nvidia-xconfig" |
677 |
|
678 |
QA_EXECSTACK_x86="usr/lib/xorg/modules/drivers/nvidia_drv.so |
679 |
usr/lib/opengl/nvidia/lib/libGL.so.${PV} |
680 |
usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV} |
681 |
usr/lib/opengl/nvidia/extensions/libglx.so |
682 |
usr/lib/libXvMCNVIDIA.so.${PV} |
683 |
usr/bin/nvidia-xconfig" |
684 |
|
685 |
export _POSIX2_VERSION="199209" |
686 |
|
687 |
if use x86; then |
688 |
PKG_V="-pkg0" |
689 |
NV_PACKAGE="${X86_NV_PACKAGE}" |
690 |
elif use amd64; then |
691 |
PKG_V="-pkg2" |
692 |
NV_PACKAGE="${AMD64_NV_PACKAGE}" |
693 |
elif use x86-fbsd; then |
694 |
PKG_V="" |
695 |
NV_PACKAGE="${X86_FBSD_NV_PACKAGE}" |
696 |
fi |
697 |
|
698 |
S="${WORKDIR}/${NV_PACKAGE}${PKG_V}/usr/src/nv" |
699 |
|
700 |
# On BSD userland it wants real make command |
701 |
MAKE="make" |
702 |
|
703 |
mtrr_check() { |
704 |
ebegin "Checking for MTRR support" |
705 |
linux_chkconfig_present MTRR |
706 |
eend $? |
707 |
|
708 |
if [[ $? -ne 0 ]] ; then |
709 |
eerror "This version needs MTRR support for most chipsets!" |
710 |
eerror "Please enable MTRR support in your kernel config, found at:" |
711 |
eerror |
712 |
eerror " Processor type and features" |
713 |
eerror " [*] MTRR (Memory Type Range Register) support" |
714 |
eerror |
715 |
eerror "and recompile your kernel ..." |
716 |
die "MTRR support not detected!" |
717 |
fi |
718 |
} |
719 |
|
720 |
pkg_setup() { |
721 |
if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then |
722 |
eerror "This ebuild doesn't currently support changing your default abi." |
723 |
die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}" |
724 |
fi |
725 |
|
726 |
if ! use x86-fbsd; then |
727 |
linux-mod_pkg_setup |
728 |
MODULE_NAMES="nvidia(video:${S})" |
729 |
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} SYSOUT=${KV_OUT_DIR}" |
730 |
mtrr_check |
731 |
fi |
732 |
|
733 |
# Since Nvidia ships 3 different series of drivers, we need to give the user |
734 |
# some kind of guidance as to what version they should install. This tries |
735 |
# to point the user in the right direction but can't be perfect. check |
736 |
# nvidia-driver.eclass |
737 |
nvidia-driver-check-warning |
738 |
} |
739 |
|
740 |
src_unpack() { |
741 |
local NV_PATCH_PREFIX="${FILESDIR}/${PV}/NVIDIA-${PV}" |
742 |
|
743 |
if ! use x86-fbsd; then |
744 |
if [[ ${KV_MINOR} -eq 6 && ${KV_PATCH} -lt 7 ]] ; then |
745 |
echo |
746 |
ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" |
747 |
ewarn "This is not officially supported for ${P}. It is likely you" |
748 |
ewarn "will not be able to compile or use the kernel module." |
749 |
ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" |
750 |
echo |
751 |
ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." |
752 |
fi |
753 |
fi |
754 |
|
755 |
if ! use x86-fbsd; then |
756 |
cd "${WORKDIR}" |
757 |
bash ${DISTDIR}/${NV_PACKAGE}${PKG_V}.run --extract-only |
758 |
else |
759 |
unpack ${A} |
760 |
fi |
761 |
|
762 |
# Patches go below here, add brief description |
763 |
use x86-fbsd \ |
764 |
&& cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}/doc" \ |
765 |
|| cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}" |
766 |
# Use the correct defines to make gtkglext build work |
767 |
epatch "${FILESDIR}"/NVIDIA_glx-defines.patch |
768 |
# Use some more sensible gl headers and make way for new glext.h |
769 |
epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch |
770 |
|
771 |
if ! use x86-fbsd; then |
772 |
# Quiet down warnings the user does not need to see |
773 |
sed -i \ |
774 |
-e 's:-Wpointer-arith::g' \ |
775 |
-e 's:-Wsign-compare::g' \ |
776 |
"${S}"/Makefile.kbuild |
777 |
|
778 |
# If you set this then it's your own fault when stuff breaks :) |
779 |
[[ -n ${USE_CRAZY_OPTS} ]] && sed -i "s:-O:${CFLAGS}:" Makefile.* |
780 |
|
781 |
# If greater than 2.6.5 use M= instead of SUBDIR= |
782 |
cd "${S}"; convert_to_m Makefile.kbuild |
783 |
fi |
784 |
} |
785 |
|
786 |
src_compile() { |
787 |
# This is already the default on Linux, as there's no toplevel Makefile, but |
788 |
# on FreeBSD there's one and triggers the kernel module build, as we install |
789 |
# it by itself, pass this. |
790 |
if use x86-fbsd; then |
791 |
cd "${WORKDIR}/${NV_PACKAGE}${PKG_V}/src" |
792 |
echo LDFLAGS="$(raw-ldflags)" |
793 |
MAKE="$(get_bmake)" emake CC="$(tc-getCC)" LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die |
794 |
else |
795 |
linux-mod_src_compile |
796 |
fi |
797 |
} |
798 |
|
799 |
src_install() { |
800 |
local MLTEST=$(type dyn_unpack) |
801 |
|
802 |
cd "${WORKDIR}"/${NV_PACKAGE}${PKG_V} |
803 |
|
804 |
if ! use x86-fbsd; then |
805 |
linux-mod_src_install |
806 |
|
807 |
VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" |
808 |
if [ -z "$VIDEOGROUP" ]; then |
809 |
eerror "Failed to determine the video group gid." |
810 |
die "Failed to determine the video group gid." |
811 |
fi |
812 |
|
813 |
# Add the aliases |
814 |
[ -f "${FILESDIR}/nvidia" ] || die "nvidia missing in FILESDIR" |
815 |
sed -e 's:PACKAGE:'${PF}':g' \ |
816 |
-e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia > \ |
817 |
"${WORKDIR}"/nvidia |
818 |
insinto /etc/modules.d |
819 |
doins "${WORKDIR}"/nvidia || die |
820 |
else |
821 |
insinto /boot/modules |
822 |
doins "${WORKDIR}/${X86_FBSD_NV_PACKAGE}/src/nvidia.kld" || die |
823 |
|
824 |
exeinto /boot/modules |
825 |
doexe "${WORKDIR}/${X86_FBSD_NV_PACKAGE}/src/nvidia.ko" || die |
826 |
fi |
827 |
|
828 |
if [[ "${MLTEST/set_abi}" == "${MLTEST}" ]] && has_multilib_profile ; then |
829 |
local OABI=${ABI} |
830 |
for ABI in $(get_install_abis) ; do |
831 |
src_install-libs |
832 |
done |
833 |
ABI=${OABI} |
834 |
unset OABI |
835 |
elif use amd64 ; then |
836 |
src_install-libs lib32 $(get_multilibdir) |
837 |
src_install-libs lib $(get_libdir) |
838 |
|
839 |
rm -rf "${D}"/usr/$(get_multilibdir)/opengl/nvidia/include |
840 |
rm -rf "${D}"/usr/$(get_multilibdir)/opengl/nvidia/extensions |
841 |
else |
842 |
src_install-libs |
843 |
fi |
844 |
|
845 |
is_final_abi || return 0 |
846 |
|
847 |
if ! use x86-fbsd; then |
848 |
# Docs |
849 |
dodoc usr/share/doc/NVIDIA_Changelog |
850 |
dodoc usr/share/doc/XF86Config.sample |
851 |
dohtml usr/share/doc/html/* |
852 |
|
853 |
# nVidia want bug reports using this script |
854 |
dobin usr/bin/nvidia-bug-report.sh || die |
855 |
else |
856 |
dodoc doc/{README,XF86Config.sample,Copyrights} |
857 |
dohtml doc/html/* |
858 |
fi |
859 |
} |
860 |
|
861 |
# Install nvidia library: |
862 |
# the first parameter is the place where to install it |
863 |
# the second parameter is the base name of the library |
864 |
# the third parameter is the provided soversion |
865 |
donvidia() { |
866 |
dodir $1 |
867 |
exeinto $1 |
868 |
|
869 |
libname=$(basename $2) |
870 |
|
871 |
doexe $2.$3 |
872 |
dosym ${libname}.$3 $1/${libname} |
873 |
|
874 |
[[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1 |
875 |
} |
876 |
|
877 |
src_install-libs() { |
878 |
local pkglibdir=lib |
879 |
local inslibdir=$(get_libdir) |
880 |
|
881 |
if [[ ${#} -eq 2 ]] ; then |
882 |
pkglibdir=${1} |
883 |
inslibdir=${2} |
884 |
elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then |
885 |
pkglibdir=lib32 |
886 |
fi |
887 |
|
888 |
local usrpkglibdir=usr/${pkglibdir} |
889 |
local libdir=usr/X11R6/${pkglibdir} |
890 |
local drvdir=${libdir}/modules/drivers |
891 |
local extdir=${libdir}/modules/extensions |
892 |
local incdir=usr/include/GL |
893 |
local sover=${PV} |
894 |
local NV_ROOT="/usr/${inslibdir}/opengl/nvidia" |
895 |
local NO_TLS_ROOT="${NV_ROOT}/no-tls" |
896 |
local TLS_ROOT="${NV_ROOT}/tls" |
897 |
local X11_LIB_DIR="/usr/${inslibdir}/xorg" |
898 |
|
899 |
if ! has_version x11-base/xorg-server ; then |
900 |
X11_LIB_DIR="/usr/${inslibdir}" |
901 |
fi |
902 |
|
903 |
if use x86-fbsd; then |
904 |
# on FreeBSD everything is on obj/ |
905 |
pkglibdir=obj |
906 |
usrpkglibdir=obj |
907 |
x11pkglibdir=obj |
908 |
drvdir=obj |
909 |
extdir=obj |
910 |
|
911 |
# don't ask me why the headers are there.. glxext.h is missing |
912 |
incdir=doc |
913 |
|
914 |
# on FreeBSD it has just .1 suffix |
915 |
sover=1 |
916 |
fi |
917 |
|
918 |
# The GLX libraries |
919 |
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover} |
920 |
donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover} |
921 |
|
922 |
dodir ${NO_TLS_ROOT} |
923 |
donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover} |
924 |
|
925 |
if ! use x86-fbsd; then |
926 |
donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover} |
927 |
fi |
928 |
|
929 |
if want_tls ; then |
930 |
dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib |
931 |
dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib |
932 |
dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib |
933 |
else |
934 |
dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib |
935 |
dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib |
936 |
dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib |
937 |
fi |
938 |
|
939 |
if ! use x86-fbsd; then |
940 |
# Install the .la file for libtool, to prevent e.g. bug #176423 |
941 |
[ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR" |
942 |
local ver1=$(get_version_component_range 1) |
943 |
local ver2=$(get_version_component_range 2) |
944 |
local ver3=$(get_version_component_range 3) |
945 |
sed -e "s:\${PV}:${PV}:" \ |
946 |
-e "s:\${ver1}:${ver1}:" \ |
947 |
-e "s:\${ver2}:${ver2}:" \ |
948 |
-e "s:\${ver3}:${ver3}:" \ |
949 |
-e "s:\${libdir}:${inslibdir}:" \ |
950 |
"${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la |
951 |
fi |
952 |
|
953 |
exeinto ${X11_LIB_DIR}/modules/drivers |
954 |
|
955 |
[[ -f ${drvdir}/nvidia_drv.so ]] && \ |
956 |
doexe ${drvdir}/nvidia_drv.so |
957 |
|
958 |
insinto /usr/${inslibdir} |
959 |
[[ -f ${libdir}/libXvMCNVIDIA.a ]] && \ |
960 |
doins ${libdir}/libXvMCNVIDIA.a |
961 |
exeinto /usr/${inslibdir} |
962 |
# fix Bug 131315 |
963 |
[[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \ |
964 |
doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \ |
965 |
dosym libXvMCNVIDIA.so.${PV} \ |
966 |
/usr/${inslibdir}/libXvMCNVIDIA.so |
967 |
|
968 |
exeinto ${NV_ROOT}/extensions |
969 |
[[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \ |
970 |
newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so |
971 |
[[ -f ${extdir}/libglx.so.${sover} ]] && \ |
972 |
newexe ${extdir}/libglx.so.${sover} libglx.so |
973 |
|
974 |
# Includes |
975 |
insinto ${NV_ROOT}/include |
976 |
doins ${incdir}/*.h |
977 |
} |
978 |
|
979 |
pkg_preinst() { |
980 |
# Can we make up our minds ?!?!? |
981 |
local NV_D=${D} |
982 |
|
983 |
if ! has_version x11-base/xorg-server ; then |
984 |
for dir in lib lib32 lib64 ; do |
985 |
if [[ -d ${NV_D}/usr/${dir}/xorg ]] ; then |
986 |
mv ${NV_D}/usr/${dir}/xorg/* ${NV_D}/usr/${dir} |
987 |
rmdir ${NV_D}/usr/${dir}/xorg |
988 |
fi |
989 |
done |
990 |
fi |
991 |
|
992 |
# Clean the dynamic libGL stuff's home to ensure |
993 |
# we dont have stale libs floating around |
994 |
if [[ -d ${ROOT}/usr/lib/opengl/nvidia ]] ; then |
995 |
rm -rf ${ROOT}/usr/lib/opengl/nvidia/* |
996 |
fi |
997 |
# Make sure we nuke the old nvidia-glx's env.d file |
998 |
if [[ -e ${ROOT}/etc/env.d/09nvidia ]] ; then |
999 |
rm -f ${ROOT}/etc/env.d/09nvidia |
1000 |
fi |
1001 |
} |
1002 |
|
1003 |
pkg_postinst() { |
1004 |
if ! use x86-fbsd; then |
1005 |
linux-mod_pkg_postinst |
1006 |
fi |
1007 |
|
1008 |
# Switch to the nvidia implementation |
1009 |
eselect opengl set --use-old nvidia |
1010 |
|
1011 |
echo |
1012 |
elog "To use the Nvidia GLX, run \"eselect opengl set nvidia\"" |
1013 |
elog |
1014 |
elog "nVidia has requested that any bug reports submitted have the" |
1015 |
elog "output of /usr/bin/nvidia-bug-report.sh included." |
1016 |
elog |
1017 |
elog "To work with compiz, you must enable the AddARGBGLXVisuals option." |
1018 |
elog |
1019 |
elog "If you are having resolution problems, try disabling DynamicTwinView." |
1020 |
echo |
1021 |
} |
1022 |
|
1023 |
want_tls() { |
1024 |
# For uclibc or anything non glibc, return false |
1025 |
has_version sys-libs/glibc || return 1 |
1026 |
|
1027 |
# Old versions of glibc were lt/no-tls only |
1028 |
has_version '<sys-libs/glibc-2.3.2' && return 1 |
1029 |
|
1030 |
local valid_chost="true" |
1031 |
if use x86 ; then |
1032 |
case ${CHOST/-*} in |
1033 |
i486|i586|i686) ;; |
1034 |
*) valid_chost="false" |
1035 |
esac |
1036 |
fi |
1037 |
|
1038 |
[[ ${valid_chost} == "false" ]] && return 1 |
1039 |
|
1040 |
# If we've got nptl, we've got tls |
1041 |
built_with_use --missing true sys-libs/glibc nptl && return 0 |
1042 |
|
1043 |
# 2.3.5 turned off tls for linuxthreads glibc on i486 and i586 |
1044 |
if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then |
1045 |
case ${CHOST/-*} in |
1046 |
i486|i586) return 1 ;; |
1047 |
esac |
1048 |
fi |
1049 |
|
1050 |
# These versions built linuxthreads version to support tls, too |
1051 |
has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0 |
1052 |
|
1053 |
return 1 |
1054 |
} |
1055 |
|
1056 |
pkg_postrm() { |
1057 |
if ! use x86-fbsd; then |
1058 |
linux-mod_pkg_postrm |
1059 |
fi |
1060 |
eselect opengl set --use-old xorg-x11 |
1061 |
} |
1062 |
|
1063 |
|
1064 |
|
1065 |
-- |
1066 |
gentoo-commits@g.o mailing list |