From 918b8900197fc3b3fb82874bea8ffc875f6f73fb Mon Sep 17 00:00:00 2001 From: Larry Hajali Date: Fri, 10 Aug 2012 11:39:24 -0500 Subject: games/megaglest: Included patch for gcc47 Signed-off-by: Robby Workman --- games/megaglest/README | 16 +++++++++------- games/megaglest/gcc-4.7.patch | 28 ++++++++++++++++++++++++++++ games/megaglest/megaglest.SlackBuild | 5 ++++- games/megaglest/megaglest.info | 2 +- games/megaglest/slack-desc | 6 +++--- 5 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 games/megaglest/gcc-4.7.patch (limited to 'games/megaglest') diff --git a/games/megaglest/README b/games/megaglest/README index edacb0083b..1ad0db5784 100644 --- a/games/megaglest/README +++ b/games/megaglest/README @@ -1,8 +1,10 @@ -MegaGlest is a free and open source 3D real-time strategy game where you control -the armies of one of seven different factions: Tech, Magic, Egyptians, Indians, -Norsemen, Persian or Romans. The game is setup in one of 16 naturally looking -settings, which (like the unit models) are crafted with great appreciation for -detail. +MegaGlest is a free open source 3D real-time strategy game where +you control the armies of one of seven different factions: Tech, +Magic, Egyptians, Indians, Norsemen, Persian or Romans. The game +is setup in one of 16 naturally looking settings, which (like the +unit models) are crafted with great appreciation for detail. -This requires xerces-c, OpenAL, lua, ftgl and wxGTK/wxPython. Megaglest can -optionally use libircclient and miniupnpc. For manpages install help2man. +This requires xerces-c, OpenAL, lua, ftgl and wxGTK or wxPython. + +Optional dependencies are libircclient and miniupnpc, as well as +help2man if you want to build manual pages. diff --git a/games/megaglest/gcc-4.7.patch b/games/megaglest/gcc-4.7.patch new file mode 100644 index 0000000000..3d118b1a9c --- /dev/null +++ b/games/megaglest/gcc-4.7.patch @@ -0,0 +1,28 @@ +--- trunk/source/shared_lib/sources/util/util.cpp 2012/04/14 21:21:09 3244 ++++ trunk/source/shared_lib/sources/util/util.cpp 2012/05/01 14:55:06 3279 +@@ -22,6 +22,8 @@ + + #ifdef WIN32 + #include // for open() ++#else ++ #include + #endif + + #include // for open() +--- trunk/source/shared_lib/include/graphics/math_util.h 2012/04/16 20:15:57 3252 ++++ trunk/source/shared_lib/include/graphics/math_util.h 2012/05/01 14:55:06 3279 +@@ -184,10 +184,10 @@ + + Rect2 computeBoundingRect() const{ + return Rect2i( +- min(p[0].x, p[1].x), +- min(p[0].y, p[2].y), +- max(p[2].x, p[3].x), +- max(p[1].y, p[3].y)); ++ std::min(p[0].x, p[1].x), ++ std::min(p[0].y, p[2].y), ++ std::max(p[2].x, p[3].x), ++ std::max(p[1].y, p[3].y)); + } + + bool isInside(const Vec2 &pt) const{ diff --git a/games/megaglest/megaglest.SlackBuild b/games/megaglest/megaglest.SlackBuild index cc2e578328..6501b9b28e 100644 --- a/games/megaglest/megaglest.SlackBuild +++ b/games/megaglest/megaglest.SlackBuild @@ -6,7 +6,7 @@ PRGNAM=megaglest VERSION=${VERSION:-3.6.0.3} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -62,6 +62,9 @@ find . \ sed -i "/^const string glestVersionString/ s|=.*|= \"v${VERSION}\";|" \ source/glest_game/facilities/game_util.cpp +# From upstream. Fixes gcc 4.7.x compile issues. +patch -p1 < $CWD/gcc-4.7.patch + mkdir build cd build cmake -G "Unix Makefiles" \ diff --git a/games/megaglest/megaglest.info b/games/megaglest/megaglest.info index 84c39d48d0..c6cdc3ab3c 100644 --- a/games/megaglest/megaglest.info +++ b/games/megaglest/megaglest.info @@ -11,4 +11,4 @@ DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Larry Hajali" EMAIL="larryhaja[at]gmail[dot]com" -APPROVED="dsomero" +APPROVED="rworkman" diff --git a/games/megaglest/slack-desc b/games/megaglest/slack-desc index fa038836a7..a38c5430df 100644 --- a/games/megaglest/slack-desc +++ b/games/megaglest/slack-desc @@ -10,9 +10,9 @@ megaglest: megaglest (3D RTS Game) megaglest: megaglest: MegaGlest is a free and open source 3D real-time strategy (RTS) game, megaglest: where you control the armies of one of seven different factions: Tech, -megaglest: Magic, Egyptians, Indians, Norsemen, Persian or Romans. The game is -megaglest: setup in one of 16 naturally looking settings, which -like the unit -megaglest: models- are crafted with great appreciation for detail. +megaglest: Magic, Egyptians, Indians, Norsemen, Persian or Romans. The game is +megaglest: setup in one of 16 naturally looking settings, which (like the unit +megaglest: models) are crafted with great appreciation for detail. megaglest: megaglest: Homepage: http://megaglest.org/ megaglest: -- cgit v1.2.3-65-gdbad