diff options
-rw-r--r-- | perl-install/Xconfig/card.pm | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm index 85644eca7..ae14cdd04 100644 --- a/perl-install/Xconfig/card.pm +++ b/perl-install/Xconfig/card.pm @@ -321,18 +321,6 @@ sub install_server { $card->{DRI_GLX_SPECIAL} = 1; $card->{Options}{IgnoreEDID} = 1; } - my %driver_to_libgl_config = ( - nvidia => "$::prefix/etc/ld.so.conf.d/.conf.nvidia", - fglrx => "$::prefix/etc/ld.so.conf.d/.conf.ati", - ); - if (my $file = $driver_to_libgl_config{$card->{Driver2}}) { - if (-e $file) { - symlinkf(basename($file), "$::prefix/etc/ld.so.conf.d/GL.conf"); - } - } else { - eval { rm_rf("/etc/ld.so.conf.d/GL.conf") }; - } - system("/sbin/ldconfig") if $::isStandalone; if ($card->{Driver2} eq 'fglrx' && -e "$::prefix/usr/X11R6/$lib/modules/dri/fglrx_dri.so" && -e "$::prefix/usr/X11R6/$lib/modules/drivers/fglrx_drv.o") { @@ -340,6 +328,8 @@ sub install_server { $card->{Driver} = 'fglrx'; } + libgl_config($card->{Driver}); + if ($card->{need_MATROX_HAL}) { require Xconfig::proprietary; Xconfig::proprietary::install_matrox_hal($::prefix); @@ -455,6 +445,23 @@ sub set_glx_restrictions { } } +sub libgl_config { + my ($Driver) = @_; + + my $dir = "$::prefix/etc/ld.so.conf.d/"; + + my %driver_to_libgl_config = ( + nvidia => '.conf.nvidia', + fglrx => '.conf.ati', + ); + if (my $file = $driver_to_libgl_config{$Driver}) { + symlinkf($file, "$dir/GL.conf") if -e "$dir/$file"; + } else { + eval { rm_rf("$dir/GL.conf") }; + } + system("/sbin/ldconfig") if $::isStandalone; +} + sub add_to_card__using_Cards { my ($card, $name) = @_; my $cards = readCardsDB("$ENV{SHARE_PATH}/ldetect-lst/Cards+"); |