summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authornros <nros>2015-09-21 11:28:45 +0000
committernros <nros>2015-09-21 11:28:45 +0000
commit96b871e5d8cb119c0210e4b63ee4faaf544da36e (patch)
tree2397515ca8d3270a03e189c41205dbe552530e8d /editors
parent5aa6b7bf70257071b4e469d4238c2077dd8e2c3a (diff)
downloadpkgsrc-96b871e5d8cb119c0210e4b63ee4faaf544da36e.tar.gz
Add patch that wasn't included in the import to pkgsrc-current to fix
pkg/50258, requested by wiz.
Diffstat (limited to 'editors')
-rw-r--r--editors/abiword/Makefile4
-rw-r--r--editors/abiword/distinfo3
-rw-r--r--editors/abiword/patches/patch-plugins_grammar_linkgrammarwrap_LinkGrammarWrap.cpp150
3 files changed, 154 insertions, 3 deletions
diff --git a/editors/abiword/Makefile b/editors/abiword/Makefile
index 3dc21d01143..1b03479846b 100644
--- a/editors/abiword/Makefile
+++ b/editors/abiword/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.155 2015/09/13 21:32:12 nros Exp $
+# $NetBSD: Makefile,v 1.156 2015/09/21 11:28:45 nros Exp $
.include "Makefile.common"
DISTNAME= abiword-${ABIVERSION}
@@ -21,7 +21,7 @@ CONFIGURE_ARGS+= --disable-default-plugins #do not build any plugins by default
CONFIGURE_ARGS+= --enable-spell # (Gtk+ only) include spell checking support
CONFIGURE_ARGS+= --enable-plugins=""
# evolution data server can't be found even if buildlinked
-# disable to make usre it's not found somewhere else
+# disable to make sure it's not found somewhere else
CONFIGURE_ARGS+= --with-evolution-data-server=no
diff --git a/editors/abiword/distinfo b/editors/abiword/distinfo
index ad7868a03b8..3265acb37c7 100644
--- a/editors/abiword/distinfo
+++ b/editors/abiword/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.65 2015/09/13 21:32:13 nros Exp $
+$NetBSD: distinfo,v 1.66 2015/09/21 11:28:45 nros Exp $
SHA1 (abiword-3.0.1.tar.gz) = 7badf9663564a144e16764a456cadda18df70991
RMD160 (abiword-3.0.1.tar.gz) = 05d92a7304e4e419776970d7b35065ceb59f7681
@@ -25,6 +25,7 @@ SHA1 (patch-plugins_gimp_xp_AbiGimp.cpp) = 15692cf15fd4099e7ad4ad854b6b57b103717
SHA1 (patch-plugins_goffice_Makefile.am) = 935af789858b3fbf3b928837acca024a1415bf86
SHA1 (patch-plugins_google_Makefile.am) = ae883071f847b641ded349e5cb2ac3c126942d8d
SHA1 (patch-plugins_grammar_Makefile.am) = 0c651d09ae690a22ce70f93fd091ceabb18a44d0
+SHA1 (patch-plugins_grammar_linkgrammarwrap_LinkGrammarWrap.cpp) = f3916dbc0b208bfe9dbb55eac850a3094683694c
SHA1 (patch-plugins_hancom_Makefile.am) = 93e6b69160438a254a6c68b81a6385456d328999
SHA1 (patch-plugins_hrtext_Makefile.am) = 439ecd0ac09b147c5a789bfb498e5da866d0cb59
SHA1 (patch-plugins_iscii_Makefile.am) = ff740a1d6e308658d18c0102a67fa8c3f32cf95b
diff --git a/editors/abiword/patches/patch-plugins_grammar_linkgrammarwrap_LinkGrammarWrap.cpp b/editors/abiword/patches/patch-plugins_grammar_linkgrammarwrap_LinkGrammarWrap.cpp
new file mode 100644
index 00000000000..95f74d947f2
--- /dev/null
+++ b/editors/abiword/patches/patch-plugins_grammar_linkgrammarwrap_LinkGrammarWrap.cpp
@@ -0,0 +1,150 @@
+$NetBSD: patch-plugins_grammar_linkgrammarwrap_LinkGrammarWrap.cpp,v 1.1 2015/09/21 11:28:45 nros Exp $
+
+First chunk:
+Remove obsolete function call, see
+http://bugzilla.abisource.com/show_bug.cgi?id=13726
+
+Other chunks:
+Fix build with link-grammar-5.2.5.
+http://www.abisource.com/viewvc/abiword/trunk/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp?r1=32836&r2=34627
+
+--- plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp.orig 2013-04-07 13:53:03.000000000 +0000
++++ plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp
+@@ -87,7 +87,7 @@ bool LinkGrammarWrap::parseSentence(Piec
+ parse_options_set_min_null_count(m_Opts, 0);
+ parse_options_set_max_null_count(m_Opts, 0);
+ parse_options_set_islands_ok(m_Opts, 0);
+- parse_options_set_panic_mode(m_Opts, TRUE);
++ //parse_options_set_panic_mode(m_Opts, TRUE);
+ parse_options_reset_resources(m_Opts);
+ UT_sint32 num_linkages = sentence_parse(sent, m_Opts);
+ bool res = (num_linkages >= 1);
+@@ -145,59 +145,57 @@ bool LinkGrammarWrap::parseSentence(Piec
+ }
+ AbiGrammarError * pWordMap = new AbiGrammarError();
+ pWordMap->m_iErrLow = iLow;
+- pWordMap->m_iErrHigh = iLow + strlen(sentence_get_nth_word(sent, i));
++ pWordMap->m_iErrHigh = iLow + strlen(linkage_get_word(linkage, i));
+ pWordMap->m_iWordNum = i;
+ vecMapOfWords.addItem(pWordMap);
+ bool bNew = false;
+- if(!sentence_nth_word_has_disjunction(sent, i))
++
++ //UT_DEBUGMSG(("|%s| NULL LINK\n",sent->word[i].string));
++ if(pErr == NULL)
++ {
++ pErr = new AbiGrammarError();
++ bNew = true;
++ }
++ if(bNew || (pErr->m_iWordNum + 1 < i))
+ {
+- //UT_DEBUGMSG(("|%s| NULL LINK\n",sent->word[i].string));
+- if(pErr == NULL)
++ if(!bNew)
+ {
+- pErr = new AbiGrammarError();
+- bNew = true;
++ if(pErr)
++ {
++ delete pErr;
++ }
++ pErr = new AbiGrammarError();
+ }
+- if(bNew || (pErr->m_iWordNum + 1 < i))
++ iHigh = iLow + strlen(linkage_get_word(linkage, i));
++ pErr->m_iErrLow = iLow + iOff -1;
++ pErr->m_iErrHigh = iHigh + iOff -1;
++ if(pErr->m_iErrLow < 0)
++ {
++ pErr->m_iErrLow = 0;
++ }
++ if(pErr->m_iErrHigh < totlen-1)
+ {
+- if(!bNew)
+- {
+- if(pErr)
+- {
+- delete pErr;
+- }
+- pErr = new AbiGrammarError();
+- }
+- iHigh = iLow + strlen(sentence_get_nth_word(sent, i));
+- pErr->m_iErrLow = iLow + iOff -1;
+- pErr->m_iErrHigh = iHigh + iOff -1;
+- if(pErr->m_iErrLow < 0)
+- {
+- pErr->m_iErrLow = 0;
+- }
+- if(pErr->m_iErrHigh < totlen-1)
+- {
+ pErr->m_iErrHigh += 1;
+- }
+- pErr->m_iWordNum = i;
+- // UT_DEBUGMSG(("Add Error %x low %d High %d\n",pErr,pErr->m_iErrLow,pErr->m_iErrHigh));
+- pT->m_vecGrammarErrors.addItem(pErr);
+- pErr = NULL;
+ }
+- else
++ pErr->m_iWordNum = i;
++ // UT_DEBUGMSG(("Add Error %x low %d High %d\n",pErr,pErr->m_iErrLow,pErr->m_iErrHigh));
++ pT->m_vecGrammarErrors.addItem(pErr);
++ pErr = NULL;
++ }
++ else
++ {
++ //
++ // Expand the sqiggle
++ //
++ iHigh = iLow + strlen(linkage_get_word(linkage, i)) + iOff;
++ pErr->m_iErrHigh = iHigh;
++ if(pErr->m_iErrHigh < totlen-1)
+ {
+- //
+- // Expand the sqiggle
+- //
+- iHigh = iLow + strlen(sentence_get_nth_word(sent, i)) + iOff;
+- pErr->m_iErrHigh = iHigh;
+- if(pErr->m_iErrHigh < totlen-1)
+- {
+ pErr->m_iErrHigh += 1;
+- }
+- pErr->m_iWordNum = i;
+ }
++ pErr->m_iWordNum = i;
+ }
+- iLow += strlen(sentence_get_nth_word(sent, i));
++ iLow += strlen(linkage_get_word(linkage, i));
+ }
+ //
+ // No NULL links but still an error , mark the whole sentence bad.
+@@ -229,30 +227,6 @@ bool LinkGrammarWrap::parseSentence(Piec
+ // }
+ UT_UTF8String sErr = linkage_get_violation_name(linkage);
+ // UT_DEBUGMSG(("Top Level error message |%s|\n",sErr.utf8_str()));
+- UT_sint32 count = linkage_get_num_sublinkages(linkage);
+- //
+- // Find linkages with violations
+- //
+- for(i=0; i<count;i++)
+- {
+- UT_sint32 iok = linkage_set_current_sublinkage(linkage, i);
+- if(iok == 0)
+- continue;
+- UT_sint32 j = 0;
+- UT_sint32 iNum = linkage_get_num_links(linkage);
+- for(j=0;j< iNum;j++)
+- // char * szViolation = linkage_get_violation_name(linkage);
+- //if(szViolation != NULL)
+- {
+- // debug disabled
+- //UT_sint32 iLword = linkage_get_link_lword(linkage,j);
+- //const char * szLword = linkage_get_word(linkage,iLword);
+- //UT_sint32 iRword = linkage_get_link_rword(linkage,j);
+- //const char * szRword = linkage_get_word(linkage,iRword);
+- //UT_DEBUGMSG(("Link %d |%s| and |%s|\n",i,szLword,szRword));
+- //UT_DEBUGMSG(("Left Word num %d Right Word num %d\n",iLword,iRword));
+- }
+- }
+ linkage_delete(linkage);
+ for(i=0; i< vecMapOfWords.getItemCount(); i++)
+ {