Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #23188
- Loading branch information
Showing
6 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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? */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters