summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2004-03-22 07:37:06 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2004-03-22 07:37:06 +0000
commita7e69a40daa9e89bf917a8689080c95ab4767c0b (patch)
treea411de179f7ef242dcfcd03771fe013264bdb516 /app-accessibility
parentmore clean up (diff)
downloadhistorical-a7e69a40daa9e89bf917a8689080c95ab4767c0b.tar.gz
historical-a7e69a40daa9e89bf917a8689080c95ab4767c0b.tar.bz2
historical-a7e69a40daa9e89bf917a8689080c95ab4767c0b.zip
Added init script and default conf. Created patch to enable daemon-only command line arg.
Diffstat (limited to 'app-accessibility')
-rw-r--r--app-accessibility/eflite/ChangeLog7
-rw-r--r--app-accessibility/eflite/Manifest7
-rw-r--r--app-accessibility/eflite/eflite-0.3.8.ebuild11
-rw-r--r--app-accessibility/eflite/files/eflite-0.3.8-daemon.patch59
-rw-r--r--app-accessibility/eflite/files/eflite.rc28
-rw-r--r--app-accessibility/eflite/files/es.conf11
6 files changed, 118 insertions, 5 deletions
diff --git a/app-accessibility/eflite/ChangeLog b/app-accessibility/eflite/ChangeLog
index 7bb0b135a997..8fbb40effe89 100644
--- a/app-accessibility/eflite/ChangeLog
+++ b/app-accessibility/eflite/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-accessibility/eflite
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-accessibility/eflite/ChangeLog,v 1.2 2004/03/21 15:16:23 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-accessibility/eflite/ChangeLog,v 1.3 2004/03/22 07:37:06 eradicator Exp $
+
+ 21 Mar 2004; Jeremy Huddleston <eradicator@gentoo.org> eflite-0.3.8.ebuild,
+ files/eflite-0.3.8-daemon.patch, files/eflite.rc, files/es.conf:
+ Added init script and default conf. Created patch to enable daemon-only
+ command line arg.
21 Mar 2004; David Holm <dholm@gentoo.org> eflite-0.3.8.ebuild:
Added to ~ppc.
diff --git a/app-accessibility/eflite/Manifest b/app-accessibility/eflite/Manifest
index 5581fc440971..29a446b35e76 100644
--- a/app-accessibility/eflite/Manifest
+++ b/app-accessibility/eflite/Manifest
@@ -1,5 +1,8 @@
-MD5 0cf38a9f2368b88719d113ee4c8597c1 eflite-0.3.8.ebuild 939
-MD5 eeadc5dea6d5954e8061810da53519c8 ChangeLog 542
+MD5 8f66342a490872b8424e0c43b5710f92 eflite-0.3.8.ebuild 1081
+MD5 5dd4b88366e571003cfec038227e7c8f ChangeLog 787
MD5 4f5d797c455932135181f0c31b5e71b2 metadata.xml 185
+MD5 d00d20939f9c2af3962608cc96917fbb files/es.conf 216
+MD5 3ce16fcf84acfe36c846349d6f10eb3a files/eflite-0.3.8-daemon.patch 1728
MD5 2fa2755f77640d9f4656a5a73dcb3995 files/eflite-0.3.8-shared_flite.patch 2116
+MD5 54f4abc1e6f43c972f1c79dcdf6fad12 files/eflite.rc 731
MD5 0f5da4dd97b480750c68391658e4bee6 files/digest-eflite-0.3.8 63
diff --git a/app-accessibility/eflite/eflite-0.3.8.ebuild b/app-accessibility/eflite/eflite-0.3.8.ebuild
index 65a03bc5a414..a107846fe008 100644
--- a/app-accessibility/eflite/eflite-0.3.8.ebuild
+++ b/app-accessibility/eflite/eflite-0.3.8.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-accessibility/eflite/eflite-0.3.8.ebuild,v 1.3 2004/03/22 05:32:15 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-accessibility/eflite/eflite-0.3.8.ebuild,v 1.4 2004/03/22 07:37:06 eradicator Exp $
inherit eutils
@@ -23,15 +23,22 @@ src_unpack() {
unpack ${A}
cd ${S}
epatch ${FILESDIR}/${P}-shared_flite.patch
+ epatch ${FILESDIR}/${P}-daemon.patch
WANT_AUTOCONF=2.5 autoconf
}
src_install() {
dobin eflite || die
dodoc ChangeLog README INSTALL eflite_test.txt
+
+ insinto /etc
+ doins ${FILESDIR}/es.conf
+
+ exeinto /etc/init.d
+ newins ${FILESDIR}/eflite.rc eflite
}
pkg_postinst() {
einfo "To test eflite, you can run:"
- einfo "gzcat /usr/share/doc/${P}/eflite_test.txt | eflite"
+ einfo "gzcat /usr/share/doc/${P}/eflite_test.txt.gz | eflite"
}
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.rc b/app-accessibility/eflite/files/eflite.rc
new file mode 100644
index 000000000000..f2f52c2f64cf
--- /dev/null
+++ b/app-accessibility/eflite/files/eflite.rc
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-accessibility/eflite/files/eflite.rc,v 1.1 2004/03/22 07:37:06 eradicator Exp $
+
+depend() {
+ need alsasound
+}
+
+start() {
+ ebegin "Starting eflite"
+ start-stop-daemon --start --exec /usr/bin/eflite --background \
+ --quiet --pidfile /var/run/eflite.pid --make-pidfile -- -D
+
+ SOCKET=`egrep '^sockname=' /etc/es.conf | sed 's/^sockname=//'`
+ [ ! -S ${SOCKET} ] && SOCKET=/tmp/es.socket
+
+ chown root.speech ${SOCKET}
+ chmod 666 ${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..0eb6b26dcaeb
--- /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