diff --git a/hunspell-disable-fortify.patch b/hunspell-disable-fortify.patch new file mode 100644 index 0000000..15ff2a1 --- /dev/null +++ b/hunspell-disable-fortify.patch @@ -0,0 +1,7 @@ +--- src/hunspell/hashmgr.cxx ++++ src/hunspell/hashmgr.cxx +@@ -1,3 +1,4 @@ ++#undef _FORTIFY_SOURCE /* bad use of char word; at the end of struct hentry -Marcus */ + #include "license.hunspell" + #include "license.myspell" + diff --git a/hunspell-fix-format.patch b/hunspell-fix-format.patch new file mode 100644 index 0000000..f262bc9 --- /dev/null +++ b/hunspell-fix-format.patch @@ -0,0 +1,20 @@ +--- src/hunspell/affixmgr.cxx ++++ src/hunspell/affixmgr.cxx +@@ -4276,7 +4276,7 @@ + if (strip[i] == cond[j]) in = 1; + } while ((j < (condl - 1)) && (cond[j] != ']')); + if (j == (condl - 1) && (cond[j] != ']')) { +- HUNSPELL_WARNING(stderr, "error: line %d: missing ] in condition:\n%s\n", linenum); ++ HUNSPELL_WARNING(stderr, "error: line %d: missing ] in condition:\n%s\n", linenum, cond); + return 0; + } + if ((!neg && !in) || (neg && in)) { +@@ -4304,7 +4304,7 @@ + if (strip[i] == cond[j]) in = 1; + } while ((j > 0) && (cond[j] != '[')); + if ((j == 0) && (cond[j] != '[')) { +- HUNSPELL_WARNING(stderr, "error: error: %d: missing ] in condition:\n%s\n", linenum); ++ HUNSPELL_WARNING(stderr, "error: error: %d: missing ] in condition:\n%s\n", linenum, cond); + return 0; + } + neg = (cond[j+1] == '^') ? 1 : 0; diff --git a/hunspell.changes b/hunspell.changes index 91d634a..88fc774 100644 --- a/hunspell.changes +++ b/hunspell.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Feb 22 14:02:48 CET 2010 - meissner@suse.de + +- disable FORTIFY_SOURCE, as HashMgr::add_word() and struct hentry + with "char word;" at the end is not going to work out. +- run "make check" to spot such problems earlier +- added missing format arguments + ------------------------------------------------------------------- Thu Dec 17 21:03:18 CET 2009 - jengelh@medozas.de diff --git a/hunspell.spec b/hunspell.spec index 5fd4644..c8fde22 100644 --- a/hunspell.spec +++ b/hunspell.spec @@ -1,7 +1,7 @@ # # spec file for package hunspell (Version 1.2.8) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,11 +20,13 @@ Summary: Hunspell - a spell checker and morphological analyzer library Name: hunspell Version: 1.2.8 -Release: 2 +Release: 3 License: GPLv2+ ; LGPLv2.1+ ; MPL .. Group: System/Libraries Source0: %{name}-%{version}.tar.bz2 Source1: baselibs.conf +Patch0: %name-fix-format.patch +Patch1: %name-disable-fortify.patch Url: http://hunspell.sourceforge.net/ BuildRequires: autoconf >= 2.59 BuildRequires: ncurses-devel >= 5.0 @@ -93,7 +95,8 @@ Authors: %prep %setup -q -n %{name}-%{version} -#%patch1 +%patch0 -p0 +%patch1 -p0 %build cp /usr/share/gettext/config.rpath . @@ -109,6 +112,9 @@ make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_bindir}/example %find_lang %{name} +%check +make check + %clean rm -rf $RPM_BUILD_ROOT