Index: head/textproc/irstlm/Makefile =================================================================== --- head/textproc/irstlm/Makefile (revision 366865) +++ head/textproc/irstlm/Makefile (revision 366866) @@ -1,26 +1,25 @@ # Created by: Dmitry Sivachenko # $FreeBSD$ PORTNAME= irstlm PORTVERSION= 5.80.03 PORTREVISION= 2 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-5.80 MAINTAINER= demon@FreeBSD.org COMMENT= The IRST Language Modeling Toolkit RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-shared USE_PERL5= run -USE_GCC= yes USE_AUTOTOOLS= libtoolize aclocal autoconf automake AUTOMAKE_ARGS= --add-missing USES= shebangfix libtool tar:tgz USE_LDCONFIG= yes SHEBANG_FILES= scripts/add-start-end.sh scripts/lm-stat.pl scripts/sort-lm.pl scripts/build-lm-qsub.sh scripts/mdtsel.sh scripts/split-dict.pl scripts/build-lm.sh scripts/merge-sublm.pl scripts/split-ngt.sh scripts/build-sublm.pl scripts/ngram-split.pl scripts/goograms2ngrams.pl scripts/rm-start-end.sh .include Index: head/textproc/irstlm/files/patch-src-interpolate-lm.cpp =================================================================== --- head/textproc/irstlm/files/patch-src-interpolate-lm.cpp (nonexistent) +++ head/textproc/irstlm/files/patch-src-interpolate-lm.cpp (revision 366866) @@ -0,0 +1,27 @@ +--- src/interpolate-lm.cpp.orig 2014-09-01 15:59:41.000000000 +0400 ++++ src/interpolate-lm.cpp 2014-09-01 16:00:21.000000000 +0400 +@@ -230,7 +230,7 @@ int main(int argc, char **argv) + //Learning mixture weights + if (learn) { + +- std::vector p[N]; //LM probabilities ++ std::vector *p = new std::vector[N]; //LM probabilities + float c[N]; //expected counts + float den,norm; //inner denominator, normalization term + float variation=1.0; // global variation between new old params +@@ -256,6 +256,7 @@ int main(int argc, char **argv) + lstream >> token >> id >> newlm; + if(id <= 0 || id > N) { + std::cerr << "LM id out of range." << std::endl; ++ delete[] p; + return 1; + } + id--; // count from 0 now +@@ -318,6 +319,7 @@ int main(int argc, char **argv) + outtxt << "LMINTERPOLATION " << N << "\n"; + for (int i=0; i