summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-04 14:25:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-04 14:25:50 +0000
commitb48b3efc4f0ca8eafc4d65987f9948f5509c980d (patch)
tree36b5c93fd71cc6d8ce5db8bf90b0ac3d36222bbc /perl-install
parent2f4a483b72dae82331dbebb907386dccbd93baf1 (diff)
downloaddrakx-backup-do-not-use-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.tar
drakx-backup-do-not-use-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.tar.gz
drakx-backup-do-not-use-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.tar.bz2
drakx-backup-do-not-use-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.tar.xz
drakx-backup-do-not-use-b48b3efc4f0ca8eafc4d65987f9948f5509c980d.zip
brltty support
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm30
-rw-r--r--perl-install/install_any.pm3
-rw-r--r--perl-install/install_steps.pm8
-rw-r--r--perl-install/share/list4
4 files changed, 44 insertions, 1 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 8f93705dd..2ae492a9f 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -11,6 +11,7 @@ use steps;
use common;
use install_any qw(:all);
use install_steps;
+use install_any;
use lang;
use keyboard;
use mouse;
@@ -484,6 +485,15 @@ sub main {
log::l("switching to newt install cuz not enough memory");
$o->{interactive} = "newt";
}
+
+ if (my ($s) = cat_("/proc/cmdline") =~ /brltty=(\S*)/) {
+ my ($driver, $device, $table) = split(',', $s);
+ $table = "text.$table.tbl" if $table !~ /\.tbl$/;
+ log::l("brltty option $driver $device $table");
+ $o->{brltty} = { driver => $driver, device => $device, table => $table };
+ $o->{interactive} = 'newt';
+ }
+
# perl_checker: require install_steps_gtk
# perl_checker: require install_steps_newt
# perl_checker: require install_steps_stdio
@@ -506,6 +516,26 @@ sub main {
#- needed very early for install_steps_gtk
eval { $o->{mouse} = mouse::detect() } if !$o->{nomouseprobe} && !$o->{mouse} && !$::testing;
+ #- need to be after oo-izing $o
+ if ($o->{brltty}) {
+ symlink "/tmp/stage2/$_", $_ foreach "/etc/brltty";
+ if (common::usingRamdisk()) {
+ install_any::remove_unused(0);
+ mkdir '/tmp/stage2/etc/brltty';
+ mkdir '/lib/brltty';
+ install_any::getAndSaveFile("/etc/brltty/$o->{brltty}{table}", "/tmp/stage2/etc/brltty/$o->{brltty}{table}") if $o->{brltty}{table};
+ install_any::getAndSaveFile("/lib/brltty/libbrlttyb$o->{brltty}{driver}.so") or do {
+ warn("Braille driver $o->{brltty}{driver} for BRLTTY was not found.\n",
+ "Press ENTER to continue.\n");
+ <STDIN>;
+ };
+ install_any::getAndSaveFile("/usr/bin/brltty");
+ chmod 0755, "/usr/bin/brltty";
+ }
+ devices::make("vcsa");
+ run_program::run("brltty");
+ }
+
$o->{lang} = lang::set($o->{lang}) if $o->{lang} ne 'en_US'; #- mainly for defcfg
start_i810fb();
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 2ba152c82..478769d8e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -338,6 +338,7 @@ sub setDefaultPackages {
delete $o->{$_} foreach qw(default_packages compssUsersChoice); #- clean modified variables.
}
+ push @{$o->{default_packages}}, "brltty" if cat_("/proc/cmdline") =~ /brltty=/;
push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs";
push @{$o->{default_packages}}, "numlock" if $o->{miscellaneous}{numlock};
push @{$o->{default_packages}}, "kernel22" if !$::oem && c::kernel_version() =~ /^\Q2.2/;
@@ -1114,7 +1115,7 @@ sub check_prog {
sub remove_unused {
$::testing and return;
- if ($::o->isa('interactive::gtk')) {
+ if (@_ ? $_[0] : $::o->isa('interactive::gtk')) {
unlink glob_("/lib/lib$_*") foreach qw(slang newt);
unlink "/usr/bin/perl-install/auto/Newt/Newt.so";
} else {
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 8893780e5..724b5f99c 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -444,6 +444,14 @@ Consoles 1,3,4,7 may also contain interesting information";
"$o->{prefix}/etc/skel/Desktop/Autostart/kapm.kdelnk") };
}
+ if ($o->{brltty}) {
+ output("$o->{prefix}/etc/brltty.conf", <<EOF);
+braille-driver $o->{brltty}{driver}
+braille-device $o->{brltty}{device}
+text-table $o->{brltty}{table}
+EOF
+ }
+
$o->install_urpmi;
if ($o->{lang} =~ /^(zh_TW|th|vi|be|bg)/) {
diff --git a/perl-install/share/list b/perl-install/share/list
index e2a2c367a..2eaceadb0 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -161,3 +161,7 @@
/sbin/lvextend
/sbin/lvreduce
/sbin/lvremove
+
+/bin/brltty
+/etc/brltty/text.*.tbl
+/lib/brltty/libbrlttyb*.so