summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig/proprietary.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-08 19:42:06 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-08 19:42:06 +0000
commit844cfdc5310de38c1540c4bbba5cb79c3216d900 (patch)
treea59861be1433c8621a84faf9a552940ca1036c54 /lib/Xconfig/proprietary.pm
parent8c7578d10a5d10da147e94fb14af969fc0357f75 (diff)
downloaddrakx-kbd-mouse-x11-844cfdc5310de38c1540c4bbba5cb79c3216d900.tar
drakx-kbd-mouse-x11-844cfdc5310de38c1540c4bbba5cb79c3216d900.tar.gz
drakx-kbd-mouse-x11-844cfdc5310de38c1540c4bbba5cb79c3216d900.tar.bz2
drakx-kbd-mouse-x11-844cfdc5310de38c1540c4bbba5cb79c3216d900.tar.xz
drakx-kbd-mouse-x11-844cfdc5310de38c1540c4bbba5cb79c3216d900.zip
- handle nvidia-current instead of nvidia97xx (thanks to Anssi)
- handle x11-driver-video-$nvidia instead of $nvidia nb: pkg_name_for_Driver2() has been dropped, and pkgs_for_Driver2() arguments have changed. this allows simplifying install::steps, but causes incompatibility
Diffstat (limited to 'lib/Xconfig/proprietary.pm')
-rw-r--r--lib/Xconfig/proprietary.pm17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/Xconfig/proprietary.pm b/lib/Xconfig/proprietary.pm
index 381da9e..7c77456 100644
--- a/lib/Xconfig/proprietary.pm
+++ b/lib/Xconfig/proprietary.pm
@@ -33,20 +33,15 @@ sub install_matrox_hal {
rm_rf("$tmpdir/$dir_in_tar");
}
-sub pkg_name_for_Driver2 {
- my ($card) = @_;
- $card->{Driver2} eq 'fglrx' ? 'ati' :
- $card->{Driver2} =~ /^nvidia/ ? $card->{Driver2} : '';
-}
-
sub pkgs_for_Driver2 {
- my ($card, $do_pkgs) = @_;
+ my ($Driver2, $do_pkgs) = @_;
- my $pkg = pkg_name_for_Driver2($card);
+ my ($pkg, $base_name) = $Driver2 eq 'fglrx' ? ('ati', 'ati') :
+ $Driver2 =~ /^nvidia/ ? ("x11-driver-video-$Driver2", $Driver2) : () or return;
- $pkg && $do_pkgs->is_available($pkg) or log::l("proprietary package $pkg not available"), return;
+ $do_pkgs->is_available($pkg) or log::l("proprietary package $pkg not available"), return;
- my $module_pkgs = $do_pkgs->check_kernel_module_packages($pkg) or
+ my $module_pkgs = $do_pkgs->check_kernel_module_packages($base_name) or
log::l("$pkg available, but no kernel module package (for installed kernels, and no dkms)"), return;
($pkg, @$module_pkgs);
@@ -84,7 +79,7 @@ sub may_use_Driver2 {
log::explanations("Using specific NVIDIA driver and GLX extensions");
$card2->{DRI_GLX_SPECIAL} = $libglx_path;
- $card2->{Options}{IgnoreEDID} = 1 if $card2->{DriverVersion} ne '97xx';
+ $card2->{Options}{IgnoreEDID} = 1 if $card2->{DriverVersion} ne '-current';
$card2;
} elsif ($card2->{Driver} eq 'fglrx') {
$check_drv->('fglrx_drv') or return;