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
commit530d5d6655fb528cbcb8d17a905e8e2016a36cb4 (patch)
tree04a47c25b0abcf6794d86a11b54e524785bcbb8f /games-action/atanks
parentstabilize #103017 (diff)
downloadhistorical-530d5d6655fb528cbcb8d17a905e8e2016a36cb4.tar.gz
historical-530d5d6655fb528cbcb8d17a905e8e2016a36cb4.tar.bz2
historical-530d5d6655fb528cbcb8d17a905e8e2016a36cb4.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.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'games-action/atanks')
-rw-r--r--games-action/atanks/ChangeLog8
-rw-r--r--games-action/atanks/Manifest14
-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, 23 insertions, 19 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..7cf3f2933d42 100644
--- a/games-action/atanks/Manifest
+++ b/games-action/atanks/Manifest
@@ -1,16 +1,16 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 894584a4ef6246c490c1379291b0003a atanks-1.1.0.ebuild 1404
-MD5 895a0b978e05113587e11ee95ba6653e ChangeLog 2996
+MD5 85536d6b7e3cf3d30297b6081fcaa8f7 ChangeLog 3315
+MD5 21a6d0930ae7d81f77c793636203c0a5 atanks-1.1.0.ebuild 1256
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
+MD5 ea52207aee01685ed0e4b52b4cd66958 files/digest-atanks-1.1.0 65
+MD5 847ff435578601cfeba1de5e58d0d2cb files/atanks-1.1.0-gcc4.patch 1212
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-iD8DBQFC+ksWomPajV0RnrERApwfAJ4/5iHOBV5c7Z5/OcbXbJKJ0/ZxiACfeEWf
-K70lsHFv9hB20SOLx5BbUms=
-=rdfD
+iD8DBQFDBUSqCRZPokWLroQRAgKDAKDZruVyQ3whLykbdQKd7enqQ2t0WACdENzm
+DwTi7PY+egtBYF3efB3getU=
+=Kfnb
-----END PGP SIGNATURE-----
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;
}
}