[87339] trunk/dports/audio/julius

hum at macports.org hum at macports.org
Thu Nov 17 07:14:21 PST 2011


Revision: 87339
          http://trac.macports.org/changeset/87339
Author:   hum at macports.org
Date:     2011-11-17 07:14:18 -0800 (Thu, 17 Nov 2011)
Log Message:
-----------
julius: add patches to stop build if an error occurs and to use clang compiler; see #32069.

Modified Paths:
--------------
    trunk/dports/audio/julius/Portfile

Added Paths:
-----------
    trunk/dports/audio/julius/files/patch-Makefile.in.diff
    trunk/dports/audio/julius/files/patch-clang.diff

Modified: trunk/dports/audio/julius/Portfile
===================================================================
--- trunk/dports/audio/julius/Portfile	2011-11-17 15:02:17 UTC (rev 87338)
+++ trunk/dports/audio/julius/Portfile	2011-11-17 15:14:18 UTC (rev 87339)
@@ -5,7 +5,7 @@
 
 name                julius
 version             4.2
-revision            1
+revision            2
 categories          audio japanese
 platforms           darwin
 maintainers         hum openmaintainer
@@ -27,7 +27,9 @@
                     sha1    94b262d1682ec26a250aa294d10389663041040f \
                     rmd160  ac5aa9f514deabf357404ded261be67f8dcfd34e
 
-patchfiles          patch-configure.diff
+patchfiles          patch-configure.diff \
+                    patch-Makefile.in.diff \
+                    patch-clang.diff
 
 depends_lib         port:libiconv
 

Added: trunk/dports/audio/julius/files/patch-Makefile.in.diff
===================================================================
--- trunk/dports/audio/julius/files/patch-Makefile.in.diff	                        (rev 0)
+++ trunk/dports/audio/julius/files/patch-Makefile.in.diff	2011-11-17 15:14:18 UTC (rev 87339)
@@ -0,0 +1,79 @@
+--- Makefile.in.orig	2011-04-29 14:09:12.000000000 +0900
++++ Makefile.in	2011-11-17 23:34:49.000000000 +0900
+@@ -20,21 +20,21 @@
+ 
+ all:
+ 	for d in $(SUBDIRS); do \
+-	  (cd $$d; $(MAKE)); \
++	  (cd $$d; $(MAKE)) || exit 1; \
+ 	done
+ 
+ install:
+ 	for d in $(SUBDIRS); do \
+-	  (cd $$d; $(MAKE) install); \
++	  (cd $$d; $(MAKE) install) || exit 1; \
+ 	done
+ 
+ install.bin:
+ 	for d in $(SUBDIRS); do \
+-	  (cd $$d; $(MAKE) install.bin); \
++	  (cd $$d; $(MAKE) install.bin) || exit 1; \
+ 	done
+ 
+ install.man:
+-	(cd man; $(MAKE) install)
++	(cd man; $(MAKE) install) || exit 1
+ 
+ clean:
+ 	for d in $(SUBDIRS); do \
+@@ -54,7 +54,7 @@
+ 
+ configure:
+ 	for d in $(CONFIG_SUBDIRS); do \
+-	  (cd $$d; autoconf); \
++	  (cd $$d; autoconf) || exit 1; \
+ 	done
+ 
+ doxygen:
+--- gramtools/Makefile.in.orig	2011-04-29 14:09:13.000000000 +0900
++++ gramtools/Makefile.in	2011-11-17 23:35:55.000000000 +0900
+@@ -16,17 +16,17 @@
+ 
+ all:
+ 	for d in $(SUBDIRS); do \
+-	  (cd $$d; $(MAKE)); \
++	  (cd $$d; $(MAKE)) || exit 1; \
+ 	done
+ 
+ install:
+ 	for d in $(SUBDIRS); do \
+-	  (cd $$d; $(MAKE) install); \
++	  (cd $$d; $(MAKE) install) || exit 1; \
+ 	done
+ 
+ install.bin:
+ 	for d in $(SUBDIRS); do \
+-	  (cd $$d; $(MAKE) install.bin); \
++	  (cd $$d; $(MAKE) install.bin) || exit 1; \
+ 	done
+ 
+ clean:
+--- man/Makefile.in.orig	2011-04-29 14:09:20.000000000 +0900
++++ man/Makefile.in	2011-11-17 23:37:20.000000000 +0900
+@@ -21,14 +21,14 @@
+ install.man:
+ 	${INSTALL} -d @mandir@/man1
+ 	for f in *.1; do \
+-	  @INSTALL_DATA@ $$f @mandir@/man1/$$f; \
++	  @INSTALL_DATA@ $$f @mandir@/man1/$$f || exit 1; \
+ 	done
+ 
+ install.man.ja:
+ 	${INSTALL} -d @mandir@/ja/man1
+ 	cd ja;
+ 	for f in *.1; do \
+-	  @INSTALL_DATA@ $$f @mandir@/ja/man1/$$f; \
++	  @INSTALL_DATA@ $$f @mandir@/ja/man1/$$f || exit 1; \
+ 	done
+ 	cd ..
+ 

