summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-08-15 09:17:41 +0000
committerMike Frysinger <vapier@gentoo.org>2004-08-15 09:17:41 +0000
commitc14e92fbbbcb49287af8442960f7b209b33cf680 (patch)
tree5ace4948feceecc14141bb372186c3e552a789b6 /games-fps
parentadded bug number to changelog (Manifest recommit) (diff)
downloadgentoo-2-c14e92fbbbcb49287af8442960f7b209b33cf680.tar.gz
gentoo-2-c14e92fbbbcb49287af8442960f7b209b33cf680.tar.bz2
gentoo-2-c14e92fbbbcb49287af8442960f7b209b33cf680.zip
ver bump #52022
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/cube/ChangeLog9
-rw-r--r--games-fps/cube/cube-20031223.ebuild5
-rw-r--r--games-fps/cube/cube-20040522.ebuild93
-rw-r--r--games-fps/cube/files/20040522-compile-fixes.patch13
-rw-r--r--games-fps/cube/files/20040522-gentoo-paths.patch43
-rw-r--r--games-fps/cube/files/digest-cube-200405221
6 files changed, 161 insertions, 3 deletions
diff --git a/games-fps/cube/ChangeLog b/games-fps/cube/ChangeLog
index 44f2b9a9d8e6..a13e10c9fa4c 100644
--- a/games-fps/cube/ChangeLog
+++ b/games-fps/cube/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-fps/cube
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/ChangeLog,v 1.5 2004/06/24 22:41:12 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/ChangeLog,v 1.6 2004/08/15 09:17:41 vapier Exp $
+
+*cube-20040522 (15 Aug 2004)
+
+ 15 Aug 2004; Mike Frysinger <vapier@gentoo.org>
+ +files/20040522-compile-fixes.patch, +files/20040522-gentoo-paths.patch,
+ cube-20031223.ebuild, +cube-20040522.ebuild:
+ Version bump #52022 by Markus Rothe + Stefan Schweizer.
15 Mar 2004; Michael Sterrett <mr_bones_@gentoo.org>
cube-20021020-r2.ebuild, cube-20031223.ebuild:
diff --git a/games-fps/cube/cube-20031223.ebuild b/games-fps/cube/cube-20031223.ebuild
index 57eff61be1fc..b0aa9f71d729 100644
--- a/games-fps/cube/cube-20031223.ebuild
+++ b/games-fps/cube/cube-20031223.ebuild
@@ -1,10 +1,11 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/cube-20031223.ebuild,v 1.6 2004/06/24 22:41:12 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/cube-20031223.ebuild,v 1.7 2004/08/15 09:17:41 vapier Exp $
inherit eutils games
MY_P="cube_2003_12_23"
+
DESCRIPTION="open source multiplayer and singleplayer first person shooter game"
HOMEPAGE="http://www.cubeengine.com/"
SRC_URI="mirror://sourceforge/cube/${MY_P}.zip"
@@ -34,7 +35,7 @@ src_unpack() {
unzip -qn ${MY_P}_src.zip || die
cd ${MY_P}_src/src
- epatch ${FILESDIR}/${PV}-gentoo-paths.patch || die
+ epatch ${FILESDIR}/${PV}-gentoo-paths.patch
echo "#define GAMES_DATADIR \"${CUBE_DATADIR}\"" >> tools.h
echo "#define GAMES_DATADIR_LEN ${#CUBE_DATADIR}" >> tools.h
sed -i \
diff --git a/games-fps/cube/cube-20040522.ebuild b/games-fps/cube/cube-20040522.ebuild
new file mode 100644
index 000000000000..18999dd6858b
--- /dev/null
+++ b/games-fps/cube/cube-20040522.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/cube-20040522.ebuild,v 1.1 2004/08/15 09:17:41 vapier Exp $
+
+inherit eutils games
+
+MY_PV="2004_05_22"
+MY_P=${PN}_${MY_PV}
+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}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="x86 ppc hppa"
+IUSE=""
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ media-libs/libsdl
+ media-libs/sdl-mixer
+ media-libs/sdl-image
+ sys-libs/zlib
+ media-libs/libpng"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+S="${WORKDIR}/cube"
+CUBE_DATADIR="${GAMES_DATADIR}/${PN}/"
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}/source
+ unzip -qn ${MY_P}_src.zip || die
+ epatch ${FILESDIR}/${PV}-compile-fixes.patch
+
+ cd src
+ epatch ${FILESDIR}/${PV}-gentoo-paths.patch
+ echo "#define GAMES_DATADIR \"${CUBE_DATADIR}\"" >> tools.h
+ echo "#define GAMES_DATADIR_LEN ${#CUBE_DATADIR}" >> tools.h
+ sed -i \
+ -e "s:packages/:${CUBE_DATADIR}packages/:" \
+ renderextras.cpp rendermd2.cpp sound.cpp worldio.cpp \
+ || die "fixing data path failed"
+ # enable parallel make
+ sed -i \
+ -e 's/make -C/$(MAKE) -C/' \
+ Makefile \
+ || die "sed Makefile failed"
+ edos2unix *.cpp
+}
+
+src_compile() {
+ cd source/enet
+ chmod +x configure
+ econf || die "econf failed"
+ emake || die
+ cd ../src
+ emake CXXOPTFLAGS="-fpermissive ${CXXFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dogamesbin source/src/cube_{client,server} || die "dogamesbin failed"
+ 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 || die "dogamesbin failed (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} || die "cp failed"
+
+ dodoc source/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/20040522-compile-fixes.patch b/games-fps/cube/files/20040522-compile-fixes.patch
new file mode 100644
index 000000000000..c92d281cfc22
--- /dev/null
+++ b/games-fps/cube/files/20040522-compile-fixes.patch
@@ -0,0 +1,13 @@
+--- src/clientgame.cpp.orig 2004-07-29 22:42:36.297967768 +0200
++++ src/clientgame.cpp 2004-07-29 22:42:50.019881720 +0200
+@@ -200,8 +200,8 @@
+
+ int sleepwait = 0;
+ string sleepcmd;
+-void sleep(char *msec, char *cmd) { sleepwait = atoi(msec)+lastmillis; strcpy_s(sleepcmd, cmd); };
+-COMMAND(sleep, ARG_2STR);
++void mysleep(char *msec, char *cmd) { sleepwait = atoi(msec)+lastmillis; strcpy_s(sleepcmd, cmd); };
++COMMAND(mysleep, ARG_2STR);
+
+ void updateworld(int millis) // main game update loop
+ {
diff --git a/games-fps/cube/files/20040522-gentoo-paths.patch b/games-fps/cube/files/20040522-gentoo-paths.patch
new file mode 100644
index 000000000000..594a0714e5fb
--- /dev/null
+++ b/games-fps/cube/files/20040522-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/digest-cube-20040522 b/games-fps/cube/files/digest-cube-20040522
new file mode 100644
index 000000000000..caeee6c14a03
--- /dev/null
+++ b/games-fps/cube/files/digest-cube-20040522
@@ -0,0 +1 @@
+MD5 a0ae899d9af6ab65970d81bf3ccd94ee cube_2004_05_22.tar.gz 22566432