diff options
author | Stew Benedict <stewb@mandriva.org> | 2001-07-27 14:27:03 +0000 |
---|---|---|
committer | Stew Benedict <stewb@mandriva.org> | 2001-07-27 14:27:03 +0000 |
commit | ea4e11187b9a5acdb4a0e29280393ba7d97e3bad (patch) | |
tree | 31379683db0af3ffae65b63b8fcdecc7ffa50097 /perl-install | |
parent | 2e594437945bbec328351bffd6775a1af5e16430 (diff) | |
download | drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.gz drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.bz2 drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.xz drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.zip |
last of sync with PPC beta mods
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfigurator.pm | 27 | ||||
-rw-r--r-- | perl-install/help.pm | 12 | ||||
-rw-r--r-- | perl-install/keyboard.pm | 14 | ||||
-rw-r--r-- | perl-install/partition_table.pm | 22 |
4 files changed, 64 insertions, 11 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index f55a1bc03..5a5954752 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -362,9 +362,9 @@ NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", $xf3_ver)) . " code => sub { log::l("Using XFree $xf4_ver with 3D hardware acceleration") } }; } if (arch() =~ /ppc/) { - #- not much choice for PPC - we only have XF4 - @choices = { text => _("XFree %s", $xf4_ver), code => '' }; - log::l("Using XFree $xf4_ver"); + #- not much choice for PPC - we only have XF4, and Xpmac from the installer + @choices = { text => _("XFree %s", $xf4_ver), code => sub { $card->{xpmac} = ''; log::l("Using XFree $xf4_ver") } }; + push @choices, { text => _("Xpmac (installation display driver)"), code => sub { $card->{xpmac} = 1 }} if ($ENV{DISPLAY}); } #- examine choice of user, beware the list MUST NOT BE REORDERED AS the first item should be the #- proposed one by DrakX. @@ -373,7 +373,14 @@ NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", $xf3_ver)) . " $tc or $tc = $choices[0]; $tc->{code} and $tc->{code}(); - + if ($card->{xpmac} eq "1") { + log::l("Use Xpmac - great..."); + #- define this stuff just so XF86Config isn't empty - we don't need it for Xpmac + $card->{type} = "Xpmac Frame Buffer Driver"; + $card->{vendor} = $card->{board} = "None"; + $card->{driver} = $card->{server} = "Xpmac"; + } + $card->{prog} = "/usr/X11R6/bin/" . ($card->{use_xf4} ? 'XFree86' : $card->{server} =~ /Sun(.*)/ ? "Xsun$1" : "XF86_$card->{server}"); @@ -390,7 +397,13 @@ NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", $xf3_ver)) . " if ($card->{Utah_glx}) { push @l, 'Mesa' if !$card->{use_xf4}; } - + if ($card->{xpmac} eq "1") { + push @l, 'XFree86-Xpmac'; + $card->{use_xf4} = ''; + $card->{prog} = "/usr/X11R6/bin/Xpmac"; + $card->{server} = 'Xpmac'; + } + -x "$prefix$card->{prog}" or $install && $install->($card->{use_xf4} ? 'XFree86-server' : "XFree86-$card->{server}", @l); -x "$prefix$card->{prog}" or die "server $card->{server} is not available (should be in $prefix$card->{prog})"; @@ -1424,7 +1437,9 @@ Current configuration is: rename "$f-4", "$f-4.old"; rename "$f.test", $f; rename "$f.test-4", "$f-4"; - symlinkf "../..$o->{card}{prog}", "$prefix/etc/X11/X"; + if ($o->{card}{server} !~ /Xpmac/) { + symlinkf "../..$o->{card}{prog}", "$prefix/etc/X11/X"; + } } } diff --git a/perl-install/help.pm b/perl-install/help.pm index 9a7553b11..243c2dfe3 100644 --- a/perl-install/help.pm +++ b/perl-install/help.pm @@ -376,7 +376,17 @@ Please be patient."), selectMouse => __( "You can now test your mouse. Use buttons and wheel to verify if settings are good. If not, you can click on \"Cancel\" to choose another -driver."), +driver. + + +If you are installing on an Apple machine with a 1-button mouse, you will +be given the opportunity to define some keyboard keys to emulate the 2nd +and 3rd mouse buttons. This will allow you to be able to access the full +functionality of the mouse in both the Linux console and the X Window GUI. + + +If you have an ADB mouse, please select USB, as the Linux kernel will take +care of mapping your mouse hardware correctly."), selectSerialPort => __("Please select the correct port. For example, the COM1 diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 0e14b7a71..82d3346a4 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -224,7 +224,7 @@ sub keyboard2kmap { $keyboards{$_[0]} && $keyboards{$_[0]}[1] } sub keyboard2xkb { $keyboards{$_[0]} && $keyboards{$_[0]}[2] } sub loadkeys_files { - my $archkbd = arch() =~ /^sparc/ ? "sun" : arch() =~ /i.86/ ? "i386" : arch(); + my $archkbd = arch() =~ /^sparc/ ? "sun" : arch() =~ /i.86/ ? "i386" : arch() =~ /ppc/ ? "mac" : arch(); my $p = "/usr/lib/kbd/keymaps/$archkbd"; my $post = ".kmap.gz"; my %trans = ("cz-latin2" => "cz-lat2"); @@ -304,7 +304,17 @@ sub xmodmap_file { } sub setup { - return if arch() =~ /^sparc|ppc/; + return if arch() =~ /^sparc/; + + #- Xpmac doesn't map keys quite right + if (arch() =~ /ppc/ && !$::testing && $ENV{DISPLAY}) { + log::l("Fixing Mac keyboard"); + run_program::run('xmodmap', "-e", "keycode 59 = BackSpace" ); + run_program::run('xmodmap', "-e", "keycode 131 = Shift_R" ); + run_program::run('xmodmap', "-e", "add shift = Shift_R" ); + return; + } + my ($keyboard) = @_; my $o = $keyboards{$keyboard} or return; diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 514d5568a..684136207 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -297,8 +297,26 @@ sub assign_device_numbers($) { my ($hd) = @_; my $i = 1; - $_->{device} = $hd->{prefix} . $i++ foreach @{$hd->{primary}{raw}}, + my $start = 1; + + #- on PPC we need to assign device numbers to the holes too - big FUN! + if (arch() =~ /ppc/) { + #- first sort the normal parts + $hd->{primary}{normal} = [sort { $a->{start} <=> $b->{start} } @{$hd->{primary}{normal}} ]; + + #- now loop through them, assigning partition numbers - reserve one for the holes + foreach (@{$hd->{primary}{normal}}) { + if ($_->{start} > $start) { + log::l("PPC: found a hole on $hd->{prefix} before $_->{start}, skipping device..."); + $i++; + } + $_->{device} = $hd->{prefix} . $i++; + $start = $_->{start} + $_->{size}; + } + } else { + $_->{device} = $hd->{prefix} . $i++ foreach @{$hd->{primary}{raw}}, map { $_->{normal} } @{$hd->{extended} || []}; + } #- try to figure what the windobe drive letter could be! # @@ -560,7 +578,7 @@ sub add_primary($$) { } sub add_extended { - arch() =~ /^sparc/ and die _("Extended partition not supported on this platform"); + arch() =~ /^sparc|ppc/ and die _("Extended partition not supported on this platform"); my ($hd, $part, $extended_type) = @_; $extended_type =~ s/Extended_?//; |