yasr: init at 0.6.9

fixes #23188
This commit is contained in:
Ji-Haeng Huh 2017-02-25 22:18:03 +01:00 committed by Jörg Thalheim
parent 2d47e1be72
commit 697838cbea
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA
6 changed files with 98 additions and 0 deletions

View File

@ -0,0 +1,25 @@
Disable openpty() and forkpty() prototypes when needed.
--- a/yasr/yasr.h
+++ b/yasr/yasr.h
@@ -308,8 +308,10 @@ extern void opt_set(int num, void *val);
extern void opt_queue_empty(int ll);
extern void opt_write(FILE * fp);
+#ifndef HAVE_OPENPTY
/* openpty.c prototypes */
extern int openpty(int *, int *, char *, struct termios *, struct winsize *);
+#endif
/* cfmakeraw.c prototypes */
extern void cfmakeraw(struct termios *);
@@ -317,8 +319,10 @@ extern void cfmakeraw(struct termios *);
/* login_tty.c prototypes */
extern int login_tty(int);
+#ifndef HAVE_FORKPTY
/* forkpty.c prototypes */
extern int forkpty(int *, char *, struct termios *, struct winsize *);
+#endif
/* tbc - Would it be more efficient to ensure that "blank" grids always held
ascii 0x20 rather than ascii 0x00? */

View File

@ -0,0 +1,11 @@
--- a/yasr/config.c.orig 2011-11-28 03:56:58.764995828 +0100
+++ a/yasr/config.c 2011-11-28 03:57:00.048967703 +0100
@@ -60,7 +60,7 @@
int args, arg[16], *argp;
int i, key, ln = 0, mode = 0;
char *home, *ptr, *s;
- char confname[MAXPATHLEN];
+ char confname[strlen(PACKAGE_DATA_DIR) + 10 + 1];
if ((home = getenv("HOME")) != NULL)
{

View File

@ -0,0 +1,18 @@
diff --git a/yasr.conf b/yasr.conf
index 1e07fc6..72f5922 100644
--- a/yasr.conf
+++ b/yasr.conf
@@ -59,11 +59,11 @@ synthesizer=emacspeak server
#synthesizer=speech dispatcher
#synthesizer port=S0
#synthesizer port=l0
-synthesizer port=|/usr/local/bin/eflite
+synthesizer port=|eflite
# Below line appropriate for Speech Dispatcher in its default configuration
#synthesizer port=127.0.0.1:6560
key echo=off
-shell=/bin/bash
+shell=/bin/sh
special=off
up and down arrows=speak line
DisableKey=6925

View File

@ -0,0 +1,14 @@
Index: yasr-0.6.9/yasr/tts.c
===================================================================
--- yasr-0.6.9.orig/yasr/tts.c 2008-02-03 00:10:07.000000000 +1100
+++ yasr-0.6.9/yasr/tts.c 2012-02-05 10:59:06.059007839 +1100
@@ -281,6 +281,9 @@
char *p = synth[tts.synth].unspeakable;
if (ch < 32) return 1;
+ /* characters with high bit set cause DECTALK to crash */
+ if (tts.synth == TTS_DECTALK && ch & 0x80)
+ return 1;
while (*p)
{
if (*p++ == ch) return 1;

View File

@ -0,0 +1,28 @@
{stdenv,fetchurl}:
stdenv.mkDerivation rec {
name = "yasr-${version}";
version = "0.6.9";
src = fetchurl {
url = "https://sourceforge.net/projects/yasr/files/yasr/${version}/${name}.tar.gz";
sha256 = "1prv9r9y6jb5ga5578ldiw507fa414m60xhlvjl29278p3x7rwa1";
};
patches = [
./10_fix_openpty_forkpty_declarations
./20_maxpathlen
./30_conf
./40_dectalk_extended_chars
]; # taken from the debian yasr package
meta = {
homepage = "http://yasr.sourceforge.net";
description = "A general-purpose console screen reader";
longDescription = "Yasr is a general-purpose console screen reader for GNU/Linux and other Unix-like operating systems.";
platforms = stdenv.lib.platforms.unix;
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ jhhuh ];
};
}

View File

@ -4627,6 +4627,8 @@ with pkgs;
yarn = callPackage ../development/tools/yarn { }; yarn = callPackage ../development/tools/yarn { };
yasr = callPackage ../applications/audio/yasr { };
yank = callPackage ../tools/misc/yank { }; yank = callPackage ../tools/misc/yank { };
yaml-merge = callPackage ../tools/text/yaml-merge { }; yaml-merge = callPackage ../tools/text/yaml-merge { };