From 9f067454afd730a563cb52429c6206738fb5672d Mon Sep 17 00:00:00 2001 From: Ville-Pekka Vainio Date: Tue, 15 Feb 2011 16:50:26 +0200 Subject: [PATCH] Add patch to fix build with GCC 4.6 --- libvoikko-3.1-gcc-4.6-fix.patch | 20 ++++++++++++++++++++ libvoikko.spec | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 libvoikko-3.1-gcc-4.6-fix.patch diff --git a/libvoikko-3.1-gcc-4.6-fix.patch b/libvoikko-3.1-gcc-4.6-fix.patch new file mode 100644 index 0000000..aedba61 --- /dev/null +++ b/libvoikko-3.1-gcc-4.6-fix.patch @@ -0,0 +1,20 @@ +diff -ur libvoikko-3.1.orig/src/morphology/malaga/values.cpp libvoikko-3.1/src/morphology/malaga/values.cpp +--- libvoikko-3.1.orig/src/morphology/malaga/values.cpp 2010-11-14 11:10:16.000000000 +0200 ++++ libvoikko-3.1/src/morphology/malaga/values.cpp 2011-02-15 16:44:03.695451550 +0200 +@@ -1216,7 +1216,7 @@ + * symbols. If a value is a list, the elements of this list are inserted into + * NEW_LIST instead of the value itself. */ + { +- value_t new_list, v, element_end; ++ value_t new_list, v; + int_t i, new_list_length; + value_t *elements; + +@@ -1227,7 +1227,6 @@ + switch (TYPE( elements[i] )) + { + case LIST_TYPE: +- element_end = NEXT_VALUE( elements[i] ); + new_list_length += length_of_value( elements[i] ) - 2; + break; + case SYMBOL_TYPE: diff --git a/libvoikko.spec b/libvoikko.spec index 3f2658d..c5c1e86 100644 --- a/libvoikko.spec +++ b/libvoikko.spec @@ -1,7 +1,7 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: libvoikko Version: 3.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Voikko is a library for spellcheckers and hyphenators Group: System Environment/Libraries @@ -11,6 +11,7 @@ URL: http://voikko.sourceforge.net/ Source0: http://downloads.sourceforge.net/voikko/%{name}-%{version}.tar.gz # The usual format of test release URLs #Source0: http://www.puimula.org/htp/testing/%{name}-%{version}rc1.tar.gz +Patch0: libvoikko-3.1-gcc-4.6-fix.patch BuildRequires: python-devel # Libvoikko >= 2.2 needs this, earlier versions won't work @@ -62,6 +63,7 @@ tasks on Finnish text. %prep %setup -q +%patch0 -p1 %build @@ -116,6 +118,9 @@ install -pm 0644 python/libvoikko.py $RPM_BUILD_ROOT%{python_sitelib}/ %{python_sitelib}/%{name}.py* %changelog +* Tue Feb 15 2011 Ville-Pekka Vainio - 3.1-3 +- Add patch to fix build with GCC 4.6 + * Tue Feb 08 2011 Fedora Release Engineering - 3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild