summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2009-11-01 18:45:20 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2009-11-01 18:45:20 +0000
commit560c0c4363699e6c1ffce46f425c6de04aa67c76 (patch)
tree12ee723b754b379c1ed9ed957cbbdd144f11d498 /app-accessibility/eflite
parentrevert unintended removal. (diff)
downloadgentoo-2-560c0c4363699e6c1ffce46f425c6de04aa67c76.tar.gz
gentoo-2-560c0c4363699e6c1ffce46f425c6de04aa67c76.tar.bz2
gentoo-2-560c0c4363699e6c1ffce46f425c6de04aa67c76.zip
revert unintended removal.
Diffstat (limited to 'app-accessibility/eflite')
-rw-r--r--app-accessibility/eflite/files/eflite-0.3.8-daemon.patch59
-rw-r--r--app-accessibility/eflite/files/eflite-0.3.8-read_pipe.patch17
-rw-r--r--app-accessibility/eflite/files/eflite-0.3.8-shared_flite.patch41
-rw-r--r--app-accessibility/eflite/files/eflite.rc29
-rw-r--r--app-accessibility/eflite/files/es.conf11
5 files changed, 157 insertions, 0 deletions
diff --git a/app-accessibility/eflite/files/eflite-0.3.8-daemon.patch b/app-accessibility/eflite/files/eflite-0.3.8-daemon.patch
new file mode 100644
index 000000000000..ceb9dbf8565b
--- /dev/null
+++ b/app-accessibility/eflite/files/eflite-0.3.8-daemon.patch
@@ -0,0 +1,59 @@
+diff -Naur eflite-0.3.8.orig/es.c eflite-0.3.8/es.c
+--- eflite-0.3.8.orig/es.c 2004-02-20 15:58:35.000000000 -0800
++++ eflite-0.3.8/es.c 2004-03-21 23:32:25.000000000 -0800
+@@ -760,9 +760,13 @@
+ char *input = NULL;
+ int more_opts = 1;
+ int debug = 0;
++ int daemon_only = 0;
+
+- while (more_opts) switch(getopt_long(argc, argv, "df:v", (struct option *)&longopts, NULL))
++ while (more_opts) switch(getopt_long(argc, argv, "Ddf:v", (struct option *)&longopts, NULL))
+ {
++ case 'D':
++ daemon_only = 1;
++ break;
+ case 'd':
+ debug = 1;
+ break;
+@@ -783,19 +787,32 @@
+ sockname = lookup_string(NULL, "socketfile");
+ if (!sockname) sockname = "/tmp/es.socket";
+ local_fd = sockconnect(sockname);
+- if (local_fd != -1) passthrough(infile, local_fd);
+- if (!debug && (child = fork()))
++
++ if(daemon_only)
+ {
+- usleep(200000);
+- local_fd = sockconnect(sockname);
+- if (local_fd == -1)
++ if(local_fd != -1)
+ {
+- es_log(1 | LOG_STDERR, "Daemon not accepting connections -- exiting\n");
++ es_log(1 | LOG_STDERR, "Socket already exists. Exiting.\n");
+ exit(1);
+ }
+- passthrough(infile, local_fd);
+- exit(0);
+ }
++ else
++ {
++ if (local_fd != -1) passthrough(infile, local_fd);
++ if (!debug && (child = fork()))
++ {
++ usleep(200000);
++ local_fd = sockconnect(sockname);
++ if (local_fd == -1)
++ {
++ es_log(1 | LOG_STDERR, "Daemon not accepting connections -- exiting\n");
++ exit(1);
++ }
++ passthrough(infile, local_fd);
++ exit(0);
++ }
++ }
++
+ punct_some = lookup_string(NULL, "punct_some");
+ if (punct_some == NULL) punct_some = "@#$%^&_[]{}\\|";
+ punct_all = lookup_string(NULL, "punct_all");
diff --git a/app-accessibility/eflite/files/eflite-0.3.8-read_pipe.patch b/app-accessibility/eflite/files/eflite-0.3.8-read_pipe.patch
new file mode 100644
index 000000000000..e5fd895bfbd3
--- /dev/null
+++ b/app-accessibility/eflite/files/eflite-0.3.8-read_pipe.patch
@@ -0,0 +1,17 @@
+Index: es.c
+===================================================================
+RCS file: /cvsroot/eflite/eflite/es.c,v
+retrieving revision 1.20
+diff -r1.20 es.c
+714c714,722
+< if (size == -1) terror("read");
+---
+> if (size == -1)
+> {
+> if (errno == EBADF)
+> {
+> /* this might really be an eof */
+> exit(0);
+> }
+> else terror("read");
+> }
diff --git a/app-accessibility/eflite/files/eflite-0.3.8-shared_flite.patch b/app-accessibility/eflite/files/eflite-0.3.8-shared_flite.patch
new file mode 100644
index 000000000000..a68f5757f62e
--- /dev/null
+++ b/app-accessibility/eflite/files/eflite-0.3.8-shared_flite.patch
@@ -0,0 +1,41 @@
+diff -Naur eflite-0.3.8.orig/Makefile.in eflite-0.3.8/Makefile.in
+--- eflite-0.3.8.orig/Makefile.in 2004-02-20 15:58:35.000000000 -0800
++++ eflite-0.3.8/Makefile.in 2004-03-21 00:39:47.000000000 -0800
+@@ -27,10 +27,10 @@
+ #CFLAGS+= -DDEBUG=2
+
+ # For making releases
+-FLITE_LIBS:=$(flite_dir)/lib/libflite_$(FL_VOX).a $(flite_dir)/lib/libflite_$(FL_LEX).a $(flite_dir)/lib/libflite_$(FL_LANG).a $(flite_dir)/lib/libflite.a
++FLITE_LIBS:=-L$(flite_dir)/lib -lflite_$(FL_VOX) -lflite_$(FL_LEX) -lflite_$(FL_LANG) -lflite
+
+-eflite: fs.o es.o soccon.o sockopen.o tone.o $(FLITE_LIBS)
+- $(CC) $(LDFLAGS) -o $@ $^ -lm $(LIBS)
++eflite: fs.o es.o soccon.o sockopen.o tone.o
++ $(CC) $(LDFLAGS) -o $@ $^ -lm $(LIBS) $(FLITE_LIBS)
+
+ fs.o: fs.c
+ $(CC) $(CFLAGS) -I. -I$(flite_include_dir) -DREGISTER_VOX=register_$(subst cmu_us_kal16,cmu_us_kal,$(FL_VOX)) -DSTANDALONE -DEFLITE -c -o $@ $<
+diff -Naur eflite-0.3.8.orig/configure.in eflite-0.3.8/configure.in
+--- eflite-0.3.8.orig/configure.in 2004-02-20 15:58:35.000000000 -0800
++++ eflite-0.3.8/configure.in 2004-03-21 00:37:08.000000000 -0800
+@@ -29,6 +29,20 @@
+ flite_dir=/usr/src/flite-1.1-release;
+ elif test -f /usr/local/src/flite-1.1-release/lib/libflite.a; then
+ flite_dir=/usr/local/src/flite-1.1-release;
++ elif test -f /usr/local/lib/libflite.so; then
++ flite_dir=/usr/local
++ elif test -f /usr/lib/libflite.so; then
++ flite_dir=/usr
++ elif test -f /opt/flite/lib/libflite.so; then
++ flite_dir=/opt
++ elif test -f $HOME/flite-1.2-release/lib/libflite.so; then
++ flite_dir=$HOME/flite-1.2-release
++ elif test -f $HOME/flite-1.1-release/lib/libflite.so; then
++ flite_dir=$HOME/flite-1.1-release
++ elif test -f /usr/src/flite-1.1-release/lib/libflite.so; then
++ flite_dir=/usr/src/flite-1.1-release;
++ elif test -f /usr/local/src/flite-1.1-release/lib/libflite.so; then
++ flite_dir=/usr/local/src/flite-1.1-release;
+ else
+ AC_MSG_ERROR(Cannot locate libflite.a. Please specify flite_dir explicitly (see INSTALL). If you do not have FLite headers and libraries available, then compile FLite and re-run configure.)
+ fi
diff --git a/app-accessibility/eflite/files/eflite.rc b/app-accessibility/eflite/files/eflite.rc
new file mode 100644
index 000000000000..f7775f18d489
--- /dev/null
+++ b/app-accessibility/eflite/files/eflite.rc
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-accessibility/eflite/files/eflite.rc,v 1.7 2009/11/01 18:45:20 eva Exp $
+
+depend() {
+ use alsasound
+ use modules
+ use hotplug
+}
+
+start() {
+ ebegin "Starting eflite"
+ start-stop-daemon --start --exec /usr/bin/eflite --background \
+ --quiet --pidfile /var/run/eflite.pid --make-pidfile -- -D || eend 1
+
+ SOCKET=`egrep '^sockname=' /etc/eflite/es.conf | sed 's/^sockname=//'`
+ [ ! -S ${SOCKET} ] && SOCKET=/tmp/es.socket
+
+ chown root:speech ${SOCKET}
+ chmod 660 ${SOCKET}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping eflite"
+ start-stop-daemon --stop --quiet --pidfile /var/run/eflite.pid
+ eend $?
+}
diff --git a/app-accessibility/eflite/files/es.conf b/app-accessibility/eflite/files/es.conf
new file mode 100644
index 000000000000..17443d3e42ba
--- /dev/null
+++ b/app-accessibility/eflite/files/es.conf
@@ -0,0 +1,11 @@
+# What socket do we listen on
+sockname=/tmp/es.socket
+
+# What volume do we set?
+tone_volume=8192
+
+# Do we use the PC Speaker? (0/1)
+speaker_tones=0
+
+# Do we use the sound card (via flite)? (0/1)
+soundcard_tones=1