Accepting request 384048 from home:scarabeus_iv:branches:devel:libraries:c_c++
- Version update to 1.3.4: * Various updates to the buildsystem * Various werror bugfixes * Loads of coverity fixes - Add patch to build with grep 2.24: * hunspell-grep2.24.patch - Remove upstreamed patch: * hunspell-emacs-utf8.patch - Do not search for translations - broken automake from upstream * Not worth fixing only bit italian and mostly hungarian translations for cli anyway OBS-URL: https://build.opensuse.org/request/show/384048 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/hunspell?expand=0&rev=42
This commit is contained in:
parent
7d23558465
commit
4f3598d0fd
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a7b2c0de0e2ce17426821dc1ac8eb115029959b3ada9d80a81739fa19373246c
|
|
||||||
size 986081
|
|
@ -1,56 +0,0 @@
|
|||||||
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7781#31
|
|
||||||
--- src/tools/hunspell.cxx~0 2011-01-21 19:01:29.000000000 +0200
|
|
||||||
+++ src/tools/hunspell.cxx 2013-02-07 10:11:54.443610900 +0200
|
|
||||||
@@ -710,13 +748,22 @@ if (pos >= 0) {
|
|
||||||
fflush(stdout);
|
|
||||||
} else {
|
|
||||||
char ** wlst = NULL;
|
|
||||||
- int ns = pMS[d]->suggest(&wlst, token);
|
|
||||||
+ int byte_offset = parser->get_tokenpos() + pos;
|
|
||||||
+ int char_offset = 0;
|
|
||||||
+ if (strcmp(io_enc, "UTF-8") == 0) {
|
|
||||||
+ for (int i = 0; i < byte_offset; i++) {
|
|
||||||
+ if ((buf[i] & 0xc0) != 0x80)
|
|
||||||
+ char_offset++;
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ char_offset = byte_offset;
|
|
||||||
+ }
|
|
||||||
+ int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d]));
|
|
||||||
if (ns == 0) {
|
|
||||||
- fprintf(stdout,"# %s %d", token,
|
|
||||||
- parser->get_tokenpos() + pos);
|
|
||||||
+ fprintf(stdout,"# %s %d", token, char_offset);
|
|
||||||
} else {
|
|
||||||
fprintf(stdout,"& %s %d %d: ", token, ns,
|
|
||||||
- parser->get_tokenpos() + pos);
|
|
||||||
+ char_offset);
|
|
||||||
fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], io_enc));
|
|
||||||
}
|
|
||||||
for (int j = 1; j < ns; j++) {
|
|
||||||
@@ -745,13 +792,23 @@ if (pos >= 0) {
|
|
||||||
if (root) free(root);
|
|
||||||
} else {
|
|
||||||
char ** wlst = NULL;
|
|
||||||
+ int byte_offset = parser->get_tokenpos() + pos;
|
|
||||||
+ int char_offset = 0;
|
|
||||||
+ if (strcmp(io_enc, "UTF-8") == 0) {
|
|
||||||
+ for (int i = 0; i < byte_offset; i++) {
|
|
||||||
+ if ((buf[i] & 0xc0) != 0x80)
|
|
||||||
+ char_offset++;
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ char_offset = byte_offset;
|
|
||||||
+ }
|
|
||||||
int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d]));
|
|
||||||
if (ns == 0) {
|
|
||||||
fprintf(stdout,"# %s %d", chenc(token, io_enc, ui_enc),
|
|
||||||
- parser->get_tokenpos() + pos);
|
|
||||||
+ char_offset);
|
|
||||||
} else {
|
|
||||||
fprintf(stdout,"& %s %d %d: ", chenc(token, io_enc, ui_enc), ns,
|
|
||||||
- parser->get_tokenpos() + pos);
|
|
||||||
+ char_offset);
|
|
||||||
fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], ui_enc));
|
|
||||||
}
|
|
||||||
for (int j = 1; j < ns; j++) {
|
|
24
hunspell-grep2.24.patch
Normal file
24
hunspell-grep2.24.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From ded5b4c62c37084d216154e02e4d5e6efbd3ccfa Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= <rul@kalgan.cc>
|
||||||
|
Date: Wed, 9 Mar 2016 23:14:56 +0100
|
||||||
|
Subject: [PATCH] Fix FTBFS due new grep binary matching behavior
|
||||||
|
|
||||||
|
(cherry-picked from
|
||||||
|
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814968#16)
|
||||||
|
---
|
||||||
|
tests/test.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test.sh b/tests/test.sh
|
||||||
|
index c6755c6..f7e852f 100755
|
||||||
|
--- a/tests/test.sh
|
||||||
|
+++ b/tests/test.sh
|
||||||
|
@@ -136,7 +136,7 @@ check_valgrind_log "morphological analysis"
|
||||||
|
|
||||||
|
# Tests suggestions
|
||||||
|
if test -f $TESTDIR/$NAME.sug; then
|
||||||
|
- hunspell $* -a -d $TESTDIR/$NAME <$TESTDIR/$NAME.wrong | grep '^&' | \
|
||||||
|
+ hunspell $* -a -d $TESTDIR/$NAME <$TESTDIR/$NAME.wrong | grep -a '^&' | \
|
||||||
|
sed 's/^[^:]*: //' >$TEMPDIR/$NAME.sug
|
||||||
|
if ! cmp $TEMPDIR/$NAME.sug $TESTDIR/$NAME.sug >/dev/null; then
|
||||||
|
echo "============================================="
|
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 4 12:10:54 UTC 2016 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Version update to 1.3.4:
|
||||||
|
* Various updates to the buildsystem
|
||||||
|
* Various werror bugfixes
|
||||||
|
* Loads of coverity fixes
|
||||||
|
- Add patch to build with grep 2.24:
|
||||||
|
* hunspell-grep2.24.patch
|
||||||
|
- Remove upstreamed patch:
|
||||||
|
* hunspell-emacs-utf8.patch
|
||||||
|
- Do not search for translations - broken automake from upstream
|
||||||
|
* Not worth fixing only bit italian and mostly hungarian translations
|
||||||
|
for cli anyway
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 1 06:16:05 UTC 2014 - pgajdos@suse.com
|
Fri Aug 1 06:16:05 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package hunspell
|
# spec file for package hunspell
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -18,15 +18,15 @@
|
|||||||
|
|
||||||
%define ver 1.3
|
%define ver 1.3
|
||||||
Name: hunspell
|
Name: hunspell
|
||||||
Version: 1.3.3
|
Version: 1.3.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A spell checker and morphological analyzer library
|
Summary: A spell checker and morphological analyzer library
|
||||||
License: (GPL-2.0+ or LGPL-2.1+ or MPL-1.1+) and LGPL-2.1+
|
License: (GPL-2.0+ or LGPL-2.1+ or MPL-1.1+) and LGPL-2.1+
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Url: http://hunspell.sourceforge.net/
|
Url: https://github.com/hunspell/hunspell
|
||||||
Source0: http://downloads.sourceforge.net/project/%{name}/Hunspell/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
Patch0: hunspell-emacs-utf8.patch
|
Patch0: hunspell-grep2.24.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -66,11 +66,12 @@ Includes and definitions for developing with hunspell.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -vi
|
autoreconf -fvi
|
||||||
%configure \
|
%configure \
|
||||||
|
--disable-silent-rules \
|
||||||
--enable-nls \
|
--enable-nls \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--disable-rpath \
|
--disable-rpath \
|
||||||
@ -84,16 +85,14 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
rm -f %{buildroot}%{_bindir}/example
|
rm -f %{buildroot}%{_bindir}/example
|
||||||
install -m 644 src/tools/{,un}munch.h %{buildroot}%{_includedir}
|
install -m 644 src/tools/{,un}munch.h %{buildroot}%{_includedir}
|
||||||
ln -sf %{_libdir}/libhunspell-%{ver}.so.0.0.0 %{buildroot}%{_libdir}/libhunspell.so
|
ln -sf %{_libdir}/libhunspell-%{ver}.so.0.0.0 %{buildroot}%{_libdir}/libhunspell.so
|
||||||
%find_lang %{name}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check %{?_smp_mflags}
|
make check %{?_smp_mflags}
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%files
|
||||||
|
|
||||||
%files -f %{name}.lang
|
|
||||||
%defattr(644,root,root,755)
|
%defattr(644,root,root,755)
|
||||||
%doc README README.myspell AUTHORS AUTHORS.myspell COPYING THANKS license.hunspell license.myspell
|
%doc README README.myspell AUTHORS AUTHORS.myspell COPYING THANKS license.hunspell license.myspell
|
||||||
%attr(755,root,root) %{_bindir}/hunspell
|
%attr(755,root,root) %{_bindir}/hunspell
|
||||||
|
3
v1.3.4.tar.gz
Normal file
3
v1.3.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:55918522cb0041748507dd4f5aa92d043cef337aa589b9367c2221da084281ac
|
||||||
|
size 1004935
|
Loading…
Reference in New Issue
Block a user