summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-09-07 11:42:49 +0000
committernia <nia@pkgsrc.org>2019-09-07 11:42:49 +0000
commite96ab838a81e31553326ebd2c39b783594417426 (patch)
tree460a8100f6d9e6d64468ce12fd95503a08547ae1
parent66c578713f3882678c78f8f56f1cb757849b6e92 (diff)
downloadpkgsrc-e96ab838a81e31553326ebd2c39b783594417426.tar.gz
flite: Update to 2.1
* Indic language support * Patch CVE-2014-0027 locally
-rw-r--r--audio/flite/DESCR9
-rw-r--r--audio/flite/Makefile27
-rw-r--r--audio/flite/PLIST20
-rw-r--r--audio/flite/distinfo16
-rw-r--r--audio/flite/patches/patch-CVE-2014-002742
-rw-r--r--audio/flite/patches/patch-aa35
-rw-r--r--audio/flite/patches/patch-ab13
-rw-r--r--audio/flite/patches/patch-ac58
-rw-r--r--audio/flite/patches/patch-config_common__make__rules23
9 files changed, 110 insertions, 133 deletions
diff --git a/audio/flite/DESCR b/audio/flite/DESCR
index 91bde080691..4e05fea8bc2 100644
--- a/audio/flite/DESCR
+++ b/audio/flite/DESCR
@@ -1,4 +1,5 @@
-Flite (festival-lite) is a small, fast run-time synthesis engine developed
-at CMU and primarily designed for small embedded machines and/or large
-servers. Flite is designed as an alternative synthesis engine to Festival
-for voices built using the FestVox suite of voice building tools.
+CMU Flite (festival-lite) is a small, fast run-time open source text to
+speech synthesis engine developed at CMU and primarily designed for small
+embedded machines and/or large servers. Flite is designed as an alternative
+text to speech synthesis engine to Festival for voices built using the
+FestVox suite of voice building tools.
diff --git a/audio/flite/Makefile b/audio/flite/Makefile
index f53e117344f..2e754a49ffe 100644
--- a/audio/flite/Makefile
+++ b/audio/flite/Makefile
@@ -1,22 +1,31 @@
-# $NetBSD: Makefile,v 1.9 2014/01/06 22:11:01 joerg Exp $
+# $NetBSD: Makefile,v 1.10 2019/09/07 11:42:49 nia Exp $
#
-DISTNAME= flite-1.3-release
+DISTNAME= flite-2.1-release
PKGNAME= ${DISTNAME:S/-release//}
-PKGREVISION= 3
CATEGORIES= audio
-MASTER_SITES= http://www.speech.cs.cmu.edu/flite/packed/flite-1.3/
+MASTER_SITES= http://www.festvox.org/flite/packed/flite-2.1/
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.speech.cs.cmu.edu/flite/
-COMMENT= Small and fast run-time synthesis engine
+HOMEPAGE= http://www.festvox.org/flite/
+COMMENT= Lightweight text to speech synthesis engine
# Error opening output file '[...]/cmu_us_kal_diphone.o': No such file or directory
MAKE_JOBS_SAFE= no
-USE_PKGLOCALEDIR= yes
-USE_TOOLS+= gmake pkg-config
-GNU_CONFIGURE= yes
+USE_TOOLS+= gmake
+GNU_CONFIGURE= yes
+
+INSTALLATION_DIRS+= bin include/flite lib share/doc/flite
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/flite ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/flite_cmu* ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/flite_time ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_LIB} ${WRKSRC}/build/platform/lib/libflite* ${DESTDIR}${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/include/*.h ${DESTDIR}${PREFIX}/include/flite
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/flite
.include "../../mk/oss.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/audio/flite/PLIST b/audio/flite/PLIST
index fe20eb14211..e551f4f7a44 100644
--- a/audio/flite/PLIST
+++ b/audio/flite/PLIST
@@ -1,15 +1,23 @@
-@comment $NetBSD: PLIST,v 1.3 2009/06/14 17:32:08 joerg Exp $
+@comment $NetBSD: PLIST,v 1.4 2019/09/07 11:42:49 nia Exp $
bin/flite
+bin/flite_cmu_time_awb
+bin/flite_cmu_us_awb
+bin/flite_cmu_us_kal
+bin/flite_cmu_us_kal16
+bin/flite_cmu_us_rms
+bin/flite_cmu_us_slt
bin/flite_time
include/flite/cst_alloc.h
include/flite/cst_args.h
include/flite/cst_audio.h
include/flite/cst_cart.h
+include/flite/cst_cg.h
include/flite/cst_clunits.h
include/flite/cst_diphone.h
include/flite/cst_endian.h
include/flite/cst_error.h
include/flite/cst_features.h
+include/flite/cst_ffeatures.h
include/flite/cst_file.h
include/flite/cst_hrg.h
include/flite/cst_item.h
@@ -37,12 +45,20 @@ include/flite/cst_val_defs.h
include/flite/cst_viterbi.h
include/flite/cst_voice.h
include/flite/cst_wave.h
+include/flite/cst_wchar.h
include/flite/flite.h
include/flite/flite_version.h
lib/libflite.a
+lib/libflite_cmu_grapheme_lang.a
+lib/libflite_cmu_grapheme_lex.a
+lib/libflite_cmu_indic_lang.a
+lib/libflite_cmu_indic_lex.a
lib/libflite_cmu_time_awb.a
+lib/libflite_cmu_us_awb.a
lib/libflite_cmu_us_kal.a
lib/libflite_cmu_us_kal16.a
+lib/libflite_cmu_us_rms.a
+lib/libflite_cmu_us_slt.a
lib/libflite_cmulex.a
lib/libflite_usenglish.a
-share/doc/flite/README
+share/doc/flite/README.md
diff --git a/audio/flite/distinfo b/audio/flite/distinfo
index 1cd5dc23e21..4fefb112f06 100644
--- a/audio/flite/distinfo
+++ b/audio/flite/distinfo
@@ -1,12 +1,10 @@
-$NetBSD: distinfo,v 1.9 2015/11/03 01:12:31 agc Exp $
+$NetBSD: distinfo,v 1.10 2019/09/07 11:42:49 nia Exp $
-SHA1 (flite-1.3-release.tar.gz) = 233144a772de72741ae1aa2292f672c30224afb3
-RMD160 (flite-1.3-release.tar.gz) = a908acfd196754783ee4665ac84ea860d54bcf80
-SHA512 (flite-1.3-release.tar.gz) = f528dcd103a4c000b62059c4e94dd3673737be92e4cf93474e95b1bbbc596fe487c973cce2ef91a71181ba9a84e9580311ce40bac96bc9ba3544b17074d78d25
-Size (flite-1.3-release.tar.gz) = 10663835 bytes
-SHA1 (patch-aa) = 274aa3dcb0ccce85064da9cdb9bb56b8aa68dfbc
-SHA1 (patch-ab) = 253876a3edc65b60a5891375b2a90a4fcc01da24
-SHA1 (patch-ac) = 9e533a22ed3a59cb6d99b6bbd6eacdfaa1695285
+SHA1 (flite-2.1-release.tar.bz2) = ed8f1ae3c44dafc2bcc70df4ebf618330f7edec9
+RMD160 (flite-2.1-release.tar.bz2) = ebd73639e65043467dffe5d9e7700f6ced5bfe1b
+SHA512 (flite-2.1-release.tar.bz2) = e9ef9ca4b6920178634d94bbe6e21a8b0ec471b010b07e6cc961ed2d120acb944c8e1d268fe26188f7dfe43fb7bd4bdff7fa53b2d2f12029d37e08d0316620d2
+Size (flite-2.1-release.tar.bz2) = 14816327 bytes
+SHA1 (patch-CVE-2014-0027) = aae5a7e965cfe41af05c3917f6574f223185aeff
SHA1 (patch-ad) = e75da7826581a1d93d4f5efe75f257cc749358a7
SHA1 (patch-ae) = c1bd0e1baea7464d3ef0d35481714f92af3da4d8
-SHA1 (patch-config_common__make__rules) = b7ac878a2d4008a796e3d53ac355b9ede6ff8249
+SHA1 (patch-config_common__make__rules) = 949ec45c35872fd39c44864b484423ab28467898
diff --git a/audio/flite/patches/patch-CVE-2014-0027 b/audio/flite/patches/patch-CVE-2014-0027
new file mode 100644
index 00000000000..d056f712b3b
--- /dev/null
+++ b/audio/flite/patches/patch-CVE-2014-0027
@@ -0,0 +1,42 @@
+$NetBSD: patch-CVE-2014-0027,v 1.1 2019/09/07 11:42:49 nia Exp $
+
+Only write audio data to a file in debug builds.
+
+This isn't useful in regular builds and is actually a security concern.
+
+https://github.com/festvox/flite/pull/3
+
+--- src/audio/auserver.c.orig 2017-10-21 14:01:07.000000000 +0000
++++ src/audio/auserver.c
+@@ -67,9 +67,11 @@ static int play_wave_from_socket(snd_hea
+ 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) ?
+@@ -116,7 +118,9 @@ static int play_wave_from_socket(snd_hea
+ 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);
+@@ -125,7 +129,9 @@ static int play_wave_from_socket(snd_hea
+ }
+ }
+ audio_close(audio_device);
++#ifdef DEBUG
+ cst_fclose(fff);
++#endif
+
+ return CST_OK_FORMAT;
+
diff --git a/audio/flite/patches/patch-aa b/audio/flite/patches/patch-aa
deleted file mode 100644
index a8916a7492b..00000000000
--- a/audio/flite/patches/patch-aa
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2009/07/07 14:18:10 joerg Exp $
-
---- Makefile.orig 2005-11-01 08:40:45.000000000 -0500
-+++ Makefile
-@@ -48,6 +48,7 @@ CONFIG=configure configure.in config.sub
- FILES = Makefile README ACKNOWLEDGEMENTS COPYING $(CONFIG)
- DIST_CLEAN = config.cache config.log config.status \
- config/config config/system.mak FileList
-+DOCDIR= $(PREFIX)/share/doc/flite
-
- HOST_ONLY_DIRS = tools main
- ALL = $(BUILD_DIRS)
-@@ -105,13 +106,15 @@ tags:
-
- install:
- @echo Installing
-- mkdir -p $(INSTALLBINDIR)
-- mkdir -p $(INSTALLLIBDIR)
-- mkdir -p $(INSTALLINCDIR)
-- $(INSTALL) -m 644 include/*.h $(INSTALLINCDIR)
-- @ $(MAKE) -C lib --no-print-directory install
-- $(INSTALL) -m 755 bin/flite $(INSTALLBINDIR)
-- $(INSTALL) -m 755 bin/flite_time $(INSTALLBINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(INSTALLBINDIR)
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALLLIBDIR)
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALLINCDIR)
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(DOCDIR)
-+ $(BSD_INSTALL_DATA) include/*.h ${DESTDIR}$(INSTALLINCDIR)
-+ $(BSD_INSTALL_DATA) $(LIBDIR)/libflite* ${DESTDIR}$(INSTALLLIBDIR)
-+ $(BSD_INSTALL_PROGRAM) bin/flite ${DESTDIR}$(INSTALLBINDIR)
-+ $(BSD_INSTALL_PROGRAM) bin/flite_time ${DESTDIR}$(INSTALLBINDIR)
-+ $(BSD_INSTALL_DATA) README ${DESTDIR}$(DOCDIR)
-
- time-stamp :
- @ echo $(PROJECT_NAME) >.time-stamp
diff --git a/audio/flite/patches/patch-ab b/audio/flite/patches/patch-ab
deleted file mode 100644
index 395a56b5437..00000000000
--- a/audio/flite/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2006/10/08 21:35:13 rillig Exp $
-
---- lang/cmulex/make_cmulex.orig 2005-07-11 00:28:52.000000000 +0200
-+++ lang/cmulex/make_cmulex 2006-10-08 23:33:26.000000000 +0200
-@@ -36,7 +36,7 @@
- ## ##
- ###########################################################################
-
--if [ "x$FLITEDIR" == "x" ]
-+if [ "x$FLITEDIR" = "x" ]
- then
- FLITEDIR=`pwd`/../..
- fi
diff --git a/audio/flite/patches/patch-ac b/audio/flite/patches/patch-ac
deleted file mode 100644
index 4ce40f18d2c..00000000000
--- a/audio/flite/patches/patch-ac
+++ /dev/null
@@ -1,58 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2006/10/08 21:35:13 rillig Exp $
-
---- tools/huff_table.orig 2005-01-20 18:01:53.000000000 +0100
-+++ tools/huff_table 2006-10-08 23:34:05.000000000 +0200
-@@ -62,7 +62,7 @@ export LANG
- ## 0 is reserved, 1 is reserved too
- ALPHABET_SIZE=254
-
--if [ $1 == "entries" ]
-+if [ $1 = "entries" ]
- then
- infile=$2
- outfile=$3
-@@ -74,7 +74,7 @@ then
- printf("\n");}' >huff.tmp.corpus
- fi
-
--if [ $1 == "phones" ]
-+if [ $1 = "phones" ]
- then
- infile=$2
- outfile=$3
-@@ -83,7 +83,7 @@ then
- sed 's/\\/ /g' >huff.tmp.corpus
- fi
-
--if [ $1 == "residual" ]
-+if [ $1 = "residual" ]
- then
- # This really doesn't work: just some tests to see what's worthwhile
- infile=$2
-@@ -110,7 +110,7 @@ then
- sed 's/,//g;s/};//' >huff.tmp.corpus
- fi
-
--if [ $1 == "other" ]
-+if [ $1 = "other" ]
- then
- infile=$2
- outfile=$3
-@@ -242,7 +242,7 @@ awk 'BEGIN {'"$maptable"'}
- printf("\n");
- }' > huff.tmp.corpus.uncompressed
-
--if [ $1 == "phones" ]
-+if [ $1 = "phones" ]
- then
- cat huff.tmp.corpus.best |
- sed 's/+/\\/g' |
-@@ -259,7 +259,7 @@ then
- mv huff.tmp.corpus.compressed huff.phones.compressed
- fi
-
--if [ $1 == "entries" ]
-+if [ $1 = "entries" ]
- then
- cat huff.tmp.corpus.best |
- sed 's/+//g' |
diff --git a/audio/flite/patches/patch-config_common__make__rules b/audio/flite/patches/patch-config_common__make__rules
index 1ce3458f355..0270a2845b8 100644
--- a/audio/flite/patches/patch-config_common__make__rules
+++ b/audio/flite/patches/patch-config_common__make__rules
@@ -1,4 +1,11 @@
-$NetBSD: patch-config_common__make__rules,v 1.2 2013/11/18 02:22:30 dholland Exp $
+$NetBSD: patch-config_common__make__rules,v 1.3 2019/09/07 11:42:49 nia Exp $
+
+hunk 1:
+
+Don't use a platform-specific build directory to make installation
+easier.
+
+hunk 2:
Work around PR 48385, a tmpfs bug that combined with this package's
build system causes gmake 4.0 to loop forever making depend.
@@ -11,14 +18,24 @@ It is, in any event, almost never a good idea to depend on directories
in makefiles. The workaround is to not do that and explicitly run a
sub-make to create the object directory.
---- config/common_make_rules.orig 2004-12-19 22:20:43.000000000 +0000
+--- config/common_make_rules.orig 2017-10-21 14:01:07.000000000 +0000
+++ config/common_make_rules
-@@ -188,7 +188,10 @@ ifdef ALL_DIRS
+@@ -55,7 +55,7 @@ CFLAGS += $(EXTRA_CC_FLAGS) $(OPT) $(DBG
+ TARGET_PLATFORM=$(TARGET_CPU)-$(TARGET_OS)
+ HOST_PLATFORM=$(HOST_CPU)-$(HOST_OS)
+ ifndef BUILDDIR
+-BUILDDIR=$(TOP)/build/$(TARGET_PLATFORM)
++BUILDDIR=$(TOP)/build/platform
+ endif
+ OBJDIR=$(BUILDDIR)/obj/$(DIRNAME)
+ BINDIR=$(BUILDDIR)/bin
+@@ -172,8 +172,11 @@ ifdef ALL_DIRS
done
endif
-$(DEPEND): $(SRCS) $(OBJDIR)
+$(DEPEND): $(SRCS)
+ ifdef BUILD_DIRS
+ @ echo Doing implicit make depend.
+ @ touch $(DEPEND)
+ @ $(MAKE) $(OBJDIR)