diff --git a/multimedia/sound/flite/actions.py b/multimedia/sound/flite/actions.py index 3cb6b6ba37..4899d16c53 100644 --- a/multimedia/sound/flite/actions.py +++ b/multimedia/sound/flite/actions.py @@ -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*") diff --git a/multimedia/sound/flite/files/CVE-2014-0027_unsafe_temporary_file.patch b/multimedia/sound/flite/files/CVE-2014-0027_unsafe_temporary_file.patch new file mode 100644 index 0000000000..c30c34e97b --- /dev/null +++ b/multimedia/sound/flite/files/CVE-2014-0027_unsafe_temporary_file.patch @@ -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 +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; + diff --git a/multimedia/sound/flite/pspec.xml b/multimedia/sound/flite/pspec.xml index 259ccd27d2..bf53abd5cb 100644 --- a/multimedia/sound/flite/pspec.xml +++ b/multimedia/sound/flite/pspec.xml @@ -17,9 +17,13 @@ alsa-lib-devel chrpath + llvm + llvm-clang + lld flite-ldflags.patch + CVE-2014-0027_unsafe_temporary_file.patch