summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-01-05 05:30:17 +0000
committerMike Frysinger <vapier@gentoo.org>2004-01-05 05:30:17 +0000
commiteeba1479980126e2c5c65ef0409ee600dafed28f (patch)
tree61930428e37e295ada5b46700a3a35aa52790eba /games-fps
parentVersion bump, fixed copyright. (diff)
downloadhistorical-eeba1479980126e2c5c65ef0409ee600dafed28f.tar.gz
historical-eeba1479980126e2c5c65ef0409ee600dafed28f.tar.bz2
historical-eeba1479980126e2c5c65ef0409ee600dafed28f.zip
ver bump #36807
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/cube/ChangeLog8
-rw-r--r--games-fps/cube/cube-20031223.ebuild78
-rw-r--r--games-fps/cube/files/20031223-gentoo-paths.patch43
-rw-r--r--games-fps/cube/files/cube_client-bin3
-rw-r--r--games-fps/cube/files/cube_server-bin3
-rw-r--r--games-fps/cube/files/digest-cube-200312231
6 files changed, 135 insertions, 1 deletions
diff --git a/games-fps/cube/ChangeLog b/games-fps/cube/ChangeLog
index cfd8faddc868..450940ca6596 100644
--- a/games-fps/cube/ChangeLog
+++ b/games-fps/cube/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-fps/cube
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/ChangeLog,v 1.2 2003/09/10 16:04:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/ChangeLog,v 1.3 2004/01/05 05:30:17 vapier Exp $
+
+*cube-20031223 (05 Jan 2004)
+
+ 05 Jan 2004; Mike Frysinger <vapier@gentoo.org> :
+ Ugh, dont know what i was thinking ... the old ebuild was ugly as
+ hell. This new one should be nicer :) #36807.
*cube-20021020-r2 (03 Mar 2003)
diff --git a/games-fps/cube/cube-20031223.ebuild b/games-fps/cube/cube-20031223.ebuild
new file mode 100644
index 000000000000..b21b7956fe4a
--- /dev/null
+++ b/games-fps/cube/cube-20031223.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/cube-20031223.ebuild,v 1.1 2004/01/05 05:30:17 vapier Exp $
+
+inherit eutils games
+
+MY_P="cube_2003_12_23"
+DESCRIPTION="Landscape-style engine that pretends to be an indoor first person shooter engine"
+HOMEPAGE="http://wouter.fov120.com/cube/"
+SRC_URI="mirror://sourceforge/cube/${MY_P}.zip"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="x86 ppc"
+
+DEPEND="virtual/opengl
+ media-libs/libsdl
+ media-libs/sdl-mixer
+ media-libs/sdl-image
+ sys-libs/zlib
+ media-libs/libpng"
+
+S=${WORKDIR}/cube
+CUBE_DATADIR=${GAMES_DATADIR}/${PN}/
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}/source
+ unzip -qn ${MY_P}_src.zip || die
+
+ cd ${MY_P}_src/src
+ epatch ${FILESDIR}/${PV}-gentoo-paths.patch || die
+ echo "#define GAMES_DATADIR \"${CUBE_DATADIR}\"" >> tools.h
+ echo "#define GAMES_DATADIR_LEN ${#CUBE_DATADIR}" >> tools.h
+ sed -i \
+ "s:packages/:${CUBE_DATADIR}packages/:" \
+ renderextras.cpp rendermd2.cpp sound.cpp worldio.cpp \
+ || die "fixing data path failed"
+ edos2unix *.cpp
+}
+
+src_compile() {
+ cd source/${MY_P}_src/src
+ emake CXXOPTFLAGS="${CXXFLAGS}" || die
+}
+
+src_install() {
+ dogamesbin source/${MY_P}_src/src/cube_{client,server}
+ exeinto ${GAMES_LIBDIR}/${PN}
+ if [ "${ARCH}" == "x86" ] ; then
+ newexe bin_unix/linux_client cube_client
+ newexe bin_unix/linux_server cube_server
+ elif [ "${ARCH}" == "ppc" ] ; then
+ newexe bin_unix/ppc_linux_client cube_client
+ newexe bin_unix/ppc_linux_server cube_server
+ fi
+ dogamesbin ${FILESDIR}/cube_{client,server}-bin
+ sed -i \
+ -e "s:GENTOO_DATADIR:${CUBE_DATADIR}:" \
+ -e "s:GENTOO_LIBDIR:${GAMES_LIBDIR}/${PN}:" \
+ ${D}/${GAMES_BINDIR}/cube_{client,server}-bin
+
+ dodir ${CUBE_DATADIR}
+ cp -r *.cfg data packages ${D}/${CUBE_DATADIR}
+
+ dodoc source/${MY_P}_src/src/CUBE_TODO.txt
+ dohtml -r docs/
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ einfo "You now have 2 clients and 2 servers:"
+ einfo "cube_client-bin prebuilt version (needed to play on public multiplayer servers)"
+ einfo "cube_client custom client built from source"
+ einfo "Parallel versions of the server have been installed"
+}
diff --git a/games-fps/cube/files/20031223-gentoo-paths.patch b/games-fps/cube/files/20031223-gentoo-paths.patch
new file mode 100644
index 000000000000..594a0714e5fb
--- /dev/null
+++ b/games-fps/cube/files/20031223-gentoo-paths.patch
@@ -0,0 +1,43 @@
+--- tools.cpp.orig 2002-12-17 09:35:55.000000000 -0500
++++ tools.cpp 2002-12-17 09:39:28.000000000 -0500
+@@ -100,8 +100,19 @@
+
+ ///////////////////////// misc tools ///////////////////////
+
++char *addfullpath(char *s) {
++ static char ret[256]; // choose a reasonable max buffer size
++ if (s[0] == '/') { return s; }
++ int slen = strlen(s);
++ memset(ret, 0x00, 256);
++ memcpy(ret, GAMES_DATADIR, GAMES_DATADIR_LEN);
++ memcpy(ret+GAMES_DATADIR_LEN, s, slen);
++ return ret;
++}
++
+ char *path(char *s)
+ {
++ s = addfullpath(s);
+ for(char *t = s; t = strpbrk(t, "/\\"); *t++ = PATHDIV);
+ return s;
+ };
+--- rendergl.cpp.orig 2002-12-17 09:48:00.000000000 -0500
++++ rendergl.cpp 2002-12-17 09:50:19.000000000 -0500
+@@ -59,6 +59,7 @@
+
+ bool installtex(int tnum, char *texname, int &xs, int &ys, bool clamp)
+ {
++ texname = addfullpath(texname);
+ SDL_Surface *s = IMG_Load(texname);
+ if(!s) { conoutf("couldn't load texture %s", (int)texname); return false; };
+ if(s->format->BitsPerPixel!=24) { conoutf("texture must be 24bpp: %s", (int)texname); return false; };
+--- tools.h.orig 2002-12-17 09:51:06.000000000 -0500
++++ tools.h 2002-12-17 09:50:59.000000000 -0500
+@@ -96,7 +96,7 @@
+ #endif
+
+
+-
++extern char *addfullpath(char *s);
+ extern char *path(char *s);
+ extern char *loadfile(char *fn, int *size);
+ extern void endianswap(void *, int, int);
diff --git a/games-fps/cube/files/cube_client-bin b/games-fps/cube/files/cube_client-bin
new file mode 100644
index 000000000000..74dd0c72cbfb
--- /dev/null
+++ b/games-fps/cube/files/cube_client-bin
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd GENTOO_DATADIR
+exec GENTOO_LIBDIR/cube_client "$@"
diff --git a/games-fps/cube/files/cube_server-bin b/games-fps/cube/files/cube_server-bin
new file mode 100644
index 000000000000..8ddd9ce43204
--- /dev/null
+++ b/games-fps/cube/files/cube_server-bin
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd GENTOO_DATADIR
+exec GENTOO_LIBDIR/cube_server "$@"
diff --git a/games-fps/cube/files/digest-cube-20031223 b/games-fps/cube/files/digest-cube-20031223
new file mode 100644
index 000000000000..fd37e49321a0
--- /dev/null
+++ b/games-fps/cube/files/digest-cube-20031223
@@ -0,0 +1 @@
+MD5 22555b87ef16c403198a6f378c048c6f cube_2003_12_23.zip 18587017