diff options
author | Ji-Haeng Huh <jhhuh.note@gmail.com> | 2017-02-25 22:18:03 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-03-12 16:59:00 +0100 |
commit | 697838cbea0d7aadb7ca3a4da78ab2753af2bf63 (patch) | |
tree | 66f808145b80781bc60b464d7bd1db00f69f985c /pkgs/applications/audio/yasr | |
parent | 2d47e1be722df1e61132ae4a7b17444f3af656f9 (diff) |
yasr: init at 0.6.9
fixes #23188
Diffstat (limited to 'pkgs/applications/audio/yasr')
-rw-r--r-- | pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations | 25 | ||||
-rw-r--r-- | pkgs/applications/audio/yasr/20_maxpathlen | 11 | ||||
-rw-r--r-- | pkgs/applications/audio/yasr/30_conf | 18 | ||||
-rw-r--r-- | pkgs/applications/audio/yasr/40_dectalk_extended_chars | 14 | ||||
-rw-r--r-- | pkgs/applications/audio/yasr/default.nix | 28 |
5 files changed, 96 insertions, 0 deletions
diff --git a/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations b/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations new file mode 100644 index 0000000000000..f575af5ecd31d --- /dev/null +++ b/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations @@ -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? */ diff --git a/pkgs/applications/audio/yasr/20_maxpathlen b/pkgs/applications/audio/yasr/20_maxpathlen new file mode 100644 index 0000000000000..386c6cbf22bd2 --- /dev/null +++ b/pkgs/applications/audio/yasr/20_maxpathlen @@ -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) + { diff --git a/pkgs/applications/audio/yasr/30_conf b/pkgs/applications/audio/yasr/30_conf new file mode 100644 index 0000000000000..98e959f55f31e --- /dev/null +++ b/pkgs/applications/audio/yasr/30_conf @@ -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 diff --git a/pkgs/applications/audio/yasr/40_dectalk_extended_chars b/pkgs/applications/audio/yasr/40_dectalk_extended_chars new file mode 100644 index 0000000000000..cc1f0af86065f --- /dev/null +++ b/pkgs/applications/audio/yasr/40_dectalk_extended_chars @@ -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; diff --git a/pkgs/applications/audio/yasr/default.nix b/pkgs/applications/audio/yasr/default.nix new file mode 100644 index 0000000000000..b700cc0bd83de --- /dev/null +++ b/pkgs/applications/audio/yasr/default.nix @@ -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 ]; + }; +} |