Added: trunk/dports/audio/julius/files/patch-clang.diff
===================================================================
--- trunk/dports/audio/julius/files/patch-clang.diff	                        (rev 0)
+++ trunk/dports/audio/julius/files/patch-clang.diff	2011-11-17 15:14:18 UTC (rev 87339)
@@ -0,0 +1,100 @@
+--- libsent/src/ngram/ngram_util.c.orig	2011-04-29 14:09:17.000000000 +0900
++++ libsent/src/ngram/ngram_util.c	2011-11-17 22:30:01.000000000 +0900
+@@ -96,7 +96,7 @@
+   }
+   fprintf(fp, "\t    wordset size = %d\n", ndata->max_word_num);
+   for(i=0;i<ndata->n;i++) {
+-    fprintf(fp, "\t  %d-gram entries = %10lu  (%5.1f MB)", i+1, ndata->d[i].totalnum, get_ngram_tuple_bytes(&(ndata->d[i])) / 1048576.0);
++    fprintf(fp, "\t  %d-gram entries = %10u  (%5.1f MB)", i+1, ndata->d[i].totalnum, get_ngram_tuple_bytes(&(ndata->d[i])) / 1048576.0);
+     if (ndata->d[i].bo_wt != NULL && ndata->d[i].totalnum != ndata->d[i].context_num) {
+       fprintf(fp, " (%d%% are valid contexts)", ndata->d[i].context_num * 100 / ndata->d[i].totalnum);
+     }
+@@ -104,7 +104,7 @@
+   }
+ 
+   if (ndata->bo_wt_1) {
+-    fprintf(fp, "\tLR 2-gram entries= %10lu  (%5.1f MB)\n", ndata->d[1].totalnum,
++    fprintf(fp, "\tLR 2-gram entries= %10u  (%5.1f MB)\n", ndata->d[1].totalnum,
+ 	    (sizeof(LOGPROB) * ndata->d[1].totalnum + sizeof(LOGPROB) * ndata->d[0].context_num) / 1048576.0);
+   }
+   fprintf(fp, "\t           pass1 = ");
+--- libsent/src/util/confout.c.orig	2011-04-29 14:09:17.000000000 +0900
++++ libsent/src/util/confout.c	2011-11-17 22:32:19.000000000 +0900
+@@ -91,7 +91,7 @@
+ #ifdef WORDS_INT
+   fprintf(strm, "    word id unit            : integer (%d bytes)\n", sizeof(WORD_ID));
+ #else
+-  fprintf(strm, "    word id unit            : short (%d bytes)\n", sizeof(WORD_ID));
++  fprintf(strm, "    word id unit            : short (%lu bytes)\n", sizeof(WORD_ID));
+ #endif
+ }
+ 
+--- libjulius/include/julius/jfunc.h.orig	2011-04-29 14:09:15.000000000 +0900
++++ libjulius/include/julius/jfunc.h	2011-11-17 23:46:45.000000000 +0900
+@@ -81,6 +81,8 @@
+ boolean j_process_activate_by_id(Recog *recog, int id);
+ 
+ boolean j_process_add_lm(Recog *recog, JCONF_LM *lmconf, JCONF_SEARCH *sconf, char *name);
++boolean j_process_remove(Recog *recog, JCONF_SEARCH *sconf);
++boolean j_process_lm_remove(Recog *recog, JCONF_LM *lmconf);
+ boolean j_remove_search(Recog *recog, JCONF_SEARCH *sconf);
+ boolean j_remove_lm(Recog *recog, JCONF_LM *lmconf);
+ boolean j_remove_am(Recog *recog, JCONF_AM *amconf);
+--- julius/main.c.orig	2011-04-29 14:09:14.000000000 +0900
++++ julius/main.c	2011-11-17 22:36:28.000000000 +0900
+@@ -194,7 +194,10 @@
+ 
+   /* initialize and standby the specified audio input source */
+   /* for microphone or other threaded input, ad-in thread starts here */
+-  if (j_adin_init(recog) == FALSE) return;
++  if (j_adin_init(recog) == FALSE) {
++    if (logfile) fclose(fp);
++    return -1;
++  }
+ 
+   /* output system information to log */
+   j_recog_info(recog);
+--- julius/record.c.orig	2011-04-29 14:09:14.000000000 +0900
++++ julius/record.c	2011-11-17 23:51:19.000000000 +0900
+@@ -242,7 +242,7 @@
+     return;
+   }
+   if (verbose_flag) {
+-    fprintf(stderr, "recorded to \"%s\" (%d bytes, %.2f sec.)\n", recordfilename, recordlen * sizeof(SP16), (float)recordlen / (float) recog->jconf->input.sfreq);
++    fprintf(stderr, "recorded to \"%s\" (%lu bytes, %.2f sec.)\n", recordfilename, recordlen * sizeof(SP16), (float)recordlen / (float) recog->jconf->input.sfreq);
+   }
+ }
+ 
+--- adinrec/adinrec.c.orig	2011-04-29 14:09:13.000000000 +0900
++++ adinrec/adinrec.c	2011-11-17 22:38:53.000000000 +0900
+@@ -141,7 +141,7 @@
+       return -1;
+     }
+     if (count < len * sizeof(SP16)) {
+-      fprintf(stderr, "adinrec: cannot write more %d bytes\ncurrent length = %d\n", count, speechlen * sizeof(SP16));
++      fprintf(stderr, "adinrec: cannot write more %d bytes\ncurrent length = %lu\n", count, speechlen * sizeof(SP16));
+       return -1;
+     }
+   } else {
+--- adintool/adintool.c.orig	2011-04-29 14:09:13.000000000 +0900
++++ adintool/adintool.c	2011-11-17 22:40:17.000000000 +0900
+@@ -578,7 +578,7 @@
+       return -1;
+     }
+     if (count < len * sizeof(SP16)) {
+-      fprintf(stderr, "adinrec: cannot write more %d bytes\ncurrent length = %d\n", count, speechlen * sizeof(SP16));
++      fprintf(stderr, "adinrec: cannot write more %d bytes\ncurrent length = %lu\n", count, speechlen * sizeof(SP16));
+       return -1;
+     }
+   } else {
+--- mkss/mkss.c.orig	2011-04-29 14:09:20.000000000 +0900
++++ mkss/mkss.c	2011-11-17 22:41:24.000000000 +0900
+@@ -190,7 +190,7 @@
+ 
+   /* close device */
+   adin_end(recog->adin);
+-  fprintf(stderr, "\n%d samples (%d bytes, %.1f sec) recorded\n", samples, samples * sizeof(SP16), (float)samples / (float)sfreq);
++  fprintf(stderr, "\n%d samples (%lu bytes, %.1f sec) recorded\n", samples, samples * sizeof(SP16), (float)samples / (float)sfreq);
+ 
+   /* compute SS */
+   fprintf(stderr, "compute SS:\n");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111117/41fd0579/attachment.html>


More information about the macports-changes mailing list