git.iko.soy/typeable/nixpkgs
on master help sign in
yasr: init at 0.6.9

fixes #23188

commit697838cbea0d7aadb7ca3a4da78ab2753af2bf63 authorJi-Haeng Huh <jhhuh.note@gmail.com> dateSat 25 Feb 2017, 22:18 (10 years ago) parent2d47e1b
6 files changed+98
pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations+25 pkgs/applications/audio/yasr/20_maxpathlen+11 pkgs/applications/audio/yasr/30_conf+18 pkgs/applications/audio/yasr/40_dectalk_extended_chars+14 pkgs/applications/audio/yasr/default.nix+28 pkgs/top-level/all-packages.nix+2
pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarationsnew file+25
@@ -0,0 +1,25 @@
1+Disable openpty() and forkpty() prototypes when needed.
2+--- a/yasr/yasr.h
3++++ b/yasr/yasr.h
4+@@ -308,8 +308,10 @@ extern void opt_set(int num, void *val);
5+ extern void opt_queue_empty(int ll);
6+ extern void opt_write(FILE * fp);
7+
8++#ifndef HAVE_OPENPTY
9+ /* openpty.c prototypes */
10+ extern int openpty(int *, int *, char *, struct termios *, struct winsize *);
11++#endif
12+
13+ /* cfmakeraw.c prototypes */
14+ extern void cfmakeraw(struct termios *);
15+@@ -317,8 +319,10 @@ extern void cfmakeraw(struct termios *);
16+ /* login_tty.c prototypes */
17+ extern int login_tty(int);
18+
19++#ifndef HAVE_FORKPTY
20+ /* forkpty.c prototypes */
21+ extern int forkpty(int *, char *, struct termios *, struct winsize *);
22++#endif
23+
24+ /* tbc - Would it be more efficient to ensure that "blank" grids always held
25+ ascii 0x20 rather than ascii 0x00? */
pkgs/applications/audio/yasr/20_maxpathlennew file+11
@@ -0,0 +1,11 @@
1+--- a/yasr/config.c.orig 2011-11-28 03:56:58.764995828 +0100
2++++ a/yasr/config.c 2011-11-28 03:57:00.048967703 +0100
3+@@ -60,7 +60,7 @@
4+ int args, arg[16], *argp;
5+ int i, key, ln = 0, mode = 0;
6+ char *home, *ptr, *s;
7+- char confname[MAXPATHLEN];
8++ char confname[strlen(PACKAGE_DATA_DIR) + 10 + 1];
9+
10+ if ((home = getenv("HOME")) != NULL)
11+ {
pkgs/applications/audio/yasr/30_confnew file+18
@@ -0,0 +1,18 @@
1+diff --git a/yasr.conf b/yasr.conf
2+index 1e07fc6..72f5922 100644
3+--- a/yasr.conf
4++++ b/yasr.conf
5+@@ -59,11 +59,11 @@ synthesizer=emacspeak server
6+ #synthesizer=speech dispatcher
7+ #synthesizer port=S0
8+ #synthesizer port=l0
9+-synthesizer port=|/usr/local/bin/eflite
10++synthesizer port=|eflite
11+ # Below line appropriate for Speech Dispatcher in its default configuration
12+ #synthesizer port=127.0.0.1:6560
13+ key echo=off
14+-shell=/bin/bash
15++shell=/bin/sh
16+ special=off
17+ up and down arrows=speak line
18+ DisableKey=6925
pkgs/applications/audio/yasr/40_dectalk_extended_charsnew file+14
@@ -0,0 +1,14 @@
1+Index: yasr-0.6.9/yasr/tts.c
2+===================================================================
3+--- yasr-0.6.9.orig/yasr/tts.c 2008-02-03 00:10:07.000000000 +1100
4++++ yasr-0.6.9/yasr/tts.c 2012-02-05 10:59:06.059007839 +1100
5+@@ -281,6 +281,9 @@
6+ char *p = synth[tts.synth].unspeakable;
7+
8+ if (ch < 32) return 1;
9++ /* characters with high bit set cause DECTALK to crash */
10++ if (tts.synth == TTS_DECTALK && ch & 0x80)
11++ return 1;
12+ while (*p)
13+ {
14+ if (*p++ == ch) return 1;
pkgs/applications/audio/yasr/default.nixnew file+28
@@ -0,0 +1,28 @@
1+{stdenv,fetchurl}:
2+
3+stdenv.mkDerivation rec {
4+ name = "yasr-${version}";
5+
6+ version = "0.6.9";
7+
8+ src = fetchurl {
9+ url = "https://sourceforge.net/projects/yasr/files/yasr/${version}/${name}.tar.gz";
10+ sha256 = "1prv9r9y6jb5ga5578ldiw507fa414m60xhlvjl29278p3x7rwa1";
11+ };
12+
13+ patches = [
14+ ./10_fix_openpty_forkpty_declarations
15+ ./20_maxpathlen
16+ ./30_conf
17+ ./40_dectalk_extended_chars
18+ ]; # taken from the debian yasr package
19+
20+ meta = {
21+ homepage = "http://yasr.sourceforge.net";
22+ description = "A general-purpose console screen reader";
23+ longDescription = "Yasr is a general-purpose console screen reader for GNU/Linux and other Unix-like operating systems.";
24+ platforms = stdenv.lib.platforms.unix;
25+ license = stdenv.lib.licenses.gpl2;
26+ maintainers = with stdenv.lib.maintainers; [ jhhuh ];
27+ };
28+}
pkgs/top-level/all-packages.nix+2
@@ -4626,6 +4626,8 @@ with pkgs;
46264626 yaft = callPackage ../applications/misc/yaft { };
46274627
46284628 yarn = callPackage ../development/tools/yarn { };
4629+
4630+ yasr = callPackage ../applications/audio/yasr { };
46294631
46304632 yank = callPackage ../tools/misc/yank { };
46314633