[asc] Fix building with gcc-4.7
Hans de Goede
jwrdegoede at fedoraproject.org
Sun Jan 15 14:00:18 UTC 2012
commit 61b8757f554d9e75a986c3d5cda599337c7bce3b
Author: Hans de Goede <hdegoede at redhat.com>
Date: Sun Jan 15 15:01:29 2012 +0100
Fix building with gcc-4.7
asc-2.4.0.0-gcc47.patch | 70 +++++++++++++++++++++++++++++++++++++++++++++++
asc.spec | 7 ++++-
2 files changed, 76 insertions(+), 1 deletions(-)
---
diff --git a/asc-2.4.0.0-gcc47.patch b/asc-2.4.0.0-gcc47.patch
new file mode 100644
index 0000000..021c657
--- /dev/null
+++ b/asc-2.4.0.0-gcc47.patch
@@ -0,0 +1,70 @@
+--- asc-2.4.0.0/source/graphics/blitter.h 2008-07-11 23:26:58.000000000 +0200
++++ asc-2.4.0.0.new/source/graphics/blitter.h 2012-01-15 14:36:39.753033150 +0100
+@@ -749,7 +748,7 @@
+
+ void assign ( PixelType src, PixelType* dest )
+ {
+- if ( isOpaque(src ) ) {
++ if ( this->isOpaque(src ) ) {
+ *dest = src;
+ }
+ };
+@@ -769,7 +768,7 @@
+
+ void assign ( PixelType src, PixelType* dest )
+ {
+- if ( isOpaque(src ) ) {
++ if ( this->isOpaque(src ) ) {
+ *dest = src;
+ }
+ };
+@@ -928,6 +927,7 @@
+ };
+
+
++#include "drawing.h"
+
+ extern const int ColorMerger_Alpha_XLAT_Table_shadings[8];
+
+--- asc-2.4.0.0/source/graphics/drawing.h 2008-06-29 13:25:41.000000000 +0200
++++ asc-2.4.0.0.new/source/graphics/drawing.h 2012-01-15 14:37:33.193034937 +0100
+@@ -169,7 +169,7 @@
+ PixelType* pix = (PixelType*)( surf.pixels() );
+ pix += pos.y * surf.pitch()/pixelsize + pos.x;
+
+- assign ( src, pix );
++ this->assign ( src, pix );
+ };
+ };
+
+--- asc-2.4.0.0/source/graphics/surface.cpp 2009-04-04 23:21:47.000000000 +0200
++++ asc-2.4.0.0.new/source/graphics/surface.cpp 2012-01-14 12:03:26.933912267 +0100
+@@ -579,7 +579,7 @@
+
+ void assign ( PixelType src, PixelType* dest )
+ {
+- if ( !isOpaque(src ) )
++ if ( !this->isOpaque(src ) )
+ *dest &= alphamask;
+ };
+
+--- asc-2.4.0.0/source/itemrepository.cpp 2009-11-01 12:05:42.000000000 +0100
++++ asc-2.4.0.0.new/source/itemrepository.cpp 2012-01-14 12:06:59.420909604 +0100
+@@ -88,7 +88,7 @@
+ t->filename = fileName;
+ t->location = location;
+ t->archive = prc.getArchive();
+- add ( t );
++ this->add ( t );
+ }
+
+
+@@ -110,7 +110,7 @@
+ t->archive = stream.readString();
+ dataLoaderTicker();
+
+- add ( t );
++ this->add ( t );
+ // add ( T::newFromStream(stream ));
+ }
+ }
diff --git a/asc.spec b/asc.spec
index c280f05..283262a 100644
--- a/asc.spec
+++ b/asc.spec
@@ -1,12 +1,13 @@
Name: asc
Version: 2.4.0.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Advanced Strategic Command
Group: Amusements/Games
License: GPLv2+
URL: http://www.asc-hq.org/
Source0: http://downloads.sourceforge.net/asc-hq/asc-%{version}.tar.bz2
Source1: %{name}.desktop
+Patch0: asc-2.4.0.0-gcc47.patch
BuildRequires: SDL_image-devel SDL_mixer-devel SDL_sound-devel
BuildRequires: bzip2-devel libjpeg-devel libsigc++-devel physfs-devel
BuildRequires: libvorbis-devel libpng-devel libtiff-devel boost-devel
@@ -20,6 +21,7 @@ ASC is a free, turn based strategy game.
%prep
%setup -q
+%patch0 -p1
sed -i 's|$datadir/games/|$datadir/|g' configure
sed -i 's|$(datadir)/games/|$(datadir)/|g' `find -name Makefile.in`
chmod -x source/libs/paragui/include/paragui.h
@@ -73,6 +75,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Sat Jan 14 2012 Hans de Goede <hdegoede at redhat.com> - 2.4.0.0-5
+- Fix building with gcc-4.7
+
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list