diff --git a/Fix_back-ends_that_want_a_NUL-terminated_string.patch b/Fix_back-ends_that_want_a_NUL-terminated_string.patch deleted file mode 100644 index 0bae505..0000000 --- a/Fix_back-ends_that_want_a_NUL-terminated_string.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 7e729f1fda553ad3e2dceb0d362f07e161a9615e Mon Sep 17 00:00:00 2001 -From: Reuben Thomas -Date: Thu, 15 Oct 2020 15:16:32 +0100 -Subject: [PATCH] Fix back-ends that want a NUL-terminated string (fix #259) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Voikko and Zemberek’s APIs assume a NUL-terminated string. Enchant does not -guarantee to provide one, so copy and NUL-terminate the provided string in -the check methods. ---- - providers/enchant_voikko.c | 12 ++++++++---- - providers/enchant_zemberek.cpp | 14 ++++++++++---- - 2 files changed, 18 insertions(+), 8 deletions(-) - -diff --git a/providers/enchant_voikko.c b/providers/enchant_voikko.c -index 4b82395..8c5cfa8 100644 ---- a/providers/enchant_voikko.c -+++ b/providers/enchant_voikko.c -@@ -48,9 +48,11 @@ - */ - - static int --voikko_dict_check (EnchantDict * me, const char *const word, size_t len _GL_UNUSED_PARAMETER) -+voikko_dict_check (EnchantDict * me, const char *const word, size_t len) - { -- int result = voikkoSpellCstr((struct VoikkoHandle *)me->user_data, word); -+ char *word_nul = strndup(word, len); -+ int result = voikkoSpellCstr((struct VoikkoHandle *)me->user_data, word_nul); -+ free(word_nul); - if (result == VOIKKO_SPELL_FAILED) - return 1; - else if (result == VOIKKO_SPELL_OK) -@@ -61,9 +63,11 @@ voikko_dict_check (EnchantDict * me, const char *const word, size_t len _GL_UNUS - - static char ** - voikko_dict_suggest (EnchantDict * me, const char *const word, -- size_t len _GL_UNUSED_PARAMETER, size_t * out_n_suggs) -+ size_t len, size_t * out_n_suggs) - { -- char **voikko_sugg_arr = voikkoSuggestCstr((struct VoikkoHandle *)me->user_data, word); -+ char *word_nul = strndup(word, len); -+ char **voikko_sugg_arr = voikkoSuggestCstr((struct VoikkoHandle *)me->user_data, word_nul); -+ free(word_nul); - if (voikko_sugg_arr == NULL) - return NULL; - for (*out_n_suggs = 0; voikko_sugg_arr[*out_n_suggs] != NULL; (*out_n_suggs)++); -diff --git a/providers/enchant_zemberek.cpp b/providers/enchant_zemberek.cpp -index 83a895a..49ddfd7 100644 ---- a/providers/enchant_zemberek.cpp -+++ b/providers/enchant_zemberek.cpp -@@ -142,18 +142,24 @@ extern "C" { - EnchantProvider *init_enchant_provider(void); - - static int --zemberek_dict_check (EnchantDict * me, const char *const word, size_t len _GL_UNUSED_PARAMETER) -+zemberek_dict_check (EnchantDict * me, const char *const word, size_t len) - { - Zemberek *checker = (Zemberek *) me->user_data; -- return checker->checkWord(word); -+ char *word_nul = g_strndup(word, len); -+ int result = checker->checkWord(word_nul); -+ free(word_nul); -+ return result; - } - - static char** - zemberek_dict_suggest (EnchantDict * me, const char *const word, -- size_t len _GL_UNUSED_PARAMETER, size_t * out_n_suggs) -+ size_t len, size_t * out_n_suggs) - { - Zemberek *checker = (Zemberek *) me->user_data; -- return checker->suggestWord (word, out_n_suggs); -+ char *word_nul = g_strndup(word, len); -+ char **result = checker->suggestWord(word_nul, out_n_suggs); -+ free(word_nul); -+ return result; - } - - static void diff --git a/enchant-2.2.15.tar.gz b/enchant-2.2.15.tar.gz new file mode 100644 index 0000000..228b1a4 --- /dev/null +++ b/enchant-2.2.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b0f2215578115f28e2a6aa549b35128600394304bd79d6f28b0d3b3d6f46c03 +size 990693 diff --git a/enchant-2.2.8.tar.gz b/enchant-2.2.8.tar.gz deleted file mode 100644 index 9329527..0000000 --- a/enchant-2.2.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c7b5e2853f0dd0b1aafea2f9e071941affeec3a76df8e3f6d67a718c89293555 -size 976715 diff --git a/enchant.changes b/enchant.changes index 71c78b3..b8dc335 100644 --- a/enchant.changes +++ b/enchant.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Tue Mar 16 20:59:06 UTC 2021 - Dirk Müller + +- Update to version 2.2.15: + + Specify that nuspell >= 4.1.0 is required. + + Fix some space leaks in the tests. + + The nuspell backend is updated for newer versions. + + Make the enchant program output its version to standard output, + not standard error. This may help some programs that use this + output. + + Fix a bug in the Voikko and Zemberek back-ends that could cause + spell checking and suggestion to fail. + + Make enchant silently ignore -B flag, for better Emacs + compatibility. + + Make enchant_broker_list_dicts sort the tags, so that + enchant-lsmod’s output is sorted. + + Minor build system improvement: don’t use -D_FORTIFY_SOURCE, + which can cause problems on Windows, and should be configured + by the compiler vendor if desired. + + Fix Hunspell backend to treat apostrophes as Hunspell does: if + either straight or curly apostrophe is a word character, allow + both. + + Fix a couple of space leaks in the Nuspell back end. +- Drop Fix_back-ends_that_want_a_NUL-terminated_string.patch: fixed + upstream. + ------------------------------------------------------------------- Thu Nov 5 17:11:26 UTC 2020 - Timo Jyrinki diff --git a/enchant.spec b/enchant.spec index 355bfa7..ddb0665 100644 --- a/enchant.spec +++ b/enchant.spec @@ -1,7 +1,7 @@ # # spec file for package enchant # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,15 +22,13 @@ %bcond_with nuspell %endif Name: enchant -Version: 2.2.8 +Version: 2.2.15 Release: 0 Summary: Generic Spell Checking Library License: LGPL-2.1-or-later URL: https://abiword.github.io/enchant/ Source: https://github.com/AbiWord/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz Source1: baselibs.conf -# PATCH-FIX-UPSTREAM Fix_back-ends_that_want_a_NUL-terminated_string.patch bsc#1178489 -- fix voikko backend in eg gspell -Patch0: Fix_back-ends_that_want_a_NUL-terminated_string.patch BuildRequires: aspell-devel BuildRequires: dbus-1-glib-devel BuildRequires: gcc-c++ @@ -39,7 +37,7 @@ BuildRequires: hunspell-devel BuildRequires: libvoikko-devel %if %{with nuspell} BuildRequires: libboost_headers-devel -BuildRequires: nuspell-devel +BuildRequires: nuspell-devel >= 4.1.0 %endif %description @@ -129,7 +127,6 @@ to develop applications that require these. %prep %setup -q -%patch0 -p1 %build %configure \