[Midnightbsd-cvs] mports [19879] trunk/audio/flite/pkg-plist: fix build
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Aug 20 19:06:05 EDT 2015
Revision: 19879
http://svnweb.midnightbsd.org/mports/?rev=19879
Author: laffer1
Date: 2015-08-20 19:06:04 -0400 (Thu, 20 Aug 2015)
Log Message:
-----------
fix build
Modified Paths:
--------------
trunk/audio/flite/Makefile
trunk/audio/flite/files/patch-configure
trunk/audio/flite/files/patch-lang-cmulex-make_cmulex
trunk/audio/flite/files/patch-src-audio-au_sun.c
trunk/audio/flite/files/patch-tools-funds_sts_main.c
trunk/audio/flite/pkg-plist
Added Paths:
-----------
trunk/audio/flite/files/patch-parallel-build
trunk/audio/flite/files/patch-single-exe
trunk/audio/flite/files/patch-warnings
Property Changed:
----------------
trunk/audio/flite/files/patch-configure
trunk/audio/flite/files/patch-include::cst_sts.h
trunk/audio/flite/files/patch-lang-cmulex-make_cmulex
trunk/audio/flite/files/patch-src-audio-au_sun.c
trunk/audio/flite/files/patch-tools-funds_sts_main.c
Modified: trunk/audio/flite/Makefile
===================================================================
--- trunk/audio/flite/Makefile 2015-08-20 22:58:58 UTC (rev 19878)
+++ trunk/audio/flite/Makefile 2015-08-20 23:06:04 UTC (rev 19879)
@@ -2,7 +2,7 @@
PORTNAME= flite
PORTVERSION= 1.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://www.speech.cs.cmu.edu/flite/packed/${PORTNAME}-${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION}-release
@@ -16,20 +16,18 @@
OPTIONS_DEFINE= DOCS
-USES= gmake tar:bzip2
+USES= cpe gmake tar:bzip2
+CPE_VENDOR= cmu
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-shared=yes
USE_LDCONFIG= yes
-MAKE_JOBS_UNSAFE= yes
-
-CFLAGS:= ${CFLAGS:N-O:N-O[0123456789]} -O0
-
post-patch:
- @${REINPLACE_CMD} -e 's|-pd|-p|g' ${WRKSRC}/main/Makefile
+ @${REINPLACE_CMD} -e 's|-pd|-pR|g' ${WRKSRC}/main/Makefile
post-install:
- @${MKDIR} ${DOCSDIR}/
- ${INSTALL_MAN} ${WRKSRC}/README ${DOCSDIR}/
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+ ${STRIP_CMD} ${PREFIX}/bin/* ${PREFIX}/lib/*.so
.include <bsd.port.mk>
Modified: trunk/audio/flite/files/patch-configure
===================================================================
--- trunk/audio/flite/files/patch-configure 2015-08-20 22:58:58 UTC (rev 19878)
+++ trunk/audio/flite/files/patch-configure 2015-08-20 23:06:04 UTC (rev 19879)
@@ -1,6 +1,3 @@
-
-$FreeBSD$
-
--- configure.orig 2009-08-14 22:50:59.000000000 +0200
+++ configure 2010-09-09 15:07:27.000000000 +0200
@@ -4079,7 +4079,7 @@
Property changes on: trunk/audio/flite/files/patch-configure
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/audio/flite/files/patch-include::cst_sts.h
===================================================================
--- trunk/audio/flite/files/patch-include::cst_sts.h 2015-08-20 22:58:58 UTC (rev 19878)
+++ trunk/audio/flite/files/patch-include::cst_sts.h 2015-08-20 23:06:04 UTC (rev 19879)
Property changes on: trunk/audio/flite/files/patch-include::cst_sts.h
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Modified: trunk/audio/flite/files/patch-lang-cmulex-make_cmulex
===================================================================
--- trunk/audio/flite/files/patch-lang-cmulex-make_cmulex 2015-08-20 22:58:58 UTC (rev 19878)
+++ trunk/audio/flite/files/patch-lang-cmulex-make_cmulex 2015-08-20 23:06:04 UTC (rev 19879)
@@ -1,6 +1,3 @@
-
-$FreeBSD$
-
--- lang/cmulex/make_cmulex.orig
+++ lang/cmulex/make_cmulex
@@ -36,7 +36,7 @@
Property changes on: trunk/audio/flite/files/patch-lang-cmulex-make_cmulex
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Added: trunk/audio/flite/files/patch-parallel-build
===================================================================
--- trunk/audio/flite/files/patch-parallel-build (rev 0)
+++ trunk/audio/flite/files/patch-parallel-build 2015-08-20 23:06:04 UTC (rev 19879)
@@ -0,0 +1,155 @@
+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:
Property changes on: trunk/audio/flite/files/patch-parallel-build
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/audio/flite/files/patch-single-exe
===================================================================
--- trunk/audio/flite/files/patch-single-exe (rev 0)
+++ trunk/audio/flite/files/patch-single-exe 2015-08-20 23:06:04 UTC (rev 19879)
@@ -0,0 +1,66 @@
+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;
Property changes on: trunk/audio/flite/files/patch-single-exe
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/audio/flite/files/patch-src-audio-au_sun.c
===================================================================
--- trunk/audio/flite/files/patch-src-audio-au_sun.c 2015-08-20 22:58:58 UTC (rev 19878)
+++ trunk/audio/flite/files/patch-src-audio-au_sun.c 2015-08-20 23:06:04 UTC (rev 19879)
@@ -1,6 +1,3 @@
-
-$FreeBSD$
-
--- src/audio/au_sun.c.orig
+++ src/audio/au_sun.c
@@ -45,6 +45,7 @@
Property changes on: trunk/audio/flite/files/patch-src-audio-au_sun.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Modified: trunk/audio/flite/files/patch-tools-funds_sts_main.c
===================================================================
--- trunk/audio/flite/files/patch-tools-funds_sts_main.c 2015-08-20 22:58:58 UTC (rev 19878)
+++ trunk/audio/flite/files/patch-tools-funds_sts_main.c 2015-08-20 23:06:04 UTC (rev 19879)
@@ -1,6 +1,3 @@
-
-$FreeBSD$
-
Tags: for-upstream
The standard headers must be included before the behavior gets undefined
Property changes on: trunk/audio/flite/files/patch-tools-funds_sts_main.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Added: trunk/audio/flite/files/patch-warnings
===================================================================
--- trunk/audio/flite/files/patch-warnings (rev 0)
+++ trunk/audio/flite/files/patch-warnings 2015-08-20 23:06:04 UTC (rev 19879)
@@ -0,0 +1,127 @@
+--- 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);
Property changes on: trunk/audio/flite/files/patch-warnings
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/audio/flite/pkg-plist
===================================================================
--- trunk/audio/flite/pkg-plist 2015-08-20 22:58:58 UTC (rev 19878)
+++ trunk/audio/flite/pkg-plist 2015-08-20 23:06:04 UTC (rev 19879)
@@ -84,5 +84,3 @@
lib/libflite_usenglish.so.1
lib/libflite_usenglish.so.1.4
%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
- at dirrm include/flite
More information about the Midnightbsd-cvs
mailing list