summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig
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
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')
-rw-r--r--lib/Xconfig/card.pm4
-rw-r--r--lib/Xconfig/proprietary.pm17
2 files changed, 8 insertions, 13 deletions
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm
index 1db9307..686b3c0 100644
--- a/lib/Xconfig/card.pm
+++ b/lib/Xconfig/card.pm
@@ -73,7 +73,7 @@ sub to_raw_X {
$raw_X->remove_load_module(modules_dir() . "$_/libglx.so") foreach '/extensions/nvidia', '/extensions/nvidia_legacy', '/extensions';
# remove ModulePath that we added
- $raw_X->remove_ModulePath(modules_dir() . "/extensions/$_") foreach 'nvidia97xx', 'nvidia96xx', 'nvidia71xx';
+ $raw_X->remove_ModulePath(modules_dir() . "/extensions/$_") foreach 'nvidia97xx', 'nvidia96xx', 'nvidia71xx', 'nvidia-current';
$raw_X->remove_ModulePath(modules_dir());
# then may re-add some
if ($card->{DRI_GLX_SPECIAL}) {
@@ -297,7 +297,7 @@ sub install_server {
if ($card->{Driver2}) {
require Xconfig::proprietary;
- my @pkgs = Xconfig::proprietary::pkgs_for_Driver2($card, $do_pkgs);
+ my @pkgs = Xconfig::proprietary::pkgs_for_Driver2($card->{Driver2}, $do_pkgs);
if (@pkgs && (!$o_in || $o_in->ask_yesorno('', formatAlaTeX(N("There is a proprietary driver available for your video card which may support additional features.
Do you wish to use it?")), 1))) {
push @packages, @pkgs;
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;