diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2006-05-31 18:55:36 +0000 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2006-05-31 18:55:36 +0000 |
commit | df824e5e9db33185a585fda5a7d41c3bf1582e5e (patch) | |
tree | d1b683b495b6c01179f9a5e456de6267d7a7ef4f /games-puzzle | |
parent | Small corrections (sleep -> epause, added missing call to linux-mod_pkg_preinst) (diff) | |
download | gentoo-2-df824e5e9db33185a585fda5a7d41c3bf1582e5e.tar.gz gentoo-2-df824e5e9db33185a585fda5a7d41c3bf1582e5e.tar.bz2 gentoo-2-df824e5e9db33185a585fda5a7d41c3bf1582e5e.zip |
Fix for gcc-4.1, bug #133815
(Portage version: 2.1_rc3-r1)
Diffstat (limited to 'games-puzzle')
-rw-r--r-- | games-puzzle/quadra/ChangeLog | 6 | ||||
-rw-r--r-- | games-puzzle/quadra/files/quadra-1.1.8-gcc41.patch | 92 | ||||
-rw-r--r-- | games-puzzle/quadra/quadra-1.1.8.ebuild | 5 |
3 files changed, 100 insertions, 3 deletions
diff --git a/games-puzzle/quadra/ChangeLog b/games-puzzle/quadra/ChangeLog index 73362af26ad0..955e13348315 100644 --- a/games-puzzle/quadra/ChangeLog +++ b/games-puzzle/quadra/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-puzzle/quadra # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-puzzle/quadra/ChangeLog,v 1.12 2006/05/31 18:19:34 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-puzzle/quadra/ChangeLog,v 1.13 2006/05/31 18:55:36 tupone Exp $ + + 31 May 2006; <Tupone@gentoo.org> +files/quadra-1.1.8-gcc41.patch, + quadra-1.1.8.ebuild: + Fix for gcc-4.1, bug #133815 by me 31 May 2006; <Tupone@gentoo.org> quadra-1.1.8.ebuild: Fix sandbox violation diff --git a/games-puzzle/quadra/files/quadra-1.1.8-gcc41.patch b/games-puzzle/quadra/files/quadra-1.1.8-gcc41.patch new file mode 100644 index 000000000000..02ede4884ec8 --- /dev/null +++ b/games-puzzle/quadra/files/quadra-1.1.8-gcc41.patch @@ -0,0 +1,92 @@ +diff -ur quadra-1.1.8-orig/skelton/include/array.h quadra-1.1.8/skelton/include/array.h +--- quadra-1.1.8-orig/skelton/include/array.h 2006-05-21 16:35:30.000000000 -0400 ++++ quadra-1.1.8/skelton/include/array.h 2006-05-21 16:53:06.000000000 -0400 +@@ -21,6 +21,7 @@ + #ifndef _HEADER_ARRAY + #define _HEADER_ARRAY + #include <vector> ++#include <algorithm> + + #ifndef max + #define max(a,b) (((a) > (b)) ? (a) : (b)) +@@ -37,7 +38,9 @@ + v.push_back(t); + } + void add_before(const T& t, int i) { +- v.insert(&v[i], t); ++ typename std::vector<T>::iterator iter = v.begin(); ++ std::advance(iter, i); ++ v.insert(iter, t); + } + bool remove_item(const T& t) { + for(int i=0; i<size(); i++) +@@ -51,7 +54,9 @@ + v.pop_back(); + } + void remove(int i) { +- v.erase(&v[i]); ++ typename std::vector<T>::iterator iter = v.begin(); ++ std::advance(iter, i); ++ v.erase(iter); + } + int size() const { + return v.size(); +diff -ur quadra-1.1.8-orig/source/net_server.cpp quadra-1.1.8/source/net_server.cpp +--- quadra-1.1.8-orig/source/net_server.cpp 2006-05-21 16:35:30.000000000 -0400 ++++ quadra-1.1.8/source/net_server.cpp 2006-05-21 16:54:27.000000000 -0400 +@@ -400,13 +400,14 @@ + } + } + } ++ unsigned i; + if(playeraccepted.accepted == 0) { + if(game->net_list.size() == MAXPLAYERS) + playeraccepted.accepted = 5; // game is full, can't join + if(game->server_max_players && game->net_list.size() >= game->server_max_players) + playeraccepted.accepted = 5; // game is full, can't join + if(game->server_max_teams && game->net_list.count_teams() >= game->server_max_teams) { +- for(unsigned i=0; i<MAXPLAYERS; ++i) { ++ for(i=0; i<MAXPLAYERS; ++i) { + Canvas* c=game->net_list.get(i); + if(c && c->color==p->team) + break; +diff -ur quadra-1.1.8-orig/source/net_stuff.cpp quadra-1.1.8/source/net_stuff.cpp +--- quadra-1.1.8-orig/source/net_stuff.cpp 2006-05-21 16:35:30.000000000 -0400 ++++ quadra-1.1.8/source/net_stuff.cpp 2006-05-21 16:55:03.000000000 -0400 +@@ -29,6 +29,7 @@ + #include "texte.h" + #include "video.h" + #include "nglog.h" ++#include <stdarg.h> + + RCSID("$Id: quadra-1.1.8-gcc41.patch,v 1.1 2006/05/31 18:55:36 tupone Exp $") + +diff -ur quadra-1.1.8-orig/source/quadra.cpp quadra-1.1.8/source/quadra.cpp +--- quadra-1.1.8-orig/source/quadra.cpp 2006-05-21 16:35:30.000000000 -0400 ++++ quadra-1.1.8/source/quadra.cpp 2006-05-21 16:56:12.000000000 -0400 +@@ -65,6 +65,7 @@ + #include "clock.h" + #include "net_server.h" + #include "quadra.h" ++#include <exception> + + RCSID("$Id: quadra-1.1.8-gcc41.patch,v 1.1 2006/05/31 18:55:36 tupone Exp $") + +@@ -2387,7 +2388,7 @@ + try { + overmind.step(); + } +- catch(exception *e) { ++ catch(std::exception *e) { + msgbox("Exception caught from overmind.step(): %s\n", e->what()); + } + #ifdef PAINTDETECTOR2000 +@@ -2406,7 +2407,7 @@ + try { + ecran->draw_zone(); + } +- catch(exception *e) { ++ catch(std::exception *e) { + msgbox("Exception caught from ecran->draw_zone(): %s\n", e->what()); + } + diff --git a/games-puzzle/quadra/quadra-1.1.8.ebuild b/games-puzzle/quadra/quadra-1.1.8.ebuild index dc3fa95ae47b..5051c4f814e0 100644 --- a/games-puzzle/quadra/quadra-1.1.8.ebuild +++ b/games-puzzle/quadra/quadra-1.1.8.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-puzzle/quadra/quadra-1.1.8.ebuild,v 1.12 2006/05/31 18:19:34 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-puzzle/quadra/quadra-1.1.8.ebuild,v 1.13 2006/05/31 18:55:36 tupone Exp $ inherit eutils toolchain-funcs games @@ -23,7 +23,8 @@ src_unpack() { unpack ${A} cd "${S}" [ $(gcc-major-version) == 3 ] && epatch "${FILESDIR}/${P}-gcc3.patch" - epatch "${FILESDIR}/libpng-1.2.5.patch" + epatch "${FILESDIR}/libpng-1.2.5.patch" \ + "${FILESDIR}/${P}"-gcc41.patch use amd64 && epatch "${FILESDIR}/${P}-amd64.patch" sed -i \ -e 's:-pedantic::' config/vars.mk \ |