summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorNeil Blakey-Milner <nbm@FreeBSD.org>2000-08-18 15:04:09 +0000
committerNeil Blakey-Milner <nbm@FreeBSD.org>2000-08-18 15:04:09 +0000
commitcc3a266bd394f1a4c9f4608ca621df5758283a68 (patch)
tree953fdfe504ac989c93d890923f57c40ac37a96fe /games
parentUpgrade to zebra-0.88. (diff)
Get bzflag to compile on 3.x. (sys/soundcard.h to machine/soundcard.h,
socklen_t to int for 3.x, and no -fno-exceptions for 3.x g++) Bothered by: Barry Irwin <bvi@rucus.ru.ac.za> Bothered by: Matthew West <mwest@uct.ac.za>
Notes
Notes: svn path=/head/; revision=31739
Diffstat (limited to 'games')
-rw-r--r--games/bzflag/Makefile2
-rw-r--r--games/bzflag/files/config-sys7
-rw-r--r--games/bzflag/files/patch-LinuxMedia.cxx12
3 files changed, 16 insertions, 5 deletions
diff --git a/games/bzflag/Makefile b/games/bzflag/Makefile
index 4f8e99eb36bb..84a3508e2b67 100644
--- a/games/bzflag/Makefile
+++ b/games/bzflag/Makefile
@@ -21,7 +21,7 @@ WRKSRC= ${WRKDIR}/bzflag
USE_XLIB= yes
MAKE_ENV= PORTCFLAGS="${CFLAGS}" PORTCXXFLAGS="${CXXFLAGS}" \
- PORTPREFIX="${PREFIX}"
+ PORTPREFIX="${PREFIX}" OSVERSION="${OSVERSION}"
MAN6= bzflag.6 bzfrelay.6 bzfls.6 bzfs.6
diff --git a/games/bzflag/files/config-sys b/games/bzflag/files/config-sys
index 02253fd025f3..d3b06c97b5dc 100644
--- a/games/bzflag/files/config-sys
+++ b/games/bzflag/files/config-sys
@@ -53,10 +53,17 @@ PCXXDEFS = -D_BSD_SOURCE -DHALF_RATE_AUDIO \
# compiler options
#
PCOPTS = -Wall -W -ansi $(ACOPTS)
+.if defined(OSVERSION) && ${OSVERSION} < 400000
+PCXXOPTS = -Wall -W -fno-rtti $(ACXXOPTS)
+COPT = -DNDEBUG ${PORTCFLAGS} -DAddrLen='int'
+CXXOPT = -DNDEBUG ${PORTCXXFLAGS} -ffast-math -fomit-frame-pointer -fnonnull-objects \
+ -fexpensive-optimizations -DAddrLen='int'
+.else
PCXXOPTS = -Wall -W -fno-exceptions -fno-rtti $(ACXXOPTS)
COPT = -DNDEBUG ${PORTCFLAGS} -DAddrLen='socklen_t'
CXXOPT = -DNDEBUG ${PORTCXXFLAGS} -ffast-math -fomit-frame-pointer -fnonnull-objects \
-fexpensive-optimizations -DAddrLen='socklen_t'
+.endif
CDEBUG = -DDEBUG -g
CXXDEBUG = -DDEBUG -g
CWOFF =
diff --git a/games/bzflag/files/patch-LinuxMedia.cxx b/games/bzflag/files/patch-LinuxMedia.cxx
index a4ca66dfa338..c6b5636ca19a 100644
--- a/games/bzflag/files/patch-LinuxMedia.cxx
+++ b/games/bzflag/files/patch-LinuxMedia.cxx
@@ -1,6 +1,6 @@
---- src/platform/LinuxMedia.cxx.orig Sat Aug 12 00:50:20 2000
-+++ src/platform/LinuxMedia.cxx Sat Aug 12 00:53:05 2000
-@@ -13,9 +13,13 @@
+--- src/platform/LinuxMedia.cxx.orig Sat Jan 15 04:09:48 2000
++++ src/platform/LinuxMedia.cxx Fri Aug 18 16:44:02 2000
+@@ -13,16 +13,27 @@
#include "LinuxMedia.h"
#include <math.h>
#include <fcntl.h>
@@ -15,7 +15,11 @@
#include <unistd.h>
#include <sys/wait.h>
#include <signal.h>
-@@ -23,6 +27,9 @@
++#if !defined(BSD)
+ #include <sys/soundcard.h>
++#else
++#include <machine/soundcard.h>
++#endif
#include <sys/ioctl.h>
#include <TimeKeeper.h>
#include <errno.h>