From 38025baebf40bcc3cfc62510f7336994289251e1 Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Feb 15 2011 06:42:30 +0000 Subject: Fix build with GCC 4.6 --- diff --git a/adonthell-0.3.5-fix-build-with-gcc-4.6.patch b/adonthell-0.3.5-fix-build-with-gcc-4.6.patch new file mode 100644 index 0000000..1801b8f --- /dev/null +++ b/adonthell-0.3.5-fix-build-with-gcc-4.6.patch @@ -0,0 +1,26 @@ +Index: adonthell-0.3/src/win_event.cc +=================================================================== +RCS file: /sources/adonthell/adonthell-0.3/src/win_event.cc,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -r1.5 -r1.6 +--- adonthell-0.3/src/win_event.cc 16 Dec 2002 19:09:54 -0000 1.5 ++++ adonthell-0.3/src/win_event.cc 11 Feb 2011 20:50:27 -0000 1.6 +@@ -1,5 +1,5 @@ + /* +- $Id: win_event.cc,v 1.5 2002/12/16 19:09:54 ksterker Exp $ ++ $Id: win_event.cc,v 1.6 2011/02/11 20:50:27 ksterker Exp $ + + (C) Copyright 2001 Joel Vennin + Part of the Adonthell Project http://adonthell.linuxgames.com +@@ -34,8 +34,9 @@ + + case DESTROY: + { ++ Functor0wRet func0ret; + set_callback_destroy ( +- makeFunctor (&Functor0wRet(), *callback, &py_callback::callback_func0ret)); ++ makeFunctor (&func0ret, *callback, &py_callback::callback_func0ret)); + break; + } + diff --git a/adonthell.spec b/adonthell.spec index b446dd3..d2e2957 100644 --- a/adonthell.spec +++ b/adonthell.spec @@ -9,9 +9,14 @@ Group: Amusements/Games License: GPLv2+ URL: http://adonthell.linuxgames.com/ Source0: http://savannah.nongnu.org/download/%{name}/%{name}-src-%{version}.tar.gz -## Submitted upstream, will be in next release + +## Fixes from CVS, no new release yet. # https://savannah.nongnu.org/bugs/index.php?25737 Patch0: %{name}-gcc44.patch +# Patch was obtained with: +# cvs diff -u -r 1.5 -r 1.6 adonthell-0.3/src/win_event.cc +Patch1: %{name}-0.3.5-fix-build-with-gcc-4.6.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel @@ -54,6 +59,7 @@ sed -i 's|myconfig.gamedir + "/locale"|"%{_datadir}/locale"|' src/nls.cc sed -i 's|^CFLAGS|^#CFLAGS|g' configure # build with GCC 4.4 %patch0 -p0 +%patch1 -p1 %build