From 2be27cd7f8bde400970b16c5e488c2fbfbbffac0 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Fri, 22 Dec 2006 21:58:46 +0000 Subject: [PATCH] Fix "shots not seen" with -fstrict-aliasing. Bug #140918 Package-Manager: portage-2.1.1-r2 --- games-action/bzflag/ChangeLog | 6 +- games-action/bzflag/Manifest | 40 +++++--- games-action/bzflag/bzflag-2.0.8.ebuild | 3 +- .../bzflag/files/bzflag-2.0.8-gcc4.patch | 94 +++++++++++++++++++ .../files/digest-bzflag-1.10.8.20041007 | 2 + 5 files changed, 130 insertions(+), 15 deletions(-) create mode 100644 games-action/bzflag/files/bzflag-2.0.8-gcc4.patch diff --git a/games-action/bzflag/ChangeLog b/games-action/bzflag/ChangeLog index d2924be2d8fd..0ce276181358 100644 --- a/games-action/bzflag/ChangeLog +++ b/games-action/bzflag/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-action/bzflag # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-action/bzflag/ChangeLog,v 1.28 2006/12/01 20:08:50 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-action/bzflag/ChangeLog,v 1.29 2006/12/22 21:58:46 tupone Exp $ + + 22 Dec 2006; +files/bzflag-2.0.8-gcc4.patch, + bzflag-2.0.8.ebuild: + Fix "shots not seen" with -fstrict-aliasing. Bug #140918 by Andreas Eriksson 01 Dec 2006; Chris Gianelloni bzflag-1.10.8.20041007.ebuild, bzflag-2.0.8.ebuild: diff --git a/games-action/bzflag/Manifest b/games-action/bzflag/Manifest index 208567d2e2e7..0727a34d8067 100644 --- a/games-action/bzflag/Manifest +++ b/games-action/bzflag/Manifest @@ -1,9 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX bzflag-2.0.4.20050930-callsignfix.patch 555 RMD160 0b5b2275eb39f7a1211e5f48455e3dc906548328 SHA1 314a1a006e18558ddac4fe78e4e6cb80d182a74b SHA256 19df8e50d3f4a09025201699472498f64ec2c3d112cef79791180caf1dec2e3a MD5 5cc604a1e5554c4a7bd2a11d9a7ad0d0 files/bzflag-2.0.4.20050930-callsignfix.patch 555 RMD160 0b5b2275eb39f7a1211e5f48455e3dc906548328 files/bzflag-2.0.4.20050930-callsignfix.patch 555 SHA256 19df8e50d3f4a09025201699472498f64ec2c3d112cef79791180caf1dec2e3a files/bzflag-2.0.4.20050930-callsignfix.patch 555 -DIST bzflag-1.10.8.20041007.tar.bz2 3963041 -DIST bzflag-2.0.4.20050930.tar.bz2 11251394 RMD160 0f3b352c1f276ec53990367fff51d674c69e2402 SHA256 496e8ea90bd2ae0e1f76cf160ab4c219f579d118edad345b33b3b085747e5e69 +AUX bzflag-2.0.8-gcc4.patch 2290 RMD160 f2e8ada13d09c965173e18282418835a673b3057 SHA1 be45ab2e9ccd5499d85ad2d265e0becbf709db5e SHA256 408b59c6fd1bcde89144e8684e23a7e68e37b32ed28a1b8c733480dd23c64e07 +MD5 0e1027cb0ad69409bfe3a2e90f5abdb3 files/bzflag-2.0.8-gcc4.patch 2290 +RMD160 f2e8ada13d09c965173e18282418835a673b3057 files/bzflag-2.0.8-gcc4.patch 2290 +SHA256 408b59c6fd1bcde89144e8684e23a7e68e37b32ed28a1b8c733480dd23c64e07 files/bzflag-2.0.8-gcc4.patch 2290 +DIST bzflag-1.10.8.20041007.tar.bz2 3963041 RMD160 af90510b6331ee4df78a7f9d45b5976e838a7e00 SHA1 3c1e762bb48a7cadc094cbe54922d96c4b475ff3 SHA256 be1d47c94c0e0c145221058e5f331c514138481d0d711e6b41bee04a2cf7b82b +DIST bzflag-2.0.4.20050930.tar.bz2 11251394 RMD160 0f3b352c1f276ec53990367fff51d674c69e2402 SHA1 18a435e0c7d297718a5c1b6766749eb7cbfde3ef SHA256 496e8ea90bd2ae0e1f76cf160ab4c219f579d118edad345b33b3b085747e5e69 DIST bzflag-2.0.8.tar.bz2 11330988 RMD160 8458df60f23b0192885835f6ac6d01e4d57b7d80 SHA1 de4fb0c55c106711d1c213b50edeeedcbbea9da0 SHA256 8d120aef46ad92d2699e582b32c44daac76bd274cf30c8be72223210cbdd9a20 EBUILD bzflag-1.10.8.20041007.ebuild 1201 RMD160 9fa9ffbc551600786d4f7d1f7a4e7aeda74d9a28 SHA1 2912dff185bd54d0e6ec9f44078c0f2669dd1987 SHA256 8ba960ca33868cf30468839e981b2dcece08419291325af5b6b387e323fd3262 MD5 e878f3cfa40c186eb7d3c2499d7b46e6 bzflag-1.10.8.20041007.ebuild 1201 @@ -13,24 +20,31 @@ EBUILD bzflag-2.0.4.20050930-r1.ebuild 1650 RMD160 4285724bce25292023960d60c9c68 MD5 71bf8c9eadbe85bfcfc88ee85795c963 bzflag-2.0.4.20050930-r1.ebuild 1650 RMD160 4285724bce25292023960d60c9c68842d9e55de6 bzflag-2.0.4.20050930-r1.ebuild 1650 SHA256 be00f5d242c701a18899c8a9b6561e34b5a02e07d1fc599eabb705001a1edca0 bzflag-2.0.4.20050930-r1.ebuild 1650 -EBUILD bzflag-2.0.8.ebuild 1872 RMD160 beda9c8fdf22c0455215b7a050afaf0b17dcd617 SHA1 c341b5335dc765464f18651c53c1480eca093367 SHA256 37e912d4ca110c145305816a24ad97c9fd2bc69cc6dad5f73328bc9d3bdab900 -MD5 f392d24d8dc0f4f7aa199445a70106db bzflag-2.0.8.ebuild 1872 -RMD160 beda9c8fdf22c0455215b7a050afaf0b17dcd617 bzflag-2.0.8.ebuild 1872 -SHA256 37e912d4ca110c145305816a24ad97c9fd2bc69cc6dad5f73328bc9d3bdab900 bzflag-2.0.8.ebuild 1872 -MISC ChangeLog 5703 RMD160 942d2d9c8270f359092c5d7e0f0fe2189277ee84 SHA1 d45ee3156b6c4381ca31b77162aef031ec644c4d SHA256 29c215ac3fc731b923448e3ca08d741bc0c0ba5fb5f3e0b9d089c470af812143 -MD5 a4e5af02c27712eec7c792f5c6439f88 ChangeLog 5703 -RMD160 942d2d9c8270f359092c5d7e0f0fe2189277ee84 ChangeLog 5703 -SHA256 29c215ac3fc731b923448e3ca08d741bc0c0ba5fb5f3e0b9d089c470af812143 ChangeLog 5703 +EBUILD bzflag-2.0.8.ebuild 1907 RMD160 cb46b84a25eed3fe1b415703a7246d7f12310d23 SHA1 db601dfc3d1613708e81ed420aa2529145057138 SHA256 994b01746e68d56a0e98c51bd2c8fe1d94f87b0a8636f9dd449866395832f437 +MD5 3e3e2647209cf51a44ddb0ee390805d1 bzflag-2.0.8.ebuild 1907 +RMD160 cb46b84a25eed3fe1b415703a7246d7f12310d23 bzflag-2.0.8.ebuild 1907 +SHA256 994b01746e68d56a0e98c51bd2c8fe1d94f87b0a8636f9dd449866395832f437 bzflag-2.0.8.ebuild 1907 +MISC ChangeLog 5871 RMD160 4cfa0675d7bcc39ee69a413f56775bc3e5457cc5 SHA1 a4e54839301230b3fb6a8d6ca3cba3f5f4545039 SHA256 22cc8d5edb1c568dfe3ac5c42f6c62584bb30c9ffdff8dfa0b2fd316e5dc6a3f +MD5 993076f7c407f810ec518789d800fd92 ChangeLog 5871 +RMD160 4cfa0675d7bcc39ee69a413f56775bc3e5457cc5 ChangeLog 5871 +SHA256 22cc8d5edb1c568dfe3ac5c42f6c62584bb30c9ffdff8dfa0b2fd316e5dc6a3f ChangeLog 5871 MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3 MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea metadata.xml 158 SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3 metadata.xml 158 -MD5 fe41525284965b2043cd849635f9f085 files/digest-bzflag-1.10.8.20041007 76 -RMD160 e6ee916a10425a3451c794f95a6e25e477295024 files/digest-bzflag-1.10.8.20041007 76 -SHA256 4cb7dbb75aea60dd4ea147ac52d538006d7b8c4c2797d8cdac1b88da3f691290 files/digest-bzflag-1.10.8.20041007 76 +MD5 75d468934b0c3f49e7dcd5432b2bf45d files/digest-bzflag-1.10.8.20041007 274 +RMD160 12600065265e09a4f3b722fa9a8ffcfdd5bf0651 files/digest-bzflag-1.10.8.20041007 274 +SHA256 2a8217fb8bdba579ab94ff0f8912389ff42e81861515671677558eee5663950b files/digest-bzflag-1.10.8.20041007 274 MD5 5e41d4854b38f35142da9f395be27e89 files/digest-bzflag-2.0.4.20050930-r1 274 RMD160 4c8ee239ee608d895ee43bd641b5cd389b5fc8f5 files/digest-bzflag-2.0.4.20050930-r1 274 SHA256 2f7e0cb15316e7a6343ad6feb935e3d1ed276429c3f52cb39806fea2dd383231 files/digest-bzflag-2.0.4.20050930-r1 274 MD5 224f8df302717ab2a405b16a60740ebb files/digest-bzflag-2.0.8 247 RMD160 b4119a53e18466344d2d19a6a86c43e6f11f23af files/digest-bzflag-2.0.8 247 SHA256 8916bc314f3e892812c9208dce6897c500b9a84ac6434c33b0870a053dbda4f5 files/digest-bzflag-2.0.8 247 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQFFjFUlbfN2jvlVAhwRAlVHAKC16LhbtO0kxgX2SiRlkDbORajUwQCfZGH+ +Kx+qH5hBHnWUp9nM9tn3uWQ= +=gswG +-----END PGP SIGNATURE----- diff --git a/games-action/bzflag/bzflag-2.0.8.ebuild b/games-action/bzflag/bzflag-2.0.8.ebuild index c3c80a46ddd6..110b43b917a7 100644 --- a/games-action/bzflag/bzflag-2.0.8.ebuild +++ b/games-action/bzflag/bzflag-2.0.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-action/bzflag/bzflag-2.0.8.ebuild,v 1.4 2006/12/13 02:37:19 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-action/bzflag/bzflag-2.0.8.ebuild,v 1.5 2006/12/22 21:58:46 tupone Exp $ inherit eutils flag-o-matic games @@ -44,6 +44,7 @@ src_unpack() { unpack ${A} cd "${S}" + epatch "${FILESDIR}/${P}"-gcc4.patch sed -i configure \ -e 's:^CFLAGS=.*::' \ -e 's:^CXXFLAGS=.*::' \ diff --git a/games-action/bzflag/files/bzflag-2.0.8-gcc4.patch b/games-action/bzflag/files/bzflag-2.0.8-gcc4.patch new file mode 100644 index 000000000000..99bffc7070d1 --- /dev/null +++ b/games-action/bzflag/files/bzflag-2.0.8-gcc4.patch @@ -0,0 +1,94 @@ +--- src/net/Pack.cxx.old 2006-12-22 21:45:34.000000000 +0100 ++++ src/net/Pack.cxx 2006-12-22 21:45:42.000000000 +0100 +@@ -17,6 +17,15 @@ + + #define ADV(_b, _t) ((void*)(((char*)(_b)) + sizeof(_t))) + ++// ++// Unions ++// ++ ++union floatintuni { ++ float floatval; ++ uint32_t intval; ++}; ++ + + // + // Buffer Overrun Checks +@@ -93,23 +102,27 @@ + void* nboPackFloat(void* b, float v) + { + // hope that float is a 4 byte IEEE 754 standard encoding +- uint32_t x = htonl(*((uint32_t*)&v)); +- ::memcpy(b, &x, sizeof(float)); +- return ADV(b, float); ++ floatintuni u; ++ u.floatval = v; ++ ++ uint32_t x = (uint32_t)htonl(u.intval); ++ ::memcpy(b, &x, sizeof(uint32_t)); ++ return ADV(b, uint32_t); + } + + void* nboPackVector(void* b, const float *v) + { + // hope that float is a 4 byte IEEE 754 standard encoding +- uint32_t data[3]; +- uint32_t *pV = (uint32_t *)v; +- uint32_t *pB = (uint32_t *)data; +- +- *(pB++) = htonl(*(pV++)); +- *(pB++) = htonl(*(pV++)); +- *pB = htonl(*pV); +- ::memcpy( b, data, 3*sizeof(float)); +- return (void*) (((char*)b)+3*sizeof(float)); ++ floatintuni u; ++ uint32_t data[3]; ++ ++ for (int i=0; i<3; i++) { ++ u.floatval = v[i]; ++ data[i] = (uint32_t)htonl(u.intval); ++ } ++ ++ ::memcpy( b, data, 3*sizeof(uint32_t)); ++ return (void*) (((char*)b)+3*sizeof(uint32_t)); + } + + void* nboPackString(void* b, const void* m, int len) +@@ -229,9 +242,10 @@ + // hope that float is a 4 byte IEEE 754 standard encoding + uint32_t x; + ::memcpy(&x, b, sizeof(uint32_t)); +- const uint32_t y = (uint32_t)ntohl(x); +- v = *((float*)&y); +- return ADV(b, float); ++ floatintuni u; ++ u.intval = (uint32_t)ntohl(x); ++ v = u.floatval; ++ return ADV(b, uint32_t); + } + + void* nboUnpackVector(void* b, float *v) +@@ -247,13 +261,14 @@ + } + // hope that float is a 4 byte IEEE 754 standard encoding + uint32_t data[3]; +- ::memcpy( data, b, 3*sizeof(float)); +- uint32_t *pV = (uint32_t *)v; +- uint32_t *pB = (uint32_t *)data; +- +- *(pV++) = (uint32_t)ntohl(*(pB++)); +- *(pV++) = (uint32_t)ntohl(*(pB++)); +- *pV = (uint32_t)ntohl(*pB); ++ floatintuni u; ++ ::memcpy( data, b, 3*sizeof(uint32_t)); ++ ++ for (int i=0; i<3; i++) { ++ u.intval = (uint32_t)ntohl(data[i]); ++ v[i] = u.floatval; ++ } ++ + return (void *) (((char*)b) + 3*sizeof(float)); + } + diff --git a/games-action/bzflag/files/digest-bzflag-1.10.8.20041007 b/games-action/bzflag/files/digest-bzflag-1.10.8.20041007 index 25a751c9091b..7f5b694b3620 100644 --- a/games-action/bzflag/files/digest-bzflag-1.10.8.20041007 +++ b/games-action/bzflag/files/digest-bzflag-1.10.8.20041007 @@ -1 +1,3 @@ MD5 59d88fc8f8fe78bc6495e4c19c383323 bzflag-1.10.8.20041007.tar.bz2 3963041 +RMD160 af90510b6331ee4df78a7f9d45b5976e838a7e00 bzflag-1.10.8.20041007.tar.bz2 3963041 +SHA256 be1d47c94c0e0c145221058e5f331c514138481d0d711e6b41bee04a2cf7b82b bzflag-1.10.8.20041007.tar.bz2 3963041 -- 2.26.2