diff --git a/japanese/zinnia/Makefile b/japanese/zinnia/Makefile index 6eb5bcfa93e3..99b677574cde 100644 --- a/japanese/zinnia/Makefile +++ b/japanese/zinnia/Makefile @@ -1,31 +1,31 @@ PORTNAME= zinnia PORTVERSION= 0.06 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= japanese MASTER_SITES= SF MAINTAINER= beyert@cs.ucr.edu COMMENT= Simple, customizable, and portable online handwriting recognition system WWW= http://zinnia.sourceforge.net/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING USES= libtool GNU_CONFIGURE= yes USE_LDCONFIG= yes PORTDOCS= index-ja.html index.html OPTIONS_DEFINE= DOCS post-patch: @${REINPLACE_CMD} -e \ '/^pkgconfigdir/s!=.*!= ${PREFIX}/libdata/pkgconfig!' \ ${WRKSRC}/Makefile.in post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${STAGEDIR}${DOCSDIR} .include diff --git a/japanese/zinnia/files/patch-svm.cpp b/japanese/zinnia/files/patch-svm.cpp new file mode 100644 index 000000000000..d37a3003bab6 --- /dev/null +++ b/japanese/zinnia/files/patch-svm.cpp @@ -0,0 +1,24 @@ +--- svm.cpp.orig 2009-04-05 11:40:29 UTC ++++ svm.cpp +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include "feature.h" + + namespace zinnia { +@@ -44,10 +45,12 @@ bool svm_train(size_t l, + } + + static const size_t kMaxIteration = 2000; ++ std::random_device device; ++ std::mt19937 engine(device()); + for (size_t iter = 0; iter < kMaxIteration; ++iter) { + double PGmax_new = -kINF; + double PGmin_new = kINF; +- std::random_shuffle(index.begin(), index.begin() + active_size); ++ std::shuffle(index.begin(), index.begin() + active_size, engine); + + for (size_t s = 0; s < active_size; ++s) { + const size_t i = index[s];