summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Heaven <tristan@gentoo.org>2009-08-24 12:25:53 +0000
committerTristan Heaven <tristan@gentoo.org>2009-08-24 12:25:53 +0000
commitf67a1b70889f70542ad7d07e5fff857204d930b9 (patch)
tree47735f0d5e64913a1d0dec8a18aa816c9a9a9210 /games-fps/nexuiz
parentNew version that allows more kernel routing tables in IPv6 and contains a cor... (diff)
downloadhistorical-f67a1b70889f70542ad7d07e5fff857204d930b9.tar.gz
historical-f67a1b70889f70542ad7d07e5fff857204d930b9.tar.bz2
historical-f67a1b70889f70542ad7d07e5fff857204d930b9.zip
Patch from Gef Lebster to fix incompatibility with jpeg-7, bug #282406
Package-Manager: portage-2.2_rc39/cvs/Linux x86_64
Diffstat (limited to 'games-fps/nexuiz')
-rw-r--r--games-fps/nexuiz/ChangeLog8
-rw-r--r--games-fps/nexuiz/Manifest14
-rw-r--r--games-fps/nexuiz/files/nexuiz-2.5.1-jpeg.patch113
-rw-r--r--games-fps/nexuiz/nexuiz-2.5.1-r1.ebuild137
4 files changed, 270 insertions, 2 deletions
diff --git a/games-fps/nexuiz/ChangeLog b/games-fps/nexuiz/ChangeLog
index 2092bfeefa29..1326ff8f1a4e 100644
--- a/games-fps/nexuiz/ChangeLog
+++ b/games-fps/nexuiz/ChangeLog
@@ -1,6 +1,12 @@
# 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.33 2009/07/10 16:06:46 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/nexuiz/ChangeLog,v 1.34 2009/08/24 12:25:52 nyhm Exp $
+
+*nexuiz-2.5.1-r1 (24 Aug 2009)
+
+ 24 Aug 2009; Tristan Heaven <nyhm@gentoo.org> +nexuiz-2.5.1-r1.ebuild,
+ +files/nexuiz-2.5.1-jpeg.patch:
+ Patch from Gef Lebster to fix incompatibility with jpeg-7, bug #282406
10 Jul 2009; Michael Sterrett <mr_bones_@gentoo.org> nexuiz-2.5.1.ebuild:
add use-based deps for libsdl (bug #277275)
diff --git a/games-fps/nexuiz/Manifest b/games-fps/nexuiz/Manifest
index a27e2507026c..40f944232e8c 100644
--- a/games-fps/nexuiz/Manifest
+++ b/games-fps/nexuiz/Manifest
@@ -1,7 +1,19 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX nexuiz-2.5.1-jpeg.patch 2918 RMD160 d87ce8c1fcd37e86d2a18b97bbf6c97a28f74ef9 SHA1 e9692fc1d1ea0cf281a7ba9589694d17948433f8 SHA256 94f098d5434ceba42ce4136ace65ebfb8cda04936f040eff66e2f4849af3263b
DIST nexmappack_r2.zip 113533483 RMD160 8fbf25ba69ecbaa8170aa468d29ee2f04df5b7f4 SHA1 9d6780822bd682346e74b83e72fafbad45b1ad38 SHA256 15088c7632e0b4f487c789fba4296f44ef5a5d83b51adcb9e603e289e5b8241e
DIST nexuiz-242.zip 393779967 RMD160 0b62abe33311a6b1128584e45f137cee9c62d05d SHA1 387e76889699ef5b7f6ee115833284597410a7ac SHA256 ec31db254fd94508f63a5651beff73ce5c9e187e9c91f35f7616f33f082ae52b
DIST nexuiz-251.zip 691491576 RMD160 cdfb2c390754721518149d3d34b6e1fecd9bafb7 SHA1 19b098adea29ea3b66a1082a453e403480faa97d SHA256 d33193b5e9ecdb0619c0dde23f0aa7ae740da25a025efbd90e90ea04e61cf756
EBUILD nexuiz-2.4.2.ebuild 3021 RMD160 da25da8d93dfd365de07fed2a14e29355ba8c2fb SHA1 3324a6c5b37c1c31a5621149c3df9b3b9ceba262 SHA256 0856baee4f8ca658cfc3cf80d2783ffcc05f6cb21c8399d35f7a9b1526607c30
+EBUILD nexuiz-2.5.1-r1.ebuild 3075 RMD160 bd79cf4411fc5631ebac44f63d82f5a6f9252df9 SHA1 c9060d5d4bbfbec47f4c9b64a5eae1ce1a0ca27c SHA256 932a5e68305f5d4139b98a3a7b69a9095dc7c3a562cf86bcdbc2ba1cb430e891
EBUILD nexuiz-2.5.1.ebuild 2924 RMD160 03879b3f8593ff968d17fe11e3327ce95a40b7ef SHA1 461f9f9ef548341045493a7dbb45654c029eabd8 SHA256 b9f2056372340f68f9e1ad0783bbd4fd49772fcc02ceeca34c62739f3f5cd494
-MISC ChangeLog 4657 RMD160 7fcb8341b6719f5a8fada2e3b79098648b4b50dc SHA1 88d221b80f1d811c2ef622d1820b5a4b4667cba1 SHA256 eea88c1e675c6f9d6f23fb41bac73275def71ed7c1e8cac8c1701b568b37e665
+MISC ChangeLog 4865 RMD160 2b6fbb7523137e0a00e127ca95b39b6759621ef6 SHA1 1d006f91d56f4414ab7d72293ddab2245c97c153 SHA256 4c563785a54f5eed76bdd42c55b8481e4354540847f0309af6589f4980adb3d4
MISC metadata.xml 237 RMD160 8b32fda78d72ed7e6df1c6929b0d8ea7e7e857c4 SHA1 9c54a6fbadee617e7bb934db865a98890ce02632 SHA256 a35634a2c24559545aef4e6e3a59cefa0c3d38644e83d1bbe30cd9530787b110
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.11 (GNU/Linux)
+
+iEYEARECAAYFAkqShtYACgkQdz7hIScOURGD3gCgiF/7LOwuc8mHK/7IP6ZT3Gfe
+m/cAn255VdacQxYgPZ7HVruhy3deQN/D
+=1WK+
+-----END PGP SIGNATURE-----
diff --git a/games-fps/nexuiz/files/nexuiz-2.5.1-jpeg.patch b/games-fps/nexuiz/files/nexuiz-2.5.1-jpeg.patch
new file mode 100644
index 000000000000..6e34428adbc3
--- /dev/null
+++ b/games-fps/nexuiz/files/nexuiz-2.5.1-jpeg.patch
@@ -0,0 +1,113 @@
+--- darkplaces/makefile 2008/07/19 12:03:15 8416
++++ darkplaces/makefile 2009/07/20 15:30:38 9064
+@@ -251,6 +251,14 @@
+ endif
+ endif
+
++ifdef DP_LINK_TO_LIBJPEG
++ LDFLAGS_LIBJPEG?=-ljpeg
++ LDFLAGS_CL+=$(LDFLAGS_LIBJPEG)
++ LDFLAGS_SV+=$(LDFLAGS_LIBJPEG)
++ LDFLAGS_SDL+=$(LDFLAGS_LIBJPEG)
++ CFLAGS_PRELOAD+=$(CFLAGS_LIBJPEG) -DLINK_TO_LIBJPEG
++endif
++
+ ##### GNU Make specific definitions #####
+
+ DO_LD=$(CC) -o $@ $^ $(LDFLAGS)
+
+--- darkplaces/jpeg.c 2009/04/10 14:37:23 8892
++++ darkplaces/jpeg.c 2009/07/20 15:30:38 9064
+@@ -28,6 +28,32 @@
+
+ cvar_t sv_writepicture_quality = {CVAR_SAVE, "sv_writepicture_quality", "10", "WritePicture quality offset (higher means better quality, but slower)"};
+
++// jboolean is unsigned char instead of int on Win32
++#ifdef WIN32
++typedef unsigned char jboolean;
++#else
++typedef int jboolean;
++#endif
++
++#ifdef LINK_TO_LIBJPEG
++#include <jpeglib.h>
++#define qjpeg_create_compress jpeg_create_compress
++#define qjpeg_create_decompress jpeg_create_decompress
++#define qjpeg_destroy_compress jpeg_destroy_compress
++#define qjpeg_destroy_decompress jpeg_destroy_decompress
++#define qjpeg_finish_compress jpeg_finish_compress
++#define qjpeg_finish_decompress jpeg_finish_decompress
++#define qjpeg_resync_to_restart jpeg_resync_to_restart
++#define qjpeg_read_header jpeg_read_header
++#define qjpeg_read_scanlines jpeg_read_scanlines
++#define qjpeg_set_defaults jpeg_set_defaults
++#define qjpeg_set_quality jpeg_set_quality
++#define qjpeg_start_compress jpeg_start_compress
++#define qjpeg_start_decompress jpeg_start_decompress
++#define qjpeg_std_error jpeg_std_error
++#define qjpeg_write_scanlines jpeg_write_scanlines
++#define jpeg_dll true
++#else
+ /*
+ =================================================================
+
+@@ -39,18 +65,12 @@
+ =================================================================
+ */
+
+-// jboolean is unsigned char instead of int on Win32
+-#ifdef WIN32
+-typedef unsigned char jboolean;
+-#else
+-typedef int jboolean;
+-#endif
+-
+-#define JPEG_LIB_VERSION 62 // Version 6b
+-
+ typedef void *j_common_ptr;
+ typedef struct jpeg_compress_struct *j_compress_ptr;
+ typedef struct jpeg_decompress_struct *j_decompress_ptr;
++
++#define JPEG_LIB_VERSION 62 // Version 6b
++
+ typedef enum
+ {
+ JCS_UNKNOWN,
+@@ -430,6 +450,7 @@
+ // Handle for JPEG DLL
+ dllhandle_t jpeg_dll = NULL;
+ qboolean jpeg_tried_loading = 0;
++#endif
+
+ static unsigned char jpeg_eoi_marker [2] = {0xFF, JPEG_EOI};
+ static jmp_buf error_in_jpeg;
+@@ -464,6 +485,9 @@
+ */
+ qboolean JPEG_OpenLibrary (void)
+ {
++#ifdef LINK_TO_LIBJPEG
++ return true;
++#else
+ const char* dllnames [] =
+ {
+ #if defined(WIN64)
+@@ -490,6 +514,7 @@
+
+ // Load the DLL
+ return Sys_LoadLibrary (dllnames, &jpeg_dll, jpegfuncs);
++#endif
+ }
+
+
+@@ -502,8 +527,10 @@
+ */
+ void JPEG_CloseLibrary (void)
+ {
++#ifndef LINK_TO_LIBJPEG
+ Sys_UnloadLibrary (&jpeg_dll);
+ jpeg_tried_loading = false; // allow retry
++#endif
+ }
+
+
+
diff --git a/games-fps/nexuiz/nexuiz-2.5.1-r1.ebuild b/games-fps/nexuiz/nexuiz-2.5.1-r1.ebuild
new file mode 100644
index 000000000000..e08feacd556f
--- /dev/null
+++ b/games-fps/nexuiz/nexuiz-2.5.1-r1.ebuild
@@ -0,0 +1,137 @@
+# 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.1-r1.ebuild,v 1.1 2009/08/24 12:25:52 nyhm 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
+ media-libs/libtheora
+ media-libs/libpng
+ media-libs/libmodplug
+ 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[joystick,video] )"
+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}-jpeg.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 '1i DP_LINK_TO_LIBJPEG=1' \
+ -e '1i DP_PRELOAD_DEPENDENCIES=1' \
+ -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"
+ doicon ${PN}.xpm
+ 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 -r readme.html Docs
+
+ 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
+}