summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2006-08-30 11:59:40 +0000
committerAlfredo Tupone <tupone@gentoo.org>2006-08-30 11:59:40 +0000
commit3f0587cc6200f8ef8ca956fa6be9848a1088000b (patch)
treef5414dabd6f6bd05fb9bda6722fcc0c416f3410f /games-fps
parentVersion bump, #139164 (diff)
downloadgentoo-2-3f0587cc6200f8ef8ca956fa6be9848a1088000b.tar.gz
gentoo-2-3f0587cc6200f8ef8ca956fa6be9848a1088000b.tar.bz2
gentoo-2-3f0587cc6200f8ef8ca956fa6be9848a1088000b.zip
Fixes for gcc-4 and others: bug #115923 #122290 #134693 #116521 #140441
(Portage version: 2.1-r2)
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/duke3d/ChangeLog11
-rw-r--r--games-fps/duke3d/duke3d-20040817-r1.ebuild116
-rw-r--r--games-fps/duke3d/files/digest-duke3d-200408172
-rw-r--r--games-fps/duke3d/files/digest-duke3d-20040817-r13
-rw-r--r--games-fps/duke3d/files/duke3d-20040817-gcc4.patch180
5 files changed, 311 insertions, 1 deletions
diff --git a/games-fps/duke3d/ChangeLog b/games-fps/duke3d/ChangeLog
index 1e65e3a7e130..0e7b944ea9a9 100644
--- a/games-fps/duke3d/ChangeLog
+++ b/games-fps/duke3d/ChangeLog
@@ -1,6 +1,15 @@
# 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.22 2006/03/05 13:40:16 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/duke3d/ChangeLog,v 1.23 2006/08/30 11:59:40 tupone Exp $
+
+*duke3d-20040817-r1 (30 Aug 2006)
+
+ 30 Aug 2006; <tupone@gentoo.org> +files/duke3d-20040817-gcc4.patch,
+ +duke3d-20040817-r1.ebuild:
+ Give more info on how to install files, Bug #115923 by Ivan Yosifov
+ Duke3d fix for gcc-4, Bug #122290 by Patrizio Bassi and Bug #134693 by Joël
+ network.cfg installed as network.cfg.template, Bug #116521 by Ivan Yosifov
+ No more hang at menu, Bug #140441 by FieldySnuts
05 Mar 2006; Tony Vroon <chainsaw@gentoo.org> +files/20040817-gcc4.patch,
duke3d-20040817.ebuild:
diff --git a/games-fps/duke3d/duke3d-20040817-r1.ebuild b/games-fps/duke3d/duke3d-20040817-r1.ebuild
new file mode 100644
index 000000000000..ed1110837246
--- /dev/null
+++ b/games-fps/duke3d/duke3d-20040817-r1.ebuild
@@ -0,0 +1,116 @@
+# 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-r1.ebuild,v 1.1 2006/08/30 11:59:40 tupone Exp $
+
+fromcvs=0
+ECVS_MODULE="duke3d"
+if [ ${fromcvs} -eq 1 ] ; then
+ ECVS_PASS="anonymous"
+ ECVS_SERVER="icculus.org:/cvs/cvsroot"
+ inherit cvs eutils flag-o-matic games
+else
+ inherit eutils flag-o-matic games
+fi
+
+DESCRIPTION="port of the original DukeNukem 3D"
+HOMEPAGE="http://icculus.org/projects/duke3d/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="hppa ppc x86"
+IUSE="hardened perl opengl"
+
+RDEPEND="media-libs/libsdl
+ media-libs/sdl-mixer
+ media-sound/timidity++
+ media-sound/timidity-eawpatches
+ perl? ( dev-lang/perl )
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ !hardened? ( x86? ( dev-lang/nasm ) )"
+
+S="${WORKDIR}/${ECVS_MODULE}"
+
+use_tf() { useq ${1} && echo "true" || echo "false"; }
+
+src_unpack() {
+ if [ ${fromcvs} -eq 1 ] ; then
+ cvs_src_unpack
+ cd duke3d/source
+ ECVS_MODULE="buildengine"
+ cvs_src_unpack
+ else
+ unpack ${A}
+ fi
+
+ # configure buildengine
+ cd "${S}/source/buildengine"
+ sed -i \
+ -e "/^useperl := / s:=.*:= $(use_tf perl):" \
+ -e "/^useopengl := / s:=.*:= $(use_tf opengl):" \
+ -e "/^usephysfs := / s:=.*:= false:" \
+ -e 's:-O3::' -e 's: -g : :' \
+ -e 's:/usr/lib/perl5/i386-linux/CORE/libperl.a::' \
+ Makefile \
+ || die "sed build Makefile failed"
+ epatch "${FILESDIR}/${PV}-endian.patch"
+
+ # configure duke3d
+ cd "${S}/source"
+ epatch "${FILESDIR}/${PV}-credits.patch"
+ # 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}"/${P}-gcc4.patch
+ sed -i \
+ -e "/^use_opengl := / s:=.*:= $(use_tf opengl):" \
+ -e "/^use_physfs := / s:=.*:= false:" \
+ Makefile \
+ || die "sed duke3d Makefile failed"
+ if ! use hardened && use x86 ; then
+ sed -i \
+ -e 's:^#USE_ASM:USE_ASM:' buildengine/Makefile \
+ || die "sed failed"
+ sed -i \
+ -e '/^#use_asm := /s:#::' Makefile \
+ || die "sed failed"
+ fi
+
+ # causes crazy redefine errors with gcc-3.[2-4].x
+ replace-flags -O3 -O2
+}
+
+src_compile() {
+ emake -C source/buildengine OPTFLAGS="${CFLAGS}" || die "buildengine failed"
+ emake -C source OPTIMIZE="${CFLAGS}" || die "duke3d failed"
+}
+
+src_install() {
+ games_make_wrapper duke3d "${GAMES_BINDIR}/duke3d.bin" "${GAMES_DATADIR}/${PN}"
+ newgamesbin source/duke3d duke3d.bin || die "newgamesbin failed"
+
+ dodoc readme.txt
+
+ cd testdata
+ insinto "${GAMES_DATADIR}/${PN}"
+ newins defs.con DEFS.CON
+ newins game.con GAME.CON
+ newins user.con USER.CON
+ newins "${FILESDIR}/network.cfg" network.cfg.template
+ insinto "${GAMES_SYSCONFDIR}"
+ doins "${FILESDIR}/duke3d.cfg"
+ dosym "${GAMES_SYSCONFDIR}/duke3d.cfg" "${GAMES_DATADIR}/${PN}/DUKE3D.CFG"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ einfo "Put the data files in ${GAMES_DATADIR}/${PN} before playing"
+ einfo ""
+ einfo "For the shareware version, get the zip file at"
+ einfo "ftp://ftp.3drealms.com/share/3dduke13.zip, unzip in some temporary"
+ einfo "directory, unzip again the file DN3DSW13.SHR. You should have now"
+ einfo "the DUKE3D.GRP file. Move only this in ${GAMES_DATADIR}/${PN}"
+}
diff --git a/games-fps/duke3d/files/digest-duke3d-20040817 b/games-fps/duke3d/files/digest-duke3d-20040817
index f463266a5a86..00ae4e7d9bf1 100644
--- a/games-fps/duke3d/files/digest-duke3d-20040817
+++ b/games-fps/duke3d/files/digest-duke3d-20040817
@@ -1 +1,3 @@
MD5 0f16c909d56dc9c7b3f8bdbd80b8ab45 duke3d-20040817.tar.bz2 1509273
+RMD160 d6d4896c6357e21543d68e322f18e8c0c00224d4 duke3d-20040817.tar.bz2 1509273
+SHA256 c0dd72030f9c5b84aea3e4989831311c94ef21641d6a1fdb0f557d04076f641f duke3d-20040817.tar.bz2 1509273
diff --git a/games-fps/duke3d/files/digest-duke3d-20040817-r1 b/games-fps/duke3d/files/digest-duke3d-20040817-r1
new file mode 100644
index 000000000000..00ae4e7d9bf1
--- /dev/null
+++ b/games-fps/duke3d/files/digest-duke3d-20040817-r1
@@ -0,0 +1,3 @@
+MD5 0f16c909d56dc9c7b3f8bdbd80b8ab45 duke3d-20040817.tar.bz2 1509273
+RMD160 d6d4896c6357e21543d68e322f18e8c0c00224d4 duke3d-20040817.tar.bz2 1509273
+SHA256 c0dd72030f9c5b84aea3e4989831311c94ef21641d6a1fdb0f557d04076f641f duke3d-20040817.tar.bz2 1509273
diff --git a/games-fps/duke3d/files/duke3d-20040817-gcc4.patch b/games-fps/duke3d/files/duke3d-20040817-gcc4.patch
new file mode 100644
index 000000000000..2a37148d799c
--- /dev/null
+++ b/games-fps/duke3d/files/duke3d-20040817-gcc4.patch
@@ -0,0 +1,180 @@
+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 = fill_value; return;
++ case 2: *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 = fill_value; ++p; size--;
++ buffer = p;
+ }
+ if ((int)buffer&2) {
+- *((unsigned short*)buffer)++ = fill_value; size-=2;
++ *s = fill_value; ++s; size-=2;
++ buffer = s;
+ }
+ lsize = size>>2;
++ unsigned int *up = buffer;
+ while(lsize) {
+- *((unsigned int*)buffer)++ = fill_value;
++ *up = fill_value;
++ ++up;
+ lsize--;
+ }
++ buffer = up;
+ if (size&2) {
+- *((unsigned short*)buffer)++ = fill_value;
++ s = buffer;
++ *s = fill_value;
++ ++s;
+ }
+ if (size&1) {
+- *((unsigned char*)buffer)++ = fill_value;
++ p = buffer;
++ *p = fill_value;
++ ++p;
+ }
+ }
+ }
+@@ -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;
+ }
+
+diff -u -r duke3d/source/buildengine/a.h duke3d.gcc4.1.1/source/buildengine/a.h
+--- duke3d/source/buildengine/a.h 2003-04-11 08:54:06.000000000 +0200
++++ duke3d.gcc4.1.1/source/buildengine/a.h 2006-06-22 12:14:40.366393568 +0200
+@@ -116,56 +116,56 @@
+
+ #if ((defined __GNUC__) && (!defined C_IDENTIFIERS_UNDERSCORED))
+
+- long asm_mmxoverlay(void) __attribute__ ((alias ("_asm_mmxoverlay")));
+- long asm_sethlinesizes(long,long,long) __attribute__ ((alias ("_asm_sethlinesizes")));
+- long asm_setpalookupaddress(char *) __attribute__ ((alias ("_asm_setpalookupaddress")));
+- long asm_setuphlineasm4(long,long) __attribute__ ((alias ("_asm_setuphlineasm4")));
+- long asm_hlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_hlineasm4")));
+- long asm_setuprhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_setuprhlineasm4")));
+- long asm_rhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_rhlineasm4")));
+- long asm_setuprmhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_setuprmhlineasm4")));
+- long asm_rmhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_rmhlineasm4")));
+- long asm_setupqrhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_setupqrhlineasm4")));
+- long asm_qrhlineasm4(long,long,long,long,long,long) __attribute__ ((alias ("_asm_qrhlineasm4")));
+- long asm_setvlinebpl(long) __attribute__ ((alias ("_asm_setvlinebpl")));
+- long asm_fixtransluscence(long) __attribute__ ((alias ("_asm_fixtransluscence")));
+- long asm_prevlineasm1(long,long,long,long,long,long) __attribute__ ((alias ("_asm_prevlineasm1")));
+- long asm_vlineasm1(long,long,long,long,long,long) __attribute__ ((alias ("_asm_vlineasm1")));
+- long asm_setuptvlineasm(long) __attribute__ ((alias ("_asm_setuptvlineasm")));
+- long asm_tvlineasm1(long,long,long,long,long,long) __attribute__ ((alias ("_asm_tvlineasm1")));
+- long asm_setuptvlineasm2(long,long,long) __attribute__ ((alias ("_asm_setuptvlineasm2")));
+- long asm_tvlineasm2(long,long,long,long,long,long) __attribute__ ((alias ("_asm_tvlineasm2")));
+- long asm_mvlineasm1(long,long,long,long,long,long) __attribute__ ((alias ("_asm_mvlineasm1")));
+- long asm_setupvlineasm(long) __attribute__ ((alias ("_asm_setupvlineasm")));
+- long asm_vlineasm4(long,long) __attribute__ ((alias ("_asm_vlineasm4")));
+- long asm_setupmvlineasm(long) __attribute__ ((alias ("_asm_setupmvlineasm")));
+- long asm_mvlineasm4(long,long) __attribute__ ((alias ("_asm_mvlineasm4")));
+- void asm_setupspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_setupspritevline")));
+- void asm_spritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_spritevline")));
+- void asm_msetupspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_msetupspritevline")));
+- void asm_mspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_mspritevline")));
+- void asm_tsetupspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_tsetupspritevline")));
+- void asm_tspritevline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_tspritevline")));
+- long asm_mhline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_mhline")));
+- long asm_mhlineskipmodify(long,long,long,long,long,long) __attribute__ ((alias ("_asm_mhlineskipmodify")));
+- long asm_msethlineshift(long,long) __attribute__ ((alias ("_asm_msethlineshift")));
+- long asm_thline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_thline")));
+- long asm_thlineskipmodify(long,long,long,long,long,long) __attribute__ ((alias ("_asm_thlineskipmodify")));
+- long asm_tsethlineshift(long,long) __attribute__ ((alias ("_asm_tsethlineshift")));
+- long asm_setupslopevlin(long,long,long) __attribute__ ((alias ("_asm_setupslopevlin")));
+- long asm_slopevlin(long,long,long,long,long,long) __attribute__ ((alias ("_asm_slopevlin")));
+- long asm_settransnormal(void) __attribute__ ((alias ("_asm_settransnormal")));
+- long asm_settransreverse(void) __attribute__ ((alias ("_asm_settransreverse")));
+- long asm_setupdrawslab(long,long) __attribute__ ((alias ("_asm_setupdrawslab")));
+- long asm_drawslab(long,long,long,long,long,long) __attribute__ ((alias ("_asm_drawslab")));
+- long asm_stretchhline(long,long,long,long,long,long) __attribute__ ((alias ("_asm_stretchhline")));
+- long asm_isvmwarerunning(void) __attribute__ ((alias ("_asm_isvmwarerunning")));
++ long asm_mmxoverlay(void) asm ("_asm_mmxoverlay");
++ long asm_sethlinesizes(long,long,long) asm ("_asm_sethlinesizes");
++ long asm_setpalookupaddress(char *) asm ("_asm_setpalookupaddress");
++ long asm_setuphlineasm4(long,long) asm ("_asm_setuphlineasm4");
++ long asm_hlineasm4(long,long,long,long,long,long) asm ("_asm_hlineasm4");
++ long asm_setuprhlineasm4(long,long,long,long,long,long) asm ("_asm_setuprhlineasm4");
++ long asm_rhlineasm4(long,long,long,long,long,long) asm ("_asm_rhlineasm4");
++ long asm_setuprmhlineasm4(long,long,long,long,long,long) asm ("_asm_setuprmhlineasm4");
++ long asm_rmhlineasm4(long,long,long,long,long,long) asm ("_asm_rmhlineasm4");
++ long asm_setupqrhlineasm4(long,long,long,long,long,long) asm ("_asm_setupqrhlineasm4");
++ long asm_qrhlineasm4(long,long,long,long,long,long) asm ("_asm_qrhlineasm4");
++ long asm_setvlinebpl(long) asm ("_asm_setvlinebpl");
++ long asm_fixtransluscence(long) asm ("_asm_fixtransluscence");
++ long asm_prevlineasm1(long,long,long,long,long,long) asm ("_asm_prevlineasm1");
++ long asm_vlineasm1(long,long,long,long,long,long) asm ("_asm_vlineasm1");
++ long asm_setuptvlineasm(long) asm ("_asm_setuptvlineasm");
++ long asm_tvlineasm1(long,long,long,long,long,long) asm ("_asm_tvlineasm1");
++ long asm_setuptvlineasm2(long,long,long) asm ("_asm_setuptvlineasm2");
++ long asm_tvlineasm2(long,long,long,long,long,long) asm ("_asm_tvlineasm2");
++ long asm_mvlineasm1(long,long,long,long,long,long) asm ("_asm_mvlineasm1");
++ long asm_setupvlineasm(long) asm ("_asm_setupvlineasm");
++ long asm_vlineasm4(long,long) asm ("_asm_vlineasm4");
++ long asm_setupmvlineasm(long) asm ("_asm_setupmvlineasm");
++ long asm_mvlineasm4(long,long) asm ("_asm_mvlineasm4");
++ void asm_setupspritevline(long,long,long,long,long,long) asm ("_asm_setupspritevline");
++ void asm_spritevline(long,long,long,long,long,long) asm ("_asm_spritevline");
++ void asm_msetupspritevline(long,long,long,long,long,long) asm ("_asm_msetupspritevline");
++ void asm_mspritevline(long,long,long,long,long,long) asm ("_asm_mspritevline");
++ void asm_tsetupspritevline(long,long,long,long,long,long) asm ("_asm_tsetupspritevline");
++ void asm_tspritevline(long,long,long,long,long,long) asm ("_asm_tspritevline");
++ long asm_mhline(long,long,long,long,long,long) asm ("_asm_mhline");
++ long asm_mhlineskipmodify(long,long,long,long,long,long) asm("_asm_mhlineskipmodify");
++ long asm_msethlineshift(long,long) asm("_asm_msethlineshift");
++ long asm_thline(long,long,long,long,long,long) asm("_asm_thline");
++ long asm_thlineskipmodify(long,long,long,long,long,long) asm("_asm_thlineskipmodify");
++ long asm_tsethlineshift(long,long) asm("_asm_tsethlineshift");
++ long asm_setupslopevlin(long,long,long) asm("_asm_setupslopevlin");
++ long asm_slopevlin(long,long,long,long,long,long) asm("_asm_slopevlin");
++ long asm_settransnormal(void) asm("_asm_settransnormal");
++ long asm_settransreverse(void) asm("_asm_settransreverse");
++ long asm_setupdrawslab(long,long) asm("_asm_setupdrawslab");
++ long asm_drawslab(long,long,long,long,long,long) asm("_asm_drawslab");
++ long asm_stretchhline(long,long,long,long,long,long) asm("_asm_stretchhline");
++ long asm_isvmwarerunning(void) asm("_asm_isvmwarerunning");
+
+ /*
+ * !!! I need a reference to this, for mprotect(), but the actual function
+ * !!! is never called in BUILD...just from other ASM routines. --ryan.
+ */
+- long asm_prohlineasm4(void) __attribute__ ((alias ("_asm_prohlineasm4")));
++ long asm_prohlineasm4(void) asm("_asm_prohlineasm4");
+
+ #endif /* ELF/GCC */
+ #endif /* defined USE_I386_ASM */