summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-userspace/files
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-02-15 23:24:26 +0200
commit7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch)
tree1684924656132935256e034f35f92abee6623265 /x11-drivers/nvidia-userspace/files
Added ebuilds for kogaion desktop
Diffstat (limited to 'x11-drivers/nvidia-userspace/files')
-rw-r--r--x11-drivers/nvidia-userspace/files/09nvidia2
-rw-r--r--x11-drivers/nvidia-userspace/files/90mutter-disable-culling2
-rw-r--r--x11-drivers/nvidia-userspace/files/NVIDIA_glx-defines.patch11
-rw-r--r--x11-drivers/nvidia-userspace/files/NVIDIA_glx-glheader.patch13
-rw-r--r--x11-drivers/nvidia-userspace/files/eblits/donvidia.eblit21
-rw-r--r--x11-drivers/nvidia-userspace/files/eblits/mtrr_check.eblit19
-rw-r--r--x11-drivers/nvidia-userspace/files/eblits/src_install-libs.eblit116
-rw-r--r--x11-drivers/nvidia-userspace/files/eblits/want_tls.eblit33
-rw-r--r--x11-drivers/nvidia-userspace/files/libGL.la-r232
-rw-r--r--x11-drivers/nvidia-userspace/files/nvidia40
-rw-r--r--x11-drivers/nvidia-userspace/files/nvidia-169.0714
-rw-r--r--x11-drivers/nvidia-userspace/files/nvidia-smi.init25
-rw-r--r--x11-drivers/nvidia-userspace/files/nvidia-udev.sh17
-rw-r--r--x11-drivers/nvidia-userspace/files/nvidia.udev-rule6
14 files changed, 351 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-userspace/files/09nvidia b/x11-drivers/nvidia-userspace/files/09nvidia
new file mode 100644
index 00000000..1fcbef41
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/files/09nvidia
@@ -0,0 +1,2 @@
+# Has to precede X11's own libraries!
+LDPATH=/opt/nvidia/lib
diff --git a/x11-drivers/nvidia-userspace/files/90mutter-disable-culling b/x11-drivers/nvidia-userspace/files/90mutter-disable-culling
new file mode 100644
index 00000000..d9b64408
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/files/90mutter-disable-culling
@@ -0,0 +1,2 @@
+# See https://bugzilla.gnome.org/show_bug.cgi?id=664858
+CLUTTER_PAINT=disable-clipped-redraws:disable-culling
diff --git a/x11-drivers/nvidia-userspace/files/NVIDIA_glx-defines.patch b/x11-drivers/nvidia-userspace/files/NVIDIA_glx-defines.patch
new file mode 100644
index 00000000..da9933f6
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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;
+
diff --git a/x11-drivers/nvidia-userspace/files/NVIDIA_glx-glheader.patch b/x11-drivers/nvidia-userspace/files/NVIDIA_glx-glheader.patch
new file mode 100644
index 00000000..e0393e1b
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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
+
+ /*************************************************************/
+
diff --git a/x11-drivers/nvidia-userspace/files/eblits/donvidia.eblit b/x11-drivers/nvidia-userspace/files/eblits/donvidia.eblit
new file mode 100644
index 00000000..75b39cfb
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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
+}
diff --git a/x11-drivers/nvidia-userspace/files/eblits/mtrr_check.eblit b/x11-drivers/nvidia-userspace/files/eblits/mtrr_check.eblit
new file mode 100644
index 00000000..b14df34b
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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
+}
diff --git a/x11-drivers/nvidia-userspace/files/eblits/src_install-libs.eblit b/x11-drivers/nvidia-userspace/files/eblits/src_install-libs.eblit
new file mode 100644
index 00000000..e48d11ce
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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
+}
diff --git a/x11-drivers/nvidia-userspace/files/eblits/want_tls.eblit b/x11-drivers/nvidia-userspace/files/eblits/want_tls.eblit
new file mode 100644
index 00000000..4debb85d
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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
+}
diff --git a/x11-drivers/nvidia-userspace/files/libGL.la-r2 b/x11-drivers/nvidia-userspace/files/libGL.la-r2
new file mode 100644
index 00000000..863d1844
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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}'
diff --git a/x11-drivers/nvidia-userspace/files/nvidia b/x11-drivers/nvidia-userspace/files/nvidia
new file mode 100644
index 00000000..7cf0f7c0
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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
diff --git a/x11-drivers/nvidia-userspace/files/nvidia-169.07 b/x11-drivers/nvidia-userspace/files/nvidia-169.07
new file mode 100644
index 00000000..a96b0cd1
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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
diff --git a/x11-drivers/nvidia-userspace/files/nvidia-smi.init b/x11-drivers/nvidia-userspace/files/nvidia-smi.init
new file mode 100644
index 00000000..2cfd4c43
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/files/nvidia-smi.init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/files/nvidia-smi.init,v 1.1 2012/07/22 21:08:43 cardoe Exp $
+
+pidfile="/var/run/nvidia-smi.pid"
+
+depend() {
+ after modules
+}
+
+start() {
+ ebegin "Starting NVIDIA System Management Interface"
+ rm -f ${pidfile}
+ start-stop-daemon --start --quiet --pidfile ${pidfile} \
+ --make-pidfile --background --exec /opt/bin/nvidia-smi -- \
+ -q -l 300
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NVIDIA System Management Interface"
+ start-stop-daemon --stop --quiet --pidfile ${pidfile}
+ eend $?
+}
diff --git a/x11-drivers/nvidia-userspace/files/nvidia-udev.sh b/x11-drivers/nvidia-userspace/files/nvidia-udev.sh
new file mode 100644
index 00000000..9487b08e
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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
diff --git a/x11-drivers/nvidia-userspace/files/nvidia.udev-rule b/x11-drivers/nvidia-userspace/files/nvidia.udev-rule
new file mode 100644
index 00000000..2eb30bb0
--- /dev/null
+++ b/x11-drivers/nvidia-userspace/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}"