forked from ports/contrib
asterisk-espeak: Initial commit
This commit is contained in:
parent
3b71696a38
commit
bdb8008f27
8
asterisk-espeak/.footprint
Normal file
8
asterisk-espeak/.footprint
Normal file
@ -0,0 +1,8 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-x--- root/asterisk etc/asterisk/
|
||||
-rw-r----- root/asterisk etc/asterisk/espeak.conf
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/lib/
|
||||
drwxr-xr-x root/root usr/lib/asterisk/
|
||||
drwxr-xr-x root/root usr/lib/asterisk/modules/
|
||||
-rwxr-xr-x root/root usr/lib/asterisk/modules/app_espeak.so
|
2
asterisk-espeak/.md5sum
Normal file
2
asterisk-espeak/.md5sum
Normal file
@ -0,0 +1,2 @@
|
||||
88c57ed8f903980984af9e3a7f15631d asterisk-espeak-0.4.tar.gz
|
||||
8362ed89281a7880dd63a7068678b48c build.patch
|
20
asterisk-espeak/Pkgfile
Normal file
20
asterisk-espeak/Pkgfile
Normal file
@ -0,0 +1,20 @@
|
||||
# Description: Asterisk text to speech module
|
||||
# URL: http://asterisk-espeak.sf.net/
|
||||
# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
|
||||
# Depends on: asterisk espeak libsndfile libsamplerate
|
||||
|
||||
name=asterisk-espeak
|
||||
version=0.4
|
||||
release=1
|
||||
source=(http://prdownloads.sf.net/$name/$name-$version.tar.gz build.patch)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
patch -p1 -i $SRC/build.patch
|
||||
export CFLAGS="$CFLAGS -DASTERISK_VERSION=8"
|
||||
make
|
||||
mkdir -p $PKG/usr/lib/asterisk/modules $PKG/etc/asterisk
|
||||
make DESTDIR=$PKG install
|
||||
chown -R root:asterisk $PKG/etc/asterisk
|
||||
chmod -R u+rwX,g-w,o= $PKG/etc/asterisk
|
||||
}
|
71
asterisk-espeak/build.patch
Normal file
71
asterisk-espeak/build.patch
Normal file
@ -0,0 +1,71 @@
|
||||
diff -u -r asterisk-espeak-0.4.orig/app_espeak.c asterisk-espeak-0.4/app_espeak.c
|
||||
--- asterisk-espeak-0.4.orig/app_espeak.c 2011-07-19 16:37:51.109554567 +0900
|
||||
+++ asterisk-espeak-0.4/app_espeak.c 2011-07-19 17:10:38.136024568 +0900
|
||||
@@ -46,12 +46,16 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <asterisk/lock.h>
|
||||
+
|
||||
+#include <asterisk.h>
|
||||
#include <asterisk/file.h>
|
||||
#include <asterisk/logger.h>
|
||||
#include <asterisk/channel.h>
|
||||
#include <asterisk/pbx.h>
|
||||
#include <asterisk/module.h>
|
||||
+#include <asterisk/lock.h>
|
||||
+#include <asterisk/app.h>
|
||||
+#include <asterisk/config.h>
|
||||
#include <asterisk/translate.h>
|
||||
#include <asterisk/utils.h>
|
||||
#include <asterisk/md5.h>
|
||||
@@ -160,11 +164,16 @@
|
||||
#endif
|
||||
|
||||
/* Config file stuff */
|
||||
+#if ASTERISK_VERSION == 8
|
||||
+ struct ast_flags config_flags = { 0 };
|
||||
+ cfg = ast_config_load(ESPEAK_CONFIG, config_flags);
|
||||
+#else
|
||||
#if ASTERISK_VERSION >= 2
|
||||
cfg = ast_config_load(ESPEAK_CONFIG);
|
||||
#else
|
||||
cfg = ast_load(ESPEAK_CONFIG);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
if (!cfg)
|
||||
{
|
||||
@@ -521,7 +530,23 @@
|
||||
return res;
|
||||
}
|
||||
|
||||
-#if ASTERISK_VERSION == 4
|
||||
+#if ASTERISK_VERSION == 8
|
||||
+int unload_module(void)
|
||||
+{
|
||||
+ int res;
|
||||
+ res = ast_unregister_application(app);
|
||||
+ ast_module_user_hangup_all();
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+static int load_module(void)
|
||||
+{
|
||||
+ return ast_register_application(app, espeak_exec, synopsis, descrip);
|
||||
+}
|
||||
+
|
||||
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "eSpeak TTS Interface");
|
||||
+
|
||||
+#elif ASTERISK_VERSION == 4
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
@@ -550,7 +575,6 @@
|
||||
return ast_register_application(app, espeak_exec, synopsis, descrip);
|
||||
}
|
||||
|
||||
-
|
||||
char *description(void)
|
||||
{
|
||||
return tdesc;
|
Loading…
x
Reference in New Issue
Block a user