/[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.2 Revision 1.9
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.2 2007/07/05 21:01:18 cardoe Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/nvidia-driver.eclass,v 1.9 2007/10/01 18:54:39 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
180201 0202 0203 0250 0251 0253 0258 0259 025b 0280 0281 0282 0286 0288 0289 \ 190201 0202 0203 0250 0251 0253 0258 0259 025b 0280 0281 0282 0286 0288 0289 \
19028c" 20028c"
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-97.0.0"
24mask_71xx=">=x11-drivers/nvidia-drivers-1.0.7200" 25mask_71xx=">=x11-drivers/nvidia-drivers-72.0.0\n=x11-drivers/nvidia-1.0.9639"
25 26
26# Retrieve the PCI device ID for each Nvidia video card you have 27# Retrieve the PCI device ID for each Nvidia video card you have
27nvidia-driver-get-card() { 28nvidia-driver-get-card() {
28 local NVIDIA_CARD="$(/usr/sbin/lspci -d 10de: -n | \ 29 local NVIDIA_CARD="$(/usr/sbin/lspci -d 10de: -n | \
29 awk '/ 0300: /{print $3}' | cut -d: -f2 | tr '\n' ' ')" 30 awk '/ 0300: /{print $3}' | cut -d: -f2 | tr '\n' ' ')"
59} 60}
60 61
61nvidia-driver-check-warning() { 62nvidia-driver-check-warning() {
62 local NVIDIA_MASK="$(nvidia-driver-get-mask)" 63 local NVIDIA_MASK="$(nvidia-driver-get-mask)"
63 if [ -n "$NVIDIA_MASK" ]; then 64 if [ -n "$NVIDIA_MASK" ]; then
65 version_compare "${NVIDIA_MASK##*-}" "${PV}"
66 r=$?
67
68 if [ "x$r" = "x1" ]; then
64 ewarn "***** WARNING *****" 69 ewarn "***** WARNING *****"
65 ewarn 70 ewarn
66 ewarn "You are currently installing a version of nvidia-drivers that is" 71 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" 72 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" 73 ewarn "system. If this is intentional, please ignore this. If it is not"
69 ewarn "please perform the following steps:" 74 ewarn "please perform the following steps:"
70 ewarn 75 ewarn
71 ewarn "Add the following mask entry to /etc/portage/package.mask by" 76 ewarn "Add the following mask entry to /etc/portage/package.mask by"
72 if [ -d "${ROOT}/etc/portage/package.mask" ]; then 77 if [ -d "${ROOT}/etc/portage/package.mask" ]; then
73 ewarn "echo \"$NVIDIA_MASK\" > /etc/portage/package.mask/nvidia-drivers" 78 ewarn "echo \"$NVIDIA_MASK\" > /etc/portage/package.mask/nvidia-drivers"
74 else 79 else
75 ewarn "echo \"$NVIDIA_MASK\" >> /etc/portage/package.mask" 80 ewarn "echo \"$NVIDIA_MASK\" >> /etc/portage/package.mask"
81 fi
82 ewarn
83 ewarn "Failure to perform the steps above could result in a non-working"
84 ewarn "X setup."
85 ewarn
86 ewarn "For more information please read:"
87 ewarn "http://www.nvidia.com/object/IO_32667.html"
88 ebeep 5
76 fi 89 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://us.download.nvidia.com/XFree86/Linux-x86_64/100.14.11/README/appendix-a.html"
83 ebeep 5
84 fi 90 fi
85} 91}
86 92
87 93

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20