diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-09-25 01:14:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-09-25 01:14:19 +0000 |
commit | 7cf2a158900ca088295ed900f4654886354cefbe (patch) | |
tree | 5940b4650334f530d35da9cfe3524d8bc0a4650d /games-fps | |
parent | gtk2 removal, Bug 106560. cleanup ebuild. (diff) | |
download | gentoo-2-7cf2a158900ca088295ed900f4654886354cefbe.tar.gz gentoo-2-7cf2a158900ca088295ed900f4654886354cefbe.tar.bz2 gentoo-2-7cf2a158900ca088295ed900f4654886354cefbe.zip |
Version bump #104292 by a bunch of peeps.
(Portage version: 2.0.52-r1 http://ronaldmcnightrider.ytmnd.com/ )
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/cube/ChangeLog | 10 | ||||
-rw-r--r-- | games-fps/cube/cube-20050829.ebuild | 102 | ||||
-rw-r--r-- | games-fps/cube/files/cube-20050829-gentoo-paths.patch | 42 | ||||
-rw-r--r-- | games-fps/cube/files/digest-cube-20050829 | 2 |
4 files changed, 154 insertions, 2 deletions
diff --git a/games-fps/cube/ChangeLog b/games-fps/cube/ChangeLog index b15b40096a3b..b6e8db88f520 100644 --- a/games-fps/cube/ChangeLog +++ b/games-fps/cube/ChangeLog @@ -1,6 +1,12 @@ # 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.9 2004/11/12 16:02:04 blubb Exp $ +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/ChangeLog,v 1.10 2005/09/25 01:14:19 vapier Exp $ + +*cube-20050829 (25 Sep 2005) + + 25 Sep 2005; Mike Frysinger <vapier@gentoo.org> + +files/cube-20050829-gentoo-paths.patch, +cube-20050829.ebuild: + Version bump #104292 by a bunch of peeps. 11 Nov 2004; Simon Stelling <blubb@gentoo.org> cube-20040522.ebuild: added ~amd64 diff --git a/games-fps/cube/cube-20050829.ebuild b/games-fps/cube/cube-20050829.ebuild new file mode 100644 index 000000000000..1490d080365e --- /dev/null +++ b/games-fps/cube/cube-20050829.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/cube-20050829.ebuild,v 1.1 2005/09/25 01:14:19 vapier Exp $ + +inherit eutils games + +MY_PV=${PV:0:4}_${PV:4:2}_${PV:6:2} +MY_P=${PN}_${MY_PV} +DESCRIPTION="Landscape-style engine that pretends to be an indoor first person shooter engine" +HOMEPAGE="http://www.cubeengine.com/" +SRC_URI="mirror://sourceforge/cube/${MY_P}_unix.tar.gz + mirror://sourceforge/cube/${MY_P}_src.zip" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~x86" +IUSE="dedicated" + +RDEPEND="virtual/opengl + virtual/glu + media-libs/libsdl + media-libs/sdl-mixer + media-libs/sdl-image + sys-libs/zlib + media-libs/libpng" +DEPEND="${RDEPEND} + app-arch/unzip + >=sys-apps/sed-4" + +S=${WORKDIR}/cube_source +S_BIN=${WORKDIR}/cube +CUBE_DATADIR=${GAMES_DATADIR}/${PN}/ + +src_unpack() { + unpack ${A} + + cd "${S}"/src + epatch "${FILESDIR}"/${P}-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 + chmod a+x "${S}"/enet/configure +} + +src_compile() { + cd enet + egamesconf || die "egamesconf failed" + emake || die "emake failed" + cd ../src + einfo "Compiling in $(pwd)" + emake CXXOPTFLAGS="-DHAS_SOCKLEN_T=1 -fpermissive ${CXXFLAGS}" \ + || die "emake failed" +} + +src_install() { + dogamesbin src/cube_client || die "dogamesbin client failed" + if use dedicated ; then + dogamesbin src/cube_server "${S_BIN}"/bin_unix/linux_server \ + || die "dogamesbin server failed" + fi + dodoc src/CUBE_TODO.txt + + cd "${S_BIN}" + insinto "${CUBE_DATADIR}" + doins -r *.cfg data packages || die "cp failed" + dohtml -r docs readme.html + + if [[ ${ARCH} == "x86" ]] ; then + exeinto "${GAMES_LIBDIR}"/${PN} + newexe bin_unix/linux_client cube_client || die "newexe server failed" + games_make_wrapper cube_client-bin \ + "${GAMES_LIBDIR}"/${PN}/cube_client "${GAMES_DATADIR}"/${PN} \ + || die "games_make_wrapper client failed" + make_desktop_entry cube_client-bin "Cube Client" + else + make_desktop_entry cube_client "Cube Client" + fi + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + if [[ ${ARCH} == "x86" ]] ; then + einfo "You now have 2 clients and 2 servers:" + einfo "cube_client-bin prebuilt version (needed to play on public multiplayer servers)" + else + einfo "You only have 1 client and 1 server:" + fi + einfo "cube_client custom client built from source" + use dedicated && \ + einfo "Parallel versions of the server have been installed" +} diff --git a/games-fps/cube/files/cube-20050829-gentoo-paths.patch b/games-fps/cube/files/cube-20050829-gentoo-paths.patch new file mode 100644 index 000000000000..137bcb7b5470 --- /dev/null +++ b/games-fps/cube/files/cube-20050829-gentoo-paths.patch @@ -0,0 +1,42 @@ +--- tools.cpp ++++ tools.cpp +@@ -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.origin 2005-08-30 17:07:30.000000000 +0200 ++++ rendergl.cpp 2005-08-30 17:12:52.000000000 +0200 +@@ -69,6 +69,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", texname); return false; };
+ if(s->format->BitsPerPixel!=24) { conoutf("texture must be 24bpp: %s", texname); return false; };
+--- tools.h ++++ tools.h +@@ -110,6 +110,7 @@ +
+
+
++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-20050829 b/games-fps/cube/files/digest-cube-20050829 new file mode 100644 index 000000000000..96c5a9f152b0 --- /dev/null +++ b/games-fps/cube/files/digest-cube-20050829 @@ -0,0 +1,2 @@ +MD5 e376c49ac209b095cb6d29490834d060 cube_2005_08_29_src.zip 482335 +MD5 e77f3cf85292bf61100d2f8511a254cc cube_2005_08_29_unix.tar.gz 30412318 |