not needed anymore, stable release in main tree is already support 3.0 kernel

This commit is contained in:
Sergey Popov 2011-09-17 23:25:53 +04:00
parent 108caf1c54
commit 18a56d9420
15 changed files with 0 additions and 935 deletions

View File

@ -1,17 +0,0 @@
AUX 09nvidia 61 RMD160 b69c3282ba6195112e312fe34bdcb12544aef8ca SHA1 05dd043f66f53409dfe511636d92a339edb4c765 SHA256 14702d6726cc9f0ad832a3cc90059999eb956f9e3a35397cb63cfa6347b33e39
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-260.19.44-2.6.39.patch 591 RMD160 8e53d800b86c380da9e9c978957a4d1b7f749fe4 SHA1 39be99b92fb16a71347fb8fb39301241550a1958 SHA256 dc9478bb4ff12d820f82bb13a8d7f956456ea97217ba89e6619f1c8d72127be3
AUX nvidia-drivers-3.0.patch 1122 RMD160 50c5a920c600a30e6e8f0dea3a4fbd30e59e345b SHA1 49ad140b64e3f8874e2a5682c5c628d57da92b1f SHA256 3fda4e7c39fd10fd9006892b6900af0414095e7c29938fa9a83ff5e6d0be2c1a
DIST NVIDIA-FreeBSD-x86-270.41.19.tar.gz 28488689 RMD160 ec517f435d4b265f4236d680572a43d823be8b33 SHA1 264b8aaa5c9b71b5ea37d4367bae12464bb931e7 SHA256 352b3a666d7b799082896e82da6228eb61158dc1b9722a4f63ffe474b27b4750
DIST NVIDIA-Linux-x86-270.41.19.run 29652783 RMD160 cf60d4ec6d8134285f97f8a76ebed7dd7e9a3a97 SHA1 5b5eb7b2650059b17537ed4b9d646a6dbd46d6a8 SHA256 a8c4aee97e3cb5bf9cd589b6245eeb633d20bae5420646384d48d568230994b1
DIST NVIDIA-Linux-x86_64-270.41.19.run 49632218 RMD160 cc0bed4c9196d1ae53a926237a4c1029ce22427a SHA1 ad325e32e51d0f286f084c9b06298ec3aa2864d5 SHA256 4d7131f07e739abc787d69696ca4ac52df2fc0b338405ffd474288c2a4a1e7a6
EBUILD nvidia-drivers-270.41.19-r9999.ebuild 16669 RMD160 d2ce83c04d0b0e67a0e931edbcaffa564019deeb SHA1 be61f3495ab2d593fddbe82a46f6650f85da877c SHA256 f218ae76e1dea609b854e20b48aae10a2decf5e7c5eb3c8e538d209f579b2593

View File

@ -1,2 +0,0 @@
# Has to precede X11's own libraries!
LDPATH=/opt/nvidia/lib

View File

@ -1,31 +0,0 @@
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 File

@ -1,11 +0,0 @@
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 File

@ -1,13 +0,0 @@
--- 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 File

@ -1,21 +0,0 @@
# 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 File

@ -1,19 +0,0 @@
# 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 File

@ -1,116 +0,0 @@
# 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 File

@ -1,33 +0,0 @@
# 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 File

@ -1,32 +0,0 @@
# 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 File

@ -1,40 +0,0 @@
# 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 File

@ -1,14 +0,0 @@
# 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 File

@ -1,14 +0,0 @@
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 File

@ -1,27 +0,0 @@
diff -urN work-OLD/kernel/conftest.sh work-NEW/kernel/conftest.sh
--- work-OLD/kernel/conftest.sh 2011-05-30 19:41:31.000000000 -0700
+++ work-NEW/kernel/conftest.sh 2011-05-30 19:47:23.000000000 -0700
@@ -76,7 +76,9 @@
}
build_cflags() {
- BASE_CFLAGS="-D__KERNEL__ \
+ # Adding -Os optimizer option to work around rcupdate.h compiler bug, see here:
+ # http://choon.net/forum/read.php?21,82725
+ BASE_CFLAGS="-Os -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
-nostdinc -isystem $ISYSTEM"
diff -urN work-OLD/kernel/nv-linux.h work-NEW/kernel/nv-linux.h
--- work-OLD/kernel/nv-linux.h 2011-05-16 23:32:19.000000000 -0700
+++ work-NEW/kernel/nv-linux.h 2011-05-30 19:46:06.000000000 -0700
@@ -34,6 +34,9 @@
# error This driver does not support 2.5 kernels!
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)
# define KERNEL_2_6
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
+/* For compatibility, pretend all kernels 3.0.0 and higher are "2.6" */
+# define KERNEL_2_6
#else
# error This driver does not support development kernels!
#endif

View File

