diff options
author | Christopher Brannon <teiresias@gentoo.org> | 2014-02-12 21:21:11 +0000 |
---|---|---|
committer | Christopher Brannon <teiresias@gentoo.org> | 2014-02-12 21:21:11 +0000 |
commit | a840820212aa9741b61b9224cc4d510e6c49efa4 (patch) | |
tree | 025c34eab7caa700b5ac045d96767786983c72ca /app-accessibility/flite | |
parent | Update to python-any-r1. Respect $EPREFIX. Fix path to regulatory.bin. Mov... (diff) | |
download | gentoo-2-a840820212aa9741b61b9224cc4d510e6c49efa4.tar.gz gentoo-2-a840820212aa9741b61b9224cc4d510e6c49efa4.tar.bz2 gentoo-2-a840820212aa9741b61b9224cc4d510e6c49efa4.zip |
Bugfixes.
For flite 1.2, 1.3, and 1.4, add a patch to prevent
the use of a temporary file. (bug #498020).
For flite 1.3, respect LDFLAGS (bug #476810).
For flite 1.3, fix build failure (bug #456986).
For flite 1.3, allow static flite to be built. USE=static has been
broken for a long time. No bug was ever opened, and I just found the
problem today.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x6521e06d)
Diffstat (limited to 'app-accessibility/flite')
-rw-r--r-- | app-accessibility/flite/ChangeLog | 21 | ||||
-rw-r--r-- | app-accessibility/flite/files/flite-1.2-tempfile.patch | 50 | ||||
-rw-r--r-- | app-accessibility/flite/files/flite-1.3-fix-static.patch | 29 | ||||
-rw-r--r-- | app-accessibility/flite/files/flite-1.3-libm.patch | 11 | ||||
-rw-r--r-- | app-accessibility/flite/files/flite-1.3-respect-ldflags.patch | 24 | ||||
-rw-r--r-- | app-accessibility/flite/files/flite-1.3-tempfile.patch | 50 | ||||
-rw-r--r-- | app-accessibility/flite/files/flite-1.4-tempfile.patch | 50 | ||||
-rw-r--r-- | app-accessibility/flite/flite-1.2-r2.ebuild | 78 | ||||
-rw-r--r-- | app-accessibility/flite/flite-1.3-r1.ebuild | 73 | ||||
-rw-r--r-- | app-accessibility/flite/flite-1.4-r3.ebuild (renamed from app-accessibility/flite/flite-1.4-r2.ebuild) | 5 |
10 files changed, 387 insertions, 4 deletions
diff --git a/app-accessibility/flite/ChangeLog b/app-accessibility/flite/ChangeLog index 6f3ef8993fb5..e04a63a681bd 100644 --- a/app-accessibility/flite/ChangeLog +++ b/app-accessibility/flite/ChangeLog @@ -1,6 +1,23 @@ # ChangeLog for app-accessibility/flite -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/ChangeLog,v 1.47 2013/08/25 14:42:09 jer Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/ChangeLog,v 1.48 2014/02/12 21:21:11 teiresias Exp $ + +*flite-1.4-r3 (12 Feb 2014) +*flite-1.3-r1 (12 Feb 2014) +*flite-1.2-r2 (12 Feb 2014) + + 12 Feb 2014; Christopher Brannon <teiresias@gentoo.org> +flite-1.2-r2.ebuild, + +files/flite-1.2-tempfile.patch, +flite-1.3-r1.ebuild, + +files/flite-1.3-fix-static.patch, +files/flite-1.3-libm.patch, + +files/flite-1.3-respect-ldflags.patch, +files/flite-1.3-tempfile.patch, + -flite-1.4-r2.ebuild, +flite-1.4-r3.ebuild, +files/flite-1.4-tempfile.patch: + For flite 1.2, 1.3, and 1.4, add a patch to prevent + the use of a temporary file. (bug #498020). + For flite 1.3, respect LDFLAGS (bug #476810). + For flite 1.3, fix build failure (bug #456986). + For flite 1.3, allow static flite to be built. USE=static has been + broken for a long time. No bug was ever opened, and I just found the + problem today. 25 Aug 2013; Jeroen Roovers <jer@gentoo.org> flite-1.2-r1.ebuild, flite-1.3.ebuild, flite-1.4-r2.ebuild: diff --git a/app-accessibility/flite/files/flite-1.2-tempfile.patch b/app-accessibility/flite/files/flite-1.2-tempfile.patch new file mode 100644 index 000000000000..09b54f64ea2e --- /dev/null +++ b/app-accessibility/flite/files/flite-1.2-tempfile.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/app-accessibility/flite/files/flite-1.3-fix-static.patch b/app-accessibility/flite/files/flite-1.3-fix-static.patch new file mode 100644 index 000000000000..156f145aa236 --- /dev/null +++ b/app-accessibility/flite/files/flite-1.3-fix-static.patch @@ -0,0 +1,29 @@ +diff -Naur flite-1.3-release/main/Makefile flite-1.3-release.new/main/Makefile +--- flite-1.3-release/main/Makefile 2014-02-12 12:08:32.222776141 -0800 ++++ flite-1.3-release.new/main/Makefile 2014-02-12 12:29:32.308048276 -0800 +@@ -48,15 +48,23 @@ + ALL = $(BINDIR)/flite$(EXEEXT) $(BINDIR)/flite_time$(EXEEXT) \ + $(BINDIR)/t2p$(EXEEXT) + ++include $(TOP)/config/common_make_rules ++ + flite_LIBS = flite_$(FL_VOX) flite_$(FL_LANG) flite_$(FL_LEX) + flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%) ++ifdef SHFLAGS + flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.so) ++else ++flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a) ++endif + + flite_time_LIBS = flite_cmu_time_awb flite_$(FL_LANG) flite_$(FL_LEX) + flite_time_LIBS_flags = -L$(LIBDIR) $(flite_time_LIBS:%=-l%) ++ifdef SHFLAGS + flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.so) +- +-include $(TOP)/config/common_make_rules ++else ++flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.a) ++endif + + $(BINDIR)/flite$(EXEEXT): flite_main.o $(FLITELIBS) $(flite_LIBS_deps) + $(CC) $(CFLAGS) -o $@ flite_main.o $(flite_LIBS_flags) $(LDFLAGS) diff --git a/app-accessibility/flite/files/flite-1.3-libm.patch b/app-accessibility/flite/files/flite-1.3-libm.patch new file mode 100644 index 000000000000..90eba91a3d6c --- /dev/null +++ b/app-accessibility/flite/files/flite-1.3-libm.patch @@ -0,0 +1,11 @@ +--- flite-1.3-release/config/common_make_rules 2013-04-03 15:28:04.004893371 +0100 ++++ flite-1.3-release/config/common_make_rules 2013-04-03 15:27:50.574992901 +0100 +@@ -69,7 +69,7 @@ + + ifdef SHFLAGS + FLITELIBS = $(LIBDIR)/libflite.so +-LDFLAGS += -L$(LIBDIR) -lflite $(OTHERLIBS) ++LDFLAGS += -L$(LIBDIR) -lflite -lm $(OTHERLIBS) + else + FLITELIBS = $(LIBDIR)/libflite.a + LDFLAGS += -L$(LIBDIR) -lflite -lm $(AUDIOLIBS) $(OTHERLIBS) diff --git a/app-accessibility/flite/files/flite-1.3-respect-ldflags.patch b/app-accessibility/flite/files/flite-1.3-respect-ldflags.patch new file mode 100644 index 000000000000..a8a8cb6fb445 --- /dev/null +++ b/app-accessibility/flite/files/flite-1.3-respect-ldflags.patch @@ -0,0 +1,24 @@ +diff -Naur flite-1.3-release/config/common_make_rules flite-1.3-release.new/config/common_make_rules +--- flite-1.3-release/config/common_make_rules 2014-02-12 09:56:23.058678651 -0800 ++++ flite-1.3-release.new/config/common_make_rules 2014-02-12 11:27:18.039561163 -0800 +@@ -67,6 +67,11 @@ + + BUILDDIRS=$(OBJDIR) $(BINDIR) $(LIBDIR) + ++ifndef SO_LDFLAGS ++SO_LDFLAGS := $(LDFLAGS) ++endif ++export SO_LDFLAGS ++ + ifdef SHFLAGS + FLITELIBS = $(LIBDIR)/libflite.so + LDFLAGS += -L$(LIBDIR) -lflite -lm $(OTHERLIBS) +@@ -130,7 +135,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,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os -L../ $($(@:%.so=%_LDLIBS))) ++ @ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} $(SO_LDFLAGS) -o ../$@.${PROJECT_VERSION} *.os -L../ $($(@:%.so=%_LDLIBS))) + @ ln -s $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION} + @ ln -s $@.${PROJECT_SHLIB_VERSION} $@ + @ rm -rf shared_os diff --git a/app-accessibility/flite/files/flite-1.3-tempfile.patch b/app-accessibility/flite/files/flite-1.3-tempfile.patch new file mode 100644 index 000000000000..09b54f64ea2e --- /dev/null +++ b/app-accessibility/flite/files/flite-1.3-tempfile.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/app-accessibility/flite/files/flite-1.4-tempfile.patch b/app-accessibility/flite/files/flite-1.4-tempfile.patch new file mode 100644 index 000000000000..09b54f64ea2e --- /dev/null +++ b/app-accessibility/flite/files/flite-1.4-tempfile.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/app-accessibility/flite/flite-1.2-r2.ebuild b/app-accessibility/flite/flite-1.2-r2.ebuild new file mode 100644 index 000000000000..3d48142a52c4 --- /dev/null +++ b/app-accessibility/flite/flite-1.2-r2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/flite-1.2-r2.ebuild,v 1.1 2014/02/12 21:21:11 teiresias Exp $ + +EAPI=5 +inherit eutils + +DESCRIPTION="Flite text to speech engine" +HOMEPAGE="http://www.speech.cs.cmu.edu/flite/index.html" +SRC_URI="http://www.speech.cs.cmu.edu/flite/packed/${P}/${P}-release.tar.bz2 + http://www.speech.cs.cmu.edu/flite/packed/${P}/${PN}_lexfix.tar.gz" + +LICENSE="BSD freetts public-domain regexp-UofT BSD-2" +SLOT="0" +KEYWORDS=" ~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="static" + +S=${WORKDIR}/${P}-release + +src_unpack() { + unpack ${P}-release.tar.bz2 + unpack ${PN}_lexfix.tar.gz + + # Move the update into ${S} + cd ${PN} + tar -cf - . | (cd "${S}"; tar -xf -) +} + +src_prepare() { + epatch "${FILESDIR}"/const.patch + epatch "${FILESDIR}"/${P}-tempfile.patch +} + +src_configure() { + local myconf + if ! use static ; then + myconf="${myconf} --enable-shared" + fi + myconf="${myconf} --with-vox=cmu_us_kal16" + + econf ${myconf} + # -j2 borks when we make the shared libs +} + +src_compile() { + emake -j1 +} + +src_install() { + dobin bin/* + dodoc ACKNOWLEDGEMENTS README + + if use static ; then + dolib.a lib/*.a + else + for lib in lib/*.so*; do + if [ -f ${lib} ]; then + dolib.so ${lib} + lib=`basename ${lib}` + majlib=`echo ${lib} | sed 's:\(\.so\.[0-9]\)\(\.[0-9]*\)*$:\1:'` + noverlib=`echo ${lib} | sed 's:\(\.so\)\(\.[0-9]*\)*$:\1:'` + + dosym ${lib} /usr/lib/${majlib} + dosym ${lib} /usr/lib/${noverlib} + fi + done + fi + + insinto /usr/include/flite + cd "${S}"/include + for file in *.h; do + doins ${file} + sed -i -e 's:#include "\(.*\)":#include <flite/\1>:g' \ + "${D}"/usr/include/flite/${file} || die "sed failed" + done + + dosym flite/flite.h /usr/include/flite.h +} diff --git a/app-accessibility/flite/flite-1.3-r1.ebuild b/app-accessibility/flite/flite-1.3-r1.ebuild new file mode 100644 index 000000000000..633d902112c2 --- /dev/null +++ b/app-accessibility/flite/flite-1.3-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/flite-1.3-r1.ebuild,v 1.1 2014/02/12 21:21:11 teiresias Exp $ + +EAPI=5 +inherit eutils + +DESCRIPTION="Flite text to speech engine" +HOMEPAGE="http://www.speech.cs.cmu.edu/flite/index.html" +SRC_URI="http://www.speech.cs.cmu.edu/flite/packed/${P}/${P}-release.tar.gz" + +LICENSE="BSD freetts public-domain regexp-UofT BSD-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" +IUSE="alsa static" + +S=${WORKDIR}/${P}-release + +src_prepare() { + epatch "${FILESDIR}"/${P}-tempfile.patch + if use alsa; then + epatch "${FILESDIR}"/${P}-alsa-support.patch + fi + epatch "${FILESDIR}"/${P}-shared-libs.patch + epatch "${FILESDIR}"/${P}-fix-static.patch + epatch "${FILESDIR}"/${P}-respect-ldflags.patch + epatch "${FILESDIR}"/${P}-libm.patch +} + +src_configure() { + local myconf + if ! use static ; then + myconf="--enable-shared" + fi + myconf="${myconf} --with-vox=cmu_us_kal16" + + econf ${myconf} +} + +src_compile() { + emake -j1 +} + +src_install() { + dobin bin/* + dodoc ACKNOWLEDGEMENTS README + + if use static ; then + dolib.a lib/*.a + else + for lib in lib/*.so*; do + if [ -f ${lib} ]; then + dolib.so ${lib} + lib=`basename ${lib}` + majlib=`echo ${lib} | sed 's:\(\.so\.[0-9]\)\(\.[0-9]*\)*$:\1:'` + noverlib=`echo ${lib} | sed 's:\(\.so\)\(\.[0-9]*\)*$:\1:'` + + dosym ${lib} /usr/lib/${majlib} + dosym ${lib} /usr/lib/${noverlib} + fi + done + fi + + insinto /usr/include/flite + cd "${S}"/include + for file in *.h; do + doins ${file} + sed -i -e 's:#include "\(.*\)":#include <flite/\1>:g' \ + "${D}"/usr/include/flite/${file} || die "sed failed" + done + + dosym flite/flite.h /usr/include/flite.h +} diff --git a/app-accessibility/flite/flite-1.4-r2.ebuild b/app-accessibility/flite/flite-1.4-r3.ebuild index 0fd9d2fc63d4..5e526bd98c47 100644 --- a/app-accessibility/flite/flite-1.4-r2.ebuild +++ b/app-accessibility/flite/flite-1.4-r3.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/flite-1.4-r2.ebuild,v 1.3 2013/08/25 14:42:09 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-accessibility/flite/flite-1.4-r3.ebuild,v 1.1 2014/02/12 21:21:11 teiresias Exp $ EAPI=4 inherit autotools eutils @@ -30,6 +30,7 @@ get_audio() { } src_prepare() { + epatch "${FILESDIR}"/${P}-tempfile.patch epatch "${FILESDIR}"/${P}-fix-parallel-builds.patch epatch "${FILESDIR}"/${P}-respect-destdir.patch epatch "${FILESDIR}"/${P}-ldflags.patch |