Gentoo Archives: gentoo-commits

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