flite fix
This commit is contained in:
@@ -17,9 +17,14 @@ NoStrip = ["/usr/lib"]
|
||||
def setup():
|
||||
#shelltools.system("sed '/^#VOXES.*$/d; s/+//g; s/cmu_indic_lex/&\nVOXES = cmu_us_kal16 cmu_us_slt/' config/android.lv >config/pisilinux.lv")
|
||||
#shelltools.system("sed -i '/$(INSTALL) -m 755 $(BINDIR)\/flite_time $(DESTDIR)$(INSTALLBINDIR)/d' main/Makefile")
|
||||
shelltools.export("CC", "clang -fuse-ld=lld")
|
||||
shelltools.export("CXX", "clang++ -fuse-ld=lld")
|
||||
shelltools.export("AR", "llvm-ar")
|
||||
shelltools.export("RANLIB", "llvm-ranlib")
|
||||
shelltools.export("LDFLAGS", "-lasound -lm")
|
||||
autotools.configure("--prefix=/usr \
|
||||
--enable-shared \
|
||||
--disable-shared \
|
||||
--with-pic \
|
||||
--with-audio=alsa \
|
||||
--with-vox=cmu_us_kal16")
|
||||
|
||||
@@ -29,6 +34,6 @@ def build():
|
||||
def install():
|
||||
autotools.install()
|
||||
|
||||
pisitools.remove("/usr/lib/*.a")
|
||||
#pisitools.remove("/usr/lib/*.a")
|
||||
|
||||
pisitools.dodoc("COPYING", "README*")
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
Description: Only write audio data to a file in debug builds
|
||||
This isn't useful in regular builds and is actually a security
|
||||
concern.
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Mon, 6 Jan 2014 13:45:00 +0000
|
||||
Bug-Debian: http://bugs.debian.org/734746
|
||||
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=1048678
|
||||
Source: https://bugzilla.redhat.com/attachment.cgi?id=846118
|
||||
|
||||
---
|
||||
src/audio/auserver.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/src/audio/auserver.c
|
||||
+++ b/src/audio/auserver.c
|
||||
@@ -62,9 +62,11 @@
|
||||
int q,i,n,r;
|
||||
unsigned char bytes[CST_AUDIOBUFFSIZE];
|
||||
short shorts[CST_AUDIOBUFFSIZE];
|
||||
+#ifdef DEBUG
|
||||
cst_file fff;
|
||||
|
||||
fff = cst_fopen("/tmp/awb.wav",CST_OPEN_WRITE|CST_OPEN_BINARY);
|
||||
+#endif
|
||||
|
||||
if ((audio_device = audio_open(header->sample_rate,1,
|
||||
(header->encoding == CST_SND_SHORT) ?
|
||||
@@ -111,7 +113,9 @@
|
||||
for (q=r; q > 0; q-=n)
|
||||
{
|
||||
n = audio_write(audio_device,shorts,q);
|
||||
+#ifdef DEBUG
|
||||
cst_fwrite(fff,shorts,2,q);
|
||||
+#endif
|
||||
if (n <= 0)
|
||||
{
|
||||
audio_close(audio_device);
|
||||
@@ -120,7 +124,9 @@
|
||||
}
|
||||
}
|
||||
audio_close(audio_device);
|
||||
+#ifdef DEBUG
|
||||
cst_fclose(fff);
|
||||
+#endif
|
||||
|
||||
return CST_OK_FORMAT;
|
||||
|
||||
@@ -17,9 +17,13 @@
|
||||
<BuildDependencies>
|
||||
<Dependency>alsa-lib-devel</Dependency>
|
||||
<Dependency>chrpath</Dependency>
|
||||
<Dependency>llvm</Dependency>
|
||||
<Dependency>llvm-clang</Dependency>
|
||||
<Dependency>lld</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">flite-ldflags.patch</Patch>
|
||||
<Patch level="1">CVE-2014-0027_unsafe_temporary_file.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user