summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-25 13:27:56 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-25 13:27:56 +0000
commit856eb715f5c3d4fdefff305b84c8660940565e77 (patch)
tree95c55cb9181796eecaacb857d3c7535de9f3c8cd /perl-install
parentd5a136439dbb6d7191d90c44760c4025cb03d4cd (diff)
downloaddrakx-856eb715f5c3d4fdefff305b84c8660940565e77.tar
drakx-856eb715f5c3d4fdefff305b84c8660940565e77.tar.gz
drakx-856eb715f5c3d4fdefff305b84c8660940565e77.tar.bz2
drakx-856eb715f5c3d4fdefff305b84c8660940565e77.tar.xz
drakx-856eb715f5c3d4fdefff305b84c8660940565e77.zip
create function libgl_config() and have it after setting Driver to 'fglrx' so
that libgl_config() can behave based on {Driver} instead of {Driver2}
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/card.pm31
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+");