summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2009-04-09 04:52:54 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2009-04-09 04:52:54 +0000
commit61c1885d301dfb366d5610c08775c13d4ad7d3cb (patch)
treef1eb9f818d97b6af7e4c567eb2524070bea8dd85 /games-fps/nexuiz
parentVersion bump. (diff)
downloadhistorical-61c1885d301dfb366d5610c08775c13d4ad7d3cb.tar.gz
historical-61c1885d301dfb366d5610c08775c13d4ad7d3cb.tar.bz2
historical-61c1885d301dfb366d5610c08775c13d4ad7d3cb.zip
version bump - ebuild submitted by Merlijn Hofstra and Tomáš Chvátal (bug #264794)
Package-Manager: portage-2.1.6.7/cvs/Linux i686
Diffstat (limited to 'games-fps/nexuiz')
-rw-r--r--games-fps/nexuiz/ChangeLog9
-rw-r--r--games-fps/nexuiz/Manifest5
-rw-r--r--games-fps/nexuiz/files/nexuiz-2.5-memory-leak.patch114
-rw-r--r--games-fps/nexuiz/nexuiz-2.5.ebuild132
4 files changed, 258 insertions, 2 deletions
diff --git a/games-fps/nexuiz/ChangeLog b/games-fps/nexuiz/ChangeLog
index d6e98127d6ae..e328b2adec23 100644
--- a/games-fps/nexuiz/ChangeLog
+++ b/games-fps/nexuiz/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-fps/nexuiz
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/nexuiz/ChangeLog,v 1.29 2009/04/03 17:32:59 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/nexuiz/ChangeLog,v 1.30 2009/04/09 04:52:54 mr_bones_ Exp $
+
+*nexuiz-2.5 (09 Apr 2009)
+
+ 09 Apr 2009; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/nexuiz-2.5-memory-leak.patch, +nexuiz-2.5.ebuild:
+ version bump - ebuild submitted by Merlijn Hofstra and Tomáš Chvátal (bug
+ #264794)
03 Apr 2009; Michael Sterrett <mr_bones_@gentoo.org> nexuiz-2.4.2.ebuild:
EAPI=2; tidy; handle strip more precisely
diff --git a/games-fps/nexuiz/Manifest b/games-fps/nexuiz/Manifest
index c915597d3e0e..4846f38b1210 100644
--- a/games-fps/nexuiz/Manifest
+++ b/games-fps/nexuiz/Manifest
@@ -1,5 +1,8 @@
+AUX nexuiz-2.5-memory-leak.patch 4447 RMD160 31af0360c05297a45f9d6e3a67c28b86f191830d SHA1 6f1a5bfa1000d2cb4af56845da2331ed67518b9e SHA256 f6c00ee657b673f0aded2f867eba0b08298bddbb8bec3988915ab2a1355420a8
DIST nexmappack_r2.zip 113533483 RMD160 8fbf25ba69ecbaa8170aa468d29ee2f04df5b7f4 SHA1 9d6780822bd682346e74b83e72fafbad45b1ad38 SHA256 15088c7632e0b4f487c789fba4296f44ef5a5d83b51adcb9e603e289e5b8241e
DIST nexuiz-242.zip 393779967 RMD160 0b62abe33311a6b1128584e45f137cee9c62d05d SHA1 387e76889699ef5b7f6ee115833284597410a7ac SHA256 ec31db254fd94508f63a5651beff73ce5c9e187e9c91f35f7616f33f082ae52b
+DIST nexuiz-25.zip 666902063 RMD160 4a9eaac39e447bcda2aea481183a41d31bcd9eac SHA1 b62a39cef7a77dc4d739d0b703fc2958028bf9f6 SHA256 23d3bc2f0d87db1c0919a0ffcec9a2a6741a724376deb6b829d6834d5a802a79
EBUILD nexuiz-2.4.2.ebuild 3021 RMD160 da25da8d93dfd365de07fed2a14e29355ba8c2fb SHA1 3324a6c5b37c1c31a5621149c3df9b3b9ceba262 SHA256 0856baee4f8ca658cfc3cf80d2783ffcc05f6cb21c8399d35f7a9b1526607c30
-MISC ChangeLog 4052 RMD160 c03de8c6ad8eafbbde71fe50977e489e176e06d4 SHA1 829fcc9a511499cb78bccc586adfbed54727e594 SHA256 a6a570d9f4c7366ee329ac80a54aa81c8c0e2db665ac4160f04fc8d293d84de3
+EBUILD nexuiz-2.5.ebuild 2950 RMD160 2bcf25c6b7352cc988b0a1fd544c6b52d3196e10 SHA1 8f9f56aea102601742e59f48294e22eadbbf4592 SHA256 5ab90f2623445e57d57c32388d51191582af7b7e6a2c8bd860529928ad21fc2a
+MISC ChangeLog 4284 RMD160 706acae336294b9b199f2d9cfd868f1ccae6ab5c SHA1 27ba4a985d4df057008d2c795b066ab364b38d0e SHA256 399891166587da7fa2f961dc492472d35198493d884060e8b9162924e9f17de0
MISC metadata.xml 237 RMD160 8b32fda78d72ed7e6df1c6929b0d8ea7e7e857c4 SHA1 9c54a6fbadee617e7bb934db865a98890ce02632 SHA256 a35634a2c24559545aef4e6e3a59cefa0c3d38644e83d1bbe30cd9530787b110
diff --git a/games-fps/nexuiz/files/nexuiz-2.5-memory-leak.patch b/games-fps/nexuiz/files/nexuiz-2.5-memory-leak.patch
new file mode 100644
index 000000000000..8f8e2bf4951a
--- /dev/null
+++ b/games-fps/nexuiz/files/nexuiz-2.5-memory-leak.patch
@@ -0,0 +1,114 @@
+Index: sv_main.c
+===================================================================
+--- sv_main.c
++++ sv_main.c
+@@ -800,7 +800,7 @@
+ sb.data = (unsigned char *) buf;
+ sb.maxsize = sizeof(buf);
+ i = 0;
+- while(MakeDownloadPacket(sv.csqc_progname, sv.csqc_progdata, sv.csqc_progsize, sv.csqc_progcrc, i++, &sb, sv.protocol))
++ while(MakeDownloadPacket(sv.csqc_progname, svs.csqc_progdata, sv.csqc_progsize, sv.csqc_progcrc, i++, &sb, sv.protocol))
+ SV_WriteDemoMessage(client, &sb, false);
+ }
+
+@@ -2234,9 +2234,9 @@
+ Con_DPrintf("Downloading %s to %s\n", host_client->download_name, host_client->name);
+
+ if(host_client->download_deflate)
+- host_client->download_file = FS_FileFromData(sv.csqc_progdata_deflated, sv.csqc_progsize_deflated, true);
++ host_client->download_file = FS_FileFromData(svs.csqc_progdata_deflated, svs.csqc_progsize_deflated, true);
+ else
+- host_client->download_file = FS_FileFromData(sv.csqc_progdata, sv.csqc_progsize, true);
++ host_client->download_file = FS_FileFromData(svs.csqc_progdata, sv.csqc_progsize, true);
+
+ // no, no space is needed between %s and %s :P
+ Host_ClientCommands("\ncl_downloadbegin %i %s%s\n", (int)FS_FileSize(host_client->download_file), host_client->download_name, extensions);
+@@ -2638,37 +2638,37 @@
+ {
+ fs_offset_t progsize;
+
+- if(sv.csqc_progdata)
++ if(svs.csqc_progdata)
+ {
+ Con_DPrintf("Unloading old CSQC data.\n");
+- Mem_Free(sv.csqc_progdata);
+- if(sv.csqc_progdata_deflated)
+- Mem_Free(sv.csqc_progdata_deflated);
++ Mem_Free(svs.csqc_progdata);
++ if(svs.csqc_progdata_deflated)
++ Mem_Free(svs.csqc_progdata_deflated);
+ }
+
+- sv.csqc_progdata = NULL;
+- sv.csqc_progdata_deflated = NULL;
++ svs.csqc_progdata = NULL;
++ svs.csqc_progdata_deflated = NULL;
+
+ Con_Print("Loading csprogs.dat\n");
+
+ sv.csqc_progname[0] = 0;
+- sv.csqc_progdata = FS_LoadFile(csqc_progname.string, sv_mempool, false, &progsize);
++ svs.csqc_progdata = FS_LoadFile(csqc_progname.string, sv_mempool, false, &progsize);
+
+ if(progsize > 0)
+ {
+ size_t deflated_size;
+
+ sv.csqc_progsize = (int)progsize;
+- sv.csqc_progcrc = CRC_Block(sv.csqc_progdata, progsize);
++ sv.csqc_progcrc = CRC_Block(svs.csqc_progdata, progsize);
+ strlcpy(sv.csqc_progname, csqc_progname.string, sizeof(sv.csqc_progname));
+ Con_Printf("server detected csqc progs file \"%s\" with size %i and crc %i\n", sv.csqc_progname, sv.csqc_progsize, sv.csqc_progcrc);
+
+ Con_Print("Compressing csprogs.dat\n");
+ //unsigned char *FS_Deflate(const unsigned char *data, size_t size, size_t *deflated_size, int level, mempool_t *mempool);
+- sv.csqc_progdata_deflated = FS_Deflate(sv.csqc_progdata, progsize, &deflated_size, -1, sv_mempool);
+- sv.csqc_progsize_deflated = (int)deflated_size;
++ svs.csqc_progdata_deflated = FS_Deflate(svs.csqc_progdata, progsize, &deflated_size, -1, sv_mempool);
++ svs.csqc_progsize_deflated = (int)deflated_size;
+ Con_Printf("Deflated: %g%%\n", 100.0 - 100.0 * (deflated_size / (float)progsize));
+- Con_DPrintf("Uncompressed: %u\nCompressed: %u\n", (unsigned)sv.csqc_progsize, (unsigned)sv.csqc_progsize_deflated);
++ Con_DPrintf("Uncompressed: %u\nCompressed: %u\n", (unsigned)sv.csqc_progsize, (unsigned)svs.csqc_progsize_deflated);
+ }
+ }
+
+Index: jpeg.c
+===================================================================
+--- jpeg.c (revision 8850)
++++ jpeg.c (revision 8853)
+@@ -1047,6 +1047,8 @@
+ // try to compress it to JPEG
+ *buf = Z_Malloc(maxsize);
+ *size = JPEG_SaveImage_to_Buffer((char *) *buf, maxsize, image_width, image_height, newimagedata);
++ Mem_Free(newimagedata);
++
+ if(!*size)
+ {
+ Z_Free(*buf);
+Index: server.h
+===================================================================
+--- server.h (revision 8850)
++++ server.h (revision 8853)
+@@ -48,6 +48,12 @@
+ float perf_acc_offset_squared;
+ float perf_acc_offset_max;
+ int perf_acc_offset_samples;
++
++ // csqc stuff
++ unsigned char *csqc_progdata;
++ size_t csqc_progsize_deflated;
++ unsigned char *csqc_progdata_deflated;
++
+ } server_static_t;
+
+ //=============================================================================
+@@ -87,9 +93,6 @@
+ int csqc_progcrc; // -1 = no progs
+ int csqc_progsize; // -1 = no progs
+ char csqc_progname[MAX_QPATH]; // copied from csqc_progname at level start
+- unsigned char *csqc_progdata;
+- size_t csqc_progsize_deflated;
+- unsigned char *csqc_progdata_deflated;
+
+ // collision culling data
+ world_t world;
diff --git a/games-fps/nexuiz/nexuiz-2.5.ebuild b/games-fps/nexuiz/nexuiz-2.5.ebuild
new file mode 100644
index 000000000000..16082f9ac6fc
--- /dev/null
+++ b/games-fps/nexuiz/nexuiz-2.5.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/nexuiz/nexuiz-2.5.ebuild,v 1.1 2009/04/09 04:52:54 mr_bones_ Exp $
+
+EAPI=2
+inherit eutils games
+
+MY_PN=Nexuiz
+MY_P=${PN}-${PV//./}
+MAPS=nexmappack_r2
+DESCRIPTION="Deathmatch FPS based on DarkPlaces, an advanced Quake 1 engine"
+HOMEPAGE="http://www.nexuiz.com/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip
+ maps? ( mirror://sourceforge/${PN}/${MAPS}.zip )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="alsa dedicated maps opengl sdl"
+
+UIRDEPEND="media-libs/libogg
+ media-libs/libvorbis
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ virtual/opengl
+ alsa? ( media-libs/alsa-lib )
+ sdl? ( media-libs/libsdl )"
+UIDEPEND="x11-proto/xextproto
+ x11-proto/xf86dgaproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto"
+RDEPEND="media-libs/jpeg
+ net-misc/curl
+ opengl? ( ${UIRDEPEND} )
+ !dedicated? ( !opengl? ( ${UIRDEPEND} ) )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ opengl? ( ${UIDEPEND} )
+ !dedicated? ( !opengl? ( ${UIDEPEND} ) )"
+
+S=${WORKDIR}/darkplaces
+
+src_unpack() {
+ unpack ${MY_P}.zip
+
+ local f
+ for f in "${MY_PN}"/sources/*.zip ; do
+ unpack ./${f}
+ done
+
+ if use maps ; then
+ cd "${WORKDIR}"/${MY_PN}
+ unpack ${MAPS}.zip
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-memory-leak.patch
+
+ # Make the game automatically look in the correct data directory
+ sed -i \
+ -e "/^CC=/d" \
+ -e "s:-O2:${CFLAGS}:" \
+ -e "/-lm/s:$: ${LDFLAGS}:" \
+ -e '/^STRIP/s/strip/true/' \
+ makefile.inc \
+ || die "sed failed"
+
+ sed -i \
+ -e "s:ifdef DP_.*:DP_FS_BASEDIR=${GAMES_DATADIR}/nexuiz\n&:" \
+ makefile \
+ || die "sed failed"
+
+ if ! use alsa ; then
+ sed -i \
+ -e "/DEFAULT_SNDAPI/s:ALSA:OSS:" \
+ makefile \
+ || die "sed failed"
+ fi
+}
+
+src_compile() {
+ if use opengl || ! use dedicated ; then
+ emake cl-${PN} || die "emake cl-${PN} failed"
+ if use sdl ; then
+ emake sdl-${PN} || die "emake sdl-${PN} failed"
+ fi
+ fi
+
+ if use dedicated ; then
+ emake sv-${PN} || die "emake sv-${PN} failed"
+ fi
+}
+
+src_install() {
+ if use opengl || ! use dedicated ; then
+ dogamesbin ${PN}-glx || die "dogamesbin glx failed"
+ newicon darkplaces72x72.png ${PN}.png
+ make_desktop_entry ${PN}-glx "Nexuiz (GLX)"
+ if use sdl ; then
+ dogamesbin ${PN}-sdl || die "dogamesbin sdl failed"
+ make_desktop_entry ${PN}-sdl "Nexuiz (SDL)"
+ dosym ${PN}-sdl "${GAMES_BINDIR}"/${PN}
+ else
+ dosym ${PN}-glx "${GAMES_BINDIR}"/${PN}
+ fi
+ fi
+
+ if use dedicated ; then
+ dogamesbin ${PN}-dedicated || die "dogamesbin dedicated failed"
+ fi
+
+ cd "${WORKDIR}"/${MY_PN}
+
+ dodoc Docs/*.txt
+ dohtml Docs/*.{htm,html}
+
+ insinto "${GAMES_DATADIR}"/${PN}
+
+ if use dedicated ; then
+ doins -r server || die "doins server failed"
+ fi
+
+ doins -r data || die "doins data failed"
+ doins -r havoc || die "doins havoc failed"
+
+ prepgamesdirs
+}