summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy/megaglest')
-rw-r--r--games-strategy/megaglest/ChangeLog6
-rw-r--r--games-strategy/megaglest/files/megaglest-3.6.0.3-gcc-4.7.patch34
-rw-r--r--games-strategy/megaglest/megaglest-3.6.0.3.ebuild4
3 files changed, 41 insertions, 3 deletions
diff --git a/games-strategy/megaglest/ChangeLog b/games-strategy/megaglest/ChangeLog
index a4bddc2b62b2..48fac9fba201 100644
--- a/games-strategy/megaglest/ChangeLog
+++ b/games-strategy/megaglest/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-strategy/megaglest
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/ChangeLog,v 1.6 2012/09/17 22:30:05 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/ChangeLog,v 1.7 2012/10/29 20:14:48 hasufell Exp $
+
+ 29 Oct 2012; Julian Ospald <hasufell@gentoo.org> megaglest-3.6.0.3.ebuild,
+ +files/megaglest-3.6.0.3-gcc-4.7.patch:
+ fix compilation for gcc-4.7 wrt #440134
17 Sep 2012; Julian Ospald <hasufell@gentoo.org> megaglest-3.6.0.3.ebuild,
metadata.xml:
diff --git a/games-strategy/megaglest/files/megaglest-3.6.0.3-gcc-4.7.patch b/games-strategy/megaglest/files/megaglest-3.6.0.3-gcc-4.7.patch
new file mode 100644
index 000000000000..53142f32a6d5
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.6.0.3-gcc-4.7.patch
@@ -0,0 +1,34 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Mon Oct 29 19:15:35 UTC 2012
+Subject: fix compilation for gcc-4.7
+
+ https://bugs.gentoo.org/show_bug.cgi?id=440134
+
+--- source/shared_lib/sources/util/util.cpp
++++ source/shared_lib/sources/util/util.cpp
+@@ -9,6 +9,8 @@
+ // License, or (at your option) any later version
+ // ==============================================================
+
++#include <unistd.h>
++
+ #include "util.h"
+
+ #include <ctime>
+--- source/shared_lib/include/graphics/math_util.h
++++ source/shared_lib/include/graphics/math_util.h
+@@ -184,10 +184,10 @@
+
+ Rect2<T> 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<T> &pt) const{
diff --git a/games-strategy/megaglest/megaglest-3.6.0.3.ebuild b/games-strategy/megaglest/megaglest-3.6.0.3.ebuild
index 7c0eff0583ca..419f4092bf0a 100644
--- a/games-strategy/megaglest/megaglest-3.6.0.3.ebuild
+++ b/games-strategy/megaglest/megaglest-3.6.0.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/megaglest-3.6.0.3.ebuild,v 1.6 2012/09/17 22:30:05 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/megaglest-3.6.0.3.ebuild,v 1.7 2012/10/29 20:14:48 hasufell Exp $
EAPI=4
VIRTUALX_REQUIRED="manual"
@@ -66,7 +66,7 @@ src_prepare() {
need-wxwidgets unicode
fi
- epatch "${FILESDIR}"/${P}-{static-build,build,as-needed}.patch
+ epatch "${FILESDIR}"/${P}-{static-build,build,as-needed,gcc-4.7}.patch
# Workaround for glew >=1.9.0
# https://sourceforge.net/tracker/?func=detail&aid=3565658&group_id=300350&atid=1266776