diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-01-03 23:52:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-01-03 23:52:32 +0000 |
commit | 02ad5dcd0475459753070ad58f0752a8280f9fc3 (patch) | |
tree | ab69a2ac31f9f87562878b32658496af8a3d316f /games-fps | |
parent | Stable on x86. (Manifest recommit) (diff) | |
download | gentoo-2-02ad5dcd0475459753070ad58f0752a8280f9fc3.tar.gz gentoo-2-02ad5dcd0475459753070ad58f0752a8280f9fc3.tar.bz2 gentoo-2-02ad5dcd0475459753070ad58f0752a8280f9fc3.zip |
Version bump. Also update the gentoo path patch to fix game .so searching #42389 and video .so searching #60752.
Diffstat (limited to 'games-fps')
7 files changed, 293 insertions, 4 deletions
diff --git a/games-fps/quake2-icculus/ChangeLog b/games-fps/quake2-icculus/ChangeLog index 99122d3e5de7..7aa03ddd1a77 100644 --- a/games-fps/quake2-icculus/ChangeLog +++ b/games-fps/quake2-icculus/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for games-fps/quake2-icculus -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/ChangeLog,v 1.10 2004/11/27 15:46:27 wolf31o2 Exp $ +# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/ChangeLog,v 1.11 2005/01/03 23:52:32 vapier Exp $ + +*quake2-icculus-0.16 (03 Jan 2005) + + 03 Jan 2005; Mike Frysinger <vapier@gentoo.org> + +files/0.16-Makefile-gentoo-opts.patch, +files/0.16-gentoo-path.patch, + +files/0.16-rogue-nan.patch, +quake2-icculus-0.16.ebuild: + Version bump. Also update the gentoo path patch to fix game .so searching + #42389 and video .so searching #60752. *quake2-icculus-0.15-r2 (27 Nov 2004) diff --git a/games-fps/quake2-icculus/files/0.16-Makefile-gentoo-opts.patch b/games-fps/quake2-icculus/files/0.16-Makefile-gentoo-opts.patch new file mode 100644 index 000000000000..2a588f0b03e8 --- /dev/null +++ b/games-fps/quake2-icculus/files/0.16-Makefile-gentoo-opts.patch @@ -0,0 +1,10 @@ +--- Makefile.orig 2005-01-03 02:02:43.817859176 -0500 ++++ Makefile 2005-01-03 02:02:45.050671760 -0500 +@@ -149,6 +149,7 @@ + endif + + DEBUG_CFLAGS=$(BASE_CFLAGS) -g ++RELEASE_CFLAGS=$(BASE_CFLAGS) $(OPTCFLAGS) + + ifeq ($(OSTYPE),FreeBSD) + LDFLAGS=-lm diff --git a/games-fps/quake2-icculus/files/0.16-gentoo-path.patch b/games-fps/quake2-icculus/files/0.16-gentoo-path.patch new file mode 100644 index 000000000000..fe20ae0b07be --- /dev/null +++ b/games-fps/quake2-icculus/files/0.16-gentoo-path.patch @@ -0,0 +1,111 @@ +--- src/qcommon/files.c.orig 2004-01-02 01:55:47.219787792 -0500 ++++ src/qcommon/files.c 2004-01-02 01:55:55.622510384 -0500 +@@ -0,0 +0,1 @@ ++#include "../linux/gentoo-paths.h" +@@ -60,6 +60,7 @@ + + char fs_gamedir[MAX_OSPATH]; + cvar_t *fs_basedir; ++cvar_t *fs_libdir; + cvar_t *fs_cddir; + cvar_t *fs_gamedirvar; + +@@ -696,6 +696,7 @@ + if (fs_cddir->string[0]) + FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) ); + FS_AddGameDirectory (va("%s/%s", fs_basedir->string, dir) ); ++ FS_AddGameDirectory (va("%s/%s", fs_libdir->string, dir) ); + FS_AddHomeAsGameDirectory(dir); + } + } +@@ -898,7 +899,8 @@ + // basedir <path> + // allows the game to run from outside the data tree + // +- fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET); ++ fs_basedir = Cvar_Get ("basedir", GENTOO_DATADIR, CVAR_NOSET); ++ fs_libdir = Cvar_Get ("libdir", GENTOO_LIBDIR, CVAR_NOSET); + + // + // cddir <path> +@@ -913,6 +915,7 @@ + // add baseq2 to search path + // + FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) ); ++ FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_libdir->string) ); + + // + // then add a '.quake2/baseq2' directory in home directory by default +--- src/linux/vid_so.c.orig 2004-01-02 10:37:46.527355832 -0500 ++++ src/linux/vid_so.c 2004-01-02 10:39:23.890554376 -0500 +@@ -0,0 +0,1 @@ ++#include "gentoo-paths.h" +@@ -231,13 +232,17 @@ + //regain root + seteuid(saved_euid); + +- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string; ++ path = Cvar_Get ("basedir", GENTOO_DATADIR, CVAR_NOSET)->string; + + snprintf (fn, MAX_OSPATH, "%s/%s", path, name ); + + if (stat(fn, &st) == -1) { +- Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno)); +- return false; ++ path = Cvar_Get ("libdir", GENTOO_LIBDIR, CVAR_NOSET)->string; ++ snprintf (fn, MAX_OSPATH, "%s/%s", path, name ); ++ if (stat(fn, &st) == -1) { ++ Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno)); ++ return false; ++ } + } + + // permission checking +@@ -498,13 +498,19 @@ + char *path; + struct stat st; + +- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string; ++ path = Cvar_Get ("basedir", GENTOO_DATADIR, CVAR_NOSET)->string; + snprintf (fn, MAX_OSPATH, "%s/ref_%s.so", path, ref ); + + if (stat(fn, &st) == 0) + return true; +- else +- return false; ++ else { ++ path = Cvar_Get ("libdir", GENTOO_LIBDIR, CVAR_NOSET)->string; ++ snprintf (fn, MAX_OSPATH, "%s/ref_%s.so", path, ref ); ++ if (stat(fn, &st) == 0) ++ return true; ++ else ++ return false; ++ } + } + + /*****************************************************************************/ +--- src/linux/qgl_linux.c.orig 2005-01-03 18:12:07.504634768 -0500 ++++ src/linux/qgl_linux.c 2005-01-03 18:13:47.662408472 -0500 +@@ -0,0 +0,1 @@ ++#include "../linux/gentoo-paths.h" +@@ -3006,13 +3006,17 @@ + // dllname, dlerror()); + + // try basedir next +- path = ri.Cvar_Get ("basedir", ".", CVAR_NOSET)->string; ++ path = ri.Cvar_Get ("basedir", GENTOO_DATADIR, CVAR_NOSET)->string; + + snprintf (fn, MAX_OSPATH, "%s/%s", path, dllname ); + + if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) { +- ri.Con_Printf( PRINT_ALL, "%s\n", dlerror() ); +- return false; ++ path = ri.Cvar_Get ("libdir", GENTOO_LIBDIR, CVAR_NOSET)->string; ++ snprintf (fn, MAX_OSPATH, "%s/%s", path, dllname ); ++ if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) { ++ ri.Con_Printf( PRINT_ALL, "%s\n", dlerror() ); ++ return false; ++ } + } + Com_Printf ("Using %s for OpenGL...", fn); + } else { diff --git a/games-fps/quake2-icculus/files/0.16-rogue-nan.patch b/games-fps/quake2-icculus/files/0.16-rogue-nan.patch new file mode 100644 index 000000000000..5db9d892c006 --- /dev/null +++ b/games-fps/quake2-icculus/files/0.16-rogue-nan.patch @@ -0,0 +1,7 @@ +--- src/rogue/g_local.h.orig 2005-01-03 02:16:03.233329552 -0500 ++++ src/rogue/g_local.h 2005-01-03 02:16:03.244327880 -0500 +@@ -24,3 +24,3 @@ + #ifndef _WIN32 +-#include <nan.h> ++#include <bits/nan.h> + #define min(a,b) ((a) < (b) ? (a) : (b)) diff --git a/games-fps/quake2-icculus/files/digest-quake2-icculus-0.16 b/games-fps/quake2-icculus/files/digest-quake2-icculus-0.16 new file mode 100644 index 000000000000..8c6b13558ac0 --- /dev/null +++ b/games-fps/quake2-icculus/files/digest-quake2-icculus-0.16 @@ -0,0 +1,4 @@ +MD5 e01b8842535415a76198f5fbb8a8ebf7 quake2-r0.16.tar.gz 1525908 +MD5 04d3f1fb7fb4dada7175a41f4595c7eb maxpak.pak 3282742 +MD5 7d5e052839c9e629bad0a6570aa70554 roguesrc320.shar.Z 626769 +MD5 41fc4ecc4f25c068e7d1f488bd4a1e1a xatrixsrc320.shar.Z 455917 diff --git a/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild b/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild index eb7f0a389643..10192d8acb2c 100644 --- a/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild +++ b/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild,v 1.1 2004/11/27 15:46:27 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild,v 1.2 2005/01/03 23:52:32 vapier Exp $ inherit eutils gcc games diff --git a/games-fps/quake2-icculus/quake2-icculus-0.16.ebuild b/games-fps/quake2-icculus/quake2-icculus-0.16.ebuild new file mode 100644 index 000000000000..94924f850982 --- /dev/null +++ b/games-fps/quake2-icculus/quake2-icculus-0.16.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/quake2-icculus-0.16.ebuild,v 1.1 2005/01/03 23:52:32 vapier Exp $ + +inherit eutils games + +MY_P="quake2-r${PV}" +DESCRIPTION="The icculus.org linux port of iD's quake2 engine" +HOMEPAGE="http://icculus.org/quake2/" +SRC_URI="http://icculus.org/quake2/files/${MY_P}.tar.gz + !noqmax? ( http://icculus.org/quake2/files/maxpak.pak ) + rogue? ( ftp://ftp.idsoftware.com/idstuff/quake2/source/roguesrc320.shar.Z ) + xatrix? ( ftp://ftp.idsoftware.com/idstuff/quake2/source/xatrixsrc320.shar.Z )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ppc sparc x86" +IUSE="arts svga sdl aalib dedicated opengl noqmax rogue xatrix ipv6" + +# default to X11 if svga/opengl/sdl/aalib/dedicated are not in USE +RDEPEND="virtual/libc + opengl? ( virtual/opengl ) + svga? ( media-libs/svgalib ) + sdl? ( media-libs/libsdl ) + aalib? ( media-libs/aalib ) + !svga? ( !opengl? ( !sdl? ( !aalib? ( !dedicated? ( virtual/x11 ) ) ) ) ) + arts? ( kde-base/arts )" +DEPEND="${RDEPEND} + >=sys-apps/sed-4 + app-arch/sharutils" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${MY_P}.tar.gz + cd ${S} + epatch "${FILESDIR}"/${PV}-Makefile-gentoo-opts.patch + epatch "${FILESDIR}"/${PV}-gentoo-path.patch + cat << EOF > src/linux/gentoo-paths.h +#define GENTOO_DATADIR "${GAMES_DATADIR}/quake2-data" +#ifdef QMAX +#define GENTOO_LIBDIR "${GAMES_LIBDIR}/${PN}-qmax" +#else +#define GENTOO_LIBDIR "${GAMES_LIBDIR}/${PN}" +#endif +EOF + + # Now we deal with the silly rogue / xatrix addons ... this is ugly :/ + ln -s $(which echo) "${T}"/more + for g in rogue xatrix ; do + use ${g} || continue + mkdir -p "${S}"/src/${g} + cd "${S}"/src/${g} + local shar=${g}src320.shar + unpack ${shar}.Z + sed -i \ + -e 's:^read ans:ans=yes :' ${shar} \ + || die "sed ${shar} failed" + echo ">>> Unpacking ${shar} to ${PWD}" + env PATH="${T}:${PATH}" unshar ${shar} || die "unpacking ${shar} failed" + rm ${shar} + done + use rogue && epatch ${FILESDIR}/${PV}-rogue-nan.patch +} + +yesno() { + for f in "$@" ; do + if ! useq $f ; then + echo NO + return 1 + fi + done + echo YES + return 0 +} + +src_compile() { + BUILD_X11=$(yesno X) + use sdl || use opengl || use svga || use aalib || BUILD_X11=YES + + # xatrix fails to build + # rogue fails to build + for BUILD_QMAX in YES NO ; do + use noqmax && [ "${BUILD_QMAX}" == "YES" ] && continue + make clean || die "cleaning failed" + emake -j1 build_release \ + BUILD_SDLQUAKE2=$(yesno sdl) \ + BUILD_SVGA=$(yesno svga) \ + BUILD_X11=${BUILD_X11} \ + BUILD_GLX=$(yesno opengl) \ + BUILD_SDL=$(yesno sdl) \ + BUILD_SDLGL=$(yesno sdl opengl) \ + BUILD_CTFDLL=YES \ + BUILD_XATRIX=$(yesno xatrix) \ + BUILD_ROGUE=$(yesno rogue) \ + BUILD_JOYSTICK=$(yesno joystick) \ + BUILD_DEDICATED=YES \ + BUILD_AA=$(yesno aalib) \ + BUILD_QMAX=${BUILD_QMAX} \ + HAVE_IPV6=$(yesno ipv6) \ + BUILD_ARTS=$(yesno arts) \ + SDLDIR=/usr/lib \ + OPTCFLAGS="${CFLAGS}" \ + || die "make failed" + # now we save the build dir ... except for the object files ... + rm release*/*/*.o + mv release* my-rel-${BUILD_QMAX} + cd my-rel-${BUILD_QMAX} + rm -rf ref_{gl,soft} ded game client ctf/*.o + mkdir baseq2 + mv game*.so baseq2/ + cd .. + done +} + +src_install() { + local q2dir=${GAMES_LIBDIR}/${PN} + local q2maxdir=${GAMES_LIBDIR}/${PN}-qmax + + dodoc readme.txt README TODO ${FILESDIR}/README-postinstall + + # regular q2 files + dodir ${q2dir} + cp -rf my-rel-NO/* ${D}/${q2dir}/ + dogamesbin ${D}/${q2dir}/{quake2,q2ded} + rm ${D}/${q2dir}/{quake2,q2ded} + use sdl && dogamesbin ${D}/${q2dir}/sdlquake2 && rm ${D}/${q2dir}/sdlquake2 + + # q2max files + if ! use noqmax ; then + dodir ${q2maxdir} + cp -rf my-rel-YES/* ${D}/${q2maxdir}/ + newgamesbin ${D}/${q2maxdir}/quake2 quake2-qmax + newgamesbin ${D}/${q2maxdir}/q2ded q2ded-qmax + rm ${D}/${q2maxdir}/{quake2,q2ded} + use sdl && newgamesbin ${D}/${q2maxdir}/sdlquake2 sdlquake2-qmax && rm ${D}/${q2maxdir}/sdlquake2 + + insinto ${q2maxdir}/baseq2 + doins ${DISTDIR}/maxpak.pak + fi + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + einfo "Go read /usr/share/doc/${PF}/README-postinstall.gz right now!" + einfo "It's important- This install is just the engine, you still need" + einfo "the data paks. Go read." +} |