aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2008-01-04 21:49:08 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2008-01-04 21:49:08 +0000
commit9f96b49b6371c9ac8ff0b70c9ec4e98ed93ec990 (patch)
tree9d5195b971f9903d1ad03621e2acb99be59da287
parent30709a3f590945f3b5c44d3096faaa7bd85f919a (diff)
downloadports-9f96b49b6371c9ac8ff0b70c9ec4e98ed93ec990.tar.gz
ports-9f96b49b6371c9ac8ff0b70c9ec4e98ed93ec990.zip
Notes
-rw-r--r--games/rottdc/Makefile24
-rw-r--r--games/rottdc/files/Makefile13
-rw-r--r--games/rottdc/files/patch-develop.h11
-rw-r--r--games/rottdc/files/patch-rt__actor.c11
-rw-r--r--games/rottdc/pkg-descr4
-rw-r--r--games/rottdc/pkg-message14
-rw-r--r--games/rottdc/pkg-plist1
7 files changed, 52 insertions, 26 deletions
diff --git a/games/rottdc/Makefile b/games/rottdc/Makefile
index 31c267a73cba..111c3c2c71bf 100644
--- a/games/rottdc/Makefile
+++ b/games/rottdc/Makefile
@@ -7,35 +7,37 @@
PORTNAME= rottdc
DISTVERSION= 1.0-2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= sdl-dc
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= alepulver@FreeBSD.org
COMMENT= Apogee's Rise Of The Triad source port
USE_BZIP2= yes
USE_GMAKE= yes
USE_SDL= sdl mixer
-USE_XLIB= yes
+PATCH_WRKSRC= ${WRKSRC}/rott
+# Crashes when compiling with -O2 or greater, so downgrade to -O1.
+CFLAGS:= ${CFLAGS:C/-O[2-9]/-O1/}
-WRKSRC= ${WRKDIR}/${DISTNAME}/rott
-
-post-patch:
- @${REINPLACE_CMD} -e '433s,^static ,,' ${WRKSRC}/rt_actor.c
+post-extract:
+ @${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/rott ${PREFIX}/bin
+.for f in rott rott-sw
+ ${INSTALL_PROGRAM} ${WRKSRC}/${f}/rott ${PREFIX}/bin/${f}
+.endfor
.ifndef (NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/README ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.for i in cheats cmdline
- ${INSTALL_DATA} ${WRKSRC}/${i}.txt ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/rott/${i}.txt ${DOCSDIR}
.endfor
.endif
post-install:
- @${CAT} ${PKGMESSAGE}
+ @${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
.include <bsd.port.mk>
diff --git a/games/rottdc/files/Makefile b/games/rottdc/files/Makefile
new file mode 100644
index 000000000000..8c0405e42f75
--- /dev/null
+++ b/games/rottdc/files/Makefile
@@ -0,0 +1,13 @@
+# Makefile wrapper for building both full and shareware versions.
+#
+# $FreeBSD$
+#
+
+all: rott rott-sw
+ $(MAKE) -C rott
+ $(MAKE) -C rott-sw
+
+rott-sw:
+ cp -r rott rott-sw
+ sed -i '' -Ee 's|(SHAREWARE) *0|\1 1|' rott-sw/develop.h
+ sed -i '' -Ee 's|(SUPERROTT) *1|\1 1|' rott/develop.h
diff --git a/games/rottdc/files/patch-develop.h b/games/rottdc/files/patch-develop.h
deleted file mode 100644
index 7fd2e2f60941..000000000000
--- a/games/rottdc/files/patch-develop.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- develop.h.orig Wed Feb 18 09:00:17 2004
-+++ develop.h Wed Feb 18 09:01:08 2004
-@@ -41,7 +41,7 @@
-
- // Make sure only one of the following are on at one time
- #define SHAREWARE 0
--#define SUPERROTT 0
-+#define SUPERROTT 1
- #define SITELICENSE 0
-
- // cute little dopefish thing, only works with special patch?
diff --git a/games/rottdc/files/patch-rt__actor.c b/games/rottdc/files/patch-rt__actor.c
new file mode 100644
index 000000000000..dc2e29ebd487
--- /dev/null
+++ b/games/rottdc/files/patch-rt__actor.c
@@ -0,0 +1,11 @@
+--- rt_actor.c.bak Tue Jan 7 03:31:51 2003
++++ rt_actor.c Fri Jan 4 19:07:08 2008
+@@ -430,7 +430,7 @@
+ void AvoidPlayerMissile(objtype*ob);
+ int EnvironmentDamage(objtype *ob);
+
+-static int STOPSPEED = 0x200;
++int STOPSPEED = 0x200;
+ static int PLAYERFRICTION = 0xe000;
+ static int ACTORFRICTION = 0xf000;
+ static int DIAGADJUST = 0xb504;
diff --git a/games/rottdc/pkg-descr b/games/rottdc/pkg-descr
index c6f1eee9194f..c71377adcfac 100644
--- a/games/rottdc/pkg-descr
+++ b/games/rottdc/pkg-descr
@@ -1,6 +1,8 @@
This is a port of Apogee's 3D action title Rise of the Triad, originally
released in 1994. This port duplicates the functionality of the original
game on modern operating systems, including Linux, Win32, OSX and now FreeBSD.
-In order to run game you'll need original game data.
+
+In order to run game you'll need either the original game data or a shareware
+version (see pkg-message).
WWW: http://sdl-dc.sourceforge.net/
diff --git a/games/rottdc/pkg-message b/games/rottdc/pkg-message
index 6de08df1527e..c3e111ade5bc 100644
--- a/games/rottdc/pkg-message
+++ b/games/rottdc/pkg-message
@@ -1,3 +1,11 @@
-******************************************************************
-* Note: Run 'rott' from directory, containing original game data *
-******************************************************************
+==============================================================================
+
+Rise of the Triad DC has been installed.
+
+There are two binaries: "rott" and "rott-sw", to play the full and shareware
+versions respectively. The game data must reside in the current directory.
+
+The shareware game data is available here:
+http://filesingularity.timedoctor.org/swdata.zip
+
+==============================================================================
diff --git a/games/rottdc/pkg-plist b/games/rottdc/pkg-plist
index 02b3a0433813..b7a8e83835ab 100644
--- a/games/rottdc/pkg-plist
+++ b/games/rottdc/pkg-plist
@@ -1,4 +1,5 @@
bin/rott
+bin/rott-sw
%%PORTDOCS%%%%DOCSDIR%%/cheats.txt
%%PORTDOCS%%%%DOCSDIR%%/cmdline.txt
%%PORTDOCS%%%%DOCSDIR%%/README