diff --git a/textproc/stardict3/Makefile b/textproc/stardict3/Makefile index 499c7df7d20e..ca7790e6538a 100644 --- a/textproc/stardict3/Makefile +++ b/textproc/stardict3/Makefile @@ -1,45 +1,45 @@ PORTNAME= stardict PORTVERSION= 3.0.6 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= textproc MASTER_SITES= SF/stardict-4/${PORTVERSION} DIST_SUBDIR= stardict MAINTAINER= makc@FreeBSD.org COMMENT= Dictionary lookup program written in Gtk2 WWW= http://www.stardict.org LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libsigc-2.0.so:devel/libsigc++20 \ libenchant.so:textproc/enchant RUN_DEPENDS= xdg-open:devel/xdg-utils GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share CONFIGURE_ARGS= --disable-festival \ --disable-gucharmap \ --disable-espeak \ --disable-tools \ --disable-updateinfo \ --disable-advertisement \ --disable-gnome-support \ --disable-schemas-install \ --disable-scrollkeeper USES= compiler:c++11-lang gettext gmake gnome libtool localbase \ pathfix pkgconfig tar:bzip2 USE_CXXSTD= c++11 USE_GNOME= intltool gtk20 post-patch: @${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,g' \ ${WRKSRC}/dict/src/conf.cpp @${REINPLACE_CMD} \ -e '/as_fn_error.*gnome-doc-utils/d' \ -e '/DEP_MODULES=/s/"$$/ gmodule-2.0"/' \ ${WRKSRC}/dict/configure ${REINPLACE_CMD} -e '/^SUBDIRS/s,help,,' ${WRKSRC}/dict/Makefile.in .include diff --git a/textproc/stardict3/files/patch-dict__src__lib__stddict.cpp b/textproc/stardict3/files/patch-dict__src__lib__stddict.cpp index 8705daeefa1e..5579dcb04c15 100644 --- a/textproc/stardict3/files/patch-dict__src__lib__stddict.cpp +++ b/textproc/stardict3/files/patch-dict__src__lib__stddict.cpp @@ -1,10 +1,44 @@ ---- ./dict/src/lib/stddict.cpp.orig 2012-02-17 08:58:47.000000000 +0000 -+++ ./dict/src/lib/stddict.cpp 2013-10-09 16:16:36.938640507 +0000 +--- dict/src/lib/stddict.cpp.orig 2014-06-23 01:27:19 UTC ++++ dict/src/lib/stddict.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include - + +@@ -2532,12 +2533,12 @@ bool Libs::LookupSynonymSimilarWord(const gchar* sWord + } + // Upper the first character and lower others. + if (!bFound) { +- gchar *nextchar = g_utf8_next_char(sWord); ++ const gchar *nextchar = g_utf8_next_char(sWord); + gchar *firstchar = g_utf8_strup(sWord, nextchar - sWord); +- nextchar = g_utf8_strdown(nextchar, -1); +- casestr = g_strdup_printf("%s%s", firstchar, nextchar); ++ gchar *nextDownchar = g_utf8_strdown(nextchar, -1); ++ casestr = g_strdup_printf("%s%s", firstchar, nextDownchar); + g_free(firstchar); +- g_free(nextchar); ++ g_free(nextDownchar); + if (strcmp(casestr, sWord)) { + bLookup = oLib[iLib]->LookupSynonym(casestr, iIndex, iIndex_suggest, CollationLevel, servercollatefunc); + if(bLookup) +@@ -2642,12 +2643,12 @@ bool Libs::LookupSimilarWord(const gchar* sWord, glong + } + // Upper the first character and lower others. + if (!bFound) { +- gchar *nextchar = g_utf8_next_char(sWord); ++ const gchar *nextchar = g_utf8_next_char(sWord); + gchar *firstchar = g_utf8_strup(sWord, nextchar - sWord); +- nextchar = g_utf8_strdown(nextchar, -1); +- casestr = g_strdup_printf("%s%s", firstchar, nextchar); ++ gchar *nextDownchar = g_utf8_strdown(nextchar, -1); ++ casestr = g_strdup_printf("%s%s", firstchar, nextDownchar); + g_free(firstchar); +- g_free(nextchar); ++ g_free(nextDownchar); + if (strcmp(casestr, sWord)) { + if(LookupSimilarWordTryWord(casestr, sWord, servercollatefunc, iLib, iIndex, idx_suggest, best_match)) + bFound=true;