From cd0f7ae068298ea69ab4543fd7d0a2d5fdc8ff66 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sat, 15 Sep 2007 17:04:05 +0000 Subject: Handle the new fglrx-hd2000 alternative driver. --- NEWS | 2 ++ lib/Xconfig/card.pm | 2 +- lib/Xconfig/proprietary.pm | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 4d9038c..f54baad 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- handle fglrx-hd2000 driver + Version 0.25 - 10 September 2007, by Pascal "Pixel" Rigaux - in the list of available Xorg drivers, add "Driver" from Cards+ diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm index d2f789b..97b2abd 100644 --- a/lib/Xconfig/card.pm +++ b/lib/Xconfig/card.pm @@ -343,7 +343,7 @@ sub libgl_config_and_more { #- ensure old deprecated conf files are not there anymore unlink("/etc/ld.so.conf.d/$_.conf") foreach 'nvidia', 'nvidia_legacy', 'ati'; - my $wanted = $card->{Driver} eq 'fglrx' ? "/etc/ld.so.conf.d/GL/ati.conf" : + my $wanted = $card->{Driver} eq 'fglrx' ? "/etc/ld.so.conf.d/GL/ati$card->{DriverVersion}.conf" : $card->{Driver} eq 'nvidia' ? "/etc/nvidia$card->{DriverVersion}/ld.so.conf" : '/etc/ld.so.conf.d/GL/standard.conf'; my $link = "$::prefix/etc/alternatives/gl_conf"; diff --git a/lib/Xconfig/proprietary.pm b/lib/Xconfig/proprietary.pm index 217b4cc..aace9fe 100644 --- a/lib/Xconfig/proprietary.pm +++ b/lib/Xconfig/proprietary.pm @@ -36,7 +36,7 @@ sub install_matrox_hal { sub pkgs_for_Driver2 { my ($Driver2, $do_pkgs) = @_; - my ($pkg, $base_name) = ($Driver2 eq 'fglrx' || $Driver2 =~ /^nvidia/) ? + my ($pkg, $base_name) = ($Driver2 =~ /^fglrx/ || $Driver2 =~ /^nvidia/) ? ("x11-driver-video-$Driver2", $Driver2) : () or return; $do_pkgs->is_available($pkg) or log::l("proprietary package $pkg not available"), return; @@ -68,6 +68,8 @@ sub may_use_Driver2 { %$card, $card->{Driver2} =~ /^nvidia(.*)/ ? (Driver => 'nvidia', DriverVersion => $1) : + $card->{Driver2} =~ /^fglrx(.*)/ ? + (Driver => 'fglrx', DriverVersion => $1) : (Driver => $card->{Driver2}), }; @@ -82,8 +84,9 @@ sub may_use_Driver2 { $card2->{Options}{IgnoreEDID} = 1 if $card2->{DriverVersion} ne '-current'; $card2; } elsif ($card2->{Driver} eq 'fglrx') { - $check_drv->('fglrx_drv') or return; - -e "$::prefix$modules_dir/dri/fglrx_dri.so" || -e "$::prefix/usr/$lib/dri/fglrx_dri.so" or + $check_drv->('fglrx_drv', "fglrx$card2->{DriverVersion}") or return; + $card2->{DriverVersion} eq '-hd2000' || -e "$::prefix$modules_dir/dri/fglrx_dri.so" + || -e "$::prefix/usr/$lib/dri/fglrx_dri.so" or log::l("proprietary fglrx_dri.so missing"), return; log::explanations("Using specific ATI fglrx and DRI drivers"); -- cgit v1.2.1