summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Loeser <halcy0n@gentoo.org>2005-08-19 02:31:54 +0000
committerMark Loeser <halcy0n@gentoo.org>2005-08-19 02:31:54 +0000
commit5c8664ef779654594f13bfd58eb748e639fffabc (patch)
treee6e9d646bf9376999ddc4044ffc233a75afb98a0 /games-action
parentstabilize #103017 (diff)
downloadgentoo-2-5c8664ef779654594f13bfd58eb748e639fffabc.tar.gz
gentoo-2-5c8664ef779654594f13bfd58eb748e639fffabc.tar.bz2
gentoo-2-5c8664ef779654594f13bfd58eb748e639fffabc.zip
Fix compilation on GCC-4. Similar fix as was needed for gcc-3.4, but this one sucks less. Removed the old fix and apply this one in all cases since it doesn't break on gcc-3.3.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'games-action')
-rw-r--r--games-action/atanks/ChangeLog8
-rw-r--r--games-action/atanks/Manifest18
-rw-r--r--games-action/atanks/atanks-1.1.0.ebuild10
-rw-r--r--games-action/atanks/files/atanks-1.1.0-gcc4.patch (renamed from games-action/atanks/files/atanks-gcc34.patch)10
4 files changed, 20 insertions, 26 deletions
diff --git a/games-action/atanks/ChangeLog b/games-action/atanks/ChangeLog
index 1bc807e41ef7..1398081748f9 100644
--- a/games-action/atanks/ChangeLog
+++ b/games-action/atanks/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-action/atanks
# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/atanks/ChangeLog,v 1.15 2005/08/10 18:44:06 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/atanks/ChangeLog,v 1.16 2005/08/19 02:31:54 halcy0n Exp $
+
+ 19 Aug 2005; Mark Loeser <halcy0n@gentoo.org> -files/atanks-gcc34.patch,
+ +files/atanks-1.1.0-gcc4.patch, atanks-1.1.0.ebuild:
+ Fix compilation on GCC-4. Similar fix as was needed for gcc-3.4, but this one
+ sucks less. Removed the old fix and apply this one in all cases since it
+ doesn't break on gcc-3.3.
10 Aug 2005; <dang@gentoo.org> atanks-1.1.0.ebuild:
Keyworded ~amd64
diff --git a/games-action/atanks/Manifest b/games-action/atanks/Manifest
index d54b279b03ae..f5f83b0b4666 100644
--- a/games-action/atanks/Manifest
+++ b/games-action/atanks/Manifest
@@ -1,16 +1,6 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 894584a4ef6246c490c1379291b0003a atanks-1.1.0.ebuild 1404
-MD5 895a0b978e05113587e11ee95ba6653e ChangeLog 2996
+MD5 fb6b2e7763f87bd49fc71f5b70f96a14 ChangeLog 3312
+MD5 530ccd6c548ff3d5a8a2eadff4717803 atanks-1.1.0.ebuild 1253
MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
-MD5 ea52207aee01685ed0e4b52b4cd66958 files/digest-atanks-1.1.0 65
MD5 e3857ce0d93e17bc2ad85dca19571131 files/1.1.0-gentoo.patch 5379
-MD5 f1a4b436c0ef59132f761306104d2904 files/atanks-gcc34.patch 1229
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
-
-iD8DBQFC+ksWomPajV0RnrERApwfAJ4/5iHOBV5c7Z5/OcbXbJKJ0/ZxiACfeEWf
-K70lsHFv9hB20SOLx5BbUms=
-=rdfD
------END PGP SIGNATURE-----
+MD5 ea52207aee01685ed0e4b52b4cd66958 files/digest-atanks-1.1.0 65
+MD5 847ff435578601cfeba1de5e58d0d2cb files/atanks-1.1.0-gcc4.patch 1212
diff --git a/games-action/atanks/atanks-1.1.0.ebuild b/games-action/atanks/atanks-1.1.0.ebuild
index 7a45074f52ec..5b0823bad4c5 100644
--- a/games-action/atanks/atanks-1.1.0.ebuild
+++ b/games-action/atanks/atanks-1.1.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/atanks/atanks-1.1.0.ebuild,v 1.12 2005/08/10 18:44:06 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/atanks/atanks-1.1.0.ebuild,v 1.13 2005/08/19 02:31:54 halcy0n Exp $
inherit eutils toolchain-funcs games
@@ -22,13 +22,11 @@ S=${WORKDIR}/${PN}
src_unpack() {
unpack ${A}
cd "${S}"
- #apply both patches to compile with gcc-3.4.0 closing bug #49457
- if [ "$(gcc-major-version)" -ge "3" -a "$(gcc-minor-version)" -ge "4" ]
- then
- epatch "${FILESDIR}/atanks-gcc34.patch"
- fi
+
epatch "${FILESDIR}/${PV}-gentoo.patch"
+ epatch "${FILESDIR}/${P}-gcc4.patch"
+
DATA_DIR="${GAMES_DATADIR}/${PN}"
sed -i \
-e "s:DATA_DIR=.*:DATA_DIR=\\\\\"${DATA_DIR}\\\\\":" \
diff --git a/games-action/atanks/files/atanks-gcc34.patch b/games-action/atanks/files/atanks-1.1.0-gcc4.patch
index d229923bff86..7b7d4b8f4aeb 100644
--- a/games-action/atanks/files/atanks-gcc34.patch
+++ b/games-action/atanks/files/atanks-1.1.0-gcc4.patch
@@ -1,18 +1,18 @@
diff -ur atanks-orig/src/player.cc atanks/src/player.cc
---- atanks-orig/src/player.cc 2004-09-04 02:12:37.847112834 -0400
-+++ atanks/src/player.cc 2004-09-04 02:17:54.685582198 -0400
+--- atanks-orig/src/player.cc 2005-08-18 22:02:59.000000000 -0400
++++ atanks/src/player.cc 2005-08-18 22:05:58.000000000 -0400
@@ -1009,12 +1009,12 @@
if (weapNum >= RIOT_CHARGE && weapNum <= RIOT_BLAST) {
// add points only within range and above ctank
if ( (cy > ctank->y - (radius / 2)) ||
- (abs (ctank->x - cx) > radius))
-+ (abs ((int)ctank->x - cx) > radius))
++ (fabs (ctank->x - cx) > radius))
continue;
} else if (weapNum >= SML_ROLLER && weapNum <= DTH_ROLLER) {
// Only aim rollers above other tanks
if (cy > tankY + TANKHEIGHT &&
- abs (ctank->x - cx) > radius)
-+ abs ((int)ctank->x - cx) > radius)
++ fabs (ctank->x - cx) > radius)
continue;
} else if (weapNum >= SML_LAZER && weapNum <= LRG_LAZER) {
// Lazer can only be aimed above horizontal
@@ -21,7 +21,7 @@ diff -ur atanks-orig/src/player.cc atanks/src/player.cc
// add sqrt distances for each tank * potential damage
long int totalEffectiveDamage = calcTotalEffectiveDamage (itemNum);
- _targetMatrix[(int)ctank->x] += sqrt (abs (ctank->x - ltank->x)) * totalEffectiveDamage;
-+ _targetMatrix[(int)ctank->x] += sqrt (abs ((int)ctank->x - (int)ltank->x)) * totalEffectiveDamage;
++ _targetMatrix[(int)ctank->x] += sqrt (fabs (ctank->x - ltank->x)) * totalEffectiveDamage;
}
}