Add patch to fix build with GCC 4.6

This commit is contained in:
Ville-Pekka Vainio 2011-02-15 16:50:26 +02:00
parent d84206879e
commit 9f067454af
2 changed files with 26 additions and 1 deletions

View File

@ -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:

View File

@ -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 <vpivaini AT cs.helsinki.fi> - 3.1-3
- Add patch to fix build with GCC 4.6
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild