summaryrefslogtreecommitdiffstats
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
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
-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
-rwxr-xr-xtools/make_mdkinst_stage23
5 files changed, 46 insertions, 2 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
diff --git a/tools/make_mdkinst_stage2 b/tools/make_mdkinst_stage2
index 3a935d271..c1d578ddf 100755
--- a/tools/make_mdkinst_stage2
+++ b/tools/make_mdkinst_stage2
@@ -42,6 +42,7 @@ rm -f `ls --sort=size $STAGE2TMP/lib/modules.cz-* | perl -ne 'print if $i++'`
rm -f $STAGE2TMP/usr/bin/{pv*,vg*,lv*} $STAGE2TMP/lib/liblvm*
rm -f $STAGE2TMP/usr/bin/{resize_reiserfs,fsck.jfs}
rm -f $STAGE2TMP/usr/X11R6/lib/X11/fonts/{12x13mdk,18x18mdk}.pcf*
+rm -rf $STAGE2TMP{/usr/bin/brltty,/etc/brltty,/lib/brltty}
rm -rf $STAGE2TMP/usr/share/locale_special
( # only keeping UTF-8
@@ -74,4 +75,4 @@ rmdir $MNTPOINT
echo bzipping $STAGE2
-bzip2 -f -9 $STAGE2
+bzip2 -v -f -9 $STAGE2