From edbcd992e07a0bd964c801e63f7d4ae7e4914d27 Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Fri, 21 Feb 2014 16:57:58 +0000 Subject: [PATCH] - Fix build with clang [1] - Fix shebangs in perl scripts - Merge binaries stripping to one loop - Support staging PR: port/186655 [1] Submitted by: maintainer MFH: 2014Q1 --- audio/julius/Makefile | 58 +++++++++++++----------------------------- audio/julius/pkg-plist | 38 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 40 deletions(-) diff --git a/audio/julius/Makefile b/audio/julius/Makefile index a876eb39a7d4..e410d75d4750 100644 --- a/audio/julius/Makefile +++ b/audio/julius/Makefile @@ -3,6 +3,7 @@ PORTNAME= julius PORTVERSION= 4.1.2 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP} MASTER_SITE_SUBDIR= julius/37582 @@ -13,53 +14,30 @@ COMMENT= Large Vocabulary Continuous Speech Recognition Engine BUILD_DEPENDS= ja-p5-Jcode>=0:${PORTSDIR}/japanese/p5-Jcode RUN_DEPENDS= ja-p5-Jcode>=0:${PORTSDIR}/japanese/p5-Jcode -MANCOMPRESSED= no GNU_CONFIGURE= yes -USES= iconv -NO_STAGE= yes +USES= iconv perl5 shebangfix +SHEBANG_FILES= jclient-perl/jclient.pl +CONFIGURE_ENV= ac_cv_path_PERL=${PERL} CPPFLAGS+= -I${LOCALBASE}/include +CFLAGS+= -Wno-return-type LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB} -MANLANG= "" ja -MAN1= accept_check.1 \ - adinrec.1 \ - adintool.1 \ - dfa_determinize.1 \ - dfa_minimize.1 \ - generate-ngram.1 \ - generate.1 \ - gram2sapixml.pl.1 \ - jclient.pl.1 \ - jcontrol.1 \ - julius.1 \ - mkbingram.1 \ - mkbinhmm.1 \ - mkbinhmmlist.1 \ - mkdfa.pl.1 \ - mkgshmm.1 \ - mkss.1 \ - nextword.1 post-configure: - @${FIND} ${WRKSRC} -type f -name Makefile | ${XARGS} ${REINPLACE_CMD} -E -e "s|INSTALL=(\.\./)+|INSTALL=install -o root -g wheel|" - @${FIND} ${WRKSRC} -type f -name Makefile | ${XARGS} ${REINPLACE_CMD} -E -e "s|install -s|install|" - @${REINPLACE_CMD} -E -e "s|man1/ja|ja/man1|" ${WRKSRC}/man/Makefile + @${FIND} ${WRKSRC} -type f -name Makefile | ${XARGS} ${REINPLACE_CMD} -E \ + -e "s|INSTALL=(\.\./)+|INSTALL=install|" \ + -e "s|install -s|install|; s|-m 555|-m 755|g" \ + -e "s,\{(bin|lib|include|man)dir,\(DESTDIR\)$$&,g" \ + -e "/(INSTALL|install)/ s,\{exec_prefix,\(DESTDIR\)$$&,g" + @${REINPLACE_CMD} -E -e "s|man1/ja|ja/man1|" \ + -e "s| /usr/local| ${STAGEDIR}${PREFIX}|g" \ + ${WRKSRC}/man/Makefile post-install: - @${STRIP_CMD} ${PREFIX}/bin/accept_check - @${STRIP_CMD} ${PREFIX}/bin/adinrec - @${STRIP_CMD} ${PREFIX}/bin/adintool - @${STRIP_CMD} ${PREFIX}/bin/dfa_determinize - @${STRIP_CMD} ${PREFIX}/bin/dfa_minimize - @${STRIP_CMD} ${PREFIX}/bin/generate-ngram - @${STRIP_CMD} ${PREFIX}/bin/generate - @${STRIP_CMD} ${PREFIX}/bin/jcontrol - @${STRIP_CMD} ${PREFIX}/bin/julius - @${STRIP_CMD} ${PREFIX}/bin/mkbingram - @${STRIP_CMD} ${PREFIX}/bin/mkbinhmm - @${STRIP_CMD} ${PREFIX}/bin/mkbinhmmlist - @${STRIP_CMD} ${PREFIX}/bin/mkfa - @${STRIP_CMD} ${PREFIX}/bin/mkss - @${STRIP_CMD} ${PREFIX}/bin/nextword +.for file in accept_check adinrec adintool dfa_determinize dfa_minimize \ +generate-ngram generate jcontrol julius mkbingram mkbinhmm mkbinhmmlist mkfa \ +mkss nextword + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${file} +.endfor .include diff --git a/audio/julius/pkg-plist b/audio/julius/pkg-plist index 672fe8d6f3a9..d7f98b67306d 100644 --- a/audio/julius/pkg-plist +++ b/audio/julius/pkg-plist @@ -1,3 +1,4 @@ +@mode 555 bin/accept_check bin/adinrec bin/adintool @@ -20,6 +21,7 @@ bin/mkgshmm bin/mkss bin/nextword bin/yomi2voca.pl +@mode include/julius/acconfig.h include/julius/beam.h include/julius/callback.h @@ -59,5 +61,41 @@ include/sent/util.h include/sent/vocabulary.h lib/libjulius.a lib/libsent.a +man/ja/man1/accept_check.1.gz +man/ja/man1/adinrec.1.gz +man/ja/man1/adintool.1.gz +man/ja/man1/dfa_determinize.1.gz +man/ja/man1/dfa_minimize.1.gz +man/ja/man1/generate-ngram.1.gz +man/ja/man1/generate.1.gz +man/ja/man1/gram2sapixml.pl.1.gz +man/ja/man1/jclient.pl.1.gz +man/ja/man1/jcontrol.1.gz +man/ja/man1/julius.1.gz +man/ja/man1/mkbingram.1.gz +man/ja/man1/mkbinhmm.1.gz +man/ja/man1/mkbinhmmlist.1.gz +man/ja/man1/mkdfa.pl.1.gz +man/ja/man1/mkgshmm.1.gz +man/ja/man1/mkss.1.gz +man/ja/man1/nextword.1.gz +man/man1/accept_check.1.gz +man/man1/adinrec.1.gz +man/man1/adintool.1.gz +man/man1/dfa_determinize.1.gz +man/man1/dfa_minimize.1.gz +man/man1/generate-ngram.1.gz +man/man1/generate.1.gz +man/man1/gram2sapixml.pl.1.gz +man/man1/jclient.pl.1.gz +man/man1/jcontrol.1.gz +man/man1/julius.1.gz +man/man1/mkbingram.1.gz +man/man1/mkbinhmm.1.gz +man/man1/mkbinhmmlist.1.gz +man/man1/mkdfa.pl.1.gz +man/man1/mkgshmm.1.gz +man/man1/mkss.1.gz +man/man1/nextword.1.gz @dirrm include/julius @dirrm include/sent