summaryrefslogtreecommitdiff
path: root/recipes/speech-dispatcher
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/speech-dispatcher')
-rw-r--r--recipes/speech-dispatcher/files/configSpeechd.conf.in_00.patch31
-rw-r--r--recipes/speech-dispatcher/files/configure_fix.patch54
-rw-r--r--recipes/speech-dispatcher/files/speech-dispatcher.init42
-rw-r--r--recipes/speech-dispatcher/files/srcMakefile.am.patch60
-rw-r--r--recipes/speech-dispatcher/speech-dispatcher_0.6.6.bb57
5 files changed, 244 insertions, 0 deletions
diff --git a/recipes/speech-dispatcher/files/configSpeechd.conf.in_00.patch b/recipes/speech-dispatcher/files/configSpeechd.conf.in_00.patch
new file mode 100644
index 0000000000..72b5e3126a
--- /dev/null
+++ b/recipes/speech-dispatcher/files/configSpeechd.conf.in_00.patch
@@ -0,0 +1,31 @@
+--- speech-dispatcher-0.6.5/config/speechd.conf.in.orig 2008-01-05 16:38:53.000000000 +0000
++++ speech-dispatcher-0.6.5/config/speechd.conf.in 2008-01-05 16:40:45.000000000 +0000
+@@ -36,7 +36,7 @@
+ # DO NOT COMMENT OUT THIS OPTION, SET IT TO "default" if you do not
+ # want to influence it.
+
+-LogDir "default"
++LogDir "/var/log/"
+ #LogDir "/var/log/speech-dispatcher/"
+ #LogDir "stdout"
+
+@@ -129,8 +129,8 @@
+ # - configuration is the path to the config file of this module,
+ # either relative (to etc/speechd/modules/) or absolute
+
+-AddModule "espeak" "sd_espeak" "espeak.conf"
+-AddModule "festival" "sd_festival" "festival.conf"
++AddModule "espeak" "sd_espeak" "/etc/speech-dispatcher/modules/espeak.conf"
++#AddModule "festival" "sd_festival" "festival.conf"
+ AddModule "flite" "sd_flite" "flite.conf"
+ #AddModule "espeak-generic" "sd_generic" "espeak-generic.conf"
+ #AddModule "epos-generic" "sd_generic" "epos-generic.conf"
+@@ -172,6 +172,6 @@
+
+ # There are some sample client settings
+
+-Include "clients/emacs.conf"
+-Include "clients/gnome-speech.conf"
++#Include "clients/emacs.conf"
++#Include "clients/gnome-speech.conf"
+
diff --git a/recipes/speech-dispatcher/files/configure_fix.patch b/recipes/speech-dispatcher/files/configure_fix.patch
new file mode 100644
index 0000000000..d593d4e0ab
--- /dev/null
+++ b/recipes/speech-dispatcher/files/configure_fix.patch
@@ -0,0 +1,54 @@
+Index: speech-dispatcher-0.6.6/configure.in
+===================================================================
+--- speech-dispatcher-0.6.6.orig/configure.in 2008-07-20 13:10:44.208894676 +0200
++++ speech-dispatcher-0.6.6/configure.in 2008-07-20 13:11:16.946093820 +0200
+@@ -5,6 +5,7 @@
+
+ dnl progs
+ AC_PROG_CC
++AC_PROG_CXX
+
+ dnl info
+ AM_INIT_AUTOMAKE("speech-dispatcher", "`cat version.sh|grep '^VERSION'|awk -F= '{print $2}'`")
+@@ -134,12 +135,15 @@
+ AC_SUBST(ibmtts_include)
+
+ dnl check for espeak support
++AC_LANG_PUSH([C++])
+ AC_CHECK_LIB(espeak,
+ espeak_Initialize,
+ espeak_ok="true"; echo "Compiling with espeak support.",
+ espeak_ok="false"; echo "Espeak not found.",
+ -lpthread -lm)
+
++AC_LANG_POP([C++])
++
+ AC_ARG_WITH(espeak, AS_HELP_STRING(--with-espeak, Compile with espeak support),
+ if test $withval = "no"; then
+ echo "Forced compilation without espeak support.";
+Index: speech-dispatcher-0.6.6/src/modules/Makefile.am
+===================================================================
+--- speech-dispatcher-0.6.6.orig/src/modules/Makefile.am 2008-07-20 13:10:51.768895801 +0200
++++ speech-dispatcher-0.6.6/src/modules/Makefile.am 2008-07-20 13:10:57.665559805 +0200
+@@ -8,6 +8,7 @@
+ EXTRA_DIST = module_main.c module_utils_addvoice.c festival_client.c festival_client.h
+
+ AM_CFLAGS = -Wall -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -L$(top_srcdir)/src/audio -I$(top_srcdir)/src/audio -I../../intl/ $(ibmtts_include) @SNDFILE_CFLAGS@ -Wl,--rpath -Wl,$(spdlibdir)
++AM_CXXFLAGS = -Wall -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -L$(top_srcdir)/src/audio -I$(top_srcdir)/src/audio -I../../intl/ $(ibmtts_include) @SNDFILE_CFLAGS@ -Wl,--rpath -Wl,$(spdlibdir)
+
+ if flite_support
+ if ibmtts_support
+@@ -45,6 +46,6 @@
+ sd_cicero_SOURCES = cicero.c module_utils.c module_utils.h
+ sd_cicero_LDADD = -lpthread -ldotconf @glib_libs@ @gthread_libs@
+
+-sd_espeak_SOURCES = espeak.c module_utils.c module_utils.h
++sd_espeak_SOURCES = espeak.c module_utils.c module_utils.h dummy.cpp
+ sd_espeak_LDFLAGS = -rpath '$(spdlibdir)'
+ sd_espeak_LDADD = -lsdaudio -lespeak -lpthread -ldotconf @glib_libs@ @SNDFILE_LIBS@ @gthread_libs@
+Index: speech-dispatcher-0.6.6/src/modules/dummy.cpp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ speech-dispatcher-0.6.6/src/modules/dummy.cpp 2008-07-20 13:10:57.668895216 +0200
+@@ -0,0 +1 @@
++
diff --git a/recipes/speech-dispatcher/files/speech-dispatcher.init b/recipes/speech-dispatcher/files/speech-dispatcher.init
new file mode 100644
index 0000000000..c3be5d8385
--- /dev/null
+++ b/recipes/speech-dispatcher/files/speech-dispatcher.init
@@ -0,0 +1,42 @@
+#! /bin/sh
+
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/speech-dispatcher
+PIDFILE=/var/run/speech-dispatcher.pid
+NAME=speech-dispatcher
+DESC='Speech Dispatcher'
+USER=speech-dispatcher
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo "Starting $NAME"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec $DAEMON
+
+ ;;
+ stop)
+ echo "Stopping $NAME"
+ start-stop-daemon --oknodo --stop --quiet \
+ --pidfile $PIDFILE --exec $DAEMON
+ ;;
+ restart)
+ echo "Restarting $NAME"
+ start-stop-daemon --oknodo --stop --quiet \
+ --pidfile $PIDFILE --exec $DAEMON
+ sleep 3
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec $DAEMON
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/recipes/speech-dispatcher/files/srcMakefile.am.patch b/recipes/speech-dispatcher/files/srcMakefile.am.patch
new file mode 100644
index 0000000000..7fdadec571
--- /dev/null
+++ b/recipes/speech-dispatcher/files/srcMakefile.am.patch
@@ -0,0 +1,60 @@
+diff -aurp speech-dispatcher-0.6.5/src.old/audio/Makefile.am speech-dispatcher-0.6.5/src/audio/Makefile.am
+--- speech-dispatcher-0.6.5/src.old/audio/Makefile.am 2008-01-02 17:06:47.000000000 -0600
++++ speech-dispatcher-0.6.5/src/audio/Makefile.am 2008-01-02 17:07:16.000000000 -0600
+@@ -2,7 +2,7 @@
+ localedir = $(datadir)/locale
+ inc_local = "-I$(top_srcdir)/intl/"
+
+-am_cflags = -DLOCALEDIR=\"$(localedir)\" -I/usr/include/ $(inc_local) @glib_include@ -DWITH_OSS
++am_cflags = -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -DWITH_OSS
+
+ if nas_support
+ NAS_FLAGS = -DWITH_NAS
+diff -aurp speech-dispatcher-0.6.5/src.old/c/api/Makefile.am speech-dispatcher-0.6.5/src/c/api/Makefile.am
+--- speech-dispatcher-0.6.5/src.old/c/api/Makefile.am 2008-01-02 17:06:47.000000000 -0600
++++ speech-dispatcher-0.6.5/src/c/api/Makefile.am 2008-01-02 17:07:39.000000000 -0600
+@@ -2,7 +2,7 @@
+ localedir = $(datadir)/locale
+ inc_local = "-I$(top_srcdir)/intl/"
+
+-AM_CFLAGS = -Wall -DLOCALEDIR=\"$(localedir)\" -I/usr/include/ $(inc_local) @glib_include@
++AM_CFLAGS = -Wall -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@
+
+ lib_LTLIBRARIES = libspeechd.la
+ libspeechd_la_SOURCES = libspeechd.c
+diff -aurp speech-dispatcher-0.6.5/src.old/c/clients/say/Makefile.am speech-dispatcher-0.6.5/src/c/clients/say/Makefile.am
+--- speech-dispatcher-0.6.5/src.old/c/clients/say/Makefile.am 2008-01-02 17:06:47.000000000 -0600
++++ speech-dispatcher-0.6.5/src/c/clients/say/Makefile.am 2008-01-02 17:08:09.000000000 -0600
+@@ -3,7 +3,7 @@ localedir = $(datadir)/locale
+ inc_local = "-I$(top_srcdir)/intl/"
+ c_api = $(top_srcdir)/src/c/api
+
+-AM_CFLAGS = -DLOCALEDIR=\"$(localedir)\" -I/usr/include/ $(inc_local) @glib_include@ -I$(c_api)
++AM_CFLAGS = -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -I$(c_api)
+
+ bin_PROGRAMS = spd-say
+ spd_say_SOURCES = say.c options.c options.h $(c_api)/libspeechd.h
+diff -aurp speech-dispatcher-0.6.5/src.old/modules/Makefile.am speech-dispatcher-0.6.5/src/modules/Makefile.am
+--- speech-dispatcher-0.6.5/src.old/modules/Makefile.am 2008-01-02 17:06:47.000000000 -0600
++++ speech-dispatcher-0.6.5/src/modules/Makefile.am 2008-01-02 17:12:41.000000000 -0600
+@@ -7,7 +7,7 @@ SNDFILE_LIBS = @SNDFILE_LIBS@
+
+ EXTRA_DIST = module_main.c module_utils_addvoice.c festival_client.c festival_client.h
+
+-AM_CFLAGS = -Wall -DLOCALEDIR=\"$(localedir)\" -I/usr/include/ $(inc_local) @glib_include@ -L$(top_srcdir)/src/audio -I$(top_srcdir)/src/audio -I../../intl/ $(ibmtts_include) @SNDFILE_CFLAGS@ -Wl,--rpath -Wl,$(spdlibdir)
++AM_CFLAGS = -Wall -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -L$(top_srcdir)/src/audio -I$(top_srcdir)/src/audio -I../../intl/ $(ibmtts_include) @SNDFILE_CFLAGS@ -Wl,--rpath -Wl,$(spdlibdir)
+
+ if flite_support
+ if ibmtts_support
+diff -aurp speech-dispatcher-0.6.5/src.old/tests/Makefile.am speech-dispatcher-0.6.5/src/tests/Makefile.am
+--- speech-dispatcher-0.6.5/src.old/tests/Makefile.am 2008-01-02 17:06:47.000000000 -0600
++++ speech-dispatcher-0.6.5/src/tests/Makefile.am 2008-01-02 17:13:55.000000000 -0600
+@@ -3,7 +3,7 @@ localedir = $(datadir)/locale
+ inc_local = "-I$(top_srcdir)/intl/"
+ c_api = $(top_srcdir)/src/c/api
+
+-AM_CFLAGS = -I$(c_api) -DLOCALEDIR=\"$(localedir)\" -I/usr/include/ $(inc_local) @glib_include@ -I../audio/
++AM_CFLAGS = -I$(c_api) -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -I../audio/
+
+ bin_PROGRAMS = long_message clibrary run_test
+
diff --git a/recipes/speech-dispatcher/speech-dispatcher_0.6.6.bb b/recipes/speech-dispatcher/speech-dispatcher_0.6.6.bb
new file mode 100644
index 0000000000..105c32312f
--- /dev/null
+++ b/recipes/speech-dispatcher/speech-dispatcher_0.6.6.bb
@@ -0,0 +1,57 @@
+DESCRIPTION = "Speech Dispatcher is a high-level device independent layer \
+for speech synthesis through a simple, stable and well documented interface."
+HOMEPAGE = "http://www.freebsoft.org/speechd/"
+LICENSE = "GPLv2"
+DEPENDS = "espeak flite pulseaudio libdotconf glib-2.0"
+RPROVIDES_${PN} += "speechd"
+
+PR = "r1"
+
+inherit autotools update-rc.d
+
+SRC_URI = "http://www.freebsoft.org/pub/projects/speechd/${PN}-${PV}.tar.gz \
+ file://speech-dispatcher.init \
+ file://srcMakefile.am.patch;patch=1 \
+ file://configure_fix.patch;patch=1 \
+ file://configSpeechd.conf.in_00.patch;patch=1"
+
+LEAD_SONAME = "libspeechd.so"
+EXTRA_OECONF = " --with-espeak --with-flite --without-ibmtts --without-nas --with-alsa --with-pulse "
+
+INITSCRIPT_NAME = "speech-dispatcher"
+INITSCRIPT_PARAMS = "defaults 45"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${includedir}
+ install -d ${D}${libdir}/${PN}-modules
+ install -d ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/speech-dispatcher
+ install -d ${D}${sysconfdir}/speech-dispatcher/modules
+
+ oe_libinstall -so -C src/audio libsdaudio ${D}${libdir}
+ oe_libinstall -so -C src/c/api libspeechd ${D}${libdir}
+
+ install -m 0644 ${S}/src/c/api/libspeechd.h ${D}${includedir}
+ install -m 0755 ${S}/src/c/clients/say/.libs/spd-say ${D}${bindir}
+ install -m 0755 ${S}/src/server/.libs/speech-dispatcher ${D}${bindir}
+ install -m 0755 ${S}/src/modules/.libs/sd_* ${D}${libdir}/${PN}-modules/
+
+ install -m 0644 ${S}/config/speechd.conf ${D}${sysconfdir}/speech-dispatcher
+ install -m 0644 ${S}/config/modules/*.conf ${D}${sysconfdir}/speech-dispatcher/modules
+ install -m 0755 ${WORKDIR}/speech-dispatcher.init ${D}${sysconfdir}/init.d/speech-dispatcher
+}
+
+do_stage() {
+ install -m 0644 ${S}/src/c/api/libspeechd.h ${STAGING_INCDIR}
+ oe_libinstall -so -C src/c/api libspeechd ${STAGING_LIBDIR}
+}
+
+PACKAGES =+ "libspeechd-dbg libspeechd libspeechd-dev"
+
+FILES_${PN} += "${libdir}/${PN}-modules/*"
+FILES_${PN}-dbg += "${libdir}/${PN}-modules/.debug"
+FILES_libspeechd += "${libdir}/libspeechd.so.*"
+FILES_libspeechd-dev += "${libdir}/libspeechd* ${includedir}"
+FILES_libspeechd-dbg += "${libdir}/.debug/libspeechd*"