rebuilt by autoport with build requirements: liblink-grammar-devel>=5.3.3-2mamba [release 3.0.1-2mamba;Fri Mar 11 2016]

This commit is contained in:
Silvan Calarco 2024-01-05 20:08:01 +01:00
parent 6c1982ce34
commit 52297417e2
5 changed files with 130 additions and 2 deletions

View File

@ -0,0 +1,35 @@
--- abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp.orig 2014-06-30 08:21:30.000000000 -0500
+++ abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp 2014-06-30 08:27:01.000000000 -0500
@@ -220,6 +220,7 @@ bool LinkGrammarWrap::parseSentence(Piec
pErr = NULL;
}
+#ifdef DEAD_DEBUG_CODE
// for(i=0; i< pT->m_vecGrammarErrors.getItemCount(); i++)
// {
// pErr = pT->m_vecGrammarErrors.getNthItem(i);
@@ -227,15 +228,10 @@ 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++)
@@ -252,6 +248,8 @@ bool LinkGrammarWrap::parseSentence(Piec
}
}
linkage_delete(linkage);
+#endif // DEAD_DEBUG_CODE
+
for(i=0; i< vecMapOfWords.getItemCount(); i++)
{
AbiGrammarError * p = vecMapOfWords.getNthItem(i);

View File

@ -0,0 +1,20 @@
--- abiword/trunk/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp 2014/06/30 13:48:28 34627
+++ abiword/trunk/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp 2015/09/09 14:14:20 35098
@@ -39,6 +39,7 @@
*/
/********************************************************************************/
+#include "config.h"
#include "xap_App.h"
#include "ut_locale.h"
#include "ut_string_class.h"
@@ -87,7 +88,9 @@
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);
+#ifndef HAVE_LINK_GRAMMAR_51
parse_options_set_panic_mode(m_Opts, TRUE);
+#endif
parse_options_reset_resources(m_Opts);
UT_sint32 num_linkages = sentence_parse(sent, m_Opts);
bool res = (num_linkages >= 1);

View File

@ -0,0 +1,13 @@
--- abiword/trunk/plugins/grammar/plugin.m4 2010/05/25 10:09:01 28902
+++ abiword/trunk/plugins/grammar/plugin.m4 2015/09/09 14:14:20 35098
@@ -22,6 +22,10 @@
fi
PKG_CHECK_MODULES(GRAMMAR,[ $grammar_pkgs ])
+PKG_CHECK_EXISTS([ link-grammar >= 5.1.0 ],
+[
+ AC_DEFINE([HAVE_LINK_GRAMMAR_51],[1],["have link-grammar 5.1.0 or later"])
+])
test "$enable_grammar" = "auto" && PLUGINS="$PLUGINS grammar"

View File

@ -0,0 +1,45 @@
--- abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp.orig 2014-06-29 14:50:30.000000000 -0500
+++ abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp 2014-06-29 14:55:39.000000000 -0500
@@ -145,12 +145,11 @@ 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)
{
@@ -167,7 +166,7 @@ bool LinkGrammarWrap::parseSentence(Piec
}
pErr = new AbiGrammarError();
}
- iHigh = iLow + strlen(sentence_get_nth_word(sent, 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)
@@ -188,7 +187,7 @@ bool LinkGrammarWrap::parseSentence(Piec
//
// Expand the sqiggle
//
- iHigh = iLow + strlen(sentence_get_nth_word(sent, i)) + iOff;
+ iHigh = iLow + strlen(linkage_get_word(linkage, i)) + iOff;
pErr->m_iErrHigh = iHigh;
if(pErr->m_iErrHigh < totlen-1)
{
@@ -196,8 +195,7 @@ bool LinkGrammarWrap::parseSentence(Piec
}
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.

View File

@ -2,7 +2,7 @@
Name: abiword
Version: 3.0.1
Release: 1mamba
Release: 2mamba
Summary: A free word processing program
Group: Graphical Desktop/Applications/Office
Vendor: openmamba
@ -19,6 +19,10 @@ Patch1: abiword-2.8.6-gcc-4.7.patch
Patch2: abiword-2.8.6-libwpd-0.9.patch
Patch3: abiword-2.8.6-libpng-1.5.patch
Patch4: abiword-2.8.6-no-undefined.patch
Patch5: abiword-3.0.1-link-grammar-5.patch
Patch6: abiword-3.0.1-link-grammar-5-2.patch
Patch7: abiword-3.0.1-link-grammar-5-3.patch
Patch8: abiword-3.0.1-link-grammar-5-4.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -85,6 +89,7 @@ BuildRequires: libyajl-devel
BuildRequires: libz-devel
BuildRequires: telepathy-glib-devel
## AUTOBUILDREQ-END
BuildRequires: liblink-grammar-devel >= 5.3.3-2mamba
BuildRequires: aspell-devel >= 0.60.2
BuildRequires: desktop-file-utils >= 0.10
BuildRequires: libots >= 0.4.2
@ -112,6 +117,8 @@ This package provides files needed for development.
%prep
%setup -q %{name}-%{version} -a1
#-D -T
#:<< _EOF
#-D -T
# -a2 -a3
#cd abiword-extras-%{version}
#%patch0 -p1
@ -120,6 +127,10 @@ This package provides files needed for development.
#%patch2 -p0
#%patch3 -p1
#%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p2
%patch8 -p2
%build
#:<< _EOF
@ -132,7 +143,8 @@ autoreconf --force --install
--enable-libabiword \
--enable-shared \
--without-evolution-data-server \
--enable-plugins
--enable-plugins \
GRAMMAR_CFLAGS="-DHAVE_LINK_GRAMMAR_51"
# FIXME: enable-libabiword does not work with 2.6.0, check again with later releases
# --enable-libabiword \
@ -208,6 +220,9 @@ install -D -m644 %{S:4} \
%{_libdir}/pkgconfig/abiword-%{majversion}.pc
%changelog
* Fri Mar 11 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0.1-2mamba
- rebuilt by autoport with build requirements: liblink-grammar-devel>=5.3.3-2mamba
* Sat Jan 17 2015 Automatic Build System <autodist@mambasoft.it> 3.0.1-1mamba
- automatic version update by autodist