diff --git a/adonthell-0.3.5-fix-build-with-gcc-4.4.patch b/adonthell-0.3.5-fix-build-with-gcc-4.4.patch new file mode 100644 index 0000000..7441d5c --- /dev/null +++ b/adonthell-0.3.5-fix-build-with-gcc-4.4.patch @@ -0,0 +1,34 @@ +Index: adonthell-0.3/src/dialog.cc +=================================================================== +RCS file: /sources/adonthell/adonthell-0.3/src/dialog.cc,v +retrieving revision 1.36 +retrieving revision 1.37 +diff -u -r1.36 -r1.37 +--- adonthell-0.3/src/dialog.cc 13 Oct 2007 19:47:25 -0000 1.36 ++++ adonthell-0.3/src/dialog.cc 1 Mar 2009 12:26:14 -0000 1.37 +@@ -1,5 +1,5 @@ + /* +- $Id: dialog.cc,v 1.36 2007/10/13 19:47:25 ksterker Exp $ ++ $Id: dialog.cc,v 1.37 2009/03/01 12:26:14 ksterker Exp $ + + (C) Copyright 2000/2001/2002 Kai Sterker + Part of the Adonthell Project http://adonthell.linuxgames.com +@@ -265,7 +265,8 @@ + { + u_int32 begin, end, len; + PyObject *result; +- char *tmp, *start, *mid, *str = NULL; ++ const char *start; ++ char *tmp, *mid, *str = NULL; + character *the_player = data::the_player; + string newstr (s); + +@@ -318,7 +319,7 @@ + + // Error! + cout << "\n*** Error, unknown macro " << start << flush; +- start[0] = ' '; ++ newstr[newstr.length () - strlen (start)] = ' '; + } + + // execute python functions diff --git a/adonthell-gcc44.patch b/adonthell-gcc44.patch deleted file mode 100644 index 8080381..0000000 --- a/adonthell-gcc44.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -C 3 -r1.36 -r1.37 -*** src/dialog.cc 13 Oct 2007 19:47:25 -0000 1.36 ---- src/dialog.cc 1 Mar 2009 12:26:14 -0000 1.37 -*************** -*** 265,271 **** - { - u_int32 begin, end, len; - PyObject *result; -! char *tmp, *start, *mid, *str = NULL; - character *the_player = data::the_player; - string newstr (s); - ---- 265,272 ---- - { - u_int32 begin, end, len; - PyObject *result; -! const char *start; -! char *tmp, *mid, *str = NULL; - character *the_player = data::the_player; - string newstr (s); - -*************** -*** 318,324 **** - - // Error! - cout << "\n*** Error, unknown macro " << start << flush; -! start[0] = ' '; - } - - // execute python functions ---- 319,325 ---- - - // Error! - cout << "\n*** Error, unknown macro " << start << flush; -! newstr[newstr.length () - strlen (start)] = ' '; - } - - // execute python functions diff --git a/adonthell.spec b/adonthell.spec index d2e2957..dc9716e 100644 --- a/adonthell.spec +++ b/adonthell.spec @@ -11,8 +11,9 @@ URL: http://adonthell.linuxgames.com/ Source0: http://savannah.nongnu.org/download/%{name}/%{name}-src-%{version}.tar.gz ## 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.36 -r 1.37 adonthell-0.3/src/dialog.cc +Patch0: %{name}-0.3.5-fix-build-with-gcc-4.4.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 @@ -58,7 +59,7 @@ sed -i 's|myconfig.gamedir + "/locale"|"%{_datadir}/locale"|' src/nls.cc # remove hardcoded CFLAGS sed -i 's|^CFLAGS|^#CFLAGS|g' configure # build with GCC 4.4 -%patch0 -p0 +%patch0 -p1 %patch1 -p1