diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-01-05 05:30:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-01-05 05:30:17 +0000 |
commit | 3b562df921916c89624a182e316e0d4b9c44c163 (patch) | |
tree | d0fb9481f50afadd2bb161e7c3ab76292b76a131 /games-fps | |
parent | Version bump, fixed copyright. (diff) | |
download | gentoo-2-3b562df921916c89624a182e316e0d4b9c44c163.tar.gz gentoo-2-3b562df921916c89624a182e316e0d4b9c44c163.tar.bz2 gentoo-2-3b562df921916c89624a182e316e0d4b9c44c163.zip |
ver bump #36807
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/cube/ChangeLog | 8 | ||||
-rw-r--r-- | games-fps/cube/cube-20031223.ebuild | 78 | ||||
-rw-r--r-- | games-fps/cube/files/20031223-gentoo-paths.patch | 43 | ||||
-rw-r--r-- | games-fps/cube/files/cube_client-bin | 3 | ||||
-rw-r--r-- | games-fps/cube/files/cube_server-bin | 3 | ||||
-rw-r--r-- | games-fps/cube/files/digest-cube-20031223 | 1 |
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 |