/[gentoo-x86]/eclass/nvidia-driver.eclass
Gentoo

Diff of /eclass/nvidia-driver.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/nvidia-driver.eclass,v 1.3 2007/07/16 13:39:36 cardoe Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/nvidia-driver.eclass,v 1.4 2007/07/16 15:01:05 cardoe Exp $
4 4
5# 5#
6# Original Author: Doug Goldstein <cardoe@gentoo.org> 6# Original Author: Doug Goldstein <cardoe@gentoo.org>
7# Purpose: Provide useful messages for nvidia-drivers based on currently 7# Purpose: Provide useful messages for nvidia-drivers based on currently
8# installed Nvidia card 8# installed Nvidia card
9# 9#
10inherit versionator
10 11
11DEPEND="sys-apps/pciutils" 12DEPEND="sys-apps/pciutils"
12 13
13# the data below is derived from 14# the data below is derived from
14# http://us.download.nvidia.com/XFree86/Linux-x86_64/100.14.11/README/appendix-a.html 15# http://us.download.nvidia.com/XFree86/Linux-x86_64/100.14.11/README/appendix-a.html
20 21
21drv_71xx="0020 0028 0029 002c 002d 00a0 0100 0101 0103 0150 0151 0152 0153" 22drv_71xx="0020 0028 0029 002c 002d 00a0 0100 0101 0103 0150 0151 0152 0153"
22 23
23mask_96xx=">=x11-drivers/nvidia-drivers-1.0.9700" 24mask_96xx=">=x11-drivers/nvidia-drivers-1.0.9700"
24mask_71xx=">=x11-drivers/nvidia-drivers-1.0.7200" 25mask_71xx=">=x11-drivers/nvidia-drivers-1.0.7200"
26
27pv_96xx="1.0.9700"
28pv_71xx="1.0.7200"
25 29
26# Retrieve the PCI device ID for each Nvidia video card you have 30# Retrieve the PCI device ID for each Nvidia video card you have
27nvidia-driver-get-card() { 31nvidia-driver-get-card() {
28 local NVIDIA_CARD="$(/usr/sbin/lspci -d 10de: -n | \ 32 local NVIDIA_CARD="$(/usr/sbin/lspci -d 10de: -n | \
29 awk '/ 0300: /{print $3}' | cut -d: -f2 | tr '\n' ' ')" 33 awk '/ 0300: /{print $3}' | cut -d: -f2 | tr '\n' ' ')"
59} 63}
60 64
61nvidia-driver-check-warning() { 65nvidia-driver-check-warning() {
62 local NVIDIA_MASK="$(nvidia-driver-get-mask)" 66 local NVIDIA_MASK="$(nvidia-driver-get-mask)"
63 if [ -n "$NVIDIA_MASK" ]; then 67 if [ -n "$NVIDIA_MASK" ]; then
68 version-compare "${NVIDIA_MASK##-*}" "${PV}"
69 r=$?
70
71 if [ "x$r" = "x1" ]; then
64 ewarn "***** WARNING *****" 72 ewarn "***** WARNING *****"
65 ewarn 73 ewarn
66 ewarn "You are currently installing a version of nvidia-drivers that is" 74 ewarn "You are currently installing a version of nvidia-drivers that is"
67 ewarn "known not to work with a video card you have installed on your" 75 ewarn "known not to work with a video card you have installed on your"
68 ewarn "system. If this is intentional, please ignore this. If it is not" 76 ewarn "system. If this is intentional, please ignore this. If it is not"
69 ewarn "please perform the following steps:" 77 ewarn "please perform the following steps:"
70 ewarn 78 ewarn
71 ewarn "Add the following mask entry to /etc/portage/package.mask by" 79 ewarn "Add the following mask entry to /etc/portage/package.mask by"
72 if [ -d "${ROOT}/etc/portage/package.mask" ]; then 80 if [ -d "${ROOT}/etc/portage/package.mask" ]; then
73 ewarn "echo \"$NVIDIA_MASK\" > /etc/portage/package.mask/nvidia-drivers" 81 ewarn "echo \"$NVIDIA_MASK\" > /etc/portage/package.mask/nvidia-drivers"
74 else 82 else
75 ewarn "echo \"$NVIDIA_MASK\" >> /etc/portage/package.mask" 83 ewarn "echo \"$NVIDIA_MASK\" >> /etc/portage/package.mask"
84 fi
85 ewarn
86 ewarn "Failure to perform the steps above could result in a non-working"
87 ewarn "X setup."
88 ewarn
89 ewarn "For more information please read:"
90 ewarn "http://www.nvidia.com/object/IO_32667.html"
91 ebeep 5
76 fi 92 fi
77 ewarn
78 ewarn "Failure to perform the steps above could result in a non-working"
79 ewarn "X setup."
80 ewarn
81 ewarn "For more information please read:"
82 ewarn "http://www.nvidia.com/object/IO_32667.html"
83 ebeep 5
84 fi 93 fi
85} 94}
86 95
87 96

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20