aboutsummaryrefslogtreecommitdiffstats
path: root/games/iortcw
diff options
context:
space:
mode:
authorcpm <cpm@FreeBSD.org>2016-08-17 08:45:17 +0800
committercpm <cpm@FreeBSD.org>2016-08-17 08:45:17 +0800
commit8e3d13a494c6de29061caaf478025550cabb95d4 (patch)
tree56535c13fe8a0aa9aa15190c7da99f759e16cacc /games/iortcw
parent2f9b192c1f80f58b8c2c3a43fce519c7f942ea94 (diff)
downloadfreebsd-ports-gnome-8e3d13a494c6de29061caaf478025550cabb95d4.tar.gz
freebsd-ports-gnome-8e3d13a494c6de29061caaf478025550cabb95d4.tar.zst
freebsd-ports-gnome-8e3d13a494c6de29061caaf478025550cabb95d4.zip
New port: games/iortcw Game engine for Return to Castle Wolfenstein
Return to Castle Wolfenstein is a military- and occult-themed first-person shooter game in a Second World War setting, originally released in 2001. It is a sequel to Wolfenstein 3D. This port contains the iortcw game engines for the single-player campaign and multiplayer, based on ioquake3 and the GPL source releases of RtCW. Return to Castle Wolfenstein requires non-distributable game data files, which you have to install manually (see pkg-message). WWW: https://github.com/iortcw/iortcw/ PR: 211456 Submitted by: Tobias Kortkamp <t@tobik.me> Reviewed by: amdmi3 (mentor) Approved by: amdmi3 (mentor)
Diffstat (limited to 'games/iortcw')
-rw-r--r--games/iortcw/Makefile56
-rw-r--r--games/iortcw/distinfo3
-rw-r--r--games/iortcw/files/Makefile39
-rw-r--r--games/iortcw/files/iowolfded.in4
-rw-r--r--games/iortcw/files/iowolfmp.in4
-rw-r--r--games/iortcw/files/iowolfsp.in4
-rw-r--r--games/iortcw/files/patch-MP_code_qcommon_q__platform.h23
-rw-r--r--games/iortcw/files/patch-SP_code_qcommon_q__platform.h23
-rw-r--r--games/iortcw/pkg-descr12
-rw-r--r--games/iortcw/pkg-message10
-rw-r--r--games/iortcw/pkg-plist17
11 files changed, 195 insertions, 0 deletions
diff --git a/games/iortcw/Makefile b/games/iortcw/Makefile
new file mode 100644
index 000000000000..f3fd39c90e37
--- /dev/null
+++ b/games/iortcw/Makefile
@@ -0,0 +1,56 @@
+# Created by: Tobias Kortkamp <t@tobik.me>
+# $FreeBSD$
+
+PORTNAME= iortcw
+PORTVERSION= 1.42d
+CATEGORIES= games
+
+MAINTAINER= t@tobik.me
+COMMENT= Game engine for Return to Castle Wolfenstein
+
+LICENSE= GPLv3
+
+BUILD_DEPENDS= opusfile>0:audio/opusfile
+LIB_DEPENDS= libcurl.so:ftp/curl \
+ libopus.so:audio/opus \
+ libfreetype.so:print/freetype2
+
+USES= jpeg openal pkgconfig gmake
+USE_GL= gl
+USE_SDL= sdl2
+
+USE_GITHUB= yes
+
+WOLFDIR= "libexec/${PORTNAME}"
+MAKE_ARGS= BINDIR="${STAGEDIR}${PREFIX}/bin" \
+ COPYDIR="${STAGEDIR}${PREFIX}/${WOLFDIR}"
+
+PLIST_SUB= ARCH="${ARCH}" WOLFDIR="${WOLFDIR}"
+
+SUB_FILES= iowolfsp iowolfmp iowolfded
+SUB_LIST= ARCH="${ARCH}" WOLFDIR="${PREFIX}/${WOLFDIR}"
+
+OPTIONS_DEFINE= MP SP
+OPTIONS_DEFAULT= MP SP
+OPTIONS_SUB= yes
+
+MP_DESC= Build multiplayer support
+SP_DESC= Build singleplayer support
+
+SP_ALL_TARGET= sp
+SP_INSTALL_TARGET= sp-install
+
+MP_ALL_TARGET= mp
+MP_INSTALL_TARGET= mp-install
+
+post-extract:
+ ${CP} ${FILESDIR}/Makefile ${WRKSRC}
+
+post-install-MP-on:
+ ${INSTALL_SCRIPT} ${WRKDIR}/iowolfmp ${STAGEDIR}${PREFIX}/bin/iowolfmp
+ ${INSTALL_SCRIPT} ${WRKDIR}/iowolfded ${STAGEDIR}${PREFIX}/bin/iowolfded
+
+post-install-SP-on:
+ ${INSTALL_SCRIPT} ${WRKDIR}/iowolfsp ${STAGEDIR}${PREFIX}/bin/iowolfsp
+
+.include <bsd.port.mk>
diff --git a/games/iortcw/distinfo b/games/iortcw/distinfo
new file mode 100644
index 000000000000..b5266bfa452a
--- /dev/null
+++ b/games/iortcw/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1469455810
+SHA256 (iortcw-iortcw-1.42d_GH0.tar.gz) = 78fd5e1639c014af91b076c4034ca2f5d57ce84e8d3d93b84ca13c91e2840d9a
+SIZE (iortcw-iortcw-1.42d_GH0.tar.gz) = 29852958
diff --git a/games/iortcw/files/Makefile b/games/iortcw/files/Makefile
new file mode 100644
index 000000000000..14e49bb488d1
--- /dev/null
+++ b/games/iortcw/files/Makefile
@@ -0,0 +1,39 @@
+MAKE_ARGS= BUILD_CLIENT=1 \
+ BUILD_SERVER=1 \
+ BUILD_GAME_SO=1 \
+ BUILD_GAME_QVM=0 \
+ TOOLS_CC=${CC} \
+ BUILD_BASEGAME=1 \
+ USE_CURL=1 \
+ USE_CURL_DLOPEN=0 \
+ USE_INTERNAL_LIBS=0 \
+ USE_OPENAL=1 \
+ USE_OPENAL_DLOPEN=0 \
+ USE_INTERNAL_SPEEX=0 \
+ USE_INTERNAL_ZLIB=0 \
+ USE_INTERNAL_JPEG=0 \
+ CLIENT_LIBS+="-L${PREFIX}/lib -lSDL2 -lcurl -lopenal -lopus" \
+ USE_INTERNAL_OGG=0 \
+ USE_INTERNAL_OPUS=0 \
+ USE_CODEC_VORBIS=0 \
+ USE_CODEC_OPUS=0 \
+ USE_FREETYPE=1 \
+ USE_LOCAL_HEADERS=0 \
+ V=1 \
+ OPTIMIZEVM="" \
+ OPTIMIZE="" \
+ COPYDIR="${COPYDIR}"
+
+sp:
+ ${MAKE} -C SP ${MAKE_ARGS}
+
+sp-install:
+ mkdir -p ${COPYDIR}
+ ${MAKE} -C SP ${MAKE_ARGS} copyfiles
+
+mp:
+ ${MAKE} -C MP ${MAKE_ARGS}
+
+mp-install:
+ mkdir -p ${COPYDIR}
+ ${MAKE} -C MP ${MAKE_ARGS} copyfiles
diff --git a/games/iortcw/files/iowolfded.in b/games/iortcw/files/iowolfded.in
new file mode 100644
index 000000000000..19336b4c6c95
--- /dev/null
+++ b/games/iortcw/files/iowolfded.in
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+cd %%WOLFDIR%%
+exec ./iowolfded.%%ARCH%%
diff --git a/games/iortcw/files/iowolfmp.in b/games/iortcw/files/iowolfmp.in
new file mode 100644
index 000000000000..6e8a24c6cd75
--- /dev/null
+++ b/games/iortcw/files/iowolfmp.in
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+cd %%WOLFDIR%%
+exec ./iowolfmp.%%ARCH%%
diff --git a/games/iortcw/files/iowolfsp.in b/games/iortcw/files/iowolfsp.in
new file mode 100644
index 000000000000..29f16a5c86b7
--- /dev/null
+++ b/games/iortcw/files/iowolfsp.in
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+cd %%WOLFDIR%%
+exec ./iowolfsp.%%ARCH%%
diff --git a/games/iortcw/files/patch-MP_code_qcommon_q__platform.h b/games/iortcw/files/patch-MP_code_qcommon_q__platform.h
new file mode 100644
index 000000000000..df8ffe75c7f0
--- /dev/null
+++ b/games/iortcw/files/patch-MP_code_qcommon_q__platform.h
@@ -0,0 +1,23 @@
+--- MP/code/qcommon/q_platform.h.orig 2016-07-29 22:00:04 UTC
++++ MP/code/qcommon/q_platform.h
+@@ -35,11 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth
+
+ #else
+
+-#if (defined _M_IX86 || defined __i386__) && !defined(C_ONLY)
+-#define id386 1
+-#else
+ #define id386 0
+-#endif
+
+ #if (defined(powerc) || defined(powerpc) || defined(ppc) || \
+ defined(__ppc) || defined(__ppc__)) && !defined(C_ONLY)
+@@ -229,8 +225,6 @@ Foundation, Inc., 51 Franklin St, Fifth
+ #ifdef __i386__
+ #define ARCH_STRING "i386"
+ #elif defined __amd64__
+-#undef idx64
+-#define idx64 1
+ #define ARCH_STRING "amd64"
+ #elif defined __axp__
+ #define ARCH_STRING "alpha"
diff --git a/games/iortcw/files/patch-SP_code_qcommon_q__platform.h b/games/iortcw/files/patch-SP_code_qcommon_q__platform.h
new file mode 100644
index 000000000000..e103bf7c91ef
--- /dev/null
+++ b/games/iortcw/files/patch-SP_code_qcommon_q__platform.h
@@ -0,0 +1,23 @@
+--- SP/code/qcommon/q_platform.h.orig 2015-12-26 14:21:49 UTC
++++ SP/code/qcommon/q_platform.h
+@@ -35,11 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth
+
+ #else
+
+-#if (defined _M_IX86 || defined __i386__) && !defined(C_ONLY)
+-#define id386 1
+-#else
+ #define id386 0
+-#endif
+
+ #if (defined(powerc) || defined(powerpc) || defined(ppc) || \
+ defined(__ppc) || defined(__ppc__)) && !defined(C_ONLY)
+@@ -229,8 +225,6 @@ Foundation, Inc., 51 Franklin St, Fifth
+ #ifdef __i386__
+ #define ARCH_STRING "i386"
+ #elif defined __amd64__
+-#undef idx64
+-#define idx64 1
+ #define ARCH_STRING "amd64"
+ #elif defined __axp__
+ #define ARCH_STRING "alpha"
diff --git a/games/iortcw/pkg-descr b/games/iortcw/pkg-descr
new file mode 100644
index 000000000000..b914a2dcdda9
--- /dev/null
+++ b/games/iortcw/pkg-descr
@@ -0,0 +1,12 @@
+Return to Castle Wolfenstein is a military- and occult-themed
+first-person shooter game in a Second World War setting, originally
+released in 2001. It is a sequel to Wolfenstein 3D.
+
+This port contains the iortcw game engines for the single-player
+campaign and multiplayer, based on ioquake3 and the GPL source
+releases of RtCW.
+
+Return to Castle Wolfenstein requires non-distributable game data
+files, which you have to install manually (see pkg-message).
+
+WWW: https://github.com/iortcw/iortcw/
diff --git a/games/iortcw/pkg-message b/games/iortcw/pkg-message
new file mode 100644
index 000000000000..33339f0a562a
--- /dev/null
+++ b/games/iortcw/pkg-message
@@ -0,0 +1,10 @@
+To play Return to Castle Wolfenstein:
+
+1. Install RtCW from your CD using emulators/i386-wine
+2. Copy your game files to ~/.wolf. They should be in
+ "~/.wine/drive_c/Program Files/Return to Castle Wolfenstein"
+3. Download patch-data-141.zip (and the language specific patch-data-* file if needed)
+ from https://github.com/iortcw/iortcw/releases/tag/1.42d
+4. Extract all patch-data-*.zip in ~/.wolf
+5a. Start a single player game with iowolfsp
+5b. Or a multiplayer game with iowolfmp
diff --git a/games/iortcw/pkg-plist b/games/iortcw/pkg-plist
new file mode 100644
index 000000000000..758ef6615479
--- /dev/null
+++ b/games/iortcw/pkg-plist
@@ -0,0 +1,17 @@
+%%MP%%%%WOLFDIR%%/iowolfded.%%ARCH%%
+%%MP%%%%WOLFDIR%%/iowolfmp.%%ARCH%%
+%%MP%%%%WOLFDIR%%/main/cgame.mp.%%ARCH%%.so
+%%MP%%%%WOLFDIR%%/main/qagame.mp.%%ARCH%%.so
+%%MP%%%%WOLFDIR%%/main/ui.mp.%%ARCH%%.so
+%%MP%%%%WOLFDIR%%/renderer_mp_opengl1_%%ARCH%%.so
+%%MP%%%%WOLFDIR%%/renderer_mp_rend2_%%ARCH%%.so
+%%MP%%bin/iowolfded
+%%MP%%bin/iowolfmp
+%%SP%%%%WOLFDIR%%/iowolfsp.%%ARCH%%
+%%SP%%%%WOLFDIR%%/iowolfspded.%%ARCH%%
+%%SP%%%%WOLFDIR%%/main/cgame.sp.%%ARCH%%.so
+%%SP%%%%WOLFDIR%%/main/qagame.sp.%%ARCH%%.so
+%%SP%%%%WOLFDIR%%/main/ui.sp.%%ARCH%%.so
+%%SP%%%%WOLFDIR%%/renderer_sp_opengl1_%%ARCH%%.so
+%%SP%%%%WOLFDIR%%/renderer_sp_rend2_%%ARCH%%.so
+%%SP%%bin/iowolfsp