diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2006-03-05 13:40:16 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2006-03-05 13:40:16 +0000 |
commit | 67f60973209a340d73db0cbdcf800b3671d0b1c2 (patch) | |
tree | 5ad3c811e1ec48824ee6c67f3952f33290f01f94 /games-fps | |
parent | remove old ebuild (diff) | |
download | gentoo-2-67f60973209a340d73db0cbdcf800b3671d0b1c2.tar.gz gentoo-2-67f60973209a340d73db0cbdcf800b3671d0b1c2.tar.bz2 gentoo-2-67f60973209a340d73db0cbdcf800b3671d0b1c2.zip |
Patch by Mark Loeser <halcy0n@gentoo.org> allows compilation in GCC 4.0/4.1 to complete. Closes bug #122290. Unfortunately portability is not improved.
(Portage version: 2.1_pre5-r4)
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/duke3d/ChangeLog | 7 | ||||
-rw-r--r-- | games-fps/duke3d/duke3d-20040817.ebuild | 3 | ||||
-rw-r--r-- | games-fps/duke3d/files/20040817-gcc4.patch | 75 |
3 files changed, 83 insertions, 2 deletions
diff --git a/games-fps/duke3d/ChangeLog b/games-fps/duke3d/ChangeLog index 733c73f6c846..1e65e3a7e130 100644 --- a/games-fps/duke3d/ChangeLog +++ b/games-fps/duke3d/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-fps/duke3d # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-fps/duke3d/ChangeLog,v 1.21 2006/01/28 23:09:29 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-fps/duke3d/ChangeLog,v 1.22 2006/03/05 13:40:16 chainsaw Exp $ + + 05 Mar 2006; Tony Vroon <chainsaw@gentoo.org> +files/20040817-gcc4.patch, + duke3d-20040817.ebuild: + Patch by Mark Loeser <halcy0n@gentoo.org> allows compilation on GCC 4.0/4.1 + to complete. Closes bug #122290. Unfortunately portability is not improved. 28 Jan 2006; Michael Sterrett <mr_bones_@gentoo.org> duke3d-20040817.ebuild: diff --git a/games-fps/duke3d/duke3d-20040817.ebuild b/games-fps/duke3d/duke3d-20040817.ebuild index edd8c4916d24..f34b77162c9c 100644 --- a/games-fps/duke3d/duke3d-20040817.ebuild +++ b/games-fps/duke3d/duke3d-20040817.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-fps/duke3d/duke3d-20040817.ebuild,v 1.7 2006/01/28 23:09:29 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-fps/duke3d/duke3d-20040817.ebuild,v 1.8 2006/03/05 13:40:16 chainsaw Exp $ fromcvs=0 ECVS_MODULE="duke3d" @@ -62,6 +62,7 @@ src_unpack() { # need to sync features with build engine epatch "${FILESDIR}/${PV}-duke3d-makefile-opts.patch" epatch "${FILESDIR}/${PV}-gcc34.patch" # compile fixes for GCC 3.4 + epatch "${FILESDIR}/${PV}-gcc4.patch" # compile fixes for GCC 4.0/4.1 by Mark Loeser sed -i \ -e "/^use_opengl := / s:=.*:= $(use_tf opengl):" \ -e "/^use_physfs := / s:=.*:= false:" \ diff --git a/games-fps/duke3d/files/20040817-gcc4.patch b/games-fps/duke3d/files/20040817-gcc4.patch new file mode 100644 index 000000000000..d79dda96c35b --- /dev/null +++ b/games-fps/duke3d/files/20040817-gcc4.patch @@ -0,0 +1,75 @@ +iff -ur duke3d/source/buildengine/a.c duke3d-gcc4/source/buildengine/a.c +--- duke3d/source/buildengine/a.c 2004-11-25 13:55:21.000000000 -0500 ++++ duke3d-gcc4/source/buildengine/a.c 2005-06-18 18:14:24.000000000 -0400 +@@ -186,7 +186,9 @@ + if (i3 == 0) + { + i1 += i4; +- ((unsigned long)i4) >>= mach3_al; ++ unsigned long temp = i4; ++ temp >>= mach3_al; ++ i4 = temp; + i4 = (i4&0xffffff00) | (source[i4]&0xff); + *dest = ((unsigned char*)i2)[i4]; + return i1; +diff -ur duke3d/source/buildengine/pragmas.c duke3d-gcc4/source/buildengine/pragmas.c +--- duke3d/source/buildengine/pragmas.c 2003-07-25 20:11:32.000000000 -0400 ++++ duke3d-gcc4/source/buildengine/pragmas.c 2005-06-18 18:25:37.000000000 -0400 +@@ -56,28 +56,39 @@ + + void clearbufbyte(void *buffer, int size, long fill_value) { + int lsize; ++ unsigned char *p=buffer; ++ unsigned short *s=buffer; + switch(size){ + case 0: return; +- case 1: *((unsigned char*)buffer)++ = fill_value; return; +- case 2: *((unsigned short*)buffer)++ = fill_value; return; +- case 3: { unsigned char *p=buffer; p[2]=p[1]=p[0] = fill_value;} return; ++ case 1: ++p; *p = fill_value; return; ++ case 2: ++s; *s = fill_value; return; ++ case 3: { p[2]=p[1]=p[0] = fill_value;} return; + default: + if ((int)buffer&1) { +- *((unsigned char*)buffer)++ = fill_value; size--; ++ ++p; *p = fill_value; size--; ++ buffer = p; + } + if ((int)buffer&2) { +- *((unsigned short*)buffer)++ = fill_value; size-=2; ++ ++s; *s = fill_value; size-=2; ++ buffer = s; + } + lsize = size>>2; ++ unsigned int *up = buffer; + while(lsize) { +- *((unsigned int*)buffer)++ = fill_value; ++ ++up; ++ *up = fill_value; + lsize--; + } ++ buffer = up; + if (size&2) { +- *((unsigned short*)buffer)++ = fill_value; ++ s = buffer; ++ ++s; ++ *s = fill_value; + } + if (size&1) { +- *((unsigned char*)buffer)++ = fill_value; ++ p = buffer; ++ ++p; ++ *p = fill_value; + } + } + } +@@ -122,7 +133,7 @@ + { + *((unsigned short *)source) = ((linum>>16)&0xffff); + linum += linum_inc; +- ((unsigned char*)source) = ((unsigned char*)source) + 2; ++ source = ((unsigned char*)source) + 2; + size--; + if (size == 0) return; + } + |