Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ENH: add CUDA 4.2 related stuff

  • Loading branch information...
commit ff84626466b19254f94dc58ee78147b72564149e 1 parent e521d28
@npinto authored
Showing with 1,388 additions and 0 deletions.
  1. +2 −0  dev-util/nvidia-cuda-sdk/Manifest
  2. +92 −0 dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.ebuild
  3. +2 −0  dev-util/nvidia-cuda-tdk/Manifest
  4. +71 −0 dev-util/nvidia-cuda-tdk/nvidia-cuda-tdk-2.295.1.ebuild
  5. +3 −0  dev-util/nvidia-cuda-toolkit/Manifest
  6. +110 −0 dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-4.2.ebuild
  7. +20 −0 x11-drivers/nvidia-drivers/Manifest
  8. +2 −0  x11-drivers/nvidia-drivers/files/09nvidia
  9. +30 −0 x11-drivers/nvidia-drivers/files/195.30-unified-arch.patch
  10. +31 −0 x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch
  11. +11 −0 x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch
  12. +13 −0 x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch
  13. +21 −0 x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit
  14. +19 −0 x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit
  15. +116 −0 x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit
  16. +33 −0 x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit
  17. +32 −0 x11-drivers/nvidia-drivers/files/libGL.la-r2
  18. +40 −0 x11-drivers/nvidia-drivers/files/nvidia
  19. +14 −0 x11-drivers/nvidia-drivers/files/nvidia-169.07
  20. +14 −0 x11-drivers/nvidia-drivers/files/nvidia-drivers-173.14.30-2.6.39.patch
  21. +92 −0 x11-drivers/nvidia-drivers/files/nvidia-drivers-190.53-2.6.33.patch
  22. +14 −0 x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch
  23. +17 −0 x11-drivers/nvidia-drivers/files/nvidia-udev.sh
  24. +6 −0 x11-drivers/nvidia-drivers/files/nvidia.udev-rule
  25. +583 −0 x11-drivers/nvidia-drivers/nvidia-drivers-295.41.ebuild
