Index: audio/flite/Makefile =================================================================== --- audio/flite/Makefile +++ audio/flite/Makefile @@ -2,29 +2,36 @@ # $FreeBSD$ PORTNAME= flite -PORTVERSION= 1.4 -PORTREVISION= 2 +PORTVERSION= 2.1 CATEGORIES= audio -MASTER_SITES= http://www.speech.cs.cmu.edu/flite/packed/${PORTNAME}-${PORTVERSION}/ +MASTER_SITES= http://www.festvox.org/${PORTNAME}/packed/${PORTNAME}-${PORTVERSION}/ DISTNAME= ${PORTNAME}-${PORTVERSION}-release MAINTAINER= sobomax@FreeBSD.org COMMENT= Small run-time speech synthesis engine -OPTIONS_DEFINE= DOCS +LICENSE= UNKNOWN +LICENSE_NAME= unknown +LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + +USES= cpe gmake tar:bzip2 -USES= cpe desthack gmake tar:bzip2 CPE_VENDOR= cmu + GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-shared=yes -USE_LDCONFIG= yes + +OPTIONS_DEFINE= DOCS post-patch: @${REINPLACE_CMD} -e 's|-pd|-pR|g' ${WRKSRC}/main/Makefile post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* + +post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* ${STAGEDIR}${PREFIX}/lib/*.so + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} .include Index: audio/flite/distinfo =================================================================== --- audio/flite/distinfo +++ audio/flite/distinfo @@ -1,2 +1,3 @@ -SHA256 (flite-1.4-release.tar.bz2) = 45c662160aeca6560589f78daf42ab62c6111dd4d244afc28118c4e6f553cd0c -SIZE (flite-1.4-release.tar.bz2) = 15163897 +TIMESTAMP = 1549805578 +SHA256 (flite-2.1-release.tar.bz2) = c73c3f6a2ea764977d6eaf0a287722d1e2066b4697088c552e342c790f3d2b85 +SIZE (flite-2.1-release.tar.bz2) = 14816327 Index: audio/flite/files/patch-configure =================================================================== --- audio/flite/files/patch-configure +++ /dev/null @@ -1,20 +0,0 @@ ---- configure.orig 2009-08-14 22:50:59.000000000 +0200 -+++ configure 2010-09-09 15:07:27.000000000 +0200 -@@ -4079,7 +4079,7 @@ - OTHERLIBS= - if test "$shared" = true; then - case "$target_os" in -- linux*|k*bsd*-gnu|gnu*) -+ linux*|k*bsd*-gnu|gnu*|*bsd*) - SHFLAGS="-fPIC" - ;; - solaris*) -@@ -4893,7 +4893,7 @@ - AUDIODEFS=-DCST_AUDIO_ALSA - AUDIOLIBS=-lasound - ;; -- *bsd) -+ *bsd*) - AUDIODRIVER=oss - AUDIODEFS=-DCST_AUDIO_FREEBSD - ;; Index: audio/flite/files/patch-lang-cmulex-make_cmulex =================================================================== --- audio/flite/files/patch-lang-cmulex-make_cmulex +++ /dev/null @@ -1,11 +0,0 @@ ---- lang/cmulex/make_cmulex.orig -+++ lang/cmulex/make_cmulex -@@ -36,7 +36,7 @@ - ## ## - ########################################################################### - --if [ "x$FLITEDIR" == "x" ] -+if [ "x$FLITEDIR" = "x" ] - then - FLITEDIR=`pwd`/../.. - fi Index: audio/flite/files/patch-parallel-build =================================================================== --- audio/flite/files/patch-parallel-build +++ /dev/null @@ -1,155 +0,0 @@ -Allow parallel builds: - - 1. First, modify make_voice_list script to accept the - output file (defaulting to flite_voice_list.c as before). - 2. Use a per-library subdirectory to build shared objecs from - the .shared.a-counterparts -- using the same shared_os/ - was causing conflicts, when multiple such libraries were - built in parallel. - 3. Use the new feature of make_voice_list (see 1.) to build - separate voice-list files for each voice, thus avoiding - the last sort of conflicts. - -This also removes linking unnecessary libraries into flite_VOICE -executables -- only the library providing the particular voice is used -now. - - -mi - ---- tools/make_voice_list 2009-04-08 09:18:42.000000000 -0400 -+++ tools/make_voice_list 2014-12-01 19:39:40.000000000 -0500 -@@ -36,26 +36,38 @@ - ########################################################################### - --rm -f flite_voice_list.c -+case "$1" in -+-o) -+ output=$2 -+ shift 2 -+ ;; -+*) -+ output=flite_voice_list.c -+ ;; -+esac -+ -+rm -f $output -+exec > $output -+ -+cat << EOT -+/* Generated automatically from make_voice_list */ -+ -+#include "flite.h" -+ -+EOT - --echo "/* Generated automatically from make_voice_list */" >flite_voice_list.c --echo >>flite_voice_list.c --echo '#include "flite.h"' >>flite_voice_list.c --echo >>flite_voice_list.c - for i in $* - do -- echo "cst_voice *register_"$i"(const char *voxdir);">>flite_voice_list.c -+ echo "cst_voice *register_"$i"(const char *voxdir);" - done - --echo >>flite_voice_list.c --echo "cst_val *flite_set_voice_list(void)" >>flite_voice_list.c --echo "{" >>flite_voice_list.c -+echo -+echo "cst_val *flite_set_voice_list(void)" -+echo "{" - for i in $* - do -- echo " flite_voice_list = cons_val(voice_val(register_"$i"(NULL)),flite_voice_list);" >>flite_voice_list.c -+ echo " flite_voice_list = cons_val(voice_val(register_"$i"(NULL)),flite_voice_list);" - done -- echo " flite_voice_list = val_reverse(flite_voice_list);" >>flite_voice_list.c -- echo " return flite_voice_list;" >>flite_voice_list.c -- --echo "}" >>flite_voice_list.c --echo >>flite_voice_list.c -+ echo " flite_voice_list = val_reverse(flite_voice_list);" -+ echo " return flite_voice_list;" - -+echo "}" ---- config/common_make_rules 2009-07-30 10:52:56.000000000 -0400 -+++ config/common_make_rules 2014-12-01 19:43:50.000000000 -0500 -@@ -121,11 +121,11 @@ - $(LIBDIR)/%.so: $(LIBDIR)/%.shared.a - @ echo making $@ -- @ rm -rf shared_os && mkdir shared_os -+ @ 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.$* && ar x ../$<) -+ @ (cd shared_os.$* && $(CC) -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os) - @ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_VERSION}` `basename $@.${PROJECT_SHLIB_VERSION}` ) - @ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_SHLIB_VERSION}` `basename $@` ) -- @ rm -rf shared_os -+ @ rm -rf shared_os.$* - - $(OBJDIR)/.make_build_dirs: ---- main/Makefile 2009-08-14 17:11:07.000000000 -0400 -+++ main/Makefile 2014-12-01 21:07:35.000000000 -0500 -@@ -40,5 +40,5 @@ - ALL_DIRS= - SRCS = flite_main.c flite_time_main.c t2p_main.c compile_regexes.c --OBJS = $(SRCS:.c=.o) flite_voice_list.o -+OBJS = $(SRCS:.c=.o) - FILES = Makefile $(SRCS) - LOCAL_INCLUDES = -@@ -47,8 +47,9 @@ - $(BINDIR)/flite$(EXEEXT) \ - $(BINDIR)/t2p$(EXEEXT) $(BINDIR)/compile_regexes$(EXEEXT) \ -- flite_voice_list.c each $(EXTRABINS) -+ $(EXTRABINS) - - VOICES=$(VOXES) - VOICELIBS=$(VOICES:%=flite_%) -+VOICEEXES=$(VOICES:%=${BINDIR}/flite_%) - - flite_LIBS = $(VOICELIBS) $(LANGS:%=flite_%) $(LEXES:%=flite_%) flite -@@ -76,5 +77,4 @@ - - ifdef SHFLAGS --flite_LIBS_flags += -Wl,-rpath $(LIBDIR) - shared_libs: $(SHAREDLIBS) - else -@@ -82,9 +82,9 @@ - endif - --$(BINDIR)/flite$(EXEEXT): flite_main.o $(flite_LIBS_deps) -+flite_voice_list.c: - $(TOP)/tools/make_voice_list $(VOICES) -- rm -f flite_voice_list.o -- $(MAKE) flite_voice_list.o -- $(CC) $(CFLAGS) -o $@ flite_main.o flite_voice_list.o $(flite_LIBS_flags) $(LDFLAGS) -+ -+$(BINDIR)/flite$(EXEEXT): flite_main.o flite_voice_list.c $(flite_LIBS_deps) -+ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ flite_main.o flite_voice_list.c $(flite_LIBS_flags) $(LDFLAGS) - - $(BINDIR)/flite_time$(EXEEXT): flite_time_main.o $(flite_time_LIBS_deps) -@@ -98,15 +98,12 @@ - $(CC) $(CFLAGS) -o $@ compile_regexes.o $(FLITELIBFLAGS) $(LDFLAGS) - --each: -- @ for i in $(VOICES) ; \ -- do \ -- $(MAKE) VOICE=$$i $(BINDIR)/flite_$$i ; \ -- done -+each: ${VOICEEXES} -+ -+voice_list_%.c: $(TOP)/tools/make_voice_list -+ $(TOP)/tools/make_voice_list -o $@ - --$(BINDIR)/flite_${VOICE}: flite_main.o $(flite_LIBS_deps) -- $(TOP)/tools/make_voice_list $(VOICE) -- rm -f flite_voice_list.o -- $(MAKE) flite_voice_list.o -- $(CC) $(CFLAGS) -o $@ flite_main.o flite_voice_list.o $(flite_LIBS_flags) $(LDFLAGS) -+$(BINDIR)/flite_%: voice_list_%.c flite_main.o $(flite_LIBS_deps) -+ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ flite_main.o voice_list_$*.c \ -+ $(filter-out -lflite_cmu_%,${flite_LIBS_flags}) -lflite_$* $(LDFLAGS) - - install: Index: audio/flite/files/patch-shlib_deps =================================================================== --- audio/flite/files/patch-shlib_deps +++ /dev/null @@ -1,14 +0,0 @@ -Respect LDFLAGS in shared libraries -https://bugs.debian.org/577335 - ---- config/common_make_rules.orig 2009-07-30 14:52:56 UTC -+++ config/common_make_rules -@@ -123,7 +123,7 @@ $(LIBDIR)/%.so: $(LIBDIR)/%.shared.a - @ 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) -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os $(LDFLAGS)) - @ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_VERSION}` `basename $@.${PROJECT_SHLIB_VERSION}` ) - @ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_SHLIB_VERSION}` `basename $@` ) - @ rm -rf shared_os.$* Index: audio/flite/files/patch-single-exe =================================================================== --- audio/flite/files/patch-single-exe +++ /dev/null @@ -1,66 +0,0 @@ -This patch completely dispenses with building flite_VOICE executables -for each voice, replacing them all with symlinks to flite itself. - -The flite itself will now determine the desired voice -- if not -explicitly given on command-line -- based on the name of the invoked -program (argv[0]). - - -mi - ---- main/Makefile 2009-08-14 17:11:07.000000000 -0400 -+++ main/Makefile 2014-12-02 01:11:35.000000000 -0500 -@@ -116,3 +113,3 @@ - do \ -- $(INSTALL) $(BINDIR)/flite_$$i $(INSTALLBINDIR); \ -+ ln -s flite $(INSTALLBINDIR)/flite_$$i; \ - done -+++ main/flite_main.c 2014-12-02 01:05:49.000000000 -0500 -@@ -51,4 +51,18 @@ - void cst_alloc_debug_summary(); - -+/* Return 1 if the big string ends with the small one, 0 otherwise */ -+static int -+endsWith(const char *big, const char *small) -+{ -+ size_t biglen, smallen; -+ -+ biglen = strlen(big); -+ smallen = strlen(small); -+ -+ if (smallen > biglen) -+ return 0; -+ return strcmp(big + (biglen - smallen), small) == 0; -+} -+ - static void flite_version() - { -@@ -299,6 +313,27 @@ - - if (filename == NULL) filename = "-"; /* stdin */ -- if (desired_voice == 0) -- desired_voice = flite_voice_select(NULL); -+ if (desired_voice == NULL) { -+ cst_voice *voice; -+ const cst_val *val; -+ const cst_lexicon *lex; -+ -+ /* Try to find the voice based on the executable filename */ -+ for (val = flite_voice_list; val; val = val_cdr(val)) { -+ voice = val_voice(val_car(val)); -+ /* First check the name of the voice itself: */ -+ if (endsWith(argv[0], voice->name)) { -+ desired_voice = voice; -+ break; -+ } -+ /* Ok, check the name of the voice's lexicon: */ -+ lex = val_lexicon(feat_val(voice->features, "lexicon")); -+ if (endsWith(argv[0], lex->name)) { -+ desired_voice = voice; -+ break; -+ } -+ } -+ if (desired_voice == NULL) -+ desired_voice = flite_voice_select(NULL); -+ } - - v = desired_voice; Index: audio/flite/files/patch-src-audio-au_sun.c =================================================================== --- audio/flite/files/patch-src-audio-au_sun.c +++ /dev/null @@ -1,22 +0,0 @@ ---- src/audio/au_sun.c.orig -+++ src/audio/au_sun.c -@@ -45,6 +45,7 @@ - #include - #include - #include -+#include - #include - #include - #include "cst_string.h" -@@ -76,7 +77,11 @@ cst_audiodev *audio_open_sun(int sps, in - cst_error(); - } - } -+#ifdef __OpenBSD__ -+ AUDIO_INITINFO(&ainfo); -+#else - ioctl(fd,AUDIO_GETINFO,&ainfo); -+#endif - - switch (fmt) - { Index: audio/flite/files/patch-tools-funds_sts_main.c =================================================================== --- audio/flite/files/patch-tools-funds_sts_main.c +++ /dev/null @@ -1,16 +0,0 @@ -Tags: for-upstream - -The standard headers must be included before the behavior gets undefined -by the following macro definition. - ---- tools/find_sts_main.c.orig 2005-01-01 15:04:43.000000000 +0100 -+++ tools/find_sts_main.c 2007-01-21 04:36:17.750982588 +0100 -@@ -40,6 +40,8 @@ - #include - #include - #include -+#include -+#include - - /* To allow some normally const fields to manipulated during building */ - #define const Index: audio/flite/files/patch-warnings =================================================================== --- audio/flite/files/patch-warnings +++ /dev/null @@ -1,127 +0,0 @@ ---- src/audio/au_oss.c 2009-04-08 09:18:42.000000000 -0400 -+++ src/audio/au_oss.c 2014-11-30 13:21:50.000000000 -0500 -@@ -84,5 +84,5 @@ - ad->channels = channels; - ad->fmt = fmt; -- ad->platform_data = (void *)afd; -+ ad->platform_data = (void *)(intptr_t)afd; - - if (ad->channels == 0) ---- src/synth/cst_ssml.c 2009-05-01 10:52:13.000000000 -0400 -+++ src/synth/cst_ssml.c 2014-11-30 13:23:47.000000000 -0500 -@@ -57,41 +57,7 @@ - #include "cst_tokenstream.h" - --static const char *ssml_whitespacesymbols; - static const char *ssml_singlecharsymbols_general = "<>&/\";"; - static const char *ssml_singlecharsymbols_inattr = "=>;/\""; - --static void add_raw_data(cst_utterance *u, const char *raw_data, -- cst_features *attributes) --{ -- /* Add all tokens in raw _data to u */ -- cst_tokenstream *ts; -- cst_relation *r; -- cst_item *t; -- const char *token; -- -- r = utt_relation_create(u,"Token"); -- ts = -- ts_open_string(raw_data, -- get_param_string(u->features,"text_whitespace",NULL), -- get_param_string(u->features,"text_singlecharsymbols",NULL), -- get_param_string(u->features,"text_prepunctuation",NULL), -- get_param_string(u->features,"text_pospunctuation",NULL)); -- while (!(ts_eof(ts))) -- { -- t = relation_append(r,NULL); -- feat_copy_into(item_feats(t),attributes); -- token = ts_get(ts); -- if (cst_strlen(token) > 0) -- { -- t = relation_append(r,NULL); -- item_set_string(t,"name",token); -- item_set_string(t,"whitespace",ts->whitespace); -- item_set_string(t,"prepunctuation",ts->prepunctuation); -- item_set_string(t,"punc",ts->postpunctuation); -- } -- } -- --} -- - static const char *ts_get_quoted_remainder(cst_tokenstream *ts) - { -@@ -169,14 +135,4 @@ - } - --static void extend_buffer(char **buffer,int *buffer_max,int at_least) --{ -- int new_max; -- -- new_max = (*buffer_max)+at_least; -- cst_free(*buffer); -- *buffer = cst_alloc(char,new_max); -- *buffer_max = new_max; --} -- - static float flite_ssml_to_speech_ts(cst_tokenstream *ts, - cst_voice *voice, ---- include/cst_lexicon.h 2009-06-09 14:07:34.000000000 -0400 -+++ include/cst_lexicon.h 2014-11-30 13:26:51.000000000 -0500 -@@ -45,5 +45,5 @@ - - typedef struct lexicon_struct { -- char *name; -+ const char *name; - int num_entries; - /* Entries are centered around bytes with value 255 */ -@@ -51,5 +51,5 @@ - /* each are terminated (preceeded in pron case) by 0 */ - /* This saves 4 bytes per entry for an index */ -- unsigned char *data; /* the entries and phone strings */ -+ const unsigned char *data; /* the entries and phone strings */ - int num_bytes; /* the number of bytes in the data */ -- char **phone_table; -+ const char * const *phone_table; ---- src/lexicon/cst_lexicon.c 2009-08-24 12:35:51.000000000 -0400 -+++ src/lexicon/cst_lexicon.c 2014-11-30 13:31:33.000000000 -0500 -@@ -63,14 +63,4 @@ - } - --void delete_lexicon(cst_lexicon *lex) --{ /* But I doubt if this will ever be called, lexicons are mapped */ -- /* This probably isn't complete */ -- if (lex) -- { -- cst_free(lex->data); -- cst_free(lex); -- } --} -- - cst_val *cst_lex_load_addenda(const cst_lexicon *lex, const char *lexfile) - { /* Load an addend from given file, check its phones wrt lex */ -@@ -331,5 +321,5 @@ - { - int i,j=0,length; -- unsigned char *cword; -+ const unsigned char *cword; - - if (l->entry_hufftable == 0) ---- lang/cmulex/cmu_lex.c 2009-08-14 12:30:10.000000000 -0400 -+++ lang/cmulex/cmu_lex.c 2014-11-30 13:37:22.000000000 -0500 -@@ -360,5 +360,5 @@ - #endif - cmu_lex.num_bytes = cmu_lex_num_bytes; -- cmu_lex.phone_table = (char **) cmu_lex_phone_table; -+ cmu_lex.phone_table = cmu_lex_phone_table; - cmu_lex.syl_boundary = cmu_syl_boundary_mo; - cmu_lex.addenda = (char ***) addenda; ---- main/compile_regexes.c 2009-04-08 09:18:42.000000000 -0400 -+++ main/compile_regexes.c 2014-11-30 13:43:25.000000000 -0500 -@@ -75,5 +75,5 @@ - printf("NULL, "); - else -- printf("%s_rxprog + %d, ", name, rgx->regmust - rgx->program); -+ printf("%s_rxprog + %td, ", name, rgx->regmust - rgx->program); - printf("%d, ",rgx->regmlen); - printf("%d,\n ",rgx->regsize); Index: audio/flite/pkg-descr =================================================================== --- audio/flite/pkg-descr +++ audio/flite/pkg-descr @@ -1,11 +1,11 @@ -Flite is a small fast run-time speech synthesis engine. It is the +Flite is a small, fast run-time speech synthesis engine. It is the latest addition to the suite of free software synthesis tools -including University of Edinburgh's Festival Speech Synthesis System -and Carnegie Mellon University's FestVox project, tools, scripts and +including University of Edinburgh's Festival Speech Synthesis System, +Carnegie Mellon University's FestVox project, tools, scripts and documentation for building synthetic voices. However, flite itself -does not require either of these systems to compile and run. +does not require these systems to compile and run. Flite is the answer to the complaint that Festival is too big, too slow, and not portable enough. -WWW: http://cmuflite.org +WWW: http://www.festvox.org/flite/ Index: audio/flite/pkg-plist =================================================================== --- audio/flite/pkg-plist +++ audio/flite/pkg-plist @@ -1,3 +1,4 @@ +%%PORTDOCS%%%%DOCSDIR%%/README.md bin/flite bin/flite_cmu_time_awb bin/flite_cmu_us_awb @@ -48,39 +49,15 @@ include/flite/flite.h include/flite/flite_version.h lib/libflite.a -lib/libflite.so -lib/libflite.so.1 -lib/libflite.so.1.4 +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_time_awb.so -lib/libflite_cmu_time_awb.so.1 -lib/libflite_cmu_time_awb.so.1.4 lib/libflite_cmu_us_awb.a -lib/libflite_cmu_us_awb.so -lib/libflite_cmu_us_awb.so.1 -lib/libflite_cmu_us_awb.so.1.4 lib/libflite_cmu_us_kal.a -lib/libflite_cmu_us_kal.so -lib/libflite_cmu_us_kal.so.1 -lib/libflite_cmu_us_kal.so.1.4 lib/libflite_cmu_us_kal16.a -lib/libflite_cmu_us_kal16.so -lib/libflite_cmu_us_kal16.so.1 -lib/libflite_cmu_us_kal16.so.1.4 lib/libflite_cmu_us_rms.a -lib/libflite_cmu_us_rms.so -lib/libflite_cmu_us_rms.so.1 -lib/libflite_cmu_us_rms.so.1.4 lib/libflite_cmu_us_slt.a -lib/libflite_cmu_us_slt.so -lib/libflite_cmu_us_slt.so.1 -lib/libflite_cmu_us_slt.so.1.4 lib/libflite_cmulex.a -lib/libflite_cmulex.so -lib/libflite_cmulex.so.1 -lib/libflite_cmulex.so.1.4 lib/libflite_usenglish.a -lib/libflite_usenglish.so -lib/libflite_usenglish.so.1 -lib/libflite_usenglish.so.1.4 -%%PORTDOCS%%%%DOCSDIR%%/README