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-173.14.16.ebuild
Date: Wed, 04 Feb 2009 00:56:22
Message-Id: E1LUW3t-0005bB-RL@stork.gentoo.org
1 ricmm 09/02/04 00:56:17
2
3 Modified: ChangeLog
4 Added: nvidia-drivers-173.14.16.ebuild
5 Log:
6 Version bump. See http://www.nvnews.net/vbulletin/showthread.php?t=126937
7 (Portage version: 2.2_rc12/cvs/Linux 2.6.28-gentoo-r1 x86_64)
8
9 Revision Changes Path
10 1.134 x11-drivers/nvidia-drivers/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.134&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?rev=1.134&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog?r1=1.133&r2=1.134
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v
19 retrieving revision 1.133
20 retrieving revision 1.134
21 diff -u -r1.133 -r1.134
22 --- ChangeLog 3 Feb 2009 20:00:34 -0000 1.133
23 +++ ChangeLog 4 Feb 2009 00:56:17 -0000 1.134
24 @@ -1,6 +1,12 @@
25 # ChangeLog for x11-drivers/nvidia-drivers
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.133 2009/02/03 20:00:34 ricmm Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.134 2009/02/04 00:56:17 ricmm Exp $
29 +
30 +*nvidia-drivers-173.14.16 (04 Feb 2009)
31 +
32 + 04 Feb 2009; Ricardo Mendoza <ricmm@g.o>
33 + +nvidia-drivers-173.14.16.ebuild:
34 + Version bump. See http://www.nvnews.net/vbulletin/showthread.php?t=126937
35
36 *nvidia-drivers-71.86.08 (03 Feb 2009)
37
38
39
40
41 1.1 x11-drivers/nvidia-drivers/nvidia-drivers-173.14.16.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.16.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.16.ebuild?rev=1.1&content-type=text/plain
45
46 Index: nvidia-drivers-173.14.16.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.16.ebuild,v 1.1 2009/02/04 00:56:17 ricmm Exp $
51
52 inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver
53
54 X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
55 AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
56 X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
57
58 DESCRIPTION="NVIDIA X11 driver and GLX libraries"
59 HOMEPAGE="http://www.nvidia.com/"
60 SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}-pkg0.run )
61 amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}-pkg2.run )
62 x86-fbsd? ( ftp://download.nvidia.com/freebsd/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
63
64 LICENSE="NVIDIA"
65 SLOT="0"
66 KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
67 IUSE="acpi custom-cflags gtk multilib kernel_linux"
68 RESTRICT="strip"
69 EMULTILIB_PKG="true"
70
71 COMMON="<x11-base/xorg-server-1.5.99
72 multilib? ( app-emulation/emul-linux-x86-xlibs )
73 kernel_FreeBSD? ( !media-video/nvidia-freebsd )
74 !app-emulation/emul-linux-x86-nvidia
75 !x11-drivers/nvidia-legacy-drivers"
76 DEPEND="${COMMON}
77 kernel_linux? ( virtual/linux-sources )
78 app-admin/eselect-opengl"
79 RDEPEND="${COMMON}
80 kernel_linux? ( virtual/modutils )
81 media-libs/mesa
82 acpi? ( sys-power/acpid )"
83 PDEPEND="gtk? ( media-video/nvidia-settings )"
84
85 QA_TEXTRELS_x86="usr/lib/libXvMCNVIDIA.so.${PV}
86 usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
87 usr/lib/opengl/nvidia/tls/libnvidia-tls.so.${PV}
88 usr/lib/opengl/nvidia/lib/libGL.so.${PV}
89 usr/lib/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
90 usr/lib/opengl/nvidia/lib/libGLcore.so.${PV}
91 usr/lib/opengl/nvidia/extensions/libglx.so
92 usr/lib/xorg/modules/drivers/nvidia_drv.so
93 usr/lib/libcuda.so.${PV}"
94
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/opengl/nvidia/lib/libnvidia-cfg.so.1
99 usr/lib/opengl/nvidia/no-tls/libnvidia-tls.so.1
100 usr/lib/opengl/nvidia/extensions/libglx.so
101 usr/lib/xorg/modules/drivers/nvidia_drv.so"
102
103 QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/tls/libnvidia-tls.so.${PV}
104 usr/lib32/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
105 usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV}
106 usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
107 usr/lib32/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
108 usr/lib32/libcuda.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"
113
114 QA_EXECSTACK_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV}
115 usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
116 usr/lib64/xorg/modules/drivers/nvidia_drv.so
117 usr/lib64/libXvMCNVIDIA.so.${PV}
118 usr/lib64/opengl/nvidia/tls/libnvidia-tls.so.${PV}
119 usr/lib64/opengl/nvidia/no-tls/libnvidia-tls.so.${PV}
120 usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV}
121 usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
122 usr/lib64/opengl/nvidia/lib/libnvidia-cfg.so.${PV}
123 usr/lib64/opengl/nvidia/extensions/libglx.so
124 usr/bin/nvidia-xconfig"
125
126 QA_WX_LOAD_x86="usr/lib/opengl/nvidia/lib/libGLcore.so.${PV}
127 usr/lib/opengl/nvidia/lib/libGL.so.${PV}
128 usr/lib/opengl/nvidia/extensions/libglx.so"
129
130 QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGLcore.so.${PV}
131 usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
132 usr/lib64/opengl/nvidia/lib/libGLcore.so.${PV}
133 usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
134 usr/lib64/opengl/nvidia/extensions/libglx.so"
135
136 if use x86; then
137 PKG_V="-pkg0"
138 NV_PACKAGE="${X86_NV_PACKAGE}"
139 elif use amd64; then
140 PKG_V="-pkg2"
141 NV_PACKAGE="${AMD64_NV_PACKAGE}"
142 elif use x86-fbsd; then
143 PKG_V=""
144 NV_PACKAGE="${X86_FBSD_NV_PACKAGE}"
145 fi
146
147 S="${WORKDIR}/${NV_PACKAGE}${PKG_V}"
148
149 mtrr_check() {
150 ebegin "Checking for MTRR support"
151 linux_chkconfig_present MTRR
152 eend $?
153
154 if [[ $? -ne 0 ]] ; then
155 eerror "Please enable MTRR support in your kernel config, found at:"
156 eerror
157 eerror " Processor type and features"
158 eerror " [*] MTRR (Memory Type Range Register) support"
159 eerror
160 eerror "and recompile your kernel ..."
161 die "MTRR support not detected!"
162 fi
163 }
164
165 sysvipc_check() {
166 ebegin "Checking for SYSVIPC support"
167 linux_chkconfig_present SYSVIPC
168 eend $?
169
170 if [[ $? -ne 0 ]] ; then
171 eerror "Please enable SYSVIPC support in your kernel config, found at:"
172 eerror
173 eerror " General setup"
174 eerror " [*] System V IPC"
175 eerror
176 eerror "and recompile your kernel ..."
177 die "SYSVIPC support not detected!"
178 fi
179 }
180
181 pkg_setup() {
182 # try to turn off distcc and ccache for people that have a problem with it
183 export DISTCC_DISABLE=1
184 export CCACHE_DISABLE=1
185
186 if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then
187 eerror "This ebuild doesn't currently support changing your default abi."
188 die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
189 fi
190
191 if use kernel_linux; then
192 linux-mod_pkg_setup
193 MODULE_NAMES="nvidia(video:${S}/usr/src/nv)"
194 BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
195 SYSOUT=${KV_OUT_DIR} HOST_CC=$(tc-getBUILD_CC)"
196 mtrr_check
197 sysvipc_check
198 fi
199
200 # On BSD userland it wants real make command
201 use userland_BSD && MAKE="$(get_bmake)"
202
203 export _POSIX2_VERSION="199209"
204
205 # Since Nvidia ships 3 different series of drivers, we need to give the user
206 # some kind of guidance as to what version they should install. This tries
207 # to point the user in the right direction but can't be perfect. check
208 # nvidia-driver.eclass
209 nvidia-driver-check-warning
210
211 # set variables to where files are in the package structure
212 if use kernel_FreeBSD; then
213 NV_DOC="${S}/doc"
214 NV_EXEC="${S}/obj"
215 NV_SRC="${S}/src"
216 elif use kernel_linux; then
217 NV_DOC="${S}/usr/share/doc"
218 NV_EXEC="${S}/usr/bin"
219 NV_SRC="${S}/usr/src/nv"
220 else
221 die "Could not determine proper NVIDIA package"
222 fi
223 }
224
225 src_unpack() {
226 if use kernel_linux && kernel_is lt 2 6 7; then
227 echo
228 ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
229 ewarn "This is not officially supported for ${P}. It is likely you"
230 ewarn "will not be able to compile or use the kernel module."
231 ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
232 echo
233 ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
234 fi
235
236 if ! use x86-fbsd; then
237 cd "${WORKDIR}"
238 bash "${DISTDIR}"/${NV_PACKAGE}${PKG_V}.run --extract-only
239 else
240 unpack ${A}
241 fi
242
243 # Patches go below here, add brief description
244 cd "${S}"
245 use x86-fbsd && cd doc
246
247 # Use the correct defines to make gtkglext build work
248 epatch "${FILESDIR}"/NVIDIA_glx-defines.patch
249 # Use some more sensible gl headers and make way for new glext.h
250 epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch
251
252 # allow on board sensors to work with lm_sensors
253 if use kernel_linux; then
254 epatch "${FILESDIR}"/NVIDIA_i2c-hwmon.patch
255 fi
256
257 if use kernel_linux; then
258 # Quiet down warnings the user does not need to see
259 sed -i \
260 -e 's:-Wpointer-arith::g' \
261 -e 's:-Wsign-compare::g' \
262 "${NV_SRC}"/Makefile.kbuild
263
264 # If you set this then it's your own fault when stuff breaks :)
265 use custom-cflags \
266 && einfo "Patching ${NV_SRC}/Makefile* to respect custom cflags" \
267 && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/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 }