summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/card.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/Xconfig/card.pm')
-rw-r--r--perl-install/Xconfig/card.pm52
1 files changed, 27 insertions, 25 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 60c7f4505..304cdc4f7 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -21,6 +21,8 @@ my %VideoRams = (
65536 => N_("64 MB or more"),
);
+my $lib = arch() =~ /x86_64/ ? "lib64" : "lib";
+
my @xfree4_Drivers = ((arch() =~ /^sparc/ ? qw(sunbw2 suncg14 suncg3 suncg6 sunffb sunleo suntcx) :
qw(apm ark chips cirrus cyrix glide i128 i740 i810 imstt
mga neomagic newport nv rendition r128 radeon vesa
@@ -60,13 +62,12 @@ sub to_raw_X {
# This loads the NVIDIA GLX extension module.
# IT IS IMPORTANT TO KEEP NAME AS FULL PATH TO libglx.so ELSE
# IT WILL LOAD XFree86 glx module and the server will crash.
- $raw_X->set_load_module('/usr/X11R6/lib/modules/extensions/libglx.so', $card->{DRI_GLX_SPECIAL});
+ $raw_X->set_load_module("/usr/X11R6/$lib/modules/extensions/libglx.so", $card->{DRI_GLX_SPECIAL});
if ($card->{Driver2} ne 'nvidia') {
- $raw_X->set_load_module('/usr/X11R6/lib/modules/extensions/libglx.a', 1);
+ $raw_X->set_load_module("/usr/X11R6/$lib/modules/extensions/libglx.a", 1);
}
$raw_X->remove_Section('DRI');
- $raw_X->add_Section('DRI', { Mode => { val => '0666' } }) if $card->{use_DRI_GLX};
$raw_X->remove_load_module('v4l') if $card->{use_DRI_GLX} && $card->{Driver} eq 'r128';
}
@@ -76,7 +77,7 @@ sub default_ATI_fglrx_config() { our $default_ATI_fglrx_config }
sub probe() {
#-for Pixel tests
#- my @c = { driver => 'Card:Matrox Millennium G400 DualHead', description => 'Matrox|Millennium G400 Dual HeadCard' };
- my @c = detect_devices::matching_driver('(Card|Server|Driver):');
+ my @c = detect_devices::matching_driver__regexp('(Card|Server|Driver):');
my @cards = map {
my @l = $_->{description} =~ /(.*?)\|(.*)/;
@@ -147,10 +148,10 @@ sub card_config__not_listed {
my @xf4 = grep { $options->{allowFB} || $_ ne 'fbdev' } @xfree4_Drivers;
my @list = (
(map { 'Vendor|' . $_ } keys %$cards),
- (map { 'XFree 4|' . $_ } @xf4),
+ (map { 'Xorg|' . $_ } @xf4),
);
- my $r = exists $cards->{$card->{BoardName}} ? "Vendor|$card->{BoardName}" : 'XFree 4|vesa';
+ my $r = exists $cards->{$card->{BoardName}} ? "Vendor|$card->{BoardName}" : 'Xorg|vesa';
$in->ask_from_({ title => N("X server"),
messages => N("Choose an X server"),
interactive_help_id => 'configureX_card_list',
@@ -251,7 +252,7 @@ sub configure {
eval { install_server($card, $options, $do_pkgs) };
if ($@) {
- $in->ask_warn('', N("Can't install XFree package: %s", $@));
+ $in->ask_warn('', N("Can't install Xorg package: %s", $@));
goto card_config__not_listed;
}
@@ -289,13 +290,13 @@ sub install_server {
push @packages, 'xorg-x11-glide-module' if $card->{card_name} =~ /Voodoo/;
}
- if ($options->{freeDriver}) {
+ if ($options->{freedriver}) {
delete $card->{Driver2};
}
my %proprietary_Driver2 = (
- nvidia => [ 'NVIDIA_kernel', 'NVIDIA_GLX' ], #- using NVIDIA driver (TNT, TN2 and GeForce cards only).
- fglrx => [ 'ATI_kernel', 'ATI_GLX' ], #- using ATI fglrx driver (Radeon, Fire GL cards only).
+ nvidia => [ 'nvidia-kernel', 'nvidia' ], #- using NVIDIA driver (TNT, TN2 and GeForce cards only).
+ fglrx => [ 'ati-kernel', 'ati' ], #- using ATI fglrx driver (Radeon, Fire GL cards only).
);
if (my $rpms_needed = $proprietary_Driver2{$card->{Driver2}}) {
if (my $proprietary_packages = $do_pkgs->check_kernel_module_packages($rpms_needed->[0], $rpms_needed->[1])) {
@@ -309,8 +310,8 @@ sub install_server {
#- make sure everything is correct at this point, packages have really been installed
#- and driver and GLX extension is present.
if ($card->{Driver2} eq 'nvidia' &&
- -e "$::prefix/usr/X11R6/lib/modules/drivers/nvidia_drv.o" &&
- -l "$::prefix/usr/X11R6/lib/modules/extensions/libglx.so") {
+ -e "$::prefix/usr/X11R6/$lib/modules/drivers/nvidia_drv.o" &&
+ -l "$::prefix/usr/X11R6/$lib/modules/extensions/libglx.so") {
log::l("Using specific NVIDIA driver and GLX extensions");
$card->{Driver} = 'nvidia';
$card->{DRI_GLX_SPECIAL} = 1;
@@ -329,8 +330,8 @@ sub install_server {
}
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") {
+ -e "$::prefix/usr/X11R6/$lib/modules/dri/fglrx_dri.so" &&
+ -e "$::prefix/usr/X11R6/$lib/modules/drivers/fglrx_drv.o") {
log::l("Using specific ATI fglrx and DRI drivers");
$card->{Driver} = 'fglrx';
}
@@ -348,9 +349,9 @@ sub xfree_and_glx_choose {
my $tc =
$auto ? $choices[0] :
- $in->ask_from_listf_raw({ title => N("XFree configuration"),
+ $in->ask_from_listf_raw({ title => N("Xorg configuration"),
messages => formatAlaTeX(join("\n\n\n", (grep { $_ } map { $_->{more_messages} } @choices),
- N("Which configuration of XFree do you want to have?"))),
+ N("Which configuration of Xorg do you want to have?"))),
interactive_help_id => 'configureX_xfree_and_glx',
},
sub { $_[0]{text} }, \@choices) or return;
@@ -395,31 +396,31 @@ sub multi_head_choices {
@choices;
}
-#- XFree version available, it would be better to parse available package and get version from it.
-sub xfree4_version() { '4.3' }
+#- Xorg version available, it would be better to parse available package and get version from it.
+sub xorg_version() { '6.7.0' }
sub xfree_and_glx_choices {
my ($card) = @_;
- my @choices = if_($card->{Driver}, { text => N("XFree %s", xfree4_version()), code => sub {} });
+ my @choices = if_($card->{Driver}, { text => N("Xorg %s", xorg_version()), code => sub {} });
#- no GLX with Xinerama
return @choices if $card->{Xinerama};
#- ask the expert or any user on second pass user to enable or not hardware acceleration support.
if ($card->{DRI_GLX}) {
- unshift @choices, { text => N("XFree %s with 3D hardware acceleration", xfree4_version()),
+ unshift @choices, { text => N("Xorg %s with 3D hardware acceleration", xorg_version()),
code => sub { $card->{use_DRI_GLX} = 1 },
- more_messages => N("Your card can have 3D hardware acceleration support with XFree %s.", xfree4_version()),
+ more_messages => N("Your card can have 3D hardware acceleration support with Xorg %s.", xorg_version()),
};
}
#- an expert user may want to try to use an EXPERIMENTAL 3D acceleration.
if ($card->{DRI_GLX_EXPERIMENTAL} && $::expert) {
- push @choices, { text => N("XFree %s with EXPERIMENTAL 3D hardware acceleration", xfree4_version()),
+ push @choices, { text => N("Xorg %s with EXPERIMENTAL 3D hardware acceleration", xorg_version()),
code => sub { $card->{use_DRI_GLX} = 1 },
- more_messages => N("Your card can have 3D hardware acceleration support with XFree %s,
-NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", xfree4_version()),
+ more_messages => N("Your card can have 3D hardware acceleration support with Xorg %s,
+NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", xorg_version()),
};
}
@choices;
@@ -459,7 +460,7 @@ sub add_to_card__using_Cards {
$card;
}
-#- needed for bad cards not restoring cleanly framebuffer, according to which version of XFree are used.
+#- needed for bad cards not restoring cleanly framebuffer, according to which version of Xorg are used.
sub check_bad_card {
my ($card) = @_;
my $bad_card = $card->{BAD_FB_RESTORE};
@@ -580,3 +581,4 @@ Option "FSAAMSPosY5" "0.000000"
END
1;
+