summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/Makefile1
-rw-r--r--games/linux-sof/Makefile88
-rw-r--r--games/linux-sof/distinfo3
-rw-r--r--games/linux-sof/files/patch-sof10
-rw-r--r--games/linux-sof/files/pkg-message.in19
-rw-r--r--games/linux-sof/pkg-descr26
-rw-r--r--games/linux-sof/pkg-plist16
7 files changed, 163 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 567a7c1ab705..c1c0e8f706c3 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -460,6 +460,7 @@
SUBDIR += linux-quake4-demo
SUBDIR += linux-savage
SUBDIR += linux-savage-samuraiwars
+ SUBDIR += linux-sof
SUBDIR += linux-spheresofchaos-demo
SUBDIR += linux-ssamtfe
SUBDIR += linux-ssamtse
diff --git a/games/linux-sof/Makefile b/games/linux-sof/Makefile
new file mode 100644
index 000000000000..0e8abe3502e1
--- /dev/null
+++ b/games/linux-sof/Makefile
@@ -0,0 +1,88 @@
+# New ports collection makefile for: linux-sof
+# Date created: 09 October 2008
+# Whom: Alexander Logvinov <ports@logvinov.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= sof
+PORTVERSION= 1.06a
+CATEGORIES= games linux
+MASTER_SITES= http://updates.lokigames.com/${PORTNAME}/
+PKGNAMEPREFIX= linux-
+DISTNAME= ${PORTNAME}-${PORTVERSION}-cdrom-x86
+EXTRACT_SUFX= .run
+
+MAINTAINER= ports@logvinov.com
+COMMENT= Soldier of Fortune for Linux
+
+PATCH_DEPENDS= xdelta:${PORTSDIR}/misc/xdelta
+
+USE_LINUX= yes
+USE_XLIB= yes
+USE_LDCONFIG= yes
+NO_BUILD= yes
+NO_PACKAGE= Distribution is 448MB; set FORCE_PACKAGE if you really want\
+ to build this package
+RESTRICTED= Redistribution is limited, see license
+
+XDELTA= ${LOCALBASE}/bin/xdelta patch
+EXTRACT_FILES= libopenal-0.0.so libSDL-1.1.so.0 README.105 README.106 base/pak2.pak
+PORTDOCS= README README.105 README.106
+SUB_FILES= pkg-message
+
+.include <bsd.port.pre.mk>
+
+do-extract:
+ @${MKDIR} ${WRKSRC}/data ${WRKSRC}/patch
+ @cd ${WRKSRC}/patch && ${SED} -e '1,/END_OF_STUB/d' ${_DISTDIR}/${DISTFILES} | \
+ ${GUNZIP_CMD} -q | ${TAR} xf -
+.if !defined(CDROM_MOUNT)
+ @${ECHO_CMD} "${PKGNAME} requires CDROM_MOUNT set to mount point of CD"
+ @${FALSE}
+.endif
+.if !exists(${CDROM_MOUNT}/bin/x86/glibc-2.1/${PORTNAME})
+ @${ECHO_CMD} "${PKGNAME} requires CD with Soldier of Fortune for Linux"
+ @${FALSE}
+.endif
+ @${CP} ${CDROM_MOUNT}/bin/x86/glibc-2.1/${PORTNAME} ${CDROM_MOUNT}/kver.pub ${WRKSRC}/data
+ @${CP} ${CDROM_MOUNT}/README ${WRKSRC}/data/
+.for file in binaries paks
+ @${TAR} x -C ${WRKSRC}/data -f ${CDROM_MOUNT}/${file}.tar.gz
+.endfor
+.for file in ${EXTRACT_FILES}
+ @${GUNZIP_CMD} -qc ${WRKSRC}/patch/data/${file} > ${WRKSRC}/data/${file}
+ @${RM} ${WRKSRC}/patch/data/${file}
+.endfor
+
+pre-patch:
+ @cd ${WRKSRC}/patch/ && \
+ ${FIND} data -name "*.0" | \
+ ${SED} 's/\(.*\)\(.0\)/${XDELTA:S,/,\\/,g} & ${WRKSRC:S,/,\\/,g}\/\1 ${WRKSRC:S,/,\\/,g}\/\1.patched/' | ${SH}
+ @cd ${WRKSRC} && \
+ ${FIND} data -name "*.patched" | \
+ ${SED} 's/\(.*\)\(.patched\)/${MV:S,/,\\/,g} & \1/' | ${SH}
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|" ${WRKSRC}/data/${PORTNAME}
+
+do-install:
+ @${MKDIR} ${DATADIR}/base
+ ${INSTALL_PROGRAM} ${WRKSRC}/data/${PORTNAME} ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/data/${PORTNAME}-bin ${DATADIR}
+ @${BRANDELF} -t Linux ${DATADIR}/${PORTNAME}-bin
+ ${INSTALL_DATA} ${WRKSRC}/data/kver.pub ${DATADIR}
+ cd ${WRKSRC}/data && \
+ ${FIND} . -name "*.so*" -exec ${INSTALL_PROGRAM} {} ${DATADIR}/{} \; && \
+ ${FIND} base -name "*.pak" -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for i in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/data/${i} ${DOCSDIR}
+.endfor
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/games/linux-sof/distinfo b/games/linux-sof/distinfo
new file mode 100644
index 000000000000..d1ec1d0608f5
--- /dev/null
+++ b/games/linux-sof/distinfo
@@ -0,0 +1,3 @@
+MD5 (sof-1.06a-cdrom-x86.run) = ab5aa49149bc9aa645029557fcb7f40d
+SHA256 (sof-1.06a-cdrom-x86.run) = 44546073f26a610ec554f3d197e157a6691c0891651689308e62feccc01a1c16
+SIZE (sof-1.06a-cdrom-x86.run) = 22928437
diff --git a/games/linux-sof/files/patch-sof b/games/linux-sof/files/patch-sof
new file mode 100644
index 000000000000..88bdbf8f6248
--- /dev/null
+++ b/games/linux-sof/files/patch-sof
@@ -0,0 +1,10 @@
+--- data/sof.orig 2008-10-10 17:55:11.000000000 +1000
++++ data/sof 2008-10-10 17:54:52.000000000 +1000
+@@ -1,5 +1,7 @@
+ #!/bin/sh
+
++SOF_DATA_PATH="%%DATADIR%%"
++
+ # Function to find the real directory a program resides in.
+ # Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software
+ FindPath()
diff --git a/games/linux-sof/files/pkg-message.in b/games/linux-sof/files/pkg-message.in
new file mode 100644
index 000000000000..60db2b10e10f
--- /dev/null
+++ b/games/linux-sof/files/pkg-message.in
@@ -0,0 +1,19 @@
+
+###############################################################################
+
+The Soldier of Fortune game was installed
+
+1) Run the game using:
+
+ # sof
+
+2) The config files are stored into the ~/.loki/sof directory
+
+3) You can see more information about this game at:
+
+ %%DOCSDIR%%
+
+4) Enjoy it ;)
+
+###############################################################################
+
diff --git a/games/linux-sof/pkg-descr b/games/linux-sof/pkg-descr
new file mode 100644
index 000000000000..c59d9eb57fdd
--- /dev/null
+++ b/games/linux-sof/pkg-descr
@@ -0,0 +1,26 @@
+You're the world's deadliest soldier of fortune and your mission
+is clear: survive. Track your prey across the globe in a series
+of secret missions to take down a fanatical terrorist organization
+before it takes you down. Maintain your cover as a covert warrior
+in a startling variety of explosive missions ranging from underhanded
+sabotage to stealthy assassination to full frontal assaults where
+skill marks the difference between the hunter and the hunted.
+
+Tear your way past enemy lines utilizing the world's most lethal
+weaponry, including a sniper rifle, white phosphorous grenades, and
+prototype microwave pulse guns. Real bullets do real damage: shoot
+someone in the leg and he falls, writhing and grasping his wound;
+shoot someone in the head and he falls down dead.
+
+Based on the popular magazine of the same name, Soldier of Fortune
+delivers the most realistic, covert-operative themed shooter experience
+ever created. Like a blockbuster action-thriller, Soldier of Fortune
+plunges you into the secret and deadly world of the modern-day
+gun-for-hire via dozens of real-to-life missions spanning five continents
+and innovative multiplayer modes.
+
+You need an original game CD of Soldier of Fortune for Linux to use
+this port.
+
+WWW: http://www.lokigames.com/products/sof/
+WWW: http://www.ravensoft.com/GamesDetail/tabid/76/XMID/16/Default.aspx
diff --git a/games/linux-sof/pkg-plist b/games/linux-sof/pkg-plist
new file mode 100644
index 000000000000..a35337530793
--- /dev/null
+++ b/games/linux-sof/pkg-plist
@@ -0,0 +1,16 @@
+bin/sof
+%%DATADIR%%/kver.pub
+%%DATADIR%%/libSDL-1.1.so.0
+%%DATADIR%%/libTitan.so
+%%DATADIR%%/liboasnd.so
+%%DATADIR%%/libopenal-0.0.so
+%%DATADIR%%/libopenal.so
+%%DATADIR%%/ref_gl.so
+%%DATADIR%%/sof-bin
+%%DATADIR%%/base/gamex86.so
+%%DATADIR%%/base/pak0.pak
+%%DATADIR%%/base/pak1.pak
+%%DATADIR%%/base/pak2.pak
+%%DATADIR%%/base/player.so
+@dirrm %%DATADIR%%/base
+@dirrm %%DATADIR%%