summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Auty <ikelos@gentoo.org>2021-04-16 23:55:11 +0100
committerMike Auty <ikelos@gentoo.org>2021-04-16 23:55:11 +0100
commit8b80442c565fe1f0e157cfbff3b8c3389571d1ae (patch)
tree2a1ae598a10bb96774d835d01527422907140b5e
parentRemove old sys-process/systemd-cron ebuild (diff)
downloadikelos-8b80442c565fe1f0e157cfbff3b8c3389571d1ae.tar.gz
ikelos-8b80442c565fe1f0e157cfbff3b8c3389571d1ae.tar.bz2
ikelos-8b80442c565fe1f0e157cfbff3b8c3389571d1ae.zip
app-accessibility/svox: Bump to EAPI-7
Signed-off-by: Mike Auty <ikelos@gentoo.org>
-rw-r--r--app-accessibility/svox/Manifest8
-rw-r--r--app-accessibility/svox/files/0001-autoconf-building-of-library-using-libtool.patch123
-rw-r--r--app-accessibility/svox/files/0001-autoconf-building-of-library-using-libtool.patch.bz2bin1152 -> 0 bytes
-rw-r--r--app-accessibility/svox/files/0002-gitignore-for-autotools-files.patch51
-rw-r--r--app-accessibility/svox/files/0002-gitignore-for-autotools-files.patch.bz2bin557 -> 0 bytes
-rw-r--r--app-accessibility/svox/files/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch399
-rw-r--r--app-accessibility/svox/files/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch.bz2bin4295 -> 0 bytes
-rw-r--r--app-accessibility/svox/files/0004-add-header-files.patch59
-rw-r--r--app-accessibility/svox/files/0004-add-header-files.patch.bz2bin616 -> 0 bytes
-rw-r--r--app-accessibility/svox/files/0005-Install-lang-files.patch32
-rw-r--r--app-accessibility/svox/files/0005-Install-lang-files.patch.bz2bin543 -> 0 bytes
-rw-r--r--app-accessibility/svox/files/0006-Set-picolangdir.patch40
-rw-r--r--app-accessibility/svox/files/0006-Set-picolangdir.patch.bz2bin686 -> 0 bytes
-rw-r--r--app-accessibility/svox/files/0007-stdint-uintptr.patch48
-rw-r--r--app-accessibility/svox/files/0007-stdint-uintptr.patch.bz2bin490 -> 0 bytes
-rw-r--r--app-accessibility/svox/svox-9999.ebuild16
16 files changed, 764 insertions, 12 deletions
diff --git a/app-accessibility/svox/Manifest b/app-accessibility/svox/Manifest
deleted file mode 100644
index 6f93c0f..0000000
--- a/app-accessibility/svox/Manifest
+++ /dev/null
@@ -1,8 +0,0 @@
-AUX 0001-autoconf-building-of-library-using-libtool.patch.bz2 1152 SHA256 59694606aed4184f943d9a7cc2df91c7fa7915714346d6cff75fd382ae2eae2e SHA512 c15e442b5419564abb887c6c7c744bd267e044256a99ba17342b0bda6eaf8a9cd392708e9c3d6d315ef06c8ecb8d01a3234bb6ef7d10e9480bf55d9e40d77049 WHIRLPOOL 5cea365ddf3a2d058c5de819a12e02881b3aec3639715394fc8830cd8ba3094b8c3f2da2ca9316b84103cb8d3f271928a4845f879d049e5c55e165dbf61101b4
-AUX 0002-gitignore-for-autotools-files.patch.bz2 557 SHA256 9e3a1ac2d93d33eaff832368f031be108b40765a46886fb9d2d4f8e500224ad5 SHA512 c1ecc1dcb2b43dd222573d806ebf3c55539885fd1ae8e4690fb6bdff1db8a1b77833e3eb1e2a2b328d5962ba28601b883e4f7cfde60587355f9370d38b8852d7 WHIRLPOOL 21544a0f1aed21b44f40b8a0d5bcd52059ee4db2380c89efbceeadf566b439a05087fa8d89ea512fea55fe8395730d3da79a1985a314be2b2549f8a871ffc7ec
-AUX 0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch.bz2 4295 SHA256 ad61d046b8cdebc7cfa141fc98f4544434fc361af267f55ad3db82303a540cb7 SHA512 07727a03ed9de8cfe94cc4480c11258a2199a8b5fb20a999aedb96a223552129a0bea2df59e66b50713554681b2a5cf23b5978b0d169c1ff5ad2c8aa8c5befd5 WHIRLPOOL cd307e68345eef1b7812345aebf7f824afe248753a76c39c3c771fa291e63ef229913719443075b79b4b76721872f89c89ce84692f0674e29d328c77d5f8cf56
-AUX 0004-add-header-files.patch.bz2 616 SHA256 e3ce37bb547872a43baa6f851f39346232ea32a32710b839d5187edad65c99e7 SHA512 0525f813318918867a905af9b089c93f4a95ae24147d0913b66e076dc55f19c1c4e2be6c3eebc0d06520d05921c38fe87c95337f66b625511159ce790fdc59a7 WHIRLPOOL cc4177936b85a48b52d5fd81fbe87a7cdbe6a255cafd37b27fb917419dd9d9b174e987c0d15ae7838d47d42c9ec8d70cc9aa8ec006af4a0a7d3170bcce74072f
-AUX 0005-Install-lang-files.patch.bz2 543 SHA256 c1d7e8024d79649c6eaf7fcade90c38295fb3b1cb5728ccbff2f5c3cf48f3115 SHA512 2016c33ae65d6122d3be844fbdc5862675b5e8ed7db4412f79d3107df6cc1fdb7b7789e6625dab51d708d101021280e0bb619f359fde27851983cc919b91122e WHIRLPOOL a16642858bc5d6ec7f659c17c9b1babed4f61706f37cab3b8ab7d054f55e4e456edc4a2f92dc97bb824425fbe0427d9b5b55aa0eff22c556defe15cf83ad22d8
-AUX 0006-Set-picolangdir.patch.bz2 686 SHA256 a6f0799c12d5b033055199ee8bdc19d566c3274624ffe178700b7cb3e31b15bb SHA512 c74787c932da063e5175ba3183c6ccbe85ca60c55d831567e33d6d018765a008773c4ef2f31f9ef48e48bbc6f1dc4e5c2db8ac5eab966e1899cc21a295999d92 WHIRLPOOL ba935099424dea5e5784ce0a85794f91de3bf3cacf2a62acdbef4dc502232df3f2cad1e5b6b2cf9f1dac5a1e31b7020cfddabbdc9e4da66ff23fd21b1080c099
-AUX 0007-stdint-uintptr.patch.bz2 490 SHA256 d2fa7e0b6b29735c8a93b9b45097b7cac30501aba856b60c3fcfcba9562a40cd SHA512 537573c81a3109e60e55a0396e8b31f2231e78cc3a15fba2603e7c600a07facfbb9676f805c7d66a5d9ee451b329d9e8b564951d462c20bd775aeec2fe6b7b22 WHIRLPOOL 9889920144c4a667c95b5b2df104ff299a4f08740a0f2b365afc60a981183049a472da767c14cb3e7a83c5477e949e76ada717757c9ef43119728d16a3ef7f57
-EBUILD svox-9999.ebuild 725 SHA256 949f8cc92771118a0915b7f7396edc1f8e47479910275ab31fd3bdb305899bca SHA512 67035bf6fa2b12913cb12de430c2d06cfac5b1f5780e164f2c39be8c71d674ce147d5e2e8c5be65a6eda4228b2ddcee3aef5fd3faf1a4f3e07280896cdafd614 WHIRLPOOL c28114377061e1306aa1d02e51b12bddc7244d4ecfa7ccac46e010c26e451b83de3ca914c671754f2a5ac08dfdee7892c51728d4e753c4df3a5056431ded759f
diff --git a/app-accessibility/svox/files/0001-autoconf-building-of-library-using-libtool.patch b/app-accessibility/svox/files/0001-autoconf-building-of-library-using-libtool.patch
new file mode 100644
index 0000000..23201b6
--- /dev/null
+++ b/app-accessibility/svox/files/0001-autoconf-building-of-library-using-libtool.patch
@@ -0,0 +1,123 @@
+From 9fe1aa475b2667446b081623abc5c6f6083a76e6 Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Sat, 24 Oct 2009 17:03:37 +0200
+Subject: [PATCH 1/7] autoconf building of library (using libtool)
+
+---
+ pico/Makefile.am | 36 ++++++++++++++++++++++++++++++++++++
+ pico/autogen.sh | 36 ++++++++++++++++++++++++++++++++++++
+ pico/configure.in | 16 ++++++++++++++++
+ 3 files changed, 88 insertions(+), 0 deletions(-)
+ create mode 100644 pico/Makefile.am
+ create mode 100755 pico/autogen.sh
+ create mode 100644 pico/configure.in
+
+diff --git a/pico/Makefile.am b/pico/Makefile.am
+new file mode 100644
+index 0000000..6d8a10c
+--- /dev/null
++++ b/pico/Makefile.am
+@@ -0,0 +1,36 @@
++## Makefile.am -- Process this file with automake to produce Makefile.in
++
++ACLOCAL_AMFLAGS = -I m4
++
++lib_LTLIBRARIES = libttspico.la
++libttspico_la_SOURCES = \
++ lib/picoacph.c \
++ lib/picoapi.c \
++ lib/picobase.c \
++ lib/picocep.c \
++ lib/picoctrl.c \
++ lib/picodata.c \
++ lib/picodbg.c \
++ lib/picoextapi.c \
++ lib/picofftsg.c \
++ lib/picokdbg.c \
++ lib/picokdt.c \
++ lib/picokfst.c \
++ lib/picoklex.c \
++ lib/picoknow.c \
++ lib/picokpdf.c \
++ lib/picokpr.c \
++ lib/picoktab.c \
++ lib/picoos.c \
++ lib/picopal.c \
++ lib/picopam.c \
++ lib/picopr.c \
++ lib/picorsrc.c \
++ lib/picosa.c \
++ lib/picosig.c \
++ lib/picosig2.c \
++ lib/picospho.c \
++ lib/picotok.c \
++ lib/picotrns.c \
++ lib/picowa.c
++
+diff --git a/pico/autogen.sh b/pico/autogen.sh
+new file mode 100755
+index 0000000..a2f757c
+--- /dev/null
++++ b/pico/autogen.sh
+@@ -0,0 +1,36 @@
++#!/bin/sh
++
++#created by aclocal
++rm -rf autom4te.cache
++rm -f aclocal.m4
++
++#created by libtoolize
++rm -rf m4
++rm -f ltmain.sh
++
++#created by autoconf
++rm -f configure
++
++#created by automake
++rm -f install-sh missing depcomp Makefile.in config.guess config.sub
++
++#created by ./configure
++rm -rf .deps
++rm -f Makefile config.log config.status libtool
++
++if [ "$1" = "clean" ]; then
++ exit
++fi
++
++IPATHS="-I lib"
++
++aclocal $IPATHS
++libtoolize
++autoconf $IPATHS
++automake --add-missing
++
++rm -rf autom4te.cache
++
++echo "Now run ./configure and then make."
++exit 0
++
+diff --git a/pico/configure.in b/pico/configure.in
+new file mode 100644
+index 0000000..0afb56d
+--- /dev/null
++++ b/pico/configure.in
+@@ -0,0 +1,16 @@
++dnl Process this file with autoconf to produce a configure script.
++
++AC_PREREQ(2.59)
++
++AC_INIT([svox], [1.0], [math.parent@gmail.com])
++
++AM_INIT_AUTOMAKE([1.9 foreign])
++
++AC_PROG_CC
++LT_INIT
++AC_PROG_LIBTOOL
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
++
++AC_CONFIG_MACRO_DIR([m4])
+--
+1.7.1
+
diff --git a/app-accessibility/svox/files/0001-autoconf-building-of-library-using-libtool.patch.bz2 b/app-accessibility/svox/files/0001-autoconf-building-of-library-using-libtool.patch.bz2
deleted file mode 100644
index f398619..0000000
--- a/app-accessibility/svox/files/0001-autoconf-building-of-library-using-libtool.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/app-accessibility/svox/files/0002-gitignore-for-autotools-files.patch b/app-accessibility/svox/files/0002-gitignore-for-autotools-files.patch
new file mode 100644
index 0000000..df57df7
--- /dev/null
+++ b/app-accessibility/svox/files/0002-gitignore-for-autotools-files.patch
@@ -0,0 +1,51 @@
+From b56b0a4bdf3e11271caab744f532cb055c517b51 Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Sat, 24 Oct 2009 17:12:42 +0200
+Subject: [PATCH 2/7] gitignore for autotools files
+
+---
+ pico/.gitignore | 32 ++++++++++++++++++++++++++++++++
+ 1 files changed, 32 insertions(+), 0 deletions(-)
+ create mode 100644 pico/.gitignore
+
+diff --git a/pico/.gitignore b/pico/.gitignore
+new file mode 100644
+index 0000000..4235569
+--- /dev/null
++++ b/pico/.gitignore
+@@ -0,0 +1,32 @@
++#created by aclocal
++autom4te.cache
++aclocal.m4
++
++#created by libtoolize
++m4
++ltmain.sh
++
++#created by autoconf
++configure
++
++#created by automake
++install-sh
++missing
++depcomp
++Makefile.in
++config.guess
++config.sub
++
++#created by ./configure
++.deps
++Makefile
++config.log
++config.status
++libtool
++
++#created by make
++*.o
++*.lo
++.libs
++libttspico.la
++
+--
+1.7.1
+
diff --git a/app-accessibility/svox/files/0002-gitignore-for-autotools-files.patch.bz2 b/app-accessibility/svox/files/0002-gitignore-for-autotools-files.patch.bz2
deleted file mode 100644
index fa9507d..0000000
--- a/app-accessibility/svox/files/0002-gitignore-for-autotools-files.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/app-accessibility/svox/files/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch b/app-accessibility/svox/files/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch
new file mode 100644
index 0000000..8ef4757
--- /dev/null
+++ b/app-accessibility/svox/files/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch
@@ -0,0 +1,399 @@
+From 8bec80dccc9f4fe147a500486813f4e89a0d56d8 Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Sun, 25 Oct 2009 15:19:01 +0100
+Subject: [PATCH 3/7] pico2wave: Convert text to .wav using svox text-to-speech system.
+
+---
+ pico/.gitignore | 1 +
+ pico/Makefile.am | 7 +
+ pico/bin/pico2wave.c | 341 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ pico/configure.in | 3 +
+ 4 files changed, 352 insertions(+), 0 deletions(-)
+ create mode 100644 pico/bin/pico2wave.c
+
+diff --git a/pico/.gitignore b/pico/.gitignore
+index 4235569..a110298 100644
+--- a/pico/.gitignore
++++ b/pico/.gitignore
+@@ -29,4 +29,5 @@ libtool
+ *.lo
+ .libs
+ libttspico.la
++pico2wave
+
+diff --git a/pico/Makefile.am b/pico/Makefile.am
+index 6d8a10c..0d9472d 100644
+--- a/pico/Makefile.am
++++ b/pico/Makefile.am
+@@ -34,3 +34,10 @@ libttspico_la_SOURCES = \
+ lib/picotrns.c \
+ lib/picowa.c
+
++bin_PROGRAMS = pico2wave
++pico2wave_SOURCES = \
++ bin/pico2wave.c
++pico2wave_LDADD = \
++ libttspico.la -lm -lpopt
++pico2wave_CFLAGS = -Wall -I lib
++
+diff --git a/pico/bin/pico2wave.c b/pico/bin/pico2wave.c
+new file mode 100644
+index 0000000..0c035a7
+--- /dev/null
++++ b/pico/bin/pico2wave.c
+@@ -0,0 +1,341 @@
++/* pico2wave.c
++
++ * Copyright (C) 2009 Mathieu Parent <math.parent@gmail.com>
++ *
++ * Licensed under the Apache License, Version 2.0 (the "License");
++ * you may not use this file except in compliance with the License.
++ * You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ *
++ * Convert text to .wav using svox text-to-speech system.
++ *
++ */
++
++
++#include <popt.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include <picoapi.h>
++#include <picoapid.h>
++#include <picoos.h>
++
++
++/* adaptation layer defines */
++#define PICO_MEM_SIZE 2500000
++#define DummyLen 100000000
++
++/* string constants */
++#define MAX_OUTBUF_SIZE 128
++const char * PICO_LINGWARE_PATH = "./lang/";
++const char * PICO_VOICE_NAME = "PicoVoice";
++
++/* supported voices
++ Pico does not seperately specify the voice and locale. */
++const char * picoSupportedLangIso3[] = { "eng", "eng", "deu", "spa", "fra", "ita" };
++const char * picoSupportedCountryIso3[] = { "USA", "GBR", "DEU", "ESP", "FRA", "ITA" };
++const char * picoSupportedLang[] = { "en-US", "en-GB", "de-DE", "es-ES", "fr-FR", "it-IT" };
++const char * picoInternalLang[] = { "en-US", "en-GB", "de-DE", "es-ES", "fr-FR", "it-IT" };
++const char * picoInternalTaLingware[] = { "en-US_ta.bin", "en-GB_ta.bin", "de-DE_ta.bin", "es-ES_ta.bin", "fr-FR_ta.bin", "it-IT_ta.bin" };
++const char * picoInternalSgLingware[] = { "en-US_lh0_sg.bin", "en-GB_kh0_sg.bin", "de-DE_gl0_sg.bin", "es-ES_zl0_sg.bin", "fr-FR_nk0_sg.bin", "it-IT_cm0_sg.bin" };
++const char * picoInternalUtppLingware[] = { "en-US_utpp.bin", "en-GB_utpp.bin", "de-DE_utpp.bin", "es-ES_utpp.bin", "fr-FR_utpp.bin", "it-IT_utpp.bin" };
++const int picoNumSupportedVocs = 6;
++
++/* adapation layer global variables */
++void * picoMemArea = NULL;
++pico_System picoSystem = NULL;
++pico_Resource picoTaResource = NULL;
++pico_Resource picoSgResource = NULL;
++pico_Resource picoUtppResource = NULL;
++pico_Engine picoEngine = NULL;
++pico_Char * picoTaFileName = NULL;
++pico_Char * picoSgFileName = NULL;
++pico_Char * picoUtppFileName = NULL;
++pico_Char * picoTaResourceName = NULL;
++pico_Char * picoSgResourceName = NULL;
++pico_Char * picoUtppResourceName = NULL;
++int picoSynthAbort = 0;
++
++
++int main(int argc, const char *argv[]) {
++ char * wavefile = NULL;
++ char * lang = "en-US";
++ int langIndex = -1, langIndexTmp = -1;
++ char * text;
++ int8_t * buffer;
++ size_t bufferSize = 256;
++
++ /* Parsing options */
++ poptContext optCon; /* context for parsing command-line options */
++ int opt; /* used for argument parsing */
++
++ struct poptOption optionsTable[] = {
++ { "wave", 'w', POPT_ARG_STRING, &wavefile, 0,
++ "Write output to this WAV file (extension SHOULD be .wav)", "filename.wav" },
++ { "lang", 'l', POPT_ARG_STRING | POPT_ARGFLAG_SHOW_DEFAULT, &lang, 0,
++ "Language", "lang" },
++ POPT_AUTOHELP
++ POPT_TABLEEND
++ };
++ optCon = poptGetContext(NULL, argc, argv, optionsTable, POPT_CONTEXT_POSIXMEHARDER);
++ poptSetOtherOptionHelp(optCon, "<words>");
++
++ /* Reporting about invalid extra options */
++ while ((opt = poptGetNextOpt(optCon)) != -1) {
++ switch (opt) {
++ default:
++ fprintf(stderr, "Invalid option %s: %s\n",
++ poptBadOption(optCon, 0), poptStrerror(opt));
++ poptPrintHelp(optCon, stderr, 0);
++ exit(1);
++ }
++ }
++
++ /* Mandatory option: --wave */
++ if(!wavefile) {
++ fprintf(stderr, "Mandatory option: %s\n\n",
++ "--wave=filename.wav");
++ poptPrintHelp(optCon, stderr, 0);
++ exit(1);
++ }
++ /* option: --lang */
++ for(langIndexTmp =0; langIndexTmp<picoNumSupportedVocs; langIndexTmp++) {
++ if(!strcmp(picoSupportedLang[langIndexTmp], lang)) {
++ langIndex = langIndexTmp;
++ break;
++ }
++ }
++ if(langIndex == -1) {
++ fprintf(stderr, "Unknown language: %s\nValid languages:\n",
++ lang);
++ for(langIndexTmp =0; langIndexTmp<picoNumSupportedVocs; langIndexTmp++) {
++ fprintf(stderr, "%s\n", picoSupportedLang[langIndexTmp]);
++ }
++ lang = "en-US";
++ fprintf(stderr, "\n");
++ poptPrintHelp(optCon, stderr, 0);
++ exit(1);
++ }
++
++ /* Remaining argument is <words> */
++ const char **extra_argv;
++ extra_argv = poptGetArgs(optCon);
++ if(extra_argv) {
++ text = (char *) &(*extra_argv)[0];
++ } else {
++ //TODO: stdin not supported yet.
++ fprintf(stderr, "Missing argument: %s\n\n",
++ "<words>");
++ poptPrintHelp(optCon, stderr, 0);
++ exit(1);
++ }
++
++ poptFreeContext(optCon);
++
++ buffer = malloc( bufferSize );
++
++ int ret, getstatus;
++ pico_Char * inp = NULL;
++ pico_Char * local_text = NULL;
++ short outbuf[MAX_OUTBUF_SIZE/2];
++ pico_Int16 bytes_sent, bytes_recv, text_remaining, out_data_type;
++ pico_Retstring outMessage;
++
++ picoSynthAbort = 0;
++
++ picoMemArea = malloc( PICO_MEM_SIZE );
++ if((ret = pico_initialize( picoMemArea, PICO_MEM_SIZE, &picoSystem ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot initialize pico (%i): %s\n", ret, outMessage);
++ goto terminate;
++ }
++
++ /* Load the text analysis Lingware resource file. */
++ picoTaFileName = (pico_Char *) malloc( PICO_MAX_DATAPATH_NAME_SIZE + PICO_MAX_FILE_NAME_SIZE );
++ strcpy((char *) picoTaFileName, PICO_LINGWARE_PATH);
++ strcat((char *) picoTaFileName, (const char *) picoInternalTaLingware[langIndex]);
++ if((ret = pico_loadResource( picoSystem, picoTaFileName, &picoTaResource ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot load text analysis resource file (%i): %s\n", ret, outMessage);
++ goto unloadTaResource;
++ }
++
++ /* Load the signal generation Lingware resource file. */
++ picoSgFileName = (pico_Char *) malloc( PICO_MAX_DATAPATH_NAME_SIZE + PICO_MAX_FILE_NAME_SIZE );
++ strcpy((char *) picoSgFileName, PICO_LINGWARE_PATH);
++ strcat((char *) picoSgFileName, (const char *) picoInternalSgLingware[langIndex]);
++ if((ret = pico_loadResource( picoSystem, picoSgFileName, &picoSgResource ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot load signal generation Lingware resource file (%i): %s\n", ret, outMessage);
++ goto unloadSgResource;
++ }
++
++ /* Load the utpp Lingware resource file if exists - NOTE: this file is optional
++ and is currently not used. Loading is only attempted for future compatibility.
++ If this file is not present the loading will still succeed. //
++ picoUtppFileName = (pico_Char *) malloc( PICO_MAX_DATAPATH_NAME_SIZE + PICO_MAX_FILE_NAME_SIZE );
++ strcpy((char *) picoUtppFileName, PICO_LINGWARE_PATH);
++ strcat((char *) picoUtppFileName, (const char *) picoInternalUtppLingware[langIndex]);
++ ret = pico_loadResource( picoSystem, picoUtppFileName, &picoUtppResource );
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ printf("pico_loadResource: %i: %s\n", ret, outMessage);
++ */
++
++ /* Get the text analysis resource name. */
++ picoTaResourceName = (pico_Char *) malloc( PICO_MAX_RESOURCE_NAME_SIZE );
++ if((ret = pico_getResourceName( picoSystem, picoTaResource, (char *) picoTaResourceName ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot get the text analysis resource name (%i): %s\n", ret, outMessage);
++ goto unloadUtppResource;
++ }
++
++ /* Get the signal generation resource name. */
++ picoSgResourceName = (pico_Char *) malloc( PICO_MAX_RESOURCE_NAME_SIZE );
++ if((ret = pico_getResourceName( picoSystem, picoSgResource, (char *) picoSgResourceName ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot get the signal generation resource name (%i): %s\n", ret, outMessage);
++ goto unloadUtppResource;
++ }
++
++
++ /* Create a voice definition. */
++ if((ret = pico_createVoiceDefinition( picoSystem, (const pico_Char *) PICO_VOICE_NAME ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot create voice definition (%i): %s\n", ret, outMessage);
++ goto unloadUtppResource;
++ }
++
++ /* Add the text analysis resource to the voice. */
++ if((ret = pico_addResourceToVoiceDefinition( picoSystem, (const pico_Char *) PICO_VOICE_NAME, picoTaResourceName ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot add the text analysis resource to the voice (%i): %s\n", ret, outMessage);
++ goto unloadUtppResource;
++ }
++
++ /* Add the signal generation resource to the voice. */
++ if((ret = pico_addResourceToVoiceDefinition( picoSystem, (const pico_Char *) PICO_VOICE_NAME, picoSgResourceName ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot add the signal generation resource to the voice (%i): %s\n", ret, outMessage);
++ goto unloadUtppResource;
++ }
++
++ /* Create a new Pico engine. */
++ if((ret = pico_newEngine( picoSystem, (const pico_Char *) PICO_VOICE_NAME, &picoEngine ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot create a new pico engine (%i): %s\n", ret, outMessage);
++ goto disposeEngine;
++ }
++
++ local_text = (pico_Char *) text ;
++ text_remaining = strlen((const char *) local_text) + 1;
++
++ inp = (pico_Char *) local_text;
++
++ size_t bufused = 0;
++
++ picoos_Common common = (picoos_Common) pico_sysGetCommon(picoSystem);
++
++ picoos_SDFile sdOutFile = NULL;
++
++ picoos_bool done = TRUE;
++ if(TRUE != (done = picoos_sdfOpenOut(common, &sdOutFile,
++ (picoos_char *) wavefile, SAMPLE_FREQ_16KHZ, PICOOS_ENC_LIN)))
++ {
++ fprintf(stderr, "Cannot open output wave file\n");
++ ret = 1;
++ goto disposeEngine;
++ }
++
++ /* synthesis loop */
++ while (text_remaining) {
++ /* Feed the text into the engine. */
++ if((ret = pico_putTextUtf8( picoEngine, inp, text_remaining, &bytes_sent ))) {
++ pico_getSystemStatusMessage(picoSystem, ret, outMessage);
++ fprintf(stderr, "Cannot put Text (%i): %s\n", ret, outMessage);
++ goto disposeEngine;
++ }
++
++ text_remaining -= bytes_sent;
++ inp += bytes_sent;
++
++ do {
++ if (picoSynthAbort) {
++ goto disposeEngine;
++ }
++ /* Retrieve the samples and add them to the buffer. */
++ getstatus = pico_getData( picoEngine, (void *) outbuf,
++ MAX_OUTBUF_SIZE, &bytes_recv, &out_data_type );
++ if((getstatus !=PICO_STEP_BUSY) && (getstatus !=PICO_STEP_IDLE)){
++ pico_getSystemStatusMessage(picoSystem, getstatus, outMessage);
++ fprintf(stderr, "Cannot get Data (%i): %s\n", getstatus, outMessage);
++ goto disposeEngine;
++ }
++ if (bytes_recv) {
++ if ((bufused + bytes_recv) <= bufferSize) {
++ memcpy(buffer+bufused, (int8_t *) outbuf, bytes_recv);
++ bufused += bytes_recv;
++ } else {
++ done = picoos_sdfPutSamples(
++ sdOutFile,
++ bufused / 2,
++ (picoos_int16*) (buffer));
++ bufused = 0;
++ memcpy(buffer, (int8_t *) outbuf, bytes_recv);
++ bufused += bytes_recv;
++ }
++ }
++ } while (PICO_STEP_BUSY == getstatus);
++ /* This chunk of synthesis is finished; pass the remaining samples. */
++ if (!picoSynthAbort) {
++ done = picoos_sdfPutSamples(
++ sdOutFile,
++ bufused / 2,
++ (picoos_int16*) (buffer));
++ }
++ picoSynthAbort = 0;
++ }
++
++ if(TRUE != (done = picoos_sdfCloseOut(common, &sdOutFile)))
++ {
++ fprintf(stderr, "Cannot close output wave file\n");
++ ret = 1;
++ goto disposeEngine;
++ }
++
++disposeEngine:
++ if (picoEngine) {
++ pico_disposeEngine( picoSystem, &picoEngine );
++ pico_releaseVoiceDefinition( picoSystem, (pico_Char *) PICO_VOICE_NAME );
++ picoEngine = NULL;
++ }
++unloadUtppResource:
++ if (picoUtppResource) {
++ pico_unloadResource( picoSystem, &picoUtppResource );
++ picoUtppResource = NULL;
++ }
++unloadSgResource:
++ if (picoSgResource) {
++ pico_unloadResource( picoSystem, &picoSgResource );
++ picoSgResource = NULL;
++ }
++unloadTaResource:
++ if (picoTaResource) {
++ pico_unloadResource( picoSystem, &picoTaResource );
++ picoTaResource = NULL;
++ }
++terminate:
++ if (picoSystem) {
++ pico_terminate(&picoSystem);
++ picoSystem = NULL;
++ }
++ exit(ret);
++}
++
+diff --git a/pico/configure.in b/pico/configure.in
+index 0afb56d..349eb1d 100644
+--- a/pico/configure.in
++++ b/pico/configure.in
+@@ -14,3 +14,6 @@ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
+
+ AC_CONFIG_MACRO_DIR([m4])
++
++AC_CHECK_LIB(popt, poptGetContext)
++
+--
+1.7.1
+
diff --git a/app-accessibility/svox/files/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch.bz2 b/app-accessibility/svox/files/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch.bz2
deleted file mode 100644
index 40c3604..0000000
--- a/app-accessibility/svox/files/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/app-accessibility/svox/files/0004-add-header-files.patch b/app-accessibility/svox/files/0004-add-header-files.patch
new file mode 100644
index 0000000..f057308
--- /dev/null
+++ b/app-accessibility/svox/files/0004-add-header-files.patch
@@ -0,0 +1,59 @@
+From 0866cb3f7cfe4b8bae1edc8d0dbf18c85e9ca74f Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Tue, 27 Oct 2009 18:29:45 +0100
+Subject: [PATCH 4/7] add header files
+
+---
+ pico/Makefile.am | 36 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 36 insertions(+), 0 deletions(-)
+
+diff --git a/pico/Makefile.am b/pico/Makefile.am
+index 0d9472d..9151042 100644
+--- a/pico/Makefile.am
++++ b/pico/Makefile.am
+@@ -34,6 +34,42 @@ libttspico_la_SOURCES = \
+ lib/picotrns.c \
+ lib/picowa.c
+
++libttspico_ladir = $(includedir)
++libttspico_la_HEADERS = \
++ lib/picoacph.h \
++ lib/picoapid.h \
++ lib/picoapi.h \
++ lib/picobase.h \
++ lib/picocep.h \
++ lib/picoctrl.h \
++ lib/picodata.h \
++ lib/picodbg.h \
++ lib/picodefs.h \
++ lib/picodsp.h \
++ lib/picoextapi.h \
++ lib/picofftsg.h \
++ lib/picokdbg.h \
++ lib/picokdt.h \
++ lib/picokfst.h \
++ lib/picoklex.h \
++ lib/picoknow.h \
++ lib/picokpdf.h \
++ lib/picokpr.h \
++ lib/picoktab.h \
++ lib/picoos.h \
++ lib/picopal.h \
++ lib/picopam.h \
++ lib/picopltf.h \
++ lib/picopr.h \
++ lib/picorsrc.h \
++ lib/picosa.h \
++ lib/picosig2.h \
++ lib/picosig.h \
++ lib/picospho.h \
++ lib/picotok.h \
++ lib/picotrns.h \
++ lib/picowa.h
++
+ bin_PROGRAMS = pico2wave
+ pico2wave_SOURCES = \
+ bin/pico2wave.c
+--
+1.7.1
+
diff --git a/app-accessibility/svox/files/0004-add-header-files.patch.bz2 b/app-accessibility/svox/files/0004-add-header-files.patch.bz2
deleted file mode 100644
index bfc3511..0000000
--- a/app-accessibility/svox/files/0004-add-header-files.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/app-accessibility/svox/files/0005-Install-lang-files.patch b/app-accessibility/svox/files/0005-Install-lang-files.patch
new file mode 100644
index 0000000..95344e3
--- /dev/null
+++ b/app-accessibility/svox/files/0005-Install-lang-files.patch
@@ -0,0 +1,32 @@
+From 486b9f924bdf38f5f213feed2631060b44024c11 Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Tue, 27 Oct 2009 23:06:46 +0100
+Subject: [PATCH 5/7] Install lang files
+
+---
+ pico/Makefile.am | 9 +++++++++
+ 1 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/pico/Makefile.am b/pico/Makefile.am
+index 9151042..8898050 100644
+--- a/pico/Makefile.am
++++ b/pico/Makefile.am
+@@ -70,6 +70,15 @@ libttspico_la_HEADERS = \
+ lib/picotrns.h \
+ lib/picowa.h
+
++picolangdir = $(datadir)/pico/lang
++picolang_DATA = \
++ lang/de-DE*.bin \
++ lang/en-GB*.bin \
++ lang/en-US*.bin \
++ lang/es-ES*.bin \
++ lang/fr-FR*.bin \
++ lang/it-IT*.bin
++
+ bin_PROGRAMS = pico2wave
+ pico2wave_SOURCES = \
+ bin/pico2wave.c
+--
+1.7.1
+
diff --git a/app-accessibility/svox/files/0005-Install-lang-files.patch.bz2 b/app-accessibility/svox/files/0005-Install-lang-files.patch.bz2
deleted file mode 100644
index da76f15..0000000
--- a/app-accessibility/svox/files/0005-Install-lang-files.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/app-accessibility/svox/files/0006-Set-picolangdir.patch b/app-accessibility/svox/files/0006-Set-picolangdir.patch
new file mode 100644
index 0000000..1ec646d
--- /dev/null
+++ b/app-accessibility/svox/files/0006-Set-picolangdir.patch
@@ -0,0 +1,40 @@
+From 0102d423b79de7af982c8d4619d816f95a9b9278 Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Thu, 29 Oct 2009 23:55:19 +0100
+Subject: [PATCH 6/7] Set picolangdir
+
+---
+ pico/Makefile.am | 2 +-
+ pico/bin/pico2wave.c | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/pico/Makefile.am b/pico/Makefile.am
+index 8898050..a19c42a 100644
+--- a/pico/Makefile.am
++++ b/pico/Makefile.am
+@@ -84,5 +84,5 @@ pico2wave_SOURCES = \
+ bin/pico2wave.c
+ pico2wave_LDADD = \
+ libttspico.la -lm -lpopt
+-pico2wave_CFLAGS = -Wall -I lib
++pico2wave_CFLAGS = -Wall -Dpicolangdir=\"$(picolangdir)\" -I lib
+
+diff --git a/pico/bin/pico2wave.c b/pico/bin/pico2wave.c
+index 0c035a7..ec7ab79 100644
+--- a/pico/bin/pico2wave.c
++++ b/pico/bin/pico2wave.c
+@@ -35,7 +35,11 @@
+
+ /* string constants */
+ #define MAX_OUTBUF_SIZE 128
++#ifdef picolangdir
++const char * PICO_LINGWARE_PATH = picolangdir "/";
++#else
+ const char * PICO_LINGWARE_PATH = "./lang/";
++#endif
+ const char * PICO_VOICE_NAME = "PicoVoice";
+
+ /* supported voices
+--
+1.7.1
+
diff --git a/app-accessibility/svox/files/0006-Set-picolangdir.patch.bz2 b/app-accessibility/svox/files/0006-Set-picolangdir.patch.bz2
deleted file mode 100644
index b6d6bd6..0000000
--- a/app-accessibility/svox/files/0006-Set-picolangdir.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/app-accessibility/svox/files/0007-stdint-uintptr.patch b/app-accessibility/svox/files/0007-stdint-uintptr.patch
new file mode 100644
index 0000000..e83ff0a
--- /dev/null
+++ b/app-accessibility/svox/files/0007-stdint-uintptr.patch
@@ -0,0 +1,48 @@
+diff --git a/pico/lib/picoapi.h b/pico/lib/picoapi.h
+index aa60358..6770845 100644
+--- a/pico/lib/picoapi.h
++++ b/pico/lib/picoapi.h
+@@ -151,6 +151,7 @@ typedef struct pico_engine *pico_Engine;
+ #define PICO_UINT32_MAX 0xffffffff
+
+ #include <limits.h>
++#include <stdint.h>
+
+ #if (SHRT_MAX == PICO_INT16_MAX)
+ typedef short pico_Int16;
+diff --git a/pico/lib/picoctrl.h b/pico/lib/picoctrl.h
+index f7b9b6e..4c2161f 100644
+--- a/pico/lib/picoctrl.h
++++ b/pico/lib/picoctrl.h
+@@ -31,6 +31,7 @@
+ #include "picoos.h"
+ #include "picorsrc.h"
+ #include "picodata.h"
++#include <stdint.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+diff --git a/pico/lib/picopr.c b/pico/lib/picopr.c
+index 7cf1824..ece3297 100644
+--- a/pico/lib/picopr.c
++++ b/pico/lib/picopr.c
+@@ -34,6 +34,7 @@
+ #include "picokpr.h"
+ #include "picopr.h"
+ #include "picoktab.h"
++#include <stdint.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+diff --git a/pico/lib/picorsrc.h b/pico/lib/picorsrc.h
+index 4dfb19e..77fd357 100644
+--- a/pico/lib/picorsrc.h
++++ b/pico/lib/picorsrc.h
+@@ -36,6 +36,7 @@
+ #include "picodefs.h"
+ #include "picoos.h"
+ #include "picoknow.h"
++#include <stdint.h>
+
+ #ifdef __cplusplus
+ extern "C" {
diff --git a/app-accessibility/svox/files/0007-stdint-uintptr.patch.bz2 b/app-accessibility/svox/files/0007-stdint-uintptr.patch.bz2
deleted file mode 100644
index 472efd3..0000000
--- a/app-accessibility/svox/files/0007-stdint-uintptr.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/app-accessibility/svox/svox-9999.ebuild b/app-accessibility/svox/svox-9999.ebuild
index adc4f63..cac5628 100644
--- a/app-accessibility/svox/svox-9999.ebuild
+++ b/app-accessibility/svox/svox-9999.ebuild
@@ -2,14 +2,14 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI=4
+EAPI=7
inherit git-r3 eutils autotools
EGIT_REPO_URI="https://android.googlesource.com/platform/external/svox/"
DESCRIPTION="SVOX PicoTTS text-to-speech engine"
-HOMEPAGE="https://android.googlesource.com/platform/external/svox/+/master"
+HOMEPAGE="https://github.com/naggety/picotts"
SRC_URI=""
LICENSE="Apache-2.0"
@@ -20,10 +20,18 @@ IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
-EPATCH_FORCE="yes"
+PATCHES=(
+ "${FILESDIR}/0001-autoconf-building-of-library-using-libtool.patch"
+ "${FILESDIR}/0002-gitignore-for-autotools-files.patch"
+ "${FILESDIR}/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch"
+ "${FILESDIR}/0004-add-header-files.patch"
+ "${FILESDIR}/0005-Install-lang-files.patch"
+ "${FILESDIR}/0006-Set-picolangdir.patch"
+ "${FILESDIR}/0007-stdint-uintptr.patch"
+ )
src_prepare() {
- epatch -p1 ${FILESDIR}
+ default_src_prepare
cd "${S}/pico"
eautoreconf
}