summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2018-03-06 22:19:06 -0300
committerDaniel Bermond2018-03-06 23:34:08 -0300
commit0fb4043c2652f63d38ad6bad88da83e036adb637 (patch)
tree32b2d25589cc57b147e14dd9c5bf9f0a1f060d2d
downloadaur-0fb4043c2652f63d38ad6bad88da83e036adb637.tar.gz
Initial commit
-rw-r--r--.SRCINFO36
-rw-r--r--PKGBUILD92
-rw-r--r--flite-1.4-audio-interface.patch22
-rw-r--r--flite-1.4-fix-parallel-builds.patch25
-rw-r--r--flite-1.4-ldflags.patch35
-rw-r--r--flite-1.4-respect-destdir.patch59
-rw-r--r--flite-1.4-tempfile-CVE-2014-0027.patch50
-rw-r--r--flite.texi.patch17
-rw-r--r--no_rpath.patch14
-rw-r--r--texi2html_to_texi2any_migration.patch14
10 files changed, 364 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..85f1a8f737a5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,36 @@
+pkgbase = flite1-patched
+ pkgdesc = A lighweight speech synthesis engine (version 1, patched with fixes and improvements)
+ pkgver = 1.4
+ pkgrel = 1
+ url = http://www.speech.cs.cmu.edu/flite/
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = texlive-core
+ makedepends = texinfo
+ makedepends = ed
+ provides = flite1
+ conflicts = flite
+ conflicts = flite1
+ conflicts = flite-fpic
+ source = http://www.festvox.org/flite/packed/flite-1.4/flite-1.4-release.tar.bz2
+ source = flite-1.4-audio-interface.patch
+ source = flite-1.4-fix-parallel-builds.patch
+ source = flite-1.4-ldflags.patch
+ source = flite-1.4-respect-destdir.patch
+ source = flite-1.4-tempfile-CVE-2014-0027.patch
+ source = flite.texi.patch
+ source = texi2html_to_texi2any_migration.patch
+ source = no_rpath.patch
+ sha256sums = 45c662160aeca6560589f78daf42ab62c6111dd4d244afc28118c4e6f553cd0c
+ sha256sums = 405320984e098c3d788b7751935b2774972ee7970dbe0fef0718ce1e5cc725c9
+ sha256sums = bfd51888ea533bb9ee74cadb68b2e507cb715ab5043aa679b7f42ab52336a7a1
+ sha256sums = ff43e11241c9aea26483865c672c20421d12c688ae8b59b39471bafb52c1463e
+ sha256sums = 093538c3a7cd2b9b9edd1f0956a34c4261c3ccdd4feb55e8ecedc338562495f3
+ sha256sums = 597f1516060917faab008819e3ceb5bb487f5b3948e97eef1020dc10b62c6edf
+ sha256sums = d38fa5dfd4fef71970d904622ec106b9ac18ece002c671b14bc1ce9b342b56b6
+ sha256sums = 1b51d528e3927b80159c6f6c2155fc022f807db7a0cf19c50e9a5e5831086efb
+ sha256sums = 462b9ecdb3e4992cb2fc026b6483ec83d883ece530a3fa0794a00e4f6fbfbb1a
+
+pkgname = flite1-patched
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5e5f25fd50f1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,92 @@
+# Maintainer: Daniel Bermond < yahoo-com: danielbermond >
+
+# This is an improved package for flite version 1 (flite1).
+#
+# flite version 1 is an old software from 2009. Since there, many issues
+# have been discovered, including the security issue CVE-2014-0027. There
+# are patches out there that addresses many of the discovered issues,
+# and also adds some fixes and enhancements.
+#
+# Another notable issue that is also worth to be mentioned is a linking
+# problem. This linking issue was exposed by upstream ffmpeg git commit
+# 6dfcbd8. Without the propper patch, ffmpeg versions 3.5 and later will
+# not compile, failing to detect libflite.
+
+_srcname=flite
+pkgname=flite1-patched
+pkgver=1.4
+pkgrel=1
+pkgdesc='A lighweight speech synthesis engine (version 1, patched with fixes and improvements)'
+arch=('i686' 'x86_64')
+url='http://www.speech.cs.cmu.edu/flite/'
+license=('custom')
+makedepends=('texlive-core' 'texinfo' 'ed')
+provides=('flite1')
+conflicts=('flite' 'flite1' 'flite-fpic')
+source=("http://www.festvox.org/flite/packed/${_srcname}-${pkgver}/${_srcname}-${pkgver}-release.tar.bz2"
+ 'flite-1.4-audio-interface.patch'
+ 'flite-1.4-fix-parallel-builds.patch'
+ 'flite-1.4-ldflags.patch'
+ 'flite-1.4-respect-destdir.patch'
+ 'flite-1.4-tempfile-CVE-2014-0027.patch'
+ 'flite.texi.patch'
+ 'texi2html_to_texi2any_migration.patch'
+ 'no_rpath.patch')
+sha256sums=('45c662160aeca6560589f78daf42ab62c6111dd4d244afc28118c4e6f553cd0c'
+ '405320984e098c3d788b7751935b2774972ee7970dbe0fef0718ce1e5cc725c9'
+ 'bfd51888ea533bb9ee74cadb68b2e507cb715ab5043aa679b7f42ab52336a7a1'
+ 'ff43e11241c9aea26483865c672c20421d12c688ae8b59b39471bafb52c1463e'
+ '093538c3a7cd2b9b9edd1f0956a34c4261c3ccdd4feb55e8ecedc338562495f3'
+ '597f1516060917faab008819e3ceb5bb487f5b3948e97eef1020dc10b62c6edf'
+ 'd38fa5dfd4fef71970d904622ec106b9ac18ece002c671b14bc1ce9b342b56b6'
+ '1b51d528e3927b80159c6f6c2155fc022f807db7a0cf19c50e9a5e5831086efb'
+ '462b9ecdb3e4992cb2fc026b6483ec83d883ece530a3fa0794a00e4f6fbfbb1a')
+
+prepare() {
+ cd "${_srcname}-${pkgver}-release"
+
+ patch -Np1 -i "${srcdir}/flite-1.4-tempfile-CVE-2014-0027.patch"
+ patch -Np1 -i "${srcdir}/flite-1.4-fix-parallel-builds.patch"
+ patch -Np1 -i "${srcdir}/flite-1.4-respect-destdir.patch"
+ patch -Np1 -i "${srcdir}/flite-1.4-ldflags.patch"
+ patch -N -i "${srcdir}/flite-1.4-audio-interface.patch"
+ patch -Np1 -i "${srcdir}/flite.texi.patch"
+ patch -Np1 -i "${srcdir}/texi2html_to_texi2any_migration.patch"
+ patch -Np1 -i "${srcdir}/no_rpath.patch"
+
+ # rename the conflicting variable 'BUILDDIR' to allow building with AUR helpers
+ sed -i 's/BUILDDIR/_FLITE1_BUILDPATH/g' config/common_make_rules
+}
+
+build() {
+ cd "${_srcname}-${pkgver}-release"
+
+ ./configure \
+ --prefix='/usr' \
+ --enable-shared \
+ --disable-static \
+ --with-vox='cmu_us_kal16'
+
+ make
+
+ msg2 'Building documentation...'
+ cd doc
+ make doc
+}
+
+package() {
+ cd "${_srcname}-${pkgver}-release"
+
+ make DESTDIR="$pkgdir" install
+
+ # documentation
+ mkdir -p "${pkgdir}/usr/share/doc/${pkgname}/html"
+ cd doc
+ install -D -m644 flite.pdf "${pkgdir}/usr/share/doc/${pkgname}/flite.pdf"
+ cd html
+ install -m644 *.html "${pkgdir}/usr/share/doc/${pkgname}/html"
+
+ # license
+ cd "${srcdir}/${_srcname}-${pkgver}-release"
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/flite-1.4-audio-interface.patch b/flite-1.4-audio-interface.patch
new file mode 100644
index 000000000000..bc8d25b89bc3
--- /dev/null
+++ b/flite-1.4-audio-interface.patch
@@ -0,0 +1,22 @@
+--- configure.in 2009-08-15 06:46:38.000000000 +1000
++++ configure.in 2011-08-30 00:53:26.000000000 +1000
+@@ -304,7 +304,6 @@
+ [ --with-audio with specific audio support (none linux freebsd etc) ],
+ AUDIODRIVER=$with_audio )
+
+-if test "x$AUDIODEFS" = x; then
+ case "$AUDIODRIVER" in
+ linux|oss)
+ AUDIODRIVER=oss
+@@ -325,9 +324,10 @@
+ ;;
+ none)
+ AUDIODEFS=-DCST_AUDIO_NONE
++ AUDIOLIBS=
+ ;;
+ esac
+-fi
++
+ AC_SUBST(AUDIODRIVER)
+ AC_SUBST(AUDIODEFS)
+ AC_SUBST(AUDIOLIBS)
diff --git a/flite-1.4-fix-parallel-builds.patch b/flite-1.4-fix-parallel-builds.patch
new file mode 100644
index 000000000000..270395877c53
--- /dev/null
+++ b/flite-1.4-fix-parallel-builds.patch
@@ -0,0 +1,25 @@
+From dec7aff03916dce6ba4c244314c60cc7b9359585 Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Fri, 1 Jan 2010 12:59:59 -0600
+Subject: [PATCH] fix parallel builds
+
+---
+ main/Makefile | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/main/Makefile b/main/Makefile
+index 0513e59..e4d04fe 100644
+--- a/main/Makefile
++++ b/main/Makefile
+@@ -81,6 +81,8 @@ else
+ shared_libs: nothing
+ endif
+
++.NOTPARALLEL: $(ALL)
++
+ $(BINDIR)/flite$(EXEEXT): flite_main.o $(flite_LIBS_deps)
+ $(TOP)/tools/make_voice_list $(VOICES)
+ rm -f flite_voice_list.o
+--
+1.6.4.4
+
diff --git a/flite-1.4-ldflags.patch b/flite-1.4-ldflags.patch
new file mode 100644
index 000000000000..f9295fb853b7
--- /dev/null
+++ b/flite-1.4-ldflags.patch
@@ -0,0 +1,35 @@
+diff -Naur flite-1.4-release/config/common_make_rules flite-1.4-release.new/config/common_make_rules
+--- flite-1.4-release/config/common_make_rules 2009-07-30 14:52:56.000000000 +0000
++++ flite-1.4-release.new/config/common_make_rules 2011-03-26 20:22:59.000000000 +0000
+@@ -68,7 +68,7 @@
+
+ FLITELIBS = $(BUILDDIR)/lib/libflite.a
+ FLITELIBFLAGS = -L$(BUILDDIR)/lib -lflite
+-LDFLAGS += -lm $(AUDIOLIBS) $(OTHERLIBS)
++LDLIBS += -lm $(AUDIOLIBS) $(OTHERLIBS)
+
+ FULLOBJS = $(OBJS:%=$(OBJDIR)/%)
+ ifdef SHFLAGS
+@@ -123,7 +123,7 @@
+ @ rm -rf shared_os && mkdir shared_os
+ @ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
+ @ (cd shared_os && ar x ../$<)
+- @ (cd shared_os && $(CC) -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os)
++ @ (cd shared_os && $(CC) ${LDFLAGS} -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os $(LDLIBS))
+ @ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_VERSION}` `basename $@.${PROJECT_SHLIB_VERSION}` )
+ @ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_SHLIB_VERSION}` `basename $@` )
+ @ rm -rf shared_os
+--- flite-1.4-release/tools/Makefile~ 2009-08-22 20:19:01.000000000 +0100
++++ flite-1.4-release.new/tools/Makefile 2013-01-20 20:06:34.259527220 +0000
+@@ -62,9 +62,9 @@
+ LOCAL_CLEAN = $(BINDIR)/find_sts $(BINDIR)/flite_sort
+
+ $(BINDIR)/find_sts: find_sts_main.o $(FLITELIBS)
+- $(CC) $(CFLAGS) -o $@ find_sts_main.o $(FLITELIBFLAGS) $(LDFLAGS)
++ $(CC) $(CFLAGS) ${LDFLAGS} -o $@ find_sts_main.o $(FLITELIBFLAGS) $(LDLIBS)
+ $(BINDIR)/flite_sort: flite_sort_main.o $(FLITELIBS)
+- $(CC) $(CFLAGS) -o $@ flite_sort_main.o $(FLITELIBFLAGS) $(LDFLAGS)
++ $(CC) $(CFLAGS) ${LDFLAGS} -o $@ flite_sort_main.o $(FLITELIBFLAGS) $(LDLIBS)
+ makescripts:
+ @ cp -p $(SCRIPTS) $(TOP)/bin
+
diff --git a/flite-1.4-respect-destdir.patch b/flite-1.4-respect-destdir.patch
new file mode 100644
index 000000000000..d54771423e1f
--- /dev/null
+++ b/flite-1.4-respect-destdir.patch
@@ -0,0 +1,59 @@
+From a0ae616d84e9f051ae8536574a9d1289e5f0c060 Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Thu, 31 Dec 2009 12:57:18 -0600
+Subject: [PATCH] respect destdir
+
+---
+ Makefile | 10 +++++-----
+ main/Makefile | 10 +++++-----
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2d3ff09..26b2386 100644
+--- a/Makefile
++++ b/Makefile
+@@ -106,11 +106,11 @@ tags:
+
+ install:
+ @echo Installing
+- mkdir -p $(INSTALLBINDIR)
+- mkdir -p $(INSTALLLIBDIR)
+- mkdir -p $(INSTALLINCDIR)
+- $(INSTALL) -m 644 include/*.h $(INSTALLINCDIR)
+- @ $(MAKE) -C main --no-print-directory install
++ mkdir -p $(DESTDIR)$(INSTALLBINDIR)
++ mkdir -p $(DESTDIR)$(INSTALLLIBDIR)
++ mkdir -p $(DESTDIR)$(INSTALLINCDIR)
++ $(INSTALL) -m 644 include/*.h $(DESTDIR)$(INSTALLINCDIR)
++ @ $(MAKE) -C main --no-print-directory DESTDIR=$(DESTDIR) install
+
+ time-stamp :
+ @ echo $(PROJECT_NAME) >.time-stamp
+diff --git a/main/Makefile b/main/Makefile
+index 8163e40..0513e59 100644
+--- a/main/Makefile
++++ b/main/Makefile
+@@ -111,15 +111,15 @@ $(BINDIR)/flite_${VOICE}: flite_main.o $(flite_LIBS_deps)
+
+ install:
+ # The basic binaries
+- @ $(INSTALL) -m 755 $(BINDIR)/flite $(INSTALLBINDIR)
++ @ $(INSTALL) -m 755 $(BINDIR)/flite $(DESTDIR)$(INSTALLBINDIR)
+ @ for i in $(VOICES) ; \
+ do \
+- $(INSTALL) $(BINDIR)/flite_$$i $(INSTALLBINDIR); \
++ $(INSTALL) $(BINDIR)/flite_$$i $(DESTDIR)$(INSTALLBINDIR); \
+ done
+- $(INSTALL) -m 755 $(BINDIR)/flite_time $(INSTALLBINDIR)
++ $(INSTALL) -m 755 $(BINDIR)/flite_time $(DESTDIR)$(INSTALLBINDIR)
+ # The libraries: static and shared (if built)
+- cp -pd $(flite_LIBS_deps) $(INSTALLLIBDIR)
++ cp -pd $(flite_LIBS_deps) $(DESTDIR)$(INSTALLLIBDIR)
+ ifdef SHFLAGS
+- cp -pd $(SHAREDLIBS) $(VERSIONSHAREDLIBS) $(INSTALLLIBDIR)
++ cp -pd $(SHAREDLIBS) $(VERSIONSHAREDLIBS) $(DESTDIR)$(INSTALLLIBDIR)
+ endif
+
+--
+1.6.4.4
+
diff --git a/flite-1.4-tempfile-CVE-2014-0027.patch b/flite-1.4-tempfile-CVE-2014-0027.patch
new file mode 100644
index 000000000000..09b54f64ea2e
--- /dev/null
+++ b/flite-1.4-tempfile-CVE-2014-0027.patch
@@ -0,0 +1,50 @@
+From a85193f122b7ec0d377e0a39ac58c64f12c51085 Mon Sep 17 00:00:00 2001
+From: Rui Matos <tiagomatos@gmail.com>
+Date: Mon, 6 Jan 2014 13:45:00 +0000
+Subject: [PATCH] auserver.c: Only write audio data to a file in debug builds
+
+This isn't useful in regular builds and is actually a security
+concern.
+---
+ src/audio/auserver.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/audio/auserver.c b/src/audio/auserver.c
+index 29716d3..3e838d0 100644
+--- a/src/audio/auserver.c
++++ b/src/audio/auserver.c
+@@ -58,9 +58,11 @@ static int play_wave_from_socket(snd_header *header,int audiostream)
+ 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) ?
+@@ -107,7 +109,9 @@ static int play_wave_from_socket(snd_header *header,int audiostream)
+ 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);
+@@ -116,7 +120,9 @@ static int play_wave_from_socket(snd_header *header,int audiostream)
+ }
+ }
+ audio_close(audio_device);
++#ifdef DEBUG
+ cst_fclose(fff);
++#endif
+
+ return CST_OK_FORMAT;
+
+--
+1.8.3.1
+
diff --git a/flite.texi.patch b/flite.texi.patch
new file mode 100644
index 000000000000..ea14ec9f0115
--- /dev/null
+++ b/flite.texi.patch
@@ -0,0 +1,17 @@
+Description: add dircategory and direntry
+Author: Denis Briand <denis@narcan.fr>
+Index: flite-1.4-release/doc/flite.texi
+===================================================================
+--- flite-1.4-release.orig/doc/flite.texi 2010-04-03 09:50:04.000000000 +0200
++++ flite-1.4-release/doc/flite.texi 2010-04-03 09:52:12.000000000 +0200
+@@ -2,6 +2,10 @@
+ @c %**start of header
+ @setfilename flite.info
+ @settitle Flite: a small, fast speech synthesis engine
++@dircategory sound
++@direntry
++flite: (flite). a small, fast speech synthesis engine
++@end direntry
+ @finalout
+ @setchapternewpage odd
+ @c %**end of header
diff --git a/no_rpath.patch b/no_rpath.patch
new file mode 100644
index 000000000000..3d823070aa7c
--- /dev/null
+++ b/no_rpath.patch
@@ -0,0 +1,14 @@
+Description: do not let flite add a dummy rpath
+Author: Samuel Thibault <sthibault@debian.org>
+diff --git a/main/Makefile b/main/Makefile
+index 8163e40..5ad6a14 100644
+--- a/main/Makefile
++++ b/main/Makefile
+@@ -75,7 +75,6 @@ LOCAL_CLEAN = $(BINDIR)/flite$(EXEEXT) $(BINDIR)/flite_time$(EXEEXT) \
+ $(flite_LIBS_deps) $(VOICES:%=$(BINDIR)/flite_%)
+
+ ifdef SHFLAGS
+-flite_LIBS_flags += -Wl,-rpath $(LIBDIR)
+ shared_libs: $(SHAREDLIBS)
+ else
+ shared_libs: nothing
diff --git a/texi2html_to_texi2any_migration.patch b/texi2html_to_texi2any_migration.patch
new file mode 100644
index 000000000000..6f0e60313cfd
--- /dev/null
+++ b/texi2html_to_texi2any_migration.patch
@@ -0,0 +1,14 @@
+Description: Debian wants to get rid of texi2html, see
+ https://wiki.debian.org/Texi2htmlTransition
+Author: Paul Gevers <elbrus@debian.org>
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -50,7 +50,7 @@
+ flite.html: flite.texi
+ @ if [ ! -d html ] ; \
+ then mkdir -p html ; fi
+- (cd html; texi2html -number -split_chapter ../flite.texi)
++ (cd html; texi2any --set-customization-variable TEXI2HTML=1 --split=chapter ../flite.texi)
+ @ if [ -d html/flite ] ; \
+ then mv html/flite/*.html html ; \
+ rmdir html/flite; fi