summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schmitt <chris@ilovelinux.de>2015-08-12 10:30:32 +0200
committerChristian Schmitt <chris@ilovelinux.de>2015-08-12 11:19:28 +0200
commit584791822fbe3eb62132742a84af15039f1e1411 (patch)
tree4e0cee54e90856355e5ee18678b7920f8976e4a4 /games-fps
parent[games-util/terragear] bump gdal dep version (diff)
downloadgamerlay-584791822fbe3eb62132742a84af15039f1e1411.tar.gz
gamerlay-584791822fbe3eb62132742a84af15039f1e1411.tar.bz2
gamerlay-584791822fbe3eb62132742a84af15039f1e1411.zip
games-fps/rtcw: new live ebuild that installs the opensource iortcw version.
This ebuild contains the singleplayer only for now. Dedicated server and MP to be done
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/rtcw/files/Makefile.local40
-rw-r--r--games-fps/rtcw/files/rtcw-zlib.patch16
-rw-r--r--games-fps/rtcw/files/wolf-ded.rc25
-rw-r--r--games-fps/rtcw/metadata.xml8
-rw-r--r--games-fps/rtcw/rtcw-9999.ebuild85
5 files changed, 174 insertions, 0 deletions
diff --git a/games-fps/rtcw/files/Makefile.local b/games-fps/rtcw/files/Makefile.local
new file mode 100644
index 0000000..462f31d
--- /dev/null
+++ b/games-fps/rtcw/files/Makefile.local
@@ -0,0 +1,40 @@
+#CFLAGS # use this for custom CFLAGS
+#V # set to show cc command line when building
+#DEFAULT_BASEDIR # extra path to search for main and such
+#BUILD_SERVER # build the 'iowolfmpded' server binary
+#BUILD_CLIENT # build the 'iowolfmp' or 'iowolfsp' client binary
+#BUILD_BASEGAME # build the 'main' binaries
+#BUILD_GAME_SO # build the game shared libraries
+#BUILD_GAME_QVM # build the game qvms
+#BUILD_STANDALONE # build binaries suited for stand-alone games
+#SERVERBIN # rename 'iowolfmpded' server binary
+#CLIENTBIN # rename 'iowolfmp' or 'iowolfsp' client binary
+#BASEGAME # rename 'main'
+#BASEGAME_CFLAGS # custom CFLAGS for basegame
+#USE_OPENAL # use OpenAL where available
+#USE_OPENAL_DLOPEN # link with OpenAL at runtime
+#USE_CURL # use libcurl for http/ftp download support
+#USE_CURL_DLOPEN # link with libcurl at runtime
+#USE_CODEC_VORBIS # enable Ogg Vorbis support
+#USE_CODEC_OPUS # enable Ogg Opus support
+#USE_MUMBLE # enable Mumble support
+#USE_VOIP # # enable built-in VoIP support
+#USE_INTERNAL_SPEEX # build internal speex library instead of dynamically linking against system libspeex
+#USE_FREETYPE # enable FreeType support for rendering fonts
+#USE_INTERNAL_ZLIB # build and link against internal zlib
+#USE_INTERNAL_JPEG # build and link against internal JPEG library
+#USE_INTERNAL_OGG # build and link against internal ogg library
+#USE_INTERNAL_OPUS # build and link against internal opus/opusfile libraries
+#USE_LOCAL_HEADERS # use headers local to ioq3 instead of system ones
+#DEBUG_CFLAGS # C compiler flags to use for building debug version
+#COPYDIR # the target installation directory
+#TEMPDIR # specify userdefined directory for temp files
+CFLAGS=-march=native -mtune=native -O3 -pipe
+USE_INTERNAL_LIBS=0
+USE_LOCAL_HEADERS=0
+USE_MUMBLE=0
+USE_VOIP=0
+USE_CODEC_OPUS=0
+NO_STRIP=1
+
+#CLIENT_CFLAGS+=-I/usr/include/opus
diff --git a/games-fps/rtcw/files/rtcw-zlib.patch b/games-fps/rtcw/files/rtcw-zlib.patch
new file mode 100644
index 0000000..aae0450
--- /dev/null
+++ b/games-fps/rtcw/files/rtcw-zlib.patch
@@ -0,0 +1,16 @@
+Index: code/qcommon/ioapi.h
+===================================================================
+diff --git a/trunk/SP/code/qcommon/ioapi.h b/trunk/SP/code/qcommon/ioapi.h
+--- a/trunk/SP/code/qcommon/ioapi.h (revision 762)
++++ b/trunk/SP/code/qcommon/ioapi.h (working copy)
+@@ -31,6 +31,10 @@
+ #endif
+ #endif
+
++#ifndef OF
++#define OF(x) x
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
diff --git a/games-fps/rtcw/files/wolf-ded.rc b/games-fps/rtcw/files/wolf-ded.rc
new file mode 100644
index 0000000..41c84ae
--- /dev/null
+++ b/games-fps/rtcw/files/wolf-ded.rc
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/rtcw/files/wolf-ded.rc,v 1.4 2004/07/14 22:16:39 agriffis Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting RTCW dedicated server..."
+ screen -A -m -d -S rtcw su - dedicated -c GENTOO_DIR/startwolfded
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping RTCW dedicated server..."
+ kill `screen -list | grep rtcw | awk -F . '{ print $1 }' | sed -e s/.//`
+ eend $?
+
+}
+
+status() {
+ screen -list | grep rtcwded
+}
diff --git a/games-fps/rtcw/metadata.xml b/games-fps/rtcw/metadata.xml
new file mode 100644
index 0000000..6a07ecd
--- /dev/null
+++ b/games-fps/rtcw/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+Return to Castle Wolfenstein is a first-person 3-D shooter based loosely on the original Wolfenstein series by id software. The game takes place in Europe during World War II. In the single player game, you play as a US military special operative sent behind enemy lines to stop the Nazi studies into the supernatural and the occult. The multi-player game is a team-based, goal-oriented series of missions and allows you to play as either the Axis or the Allies. There are several classes of characters you can play, each with their own special abilities and weapon choices. This game is commercial software and requires data from the retail Windows version to play.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/rtcw/rtcw-9999.ebuild b/games-fps/rtcw/rtcw-9999.ebuild
new file mode 100644
index 0000000..6fdbcec
--- /dev/null
+++ b/games-fps/rtcw/rtcw-9999.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games git-2
+
+DESCRIPTION="Return to Castle Wolfenstein - IORTCW Project"
+HOMEPAGE="http://games.activision.com/games/wolfenstein/"
+EGIT_REPO_URI="https://github.com/iortcw/iortcw.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="opengl"
+
+UIDEPEND="
+ (
+ media-libs/libsdl2
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ virtual/opengl
+ )"
+RDEPEND="sys-libs/glibc
+ opengl? ( ${UIDEPEND} )"
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+ARCHITECTURE=$(uname -m)
+
+src_prepare(){
+ epatch "${FILESDIR}/${PN}-zlib.patch"
+ cp "${FILESDIR}/Makefile.local" "${S}/SP/"
+}
+
+src_compile() {
+ cd "${S}/SP/"
+ ARCH="${ARCHITECTURE}" emake
+}
+
+src_install() {
+ cd "${S}/SP/"
+ ARCH="${ARCHITECTURE}" \
+ COPYDIR=${D}/${GAMES_PREFIX_OPT}/${PN} \
+ emake copyfiles
+
+ #games_make_wrapper rtcwmp ./wolf.x86 "${dir}" "${dir}"
+ games_make_wrapper rtcwsp ./iowolfsp."${ARCHITECTURE}" "${dir}" "${dir}"
+
+ #if use dedicated; then
+ # games_make_wrapper wolf-ded ./wolfded.x86 "${dir}" "${dir}"
+ # newinitd "${FILESDIR}"/wolf-ded.rc wolf-ded
+ # sed -i \
+ # -e "s:GENTOO_DIR:${dir}:" \
+ # "${D}"/etc/init.d/wolf-ded \
+ # || die
+ #fi
+
+ doicon -s scalable misc/iortcw.svg
+ make_desktop_entry rtcwsp "Return to Castle Wolfenstein (SP)" iortcw
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "You need to copy pak0.pk3, mp_pak0.pk3, mp_pak1.pk3, mp_pak2.pk3,"
+ elog "sp_pak1.pk3 and sp_pak2.pk3 from a Window installation into ${dir}/main/"
+ elog
+ elog "To play the game run:"
+ elog " rtcwsp (single-player)"
+ #elog " rtcwmp (multi-player)"
+ elog
+# if use dedicated
+# then
+# elog "To start a dedicated server run:"
+# elog " /etc/init.d/wolf-ded start"
+# elog
+# elog "To run the dedicated server at boot, type:"
+# elog " rc-update add wolf-ded default"
+# elog
+# elog "The dedicated server is started under the ${GAMES_USER_DED} user account"
+# echo
+# fi
+}