pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin - collaborative debugging tool View Help


Posted by OS-2007 on Sun 19 Oct 13:17 (modification of post by view diff)
report abuse | download | new post

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

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post