@ -1,545 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-270.41.19.ebuild,v 1.4 2011/07/19 06:47:35 angelos Exp $
EAPI="2"
inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver
X86_NV_PACKAGE="NVIDIA-Linux-x86-${PV}"
AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
X86_FBSD_NV_PACKAGE="NVIDIA-FreeBSD-x86-${PV}"
DESCRIPTION="NVIDIA X11 driver and GLX libraries"
HOMEPAGE="http://www.nvidia.com/"
SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${PV}/${X86_NV_PACKAGE}.run )
amd64? ( ftp://download.nvidia.com/XFree86/Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )
x86-fbsd? ( ftp://download.nvidia.com/XFree86/FreeBSD-x86/${PV}/${X86_FBSD_NV_PACKAGE}.tar.gz )"
LICENSE="NVIDIA"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
IUSE="acpi custom-cflags gtk multilib kernel_linux"
RESTRICT="strip"
EMULTILIB_PKG="true"
COMMON="<x11-base/xorg-server-1.10.99
kernel_linux? ( >=sys-libs/glibc-2.6.1 )
multilib? ( app-emulation/emul-linux-x86-xlibs )
>=app-admin/eselect-opengl-1.0.9
!<media-video/nvidia-settings-256.52"
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/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/opengl/nvidia/lib/libGL.so.${PV}
usr/lib32/libcuda.so.${PV}
usr/lib32/libvdpau_nvidia.so.${PV}
usr/lib32/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/libnvidia-compiler.so.${PV}
usr/lib/libvdpau_nvidia.so.${PV}
usr/lib/libcuda.so.${PV}
usr/lib/libOpenCL.so.1.0.0"
QA_EXECSTACK_amd64="usr/lib32/libnvidia-glcore.so.${PV}
usr/lib32/opengl/nvidia/lib/libGL.so.${PV}
usr/lib32/libnvidia-compiler.so.${PV}
usr/lib32/opengl/nvidia/lib/libnvidia-tls.so.${PV}
usr/lib32/libvdpau_nvidia.so.${PV}
usr/lib32/libcuda.so.${PV}
usr/lib32/libOpenCL.so.1.0.0
usr/lib64/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/libOpenCL.so.1.0.0
usr/lib64/xorg/modules/drivers/nvidia_drv.so
usr/bin/nvidia-smi
usr/bin/nvidia-xconfig
usr/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/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/libOpenCL.so.1.0.0
usr/lib64/libnvidia-compiler.so.${PV}
usr/lib64/libnvcuvid.so.${PV}
usr/bin/nvidia-smi
usr/bin/nvidia-xconfig
usr/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/libOpenCL.so.1.0.0
usr/lib/libnvidia-compiler.so.${PV}
usr/lib/libnvcuvid.so.${PV}
usr/bin/nvidia-smi
usr/bin/nvidia-xconfig
usr/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)"
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
epatch "${FILESDIR}"/256.35-unified-arch.patch
# NVidia's version check broke for kernel version 3.0.0
epatch "${FILESDIR}"/${PN}-3.0.patch
# 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
}
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
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 /usr/$(get_libdir)/libnvidia-cfg.so.${NV_SOVER} \
/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 /usr/$(get_libdir)/libnvidia-ml.so.${NV_SOVER} \
/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 /usr/$(get_libdir)/libnvcuvid.so.${NV_SOVER} \
/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 /usr/$(get_libdir)/opengl/nvidia/extensions/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 || \
die "failed to create libXvMCNVIDIA.so symlink"
# OpenCL ICD for NVIDIA
if use kernel_linux; then
dodir /etc/OpenCL/vendors
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
dobin ${NV_EXEC}/nvidia-xconfig || die
if use gtk; then
dobin ${NV_EXEC}/nvidia-settings || die
fi
dobin ${NV_EXEC}/nvidia-bug-report.sh || die
if use kernel_linux; then
dobin ${NV_EXEC}/nvidia-smi || die
fi
# Desktop entries for nvidia-settings
if use gtk; then
sed -e 's:__UTILS_PATH__:/usr/bin:' \
-e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \
-i "${NV_EXEC}/nvidia-settings.desktop"
domenu ${NV_EXEC}/nvidia-settings.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 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 /usr/${inslibdir} ${libdir}/libOpenCL.so 1.0.0
dosym libOpenCL.so.1 /usr/${inslibdir}/libOpenCL.so
fi
}
pkg_preinst() {
if use kernel_linux; then
linux-mod_pkg_postinst
fi
# 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() {
if use kernel_linux; then
linux-mod_pkg_postinst
fi
# Switch to the nvidia implementation
eselect opengl 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 "NVIDIA has requested that any bug reports submitted have the"
elog "output of /usr/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_postrm() {
if use kernel_linux; then
linux-mod_pkg_postrm
fi
eselect opengl set --use-old xorg-x11
}