View
2  dev-util/nvidia-cuda-sdk/Manifest
@@ -0,0 +1,2 @@
+DIST gpucomputingsdk_4.2.9_linux.run 152436489 RMD160 7b0cbe3565d0abbb29bdd3d1f5fe49c273d46f4f SHA1 ba39a23a43dca4a64f07c7bfe574e9c3398abd83 SHA256 b6a53afcf8f8422b5075aa37cec6730b0b9896d50867ee9105da05d62e95b8bb
+EBUILD nvidia-cuda-sdk-4.2.ebuild 1833 RMD160 02759e6f9f7d5fef30bf178542f2efa6d63dd3e1 SHA1 3f833dc87580815a8cde690401448741511ef656 SHA256 7a71c0286fc1b4a143f1995e36560f839277d9273b5bb2bb6a8d37da79c28c7d
View
92 dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit unpacker toolchain-funcs
+
+DESCRIPTION="NVIDIA CUDA Software Development Kit"
+HOMEPAGE="http://developer.nvidia.com/cuda"
+
+CUDA_V=${PV//_/-}
+DIR_V=${CUDA_V//./_}
+DIR_V=${DIR_V//beta/Beta}
+
+SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/rel/sdk/gpucomputingsdk_${CUDA_V}.9_linux.run"
+LICENSE="CUDPP"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +doc +examples opencl +cuda"
+
+RDEPEND=">=dev-util/nvidia-cuda-toolkit-4.2
+ examples? ( >=x11-drivers/nvidia-drivers-295.40 )
+ media-libs/freeglut"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+RESTRICT="binchecks"
+
+pkg_setup() {
+ if use cuda || use opencl && [ $(gcc-major-version) -lt 4 -o $(gcc-minor-version) -lt 5 ]; then
+ eerror "This package requires >=sys-devel/gcc-4.5 to build sucessfully."
+ eerror "Please use gcc-config to switch to a compatible GCC version."
+ die ">=sys-devel/gcc-4.4 required"
+ fi
+ echo $(gcc-major-version) $(gcc-minor-version)
+}
+
+src_compile() {
+ if ! use examples; then
+ return
+ fi
+ local myopts=""
+
+ if use debug; then
+ myopts="${myopts} dbg=1"
+ fi
+
+ cd "${S}/sdk"
+
+ if use cuda; then
+ cd C
+ emake cuda-install=/opt/cuda ${myopts} || die
+ cd ..
+ fi
+
+ if use opencl; then
+ cd OpenCL
+ emake || die
+ cd ..
+ fi
+}
+
+src_install() {
+ cd "${S}/sdk"
+
+ if ! use doc; then
+ rm -rf *.txt doc */doc */Samples.htm */releaseNotesData
+ fi
+
+ if ! use examples; then
+ rm -rf bin */bin */tools
+ fi
+
+ for f in $(find .); do
+ local t="$(dirname ${f})"
+ if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
+ continue
+ fi
+
+ if [[ ! -d "${f}" ]]; then
+ if [[ -x "${f}" ]]; then
+ exeinto "/opt/cuda/sdk/${t}"
+ doexe "${f}"
+ else
+ insinto "/opt/cuda/sdk/${t}"
+ doins "${f}"
+ fi
+ fi
+ done
+}
View
2  dev-util/nvidia-cuda-tdk/Manifest
@@ -1,2 +1,4 @@
DIST tdk_1.285.1.linux_tar.gz 1426343 RMD160 4464ffe1a4379e4332e5d148d06364e8da7b6fa5 SHA1 60fc50aa64efd30567c13bdf6ec2b5ec2bb8d2e3 SHA256 3190d23db055e22de7651cdf14dc1c7f8c6c02d3281e1541062159f597e86457
+DIST tdk_2.295.1_linux.tar.gz 1194352 RMD160 4d801c0470cb0a179068748b51b38ac70f999595 SHA1 aace711fadecc64aee3f52b2e2695de6f5715d86 SHA256 2874d6f221ac34deffc35f337032885a6f059f3cbc1daab57af895d6e9ec4a8d
EBUILD nvidia-cuda-tdk-1.285.1.ebuild 1230 RMD160 38b4dca6010080f09d2632ab58906bc9c9fb0487 SHA1 b6500cef326bcfca6db22edae990a89d7567b878 SHA256 32130b11dfa1480d0f4804ac7703fbbdca3aa6c6465def01c9b2907b4e64adf2
+EBUILD nvidia-cuda-tdk-2.295.1.ebuild 1219 RMD160 a116a36892a783e677db7741d3c136fcda33a57d SHA1 8f3fbdb4e9840282bee94883e9013f89b335c9cf SHA256 97d2e247b9a3d8d2c6d068c6e8eb8232d61c94e4fd72b2e664bb4c271f56cafa
View
71 dev-util/nvidia-cuda-tdk/nvidia-cuda-tdk-2.295.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="NVIDIA Tesla Deployment Kit"
+HOMEPAGE="http://developer.nvidia.com/tesla-deployment-kit"
+
+SRC_URI=http://developer.download.nvidia.com/assets/cuda/files/CUDADownloads/NVML/tdk_${PV}_linux.tar.gz
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+doc +examples"
+
+RDEPEND="
+>=dev-util/nvidia-cuda-toolkit-4.1
+examples? ( >=x11-drivers/nvidia-drivers-260.19.21 )
+media-libs/freeglut
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+RESTRICT="binchecks"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ tar xvf ${A%.*}
+}
+
+src_compile() {
+ cd "${S}/tdk_${PV}/"
+
+ if use examples; then
+ cd example
+ emake || die
+ fi
+}
+
+src_install() {
+ cd "${S}/tdk_${PV}/"
+
+ if ! use doc; then
+ rm -rf *.txt doc
+ fi
+
+ if ! use examples; then
+ rm -rf example
+ fi
+
+ for f in $(find .); do
+ local t="$(dirname ${f})"
+ if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
+ continue
+ fi
+
+ if [[ ! -d "${f}" ]]; then
+ if [[ -x "${f}" ]]; then
+ exeinto "/opt/cuda/tdk/${t}"
+ doexe "${f}"
+ else
+ insinto "/opt/cuda/tdk/${t}"
+ doins "${f}"
+ fi
+ fi
+ done
+}
View
3  dev-util/nvidia-cuda-toolkit/Manifest
@@ -0,0 +1,3 @@
+DIST cudatoolkit_4.2.9_linux_32_ubuntu11.04.run 209998124 RMD160 459e0eb9bad6b96dbbf07508bcd51e6fb8a2662c SHA1 f570837a0b98a5c1d440d11053a48649887fd5c9 SHA256 0c91d51e49c7cabc13fafa75cbf547c6902557cb5c3e19b4cf3c83c26172a03f
+DIST cudatoolkit_4.2.9_linux_64_ubuntu11.04.run 282394341 RMD160 cac409facac941c510d486b1b654b4003281e840 SHA1 1d7404e69affb487f9c6a0f2ea904d72f3a0f7e5 SHA256 22d857db6b3831670bc2ca7ed22ac257b6946f68f6e4b6f534ec98b69690ad38
+EBUILD nvidia-cuda-toolkit-4.2.ebuild 2539 RMD160 b1ca2fcdfb3de0f0bfdb5a8bc7f034edd4bb072f SHA1 b70d349c5788ad2ec433c24f971481c464657c00 SHA256 047d1aae07f3633385b07c12d68d1df76a04a68f969dda25bfd39f4334a1ece1
View
110 dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-4.2.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils multilib unpacker
+
+DESCRIPTION="NVIDIA CUDA Toolkit"
+HOMEPAGE="http://developer.nvidia.com/cuda"
+RESTRICT="binchecks"
+
+CUDA_V=${PV//_/-}
+DIR_V=${CUDA_V//./_}
+DIR_V=${DIR_V//beta/Beta}
+
+BASE_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/rel/toolkit"
+SRC_URI="amd64? ( ${BASE_URI}/cudatoolkit_${CUDA_V}.9_linux_64_ubuntu11.04.run )
+ x86? ( ${BASE_URI}/cudatoolkit_${CUDA_V}.9_linux_32_ubuntu11.04.run )"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debugger doc profiler"
+
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-2.20
+ >=sys-devel/gcc-4.5
+ debugger? ( >=sys-libs/libtermcap-compat-2.0.8-r2 )
+ >=x11-drivers/nvidia-drivers-295.40"
+
+S="${WORKDIR}"
+
+src_install() {
+ local DEST=/opt/cuda
+
+ into ${DEST}
+ dobin bin/*
+ dobin nvvm/*
+ dolib $(get_libdir)/*
+
+ if ! use debugger; then
+ rm -f "${D}/${DEST}/bin/cuda-gdb"
+ else
+ insinto ${DEST}/extras
+ doins -r extras/Debugger
+ fi
+
+ if use profiler; then
+ # TODO: Use system JRE for the profiler?
+ insinto ${DEST}
+ doins -r libnvvp
+ fperms a+x ${DEST}/libnvvp/nvvp ${DEST}/libnvvp/jre/bin/* ${DEST}/libnvvp/*.so
+
+ cat > "${T}/nvv" << EOF
+#!/bin/sh
+LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${DEST}/lib:${DEST}/lib64 ${DEST}/libnvvp/nvvp
+EOF
+ dobin "${T}/nvv"
+ insinto ${DEST}/extras
+ doins -r extras/CUPTI
+ fi
+
+ chmod a-x "${D}/${DEST}/bin/nvcc.profile"
+ chmod a-x "${D}/${DEST}/bin/ci_include.h"
+
+ # TODO: Manuals are missing from this release. Remove the following
+ # commented-out lines if they are not restored in the next releases.
+ # doman does not respect DESTTREE
+ #insinto ${DEST}/man/man1
+ #doins man/man1/*
+ #insinto ${DEST}/man/man3
+ #doins man/man3/*
+ #prepman ${DEST}
+
+ insinto ${DEST}/include
+ doins -r include/*
+
+ insinto ${DEST}/src
+ doins src/*
+
+ if use doc ; then
+ insinto ${DEST}/doc
+ doins -r doc/*
+ fi
+
+ cat > "${T}/env" << EOF
+PATH=${DEST}/bin
+ROOTPATH=${DEST}/bin
+LDPATH=${DEST}/$(get_libdir)
+MANPATH=${DEST}/man
+EOF
+ newenvd "${T}/env" 99cuda
+
+ export CONF_LIBDIR_OVERRIDE="lib"
+ # HACK: temporary workaround until CONF_LIBDIR_OVERRIDE is respected.
+ export LIBDIR_amd64="lib"
+
+ into ${DEST}/open64
+ dobin open64/bin/*
+ libopts -m0755
+ dolib open64/lib/*
+}
+
+pkg_postinst() {
+ elog "If you want to natively run the code generated by this version of the"
+ elog "CUDA toolkit, you will need >=x11-drivers/nvidia-drivers-295.40"
+ elog ""
+ elog "Run '. /etc/profile' before using the CUDA toolkit. "
+}
View
20 x11-drivers/nvidia-drivers/Manifest
@@ -0,0 +1,20 @@
+AUX 09nvidia 61 RMD160 b69c3282ba6195112e312fe34bdcb12544aef8ca SHA1 05dd043f66f53409dfe511636d92a339edb4c765 SHA256 14702d6726cc9f0ad832a3cc90059999eb956f9e3a35397cb63cfa6347b33e39
+AUX 195.30-unified-arch.patch 1525 RMD160 9872c270b4bb3d3010af3f2b83798631562c8d8f SHA1 06330376e9a25e3317a4bfe12f74af17e56f3448 SHA256 b6224e213820c698315a8645204d992b779f31e8c45c025e740bc189dc1f9bae
+AUX 256.35-unified-arch.patch 1380 RMD160 2612cad105f442d4232b99e3054124e8037860bb SHA1 d82433c0b3520c87e05f1013a59b243ec65ebe97 SHA256 5e84bb51e0f9b3ceba270d53ad2a739dc534861df9acd6ab6852670f5a1357d7
+AUX NVIDIA_glx-defines.patch 437 RMD160 7cc38de0663c51d9e3718f02035a940a5d31e53c SHA1 eef9bcae32d4e00133b205e27ce766488d5c6cdb SHA256 0007f3d962edb87da4788ce58869679c1b10f28223a6bf1c23696fede57305da
+AUX NVIDIA_glx-glheader.patch 380 RMD160 ee9a10cfbed10d5711f58a80553ffebeea5853bf SHA1 72abfedb9dfb7dae7dc23a5701d3e00282fef2c0 SHA256 f630e24067bf6199a64f8fe8c5d6fc158cb4b153bda65ffc3f97b36a9cb08faf
+AUX eblits/donvidia.eblit 695 RMD160 e83869944dfce52a62423412e6c22b4e4468bc3c SHA1 0c877bbe4402c2845f8f4353c9f2d8086d364fbc SHA256 d404dd7e5657d83ccf3687720fb978030a3716e47957fb8bb80dea3ed57b3672
+AUX eblits/mtrr_check.eblit 629 RMD160 a7f9090f419faa17e74b81346c4bb019a7700138 SHA1 edb9ba38de929a9a0406408701a454f514fe78ed SHA256 ae1b8fb37985fc3e42a4a776779b3fe3d70be2c826df5c3f99d03ba7209ca0b1
+AUX eblits/src_install-libs.eblit 3472 RMD160 3e00b70ea45c7fdf6ec6a48c121f56b8faae15da SHA1 ec4cb37556284846a24fcdd54cff1a4cd0ccc539 SHA256 6f301de374736cec316794bf1935a15de025b3c505981f24e06e3df75818ad6a
+AUX eblits/want_tls.eblit 952 RMD160 4f33e6aef50032665d68654af1cfdbd9abc54195 SHA1 cf96ae8227913439526f0ab2ec984e5be6f3a1fd SHA256 e5ce767a2e9a5c0682e764b9ba42a20e721a093f4c0626605570c8b5e3afecd0
+AUX libGL.la-r2 733 RMD160 479612ab30c04ca0683c7d9edaf9ab3de783e4a9 SHA1 88656b7e7234ade4f5564373fd6eb5c040167655 SHA256 4856e7a2c31763ade41c93a395f3e80a2705ac2ab4dbd73e5161cdba132f407b
+AUX nvidia 1510 RMD160 ca0d0e5375109d9edf682d9bdda743b7c693e4d4 SHA1 85cf9bff167dcc063ba61426523973e9598085f7 SHA256 b193cc3f6d6f39138720a2282d9f161fc8f2e8a15bc43d183a30eb879add06c5
+AUX nvidia-169.07 639 RMD160 8baddb6fd1bf7f0e2688870a78e8ace051d62e3f SHA1 b30487ba2a24a6b1359d1fd831eeb1705060953c SHA256 a8c4860f008d53776fda7a17b59524f271236559af688e9a2c9845cbbcba1577
+AUX nvidia-drivers-173.14.30-2.6.39.patch 599 RMD160 9dd06b0036a2ceed8b5a4874b584d32ac25c17f5 SHA1 d5dcbc8edfb05b79ea1f73068b87cd9068f8cf06 SHA256 f1528152fb786d74701bd5d99ccbabad0b1ac791958d83c17bf783484dda9474
+AUX nvidia-drivers-190.53-2.6.33.patch 2893 RMD160 29f6cf29909828f8d22504dfcb43b23aeeff78dd SHA1 412f8a2b208e8af886891985fcabf8623c9943c3 SHA256 68f5cdf4489fb6bc480319e4bda6e6481beb189cf37920b939b8f7bbf77aed1f
+AUX nvidia-drivers-260.19.44-2.6.39.patch 591 RMD160 8e53d800b86c380da9e9c978957a4d1b7f749fe4 SHA1 39be99b92fb16a71347fb8fb39301241550a1958 SHA256 dc9478bb4ff12d820f82bb13a8d7f956456ea97217ba89e6619f1c8d72127be3
+AUX nvidia-udev.sh 185 RMD160 26d8e7e1447daa7d4fd09993f855b58ae1754a72 SHA1 d607b57662e0542b335cbc86ed3c946bb522891f SHA256 120c0af2b64fbcbd7032217a78eec8b104874c1ca68726367bce22c57944e07e
+AUX nvidia.udev-rule 462 RMD160 a7bc1d61d75a7fd7847903064ae5974e4079db5a SHA1 ac04cf8838bab05d5c092446d34c0154b9f6220e SHA256 37b152a5055a16d1947171567178e2841679ddf03dba9d48e7d30f1e3b469ac6
+DIST devdriver_4.2_linux_32_295.41.run 34671088 RMD160 71ec289b23a06a0d008914228e57ce2091fbc32c SHA1 ce06753c891c3b43e66620503c118e8b17acb63b SHA256 935c77b0879ae1d9b8629bba4f7f8a4d2678d7ef558fbc837ff55b70bee8236c
+DIST devdriver_4.2_linux_64_295.41.run 58449059 RMD160 e99fcc35f5a4875ad7f1e2f9c1fce719116b82bf SHA1 518804a9c110d07aebb5559806e307e064cbf924 SHA256 fcdbe5fc9d2f3bc28956a23e5e9a7e3dc8b41901c4c2c1b4d0c3efedcd862fa3
+EBUILD nvidia-drivers-295.41.ebuild 18170 RMD160 18557ff5d18660f7ef0066edc04daedd3e7db7f9 SHA1 bc056640e3e92b344fd1f0c108e815b4494ca7f2 SHA256 60fde7805ec472e1b88a7d80f55bb0a9f1f490415f56b3ab9739cb9b89ea7e6b
View
2  x11-drivers/nvidia-drivers/files/09nvidia
@@ -0,0 +1,2 @@
+# Has to precede X11's own libraries!
+LDPATH=/opt/nvidia/lib
View
30 x11-drivers/nvidia-drivers/files/195.30-unified-arch.patch
@@ -0,0 +1,30 @@
+diff -Naurp NVIDIA-Linux-x86_64-195.30-pkg2-orig/usr/src/nv/conftest.sh NVIDIA-Linux-x86_64-195.30-pkg2/usr/src/nv/conftest.sh
+--- NVIDIA-Linux-x86_64-195.30-pkg2-orig/usr/src/nv/conftest.sh 2010-02-07 22:53:38.000000000 +0100
++++ NVIDIA-Linux-x86_64-195.30-pkg2/usr/src/nv/conftest.sh 2010-02-07 22:57:10.000000000 +0100
+@@ -82,7 +82,7 @@ build_cflags() {
+
+ if [ "$OUTPUT" != "$SOURCES" ]; then
+ MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
+ MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+ fi
+@@ -91,7 +91,7 @@ build_cflags() {
+ fi
+ else
+ MACH_CFLAGS="-I$HEADERS/asm/mach-default"
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
+ MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+ fi
+@@ -102,7 +102,7 @@ build_cflags() {
+
+ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS"
+
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
+ fi
+ if [ -n "$BUILD_PARAMS" ]; then
View
31 x11-drivers/nvidia-drivers/files/256.35-unified-arch.patch
@@ -0,0 +1,31 @@
+Add support for the 'x86' unified kernel arch in conftest.sh
+
+--- NVIDIA-Linux-x86-256.25/kernel/conftest.sh
++++ NVIDIA-Linux-x86-256.25/kernel/conftest.sh
+@@ -101,7 +101,7 @@ build_cflags() {
+
+ if [ "$OUTPUT" != "$SOURCES" ]; then
+ MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
+ MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+ fi
+@@ -110,7 +110,7 @@ build_cflags() {
+ fi
+ else
+ MACH_CFLAGS="-I$HEADERS/asm/mach-default"
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
+ MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+ fi
+@@ -121,7 +121,7 @@ build_cflags() {
+
+ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+
+- if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "x86" ]; then
+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
+ fi
+ if [ -n "$BUILD_PARAMS" ]; then
View
11 x11-drivers/nvidia-drivers/files/NVIDIA_glx-defines.patch
@@ -0,0 +1,11 @@
+diff -ur NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h
+--- NVIDIA_GLX-1.0-4191/usr/include/GL/glx.h 2002-12-09 21:26:55.000000000 +0100
++++ NVIDIA_GLX-1.0-4191.new/usr/include/GL/glx.h 2003-01-30 18:20:23.000000000 +0100
+@@ -39,6 +39,7 @@
+ typedef XID GLXPixmap;
+ typedef XID GLXDrawable;
+ typedef XID GLXPbuffer;
++typedef XID GLXPbufferSGIX;
+ typedef XID GLXWindow;
+ typedef XID GLXFBConfigID;
+
View
13 x11-drivers/nvidia-drivers/files/NVIDIA_glx-glheader.patch
@@ -0,0 +1,13 @@
+--- usr/include/GL/gl.g.orig 2004-07-17 19:56:59.789410584 +1000
++++ usr/include/GL/gl.h 2004-07-17 19:59:08.844791184 +1000
+@@ -66,6 +66,10 @@
+ typedef double GLclampd;
+ typedef void GLvoid;
+
++/* Patching for some better defines in the global system */
++#ifndef GL_GLEXT_LEGACY
++#include <GL/glext.h>
++#endif
+
+ /*************************************************************/
+
View
21 x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit
@@ -0,0 +1,21 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/donvidia.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
+
+# Install nvidia library:
+# the first parameter is the place where to install it
+# the second parameter is the base name of the library
+# the third parameter is the provided soversion
+donvidia() {
+ dodir $1
+ exeinto $1
+
+ libname=$(basename $2)
+
+ # libnvidia-cfg.so is no longer supplied in lib32; step over it gracefully
+ if [ -e $2.$3 ] ; then
+ doexe $2.$3
+ dosym ${libname}.$3 $1/${libname}
+ [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1
+ fi
+}
View
19 x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit
@@ -0,0 +1,19 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/mtrr_check.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
View
116 x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit
@@ -0,0 +1,116 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distribnuted under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/src_install-libs.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
+#
+src_install-libs() {
+ local pkglibdir=lib
+ local inslibdir=$(get_libdir)
+
+ if [[ ${#} -eq 2 ]] ; then
+ pkglibdir=${1}
+ inslibdir=${2}
+ elif has_multilib_profile && [[ ${ABI} == "x86" ]] ; then
+ pkglibdir=lib32
+ fi
+
+ local usrpkglibdir=usr/${pkglibdir}
+ local libdir=usr/X11R6/${pkglibdir}
+ local drvdir=${libdir}/modules/drivers
+ local extdir=${libdir}/modules/extensions
+ local incdir=usr/include/GL
+ local sover=${PV}
+ local NV_ROOT="/usr/${inslibdir}/opengl/nvidia"
+ local NO_TLS_ROOT="${NV_ROOT}/no-tls"
+ local TLS_ROOT="${NV_ROOT}/tls"
+ local X11_LIB_DIR="/usr/${inslibdir}/xorg"
+
+ if use x86-fbsd; then
+ # on FreeBSD everything is on obj/
+ pkglibdir=obj
+ usrpkglibdir=obj
+ x11pkglibdir=obj
+ drvdir=obj
+ extdir=obj
+
+ # don't ask me why the headers are there.. glxext.h is missing
+ incdir=doc
+
+ # on FreeBSD it has just .1 suffix
+ sover=1
+ fi
+
+ # The GLX libraries
+ donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGL.so ${sover}
+ donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libGLcore.so ${sover}
+
+ donvidia ${NV_ROOT}/lib ${usrpkglibdir}/libnvidia-cfg.so ${sover}
+
+ dodir ${NO_TLS_ROOT}
+ donvidia ${NO_TLS_ROOT} ${usrpkglibdir}/libnvidia-tls.so ${sover}
+
+ if ! use x86-fbsd; then
+ donvidia ${TLS_ROOT} ${usrpkglibdir}/tls/libnvidia-tls.so ${sover}
+ fi
+
+ if want_tls ; then
+ dosym ../tls/libnvidia-tls.so ${NV_ROOT}/lib
+ dosym ../tls/libnvidia-tls.so.1 ${NV_ROOT}/lib
+ dosym ../tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib
+ else
+ dosym ../no-tls/libnvidia-tls.so ${NV_ROOT}/lib
+ dosym ../no-tls/libnvidia-tls.so.1 ${NV_ROOT}/lib
+ dosym ../no-tls/libnvidia-tls.so.${sover} ${NV_ROOT}/lib
+ fi
+
+ if ! use x86-fbsd; then
+ # Install the .la file for libtool, to prevent e.g. bug #176423
+ [ -f "${FILESDIR}/libGL.la-r2" ] || die "libGL.la-r2 missing in FILESDIR"
+ local ver1=$(get_version_component_range 1)
+ local ver2=$(get_version_component_range 2)
+ local ver3=$(get_version_component_range 3)
+ sed -e "s:\${PV}:${PV}:" \
+ -e "s:\${ver1}:${ver1}:" \
+ -e "s:\${ver2}:${ver2}:" \
+ -e "s:\${ver3}:${ver3}:" \
+ -e "s:\${libdir}:${inslibdir}:" \
+ "${FILESDIR}"/libGL.la-r2 > "${D}"/${NV_ROOT}/lib/libGL.la
+ fi
+
+ exeinto ${X11_LIB_DIR}/modules/drivers
+
+ [[ -f ${drvdir}/nvidia_drv.so ]] && \
+ doexe ${drvdir}/nvidia_drv.so
+
+ insinto /usr/${inslibdir}
+ [[ -f ${libdir}/libXvMCNVIDIA.a ]] && \
+ doins ${libdir}/libXvMCNVIDIA.a
+ exeinto /usr/${inslibdir}
+ # fix Bug 131315
+ [[ -f ${libdir}/libXvMCNVIDIA.so.${PV} ]] && \
+ doexe ${libdir}/libXvMCNVIDIA.so.${PV} && \
+ dosym libXvMCNVIDIA.so.${PV} \
+ /usr/${inslibdir}/libXvMCNVIDIA.so
+
+ exeinto ${NV_ROOT}/extensions
+ [[ -f ${libdir}/modules/libnvidia-wfb.so.${sover} ]] && \
+ newexe ${libdir}/modules/libnvidia-wfb.so.${sover} libwfb.so
+ [[ -f ${extdir}/libglx.so.${sover} ]] && \
+ newexe ${extdir}/libglx.so.${sover} libglx.so
+
+ # Includes
+ insinto ${NV_ROOT}/include
+ doins ${incdir}/*.h
+
+ #cuda
+ if [[ -f usr/include/cuda/cuda.h ]]; then
+ dodir /usr/include/cuda
+ insinto /usr/include/cuda
+ doins usr/include/cuda/*.h
+
+ if [[ -f usr/${pkglibdir}/libcuda.so.${PV} ]]; then
+ dolib.so usr/${pkglibdir}/libcuda.so.${PV}
+ dosym libcuda.so.${PV} /usr/${inslibdir}/libcuda.so.1
+ dosym libcuda.so.1 /usr/${inslibdir}/libcuda.so
+ fi
+ fi
+}
View
33 x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit
@@ -0,0 +1,33 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/eblits/want_tls.eblit,v 1.1 2008/12/18 18:27:35 cardoe Exp $
+
+want_tls() {
+ # For uclibc or anything non glibc, return false
+ has_version sys-libs/glibc || return 1
+
+ # Old versions of glibc were lt/no-tls only
+ has_version '<sys-libs/glibc-2.3.2' && return 1
+
+ if use x86 ; then
+ case ${CHOST/-*} in
+ i486|i586|i686) ;;
+ *) return 1 ;;
+ esac
+ fi
+
+ # If we've got nptl, we've got tls
+ built_with_use --missing true sys-libs/glibc nptl && return 0
+
+ # 2.3.5 turned off tls for linuxthreads glibc on i486 and i586
+ if use x86 && has_version '>=sys-libs/glibc-2.3.5' ; then
+ case ${CHOST/-*} in
+ i486|i586) return 1 ;;
+ esac
+ fi
+
+ # These versions built linuxthreads version to support tls, too
+ has_version '>=sys-libs/glibc-2.3.4.20040619-r2' && return 0
+
+ return 1
+}
View
32 x11-drivers/nvidia-drivers/files/libGL.la-r2
@@ -0,0 +1,32 @@
+# libGL.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libGL.so.1'
+
+# Names of this library.
+library_names='libGL.so.${PV} libGL.so.1 libGL.so'
+
+# The name of the static archive.
+old_library=''
+
+# Libraries that this one depends upon.
+dependency_libs='-L/usr/${libdir} -lm -lX11 -lXext -ldl'
+
+# Version information for libGL.
+current=${ver1}
+age=${ver2}
+revision=${ver3}
+
+# Is this an already installed library?
+installed=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/${libdir}'
View
40 x11-drivers/nvidia-drivers/files/nvidia
@@ -0,0 +1,40 @@
+# Nvidia drivers support
+alias char-major-195 nvidia
+alias /dev/nvidiactl char-major-195
+
+# To tweak the driver the following options can be used, note that
+# you should be careful, as it could cause instability!! For more
+# options see /usr/share/doc/PACKAGE/README
+#
+# To enable Side Band Adressing: NVreg_EnableAGPSBA=1
+#
+# To enable Fast Writes: NVreg_EnableAGPFW=1
+#
+# To enable both for instance, uncomment following line:
+#
+#options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1
+# If you have a mobile chip, you may need to enable this option
+# if you have hard lockups when starting X.
+#
+# See: Appendix I. Configuring your laptop
+# In /usr/share/doc/PACKAGE/README for full details
+#
+# Choose the appropriate value for NVreg_Mobile from the table:
+# Value Meaning
+# ---------- --------------------------------------------------
+# 0xFFFFFFFF let the kernel module autodetect the correct value
+# 1 Dell laptops
+# 2 non-Compal Toshiba laptops
+# 3 all other laptops
+# 4 Compal Toshiba laptops
+# 5 Gateway laptops
+#
+#options nvidia NVreg_SoftEDIDs=0 NVreg_Mobile=3
+
+
+# !!! SECURITY WARNING !!!
+# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
+# WHAT YOU ARE DOING.
+# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
+# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
+options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
View
14 x11-drivers/nvidia-drivers/files/nvidia-169.07
@@ -0,0 +1,14 @@
+# Nvidia drivers support
+alias char-major-195 nvidia
+alias /dev/nvidiactl char-major-195
+
+# To tweak the driver the following options can be used, note that
+# you should be careful, as it could cause instability!! For more
+# options see /usr/share/doc/PACKAGE/README
+#
+# !!! SECURITY WARNING !!!
+# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
+# WHAT YOU ARE DOING.
+# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
+# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
+options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
View
14 x11-drivers/nvidia-drivers/files/nvidia-drivers-173.14.30-2.6.39.patch
@@ -0,0 +1,14 @@
+linux/smp_lock.h no longer exists in linux-2.6.39+
+
+--- a/usr/src/nv/nv-linux.h
++++ b/usr/src/nv/nv-linux.h
+@@ -87,7 +87,9 @@
+ #if !defined(KERNEL_2_4)
+ #include <linux/sched.h> /* suser(), capable() replacement */
+ #include <linux/moduleparam.h> /* module_param() */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+ #include <linux/smp_lock.h> /* kernel_locked */
++#endif
+ #include <asm/tlbflush.h> /* flush_tlb(), flush_tlb_all() */
+ #include <asm/kmap_types.h> /* page table entry lookup */
+ #endif
View
92 x11-drivers/nvidia-drivers/files/nvidia-drivers-190.53-2.6.33.patch
@@ -0,0 +1,92 @@
+Index: usr/src/nv/conftest.sh
+===================================================================
+--- usr/src/nv/conftest.sh
++++ usr/src/nv/conftest.sh 2010-01-06 12:10:56.000000000 +0530
+@@ -32,14 +32,14 @@
+ # CONFIG_XEN and CONFIG_PARAVIRT are present, text_xen() treats
+ # the kernel as a stand-alone kernel.
+ #
+- FILE="linux/autoconf.h"
++ FILE="generated/autoconf.h"
+
+ if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
+ #
+ # We are looking at a configured source tree; verify
+ # that it's not a Xen kernel.
+ #
+- echo "#include <linux/autoconf.h>
++ echo "#include <generated/autoconf.h>
+ #if defined(CONFIG_XEN) && !defined(CONFIG_PARAVIRT)
+ #error CONFIG_XEN defined!
+ #endif
+@@ -111,7 +111,12 @@
+ fi
+ }
+
+-CONFTEST_PREAMBLE="#include <linux/autoconf.h>
++CONFTEST_PREAMBLE="#include <linux/version.h>
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
++ #include <generated/autoconf.h>
++ #else
++ #include <linux/autoconf.h>
++ #endif
+ #if defined(CONFIG_XEN) && \
+ defined(CONFIG_XEN_INTERFACE_VERSION) && !defined(__XEN_INTERFACE_VERSION__)
+ #define __XEN_INTERFACE_VERSION__ CONFIG_XEN_INTERFACE_VERSION
+@@ -1294,7 +1299,7 @@
+ echo "";
+ fi
+ fi
+- exit $RET
++# exit $RET
+ ;;
+
+ get_uname)
+@@ -1316,11 +1321,11 @@
+ # tree or at headers shipped for a specific kernel.
+ # Determine the kernel version using a compile check.
+ #
+- FILE="linux/utsrelease.h"
++ FILE="generated/utsrelease.h"
+
+ if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
+ echo "$CONFTEST_PREAMBLE
+- #include <linux/utsrelease.h>
++ #include <generated/utsrelease.h>
+ int main() {
+ printf(\"%s\", UTS_RELEASE);
+ return 0;
+@@ -1375,7 +1380,7 @@
+ #
+ RET=1
+ VERBOSE=$6
+- FILE="linux/autoconf.h"
++ FILE="generated/autoconf.h"
+
+ if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
+ #
+@@ -1429,7 +1434,7 @@
+ #
+ RET=1
+ VERBOSE=$6
+- FILE="linux/autoconf.h"
++ FILE="generated/autoconf.h"
+
+ if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then
+ #
+Index: usr/src/nv/nvacpi.c
+===================================================================
+--- usr/src/nv/nvacpi.c
++++ usr/src/nv/nvacpi.c 2010-01-06 12:10:56.000000000 +0530
+@@ -49,6 +49,10 @@
+ };
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
++#define acpi_walk_namespace(a,b,c,d,e,f) acpi_walk_namespace(a,b,c,d,e,f,NULL)
++#endif
++
+ static struct acpi_driver *nv_acpi_driver;
+ static acpi_handle nvif_handle = NULL;
+ static acpi_handle dsm_handle = NULL;
+
View
14 x11-drivers/nvidia-drivers/files/nvidia-drivers-260.19.44-2.6.39.patch
@@ -0,0 +1,14 @@
+linux/smp_lock.h no longer exists in linux-2.6.39+
+
+--- a/kernel/nv-linux.h
++++ b/kernel/nv-linux.h
+@@ -87,7 +87,9 @@
+ #if !defined(KERNEL_2_4)
+ #include <linux/sched.h> /* suser(), capable() replacement */
+ #include <linux/moduleparam.h> /* module_param() */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+ #include <linux/smp_lock.h> /* kernel_locked */
++#endif
+ #include <asm/tlbflush.h> /* flush_tlb(), flush_tlb_all() */
+ #include <asm/kmap_types.h> /* page table entry lookup */
+ #endif
View
17 x11-drivers/nvidia-drivers/files/nvidia-udev.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [ $# -ne 1 ]; then
+ echo "Invalid args" >&2
+ exit 1
+fi
+
+case $1 in
+ add|ADD)
+ /opt/bin/nvidia-smi > /dev/null
+ ;;
+ remove|REMOVE)
+ rm -f /dev/nvidia*
+ ;;
+esac
+
+exit 0
View
6 x11-drivers/nvidia-drivers/files/nvidia.udev-rule
@@ -0,0 +1,6 @@
+ACTION=="add", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"
+# Previously the ACTION was "add|remove" but one user on bug #376527 had a
+# problem until he recompiled udev-171-r5, which is one of the versions I
+# tested with and it was fine. I'm breaking the rules out just to be safe
+# so someone else doesn't have an issue
+ACTION=="remove", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"
View
583 x11-drivers/nvidia-drivers/nvidia-drivers-295.41.ebuild
@@ -0,0 +1,583 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils unpacker multilib portability versionator linux-mod flag-o-matic nvidia-driver
+
+CUDA_V="4.2"
+CUDA_V_DIR=${CUDA_V//./_}
+
+X86_NV_PACKAGE="devdriver_${CUDA_V}_linux_32_${PV}"
+AMD64_NV_PACKAGE="devdriver_${CUDA_V}_linux_64_${PV}"
+
+DESCRIPTION="NVIDIA X11 driver and GLX libraries"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="
+x86? ( http://developer.download.nvidia.com/compute/cuda/${CUDA_V_DIR}/rel/drivers/${X86_NV_PACKAGE}.run )
+amd64? ( http://developer.download.nvidia.com/compute/cuda/${CUDA_V_DIR}/rel/drivers/${AMD64_NV_PACKAGE}.run )
+"
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="acpi custom-cflags gtk multilib kernel_linux"
+RESTRICT="strip"
+EMULTILIB_PKG="true"
+
+COMMON="<x11-base/xorg-server-1.12.99
+ kernel_linux? ( >=sys-libs/glibc-2.6.1 )
+ multilib? ( app-emulation/emul-linux-x86-xlibs )
+ >=app-admin/eselect-opengl-1.0.9
+ app-admin/eselect-opencl"
+DEPEND="${COMMON}
+ kernel_linux? ( virtual/linux-sources )"
+RDEPEND="${COMMON}
+ x11-libs/libXvMC
+ acpi? ( sys-power/acpid )"
+PDEPEND=">=x11-libs/libvdpau-0.3-r1
+ gtk? ( media-video/nvidia-settings )"
+
+QA_TEXTRELS_x86="
+ usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
+ usr/lib/libXvMCNVIDIA.so.${PV}
+ usr/lib/libcuda.so.${PV}
+ usr/lib/libnvcuvid.so.${PV}
+ usr/lib/libnvidia-cfg.so.${PV}
+ usr/lib/libnvidia-compiler.so.${PV}
+ usr/lib/libnvidia-glcore.so.${PV}
+ usr/lib/libnvidia-ml.so.${PV}
+ usr/lib/libvdpau_nvidia.so.${PV}
+ usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
+ usr/lib/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV}
+ usr/lib/xorg/modules/drivers/nvidia_drv.so"
+
+QA_TEXTRELS_x86_fbsd="boot/modules/nvidia.ko
+ usr/lib/opengl/nvidia/lib/libGL.so.1
+ usr/lib/libnvidia-glcore.so.1
+ usr/lib/libnvidia-cfg.so.1
+ usr/lib/libnvidia-ml.so.1
+ usr/lib/opengl/nvidia/extensions/libglx.so.1
+ usr/lib/xorg/modules/drivers/nvidia_drv.so"
+
+QA_TEXTRELS_amd64="usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
+ usr/lib32/libnvidia-glcore.so.${PV}
+ usr/lib32/libvdpau_nvidia.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib32/libcuda.so.${PV}
+ usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
+ usr/lib32/libnvidia-compiler.so.${PV}"
+
+QA_EXECSTACK_x86="usr/lib/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib/libnvidia-glcore.so.${PV}
+ usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
+ usr/lib64/libXvMCNVIDIA.so.${PV}
+ usr/lib/libXvMCNVIDIA.a:NVXVMC.o
+ usr/lib/libvdpau_nvidia.so.${PV}
+ usr/lib/libnvidia-compiler.so.${PV}
+ usr/lib/libcuda.so.${PV}
+ usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0"
+
+QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
+ usr/lib32/libvdpau_nvidia.so.${PV}
+ usr/lib32/libcuda.so.${PV}
+ usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
+ usr/lib32/libnvidia-compiler.so.${PV}
+ usr/lib64/libXvMCNVIDIA.a:NVXVMC.o
+ usr/lib64/libnvidia-cfg.so.${PV}
+ usr/lib64/libnvidia-ml.so.${PV}
+ usr/lib64/libvdpau_nvidia.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib64/libnvidia-glcore.so.${PV}
+ usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
+ usr/lib64/libXvMCNVIDIA.so.${PV}
+ usr/lib64/libcuda.so.${PV}
+ usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
+ usr/lib64/libnvidia-compiler.so.${PV}
+ usr/lib64/xorg/modules/drivers/nvidia_drv.so
+ opt/bin/nvidia-smi
+ opt/bin/nvidia-xconfig
+ opt/bin/nvidia-debugdump
+ opt/bin/nvidia-settings"
+
+QA_WX_LOAD_x86="usr/lib/libnvidia-glcore.so.${PV}
+ usr/lib/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
+ usr/lib/libXvMCNVIDIA.a
+ usr/lib64/libXvMCNVIDIA.so.${PV}"
+
+QA_WX_LOAD_amd64="usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib32/libnvidia-glcore.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib64/libnvidia-glcore.so.${PV}
+ usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
+ usr/lib64/libXvMCNVIDIA.so.${PV}"
+
+QA_SONAME_x86="usr/lib/libnvidia-compiler.so.${PV}"
+
+QA_SONAME_amd64="usr/lib64/libnvidia-compiler.so.${PV}
+ usr/lib32/libnvidia-compiler.so.${PV}"
+
+QA_DT_HASH_amd64="usr/lib32/libcuda.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib32/libnvidia-glcore.so.${PV}
+ usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
+ usr/lib32/libvdpau_nvidia.so.${PV}
+ usr/lib32/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
+ usr/lib32/libnvidia-compiler.so.${PV}
+ usr/lib64/libXvMCNVIDIA.so.${PV}
+ usr/lib64/libcuda.so.${PV}
+ usr/lib64/libnvidia-cfg.so.${PV}
+ usr/lib64/libnvidia-glcore.so.${PV}
+ usr/lib64/libnvidia-ml.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.${PV}
+ usr/lib64/opengl/nvidia/extensions/libglx.so.${PV}
+ usr/lib64/xorg/modules/drivers/nvidia_drv.so
+ usr/lib64/libvdpau_nvidia.so.${PV}
+ usr/lib64/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
+ usr/lib64/libnvidia-compiler.so.${PV}
+ usr/lib64/libnvcuvid.so.${PV}
+ opt/bin/nvidia-smi
+ opt/bin/nvidia-xconfig
+ opt/bin/nvidia-debugdump
+ opt/bin/nvidia-settings"
+
+QA_DT_HASH_x86="usr/lib/libcuda.so.${PV}
+ usr/lib/libnvidia-cfg.so.${PV}
+ usr/lib/libnvidia-glcore.so.${PV}
+ usr/lib/libnvidia-ml.so.${PV}
+ usr/lib/opengl/nvidia/lib/libGL.so.${PV}
+ usr/lib/opengl/nvidia/lib/libnvidia-tls.so.${PV}
+ usr/lib/opengl/nvidia/extensions/libglx.so.${PV}
+ usr/lib/xorg/modules/drivers/nvidia_drv.so
+ usr/lib/libXvMCNVIDIA.so.${PV}
+ usr/lib/libvdpau_nvidia.so.${PV}
+ usr/lib/OpenCL/vendors/nvidia/libOpenCL.so.1.0.0
+ usr/lib/libnvidia-compiler.so.${PV}
+ usr/lib/libnvcuvid.so.${PV}
+ opt/bin/nvidia-smi
+ opt/bin/nvidia-xconfig
+ opt/bin/nvidia-debugdump
+ opt/bin/nvidia-settings"
+
+S=${WORKDIR}/
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+lockdep_check() {
+ if linux_chkconfig_present LOCKDEP; then
+ eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel."
+ eerror "Unfortunately, this option exports the symbol "
+ eerror "'lockdep_init_map' as GPL-only which will prevent "
+ eerror "${P} from compiling."
+ eerror "Please make sure the following options have been unset:"
+ eerror
+ eerror " Kernel hacking --->"
+ eerror " [ ] Lock debugging: detect incorrect freeing of live locks"
+ eerror " [ ] Lock debugging: prove locking correctness"
+ eerror " [ ] Lock usage statistics"
+ eerror "in 'menuconfig'"
+ die "LOCKDEP enabled"
+ fi
+}
+
+pkg_setup() {
+ # try to turn off distcc and ccache for people that have a problem with it
+ export DISTCC_DISABLE=1
+ export CCACHE_DISABLE=1
+
+ if use amd64 && has_multilib_profile && [ "${DEFAULT_ABI}" != "amd64" ]; then
+ eerror "This ebuild doesn't currently support changing your default abi."
+ die "Unexpected \${DEFAULT_ABI} = ${DEFAULT_ABI}"
+ fi
+
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ MODULE_NAMES="nvidia(video:${S}/kernel)"
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
+ SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)"
+ # linux-mod_src_compile calls set_arch_to_kernel, which
+ # sets the ARCH to x86 but NVIDIA's wrapping Makefile
+ # expects x86_64 or i386 and then converts it to x86
+ # later on in the build process
+ BUILD_FIXES="ARCH=$(uname -m | sed -e 's/i.86/i386/')"
+ mtrr_check
+ lockdep_check
+ fi
+
+ # On BSD userland it wants real make command
+ use userland_BSD && MAKE="$(get_bmake)"
+
+ export _POSIX2_VERSION="199209"
+
+ # Since Nvidia ships 3 different series of drivers, we need to give the user
+ # some kind of guidance as to what version they should install. This tries
+ # to point the user in the right direction but can't be perfect. check
+ # nvidia-driver.eclass
+ nvidia-driver-check-warning
+
+ # set variables to where files are in the package structure
+ if use kernel_FreeBSD; then
+ NV_DOC="${S}/doc"
+ NV_EXEC="${S}/obj"
+ NV_LIB="${S}/obj"
+ NV_SRC="${S}/src"
+ NV_MAN="${S}/x11/man"
+ NV_X11="${S}/obj"
+ NV_X11_DRV="${NV_X11}"
+ NV_X11_EXT="${NV_X11}"
+ NV_SOVER=1
+ elif use kernel_linux; then
+ NV_DOC="${S}"
+ NV_EXEC="${S}"
+ NV_LIB="${S}"
+ NV_SRC="${S}/kernel"
+ NV_MAN="${S}"
+ NV_X11="${S}"
+ NV_X11_DRV="${NV_X11}"
+ NV_X11_EXT="${NV_X11}"
+ NV_SOVER=${PV}
+ else
+ die "Could not determine proper NVIDIA package"
+ fi
+}
+
+src_unpack() {
+ if use kernel_linux && kernel_is lt 2 6 7; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ if ! use x86-fbsd; then
+ cd "${S}"
+ unpack_makeself
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ # Please add a brief description for every added patch
+ use x86-fbsd && cd doc
+
+ if use kernel_linux; then
+ # Quiet down warnings the user does not need to see
+ sed -i \
+ -e 's:-Wsign-compare::g' \
+ "${NV_SRC}"/Makefile.kbuild
+
+ # Fix building with Linux 3.3.x wrt #408841
+ sed -i \
+ -e '/CFLAGS="$CFLAGS/s:-I$SOURCES/arch/x86/include:& -I$OUTPUT/arch/x86/include/generated:' \
+ kernel/conftest.sh || die
+
+ # If you set this then it's your own fault when stuff breaks :)
+ use custom-cflags && sed -i "s:-O:${CFLAGS}:" "${NV_SRC}"/Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m "${NV_SRC}"/Makefile.kbuild
+ fi
+ cat <<- EOF > "${S}"/nvidia.icd
+ /usr/$(get_libdir)/libcuda.so
+ EOF
+}
+
+src_compile() {
+ # This is already the default on Linux, as there's no toplevel Makefile, but
+ # on FreeBSD there's one and triggers the kernel module build, as we install
+ # it by itself, pass this.
+
+ cd "${NV_SRC}"
+ if use x86-fbsd; then
+ MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ elif use kernel_linux; then
+ linux-mod_src_compile
+ fi
+}
+
+src_install() {
+ if use kernel_linux; then
+ linux-mod_src_install
+
+ VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)"
+ if [ -z "$VIDEOGROUP" ]; then
+ eerror "Failed to determine the video group gid."
+ die "Failed to determine the video group gid."
+ fi
+
+ # Add the aliases
+ [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR"
+ sed -e 's:PACKAGE:'${PF}':g' \
+ -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \
+ "${WORKDIR}"/nvidia
+ insinto /etc/modprobe.d
+ newins "${WORKDIR}"/nvidia nvidia.conf || die
+
+ # Ensures that our device nodes are created when not using X
+ exeinto /lib/udev
+ doexe "${FILESDIR}"/nvidia-udev.sh
+
+ insinto /lib/udev/rules.d
+ newins "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules
+ elif use x86-fbsd; then
+ insinto /boot/modules
+ doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" || die
+
+ exeinto /boot/modules
+ doexe "${WORKDIR}/${NV_PACKAGE}/src/nvidia.ko" || die
+ fi
+
+ # NVIDIA kernel <-> userspace driver config lib
+ dolib.so ${NV_LIB}/libnvidia-cfg.so.${NV_SOVER} || \
+ die "failed to install libnvidia-cfg"
+ dosym libnvidia-cfg.so.${NV_SOVER} \
+ /usr/$(get_libdir)/libnvidia-cfg.so.1 || \
+ die "failed to create libnvidia-cfg.so symlink"
+ dosym libnvidia-cfg.so.1 \
+ /usr/$(get_libdir)/libnvidia-cfg.so || \
+ die "failed to create libnvidia-cfg.so symlink"
+
+ # NVIDIA monitoring library
+ dolib.so ${NV_LIB}/libnvidia-ml.so.${NV_SOVER} || \
+ die "failed to install libnvidia-ml"
+ dosym libnvidia-ml.so.${NV_SOVER} \
+ /usr/$(get_libdir)/libnvidia-ml.so.1 || \
+ die "failed to create libnvidia-ml.so symlink"
+ dosym libnvidia-ml.so.1 \
+ /usr/$(get_libdir)/libnvidia-ml.so || \
+ die "failed to create libnvidia-ml.so symlink"
+
+ # NVIDIA video decode <-> CUDA
+ dolib.so ${NV_LIB}/libnvcuvid.so.${NV_SOVER} || \
+ die "failed to install libnvcuvid.so"
+ dosym libnvcuvid.so.${NV_SOVER} \
+ /usr/$(get_libdir)/libnvcuvid.so.1 || \
+ die "failed to create libnvcuvid.so symlink"
+ dosym libnvcuvid.so.1 \
+ /usr/$(get_libdir)/libnvcuvid.so || \
+ die "failed to create libnvcuvid.so symlink"
+
+ # Xorg DDX driver
+ insinto /usr/$(get_libdir)/xorg/modules/drivers
+ doins ${NV_X11_DRV}/nvidia_drv.so || die "failed to install nvidia_drv.so"
+
+ # Xorg GLX driver
+ insinto /usr/$(get_libdir)/opengl/nvidia/extensions
+ doins ${NV_X11_EXT}/libglx.so.${NV_SOVER} || \
+ die "failed to install libglx.so"
+ dosym libglx.so.${NV_SOVER} \
+ /usr/$(get_libdir)/opengl/nvidia/extensions/libglx.so || \
+ die "failed to create libglx.so symlink"
+
+ # XvMC driver
+ dolib.a ${NV_X11}/libXvMCNVIDIA.a || \
+ die "failed to install libXvMCNVIDIA.so"
+ dolib.so ${NV_X11}/libXvMCNVIDIA.so.${NV_SOVER} || \
+ die "failed to install libXvMCNVIDIA.so"
+ dosym libXvMCNVIDIA.so.${NV_SOVER} \
+ /usr/$(get_libdir)/libXvMCNVIDIA.so.1 || \
+ die "failed to create libXvMCNVIDIA.so symlink"
+ dosym libXvMCNVIDIA.so.1 /usr/$(get_libdir)/libXvMCNVIDIA.so || \
+ die "failed to create libXvMCNVIDIA.so symlink"
+ dosym libXvMCNVIDIA.so.${NV_SOVER} \
+ /usr/$(get_libdir)/libXvMCNVIDIA_dynamic.so.1 || \
+ die "failed to create libXvMCNVIDIA_dynamic.so symlink"
+
+ # OpenCL ICD for NVIDIA
+ if use kernel_linux; then
+ insinto /etc/OpenCL/vendors
+ doins nvidia.icd
+ fi
+
+ # Documentation
+ dohtml ${NV_DOC}/html/*
+ if use x86-fbsd; then
+ dodoc "${NV_DOC}/README"
+ doman "${NV_MAN}/nvidia-xconfig.1"
+ use gtk && doman "${NV_MAN}/nvidia-settings.1"
+ else
+ # Docs
+ newdoc "${NV_DOC}/README.txt" README
+ dodoc "${NV_DOC}/NVIDIA_Changelog"
+ doman "${NV_MAN}/nvidia-smi.1.gz"
+ doman "${NV_MAN}/nvidia-xconfig.1.gz"
+ use gtk && doman "${NV_MAN}/nvidia-settings.1.gz"
+ fi
+
+ # Helper Apps
+ exeinto /opt/bin/
+ doexe ${NV_EXEC}/nvidia-xconfig || die
+ doexe ${NV_EXEC}/nvidia-debugdump || die
+ if use gtk; then
+ doexe ${NV_EXEC}/nvidia-settings || die
+ fi
+ doexe ${NV_EXEC}/nvidia-bug-report.sh || die
+ if use kernel_linux; then
+ doexe ${NV_EXEC}/nvidia-smi || die
+ fi
+
+ # Desktop entries for nvidia-settings
+ if use gtk; then
+ sed -e 's:__UTILS_PATH__:/opt/bin:' \
+ -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \
+ -i "${NV_EXEC}/nvidia-settings.desktop"
+ newmenu ${NV_EXEC}/nvidia-settings.desktop nvidia-settings-opt.desktop
+
+ doicon ${NV_EXEC}/nvidia-settings.png
+ fi
+
+ if has_multilib_profile ; then
+ local OABI=${ABI}
+ for ABI in $(get_install_abis) ; do
+ src_install-libs
+ done
+ ABI=${OABI}
+ unset OABI
+ else
+ src_install-libs
+ fi
+
+ is_final_abi || die "failed to iterate through all ABIs"
+}
+
+# Install nvidia library:
+# the first parameter is the place where to install it
+# the second parameter is the base name of the library
+# the third parameter is the provided soversion
+donvidia() {
+ dodir $1
+ exeinto $1
+
+ libname=$(basename $2)
+
+ doexe $2.$3 || die "failed to install $2"
+ dosym ${libname}.$3 $1/${libname} || die "failed to symlink $2"
+ [[ $3 != "1" ]] && dosym ${libname}.$3 $1/${libname}.1
+}
+
+src_install-libs() {
+ local inslibdir=$(get_libdir)
+ local NV_ROOT="/usr/${inslibdir}/opengl/nvidia"
+ local CL_ROOT=/usr/${inslibdir}/OpenCL/vendors/nvidia
+ local libdir= sover=
+
+ if use kernel_linux; then
+ if has_multilib_profile && [[ ${ABI} == "x86" ]] ; then
+ libdir=32
+ else
+ libdir=.
+ fi
+ sover=${PV}
+ else
+ libdir=obj
+ # on FreeBSD it has just .1 suffix
+ sover=1
+ fi
+
+ # The GLX libraries
+ donvidia ${NV_ROOT}/lib ${libdir}/libGL.so ${sover}
+ donvidia /usr/${inslibdir} ${libdir}/libnvidia-glcore.so ${sover}
+ if use x86-fbsd; then
+ donvidia ${NV_ROOT}/lib ${libdir}/libnvidia-tls.so ${sover}
+ else
+ donvidia ${NV_ROOT}/lib ${libdir}/tls/libnvidia-tls.so ${sover}
+ fi
+
+ # VDPAU
+ donvidia /usr/${inslibdir} ${libdir}/libvdpau_nvidia.so ${sover}
+
+ # CUDA & OpenCL
+ if use kernel_linux; then
+ donvidia /usr/${inslibdir} ${libdir}/libcuda.so ${sover}
+ donvidia /usr/${inslibdir} ${libdir}/libnvidia-compiler.so ${sover}
+ donvidia ${CL_ROOT} ${libdir}/libOpenCL.so 1.0.0
+ #dosym libOpenCL.so.1 ${CL_ROOT}/libOpenCL.so
+ fi
+}
+
+pkg_preinst() {
+ use kernel_linux && linux-mod_pkg_preinst
+
+ # Clean the dynamic libGL stuff's home to ensure
+ # we dont have stale libs floating around
+ if [ -d "${ROOT}"/usr/lib/opengl/nvidia ] ; then
+ rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
+ fi
+ # Make sure we nuke the old nvidia-glx's env.d file
+ if [ -e "${ROOT}"/etc/env.d/09nvidia ] ; then
+ rm -f "${ROOT}"/etc/env.d/09nvidia
+ fi
+}
+
+pkg_postinst() {
+ use kernel_linux && linux-mod_pkg_postinst
+
+ # Switch to the nvidia implementation
+ "${ROOT}"/usr/bin/eselect opengl set --use-old nvidia
+ "${ROOT}"/usr/bin/eselect opencl set --use-old nvidia
+
+ echo
+ elog "You must be in the video group to use the NVIDIA device"
+ elog "For more info, read the docs at"
+ elog "http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3_sect6"
+ elog
+
+ elog "This ebuild installs a kernel module and X driver. Both must"
+ elog "match explicitly in their version. This means, if you restart"
+ elog "X, you must modprobe -r nvidia before starting it back up"
+ elog
+
+ elog "To use the NVIDIA GLX, run \"eselect opengl set nvidia\""
+ elog
+ elog "To use the NVIDIA CUDA/OpenCL, run \"eselect opencl set nvidia\""
+ elog
+ elog "NVIDIA has requested that any bug reports submitted have the"
+ elog "output of /opt/bin/nvidia-bug-report.sh included."
+ elog
+ elog "To work with compiz, you must enable the AddARGBGLXVisuals option."
+ elog
+ elog "If you are having resolution problems, try disabling DynamicTwinView."
+ elog
+
+ if ! use gtk; then
+ elog "USE=gtk controls whether the nvidia-settings application"
+ elog "is installed. If you would like to use it, enable that"
+ elog "flag and re-emerge this ebuild. media-video/nvidia-settings"
+ elog "no longer installs nvidia-settings but only installs the"
+ elog "associated user space libraries."
+ fi
+}
+
+pkg_prerm() {
+ "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
+
+pkg_postrm() {
+ use kernel_linux && linux-mod_pkg_postrm
+ "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
+}
Please sign in to comment.
Something went wrong with that request. Please try again.