Initial import of bzflag-1.7g0

bzflag is a multiplayer 3d tank war game
WWW: http://www.bzflag.org/

Maintainer Jolan Luff <jolan@cryptonomicon.org>
This commit is contained in:
pvalchev 2003-02-03 04:09:56 +00:00
parent 76288c0c05
commit c6751e6d15
19 changed files with 498 additions and 0 deletions

39
games/bzflag/Makefile Normal file
View File

@ -0,0 +1,39 @@
# $OpenBSD: Makefile,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
COMMENT= "graphical multiplayer 3-d tank war game"
DISTNAME= bzflag-1.7g0
CATEGORIES= games x11
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bzflag/}
EXTRACT_SUFX= .tgz
HOMEPAGE= http://www.bzflag.org/
MAINTAINER= Jolan Luff <jolan@cryptonomicon.org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MODULES= gcc3
MODGCC3_ARCHES= sparc64
MODGCC3_LANGS= C++
USE_X11= Yes
NO_REGRESS= Yes
CFLAGS+= -pthread
MAKE_ENV= PORTCFLAGS="${CFLAGS}" PORTCXXFLAGS="${CXXFLAGS}" \
PORTPREFIX="${PREFIX}"
post-patch:
cp -f ${FILESDIR}/config-sys ${WRKSRC}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/man/*.6 ${PREFIX}/man/man6
${INSTALL_DATA_DIR} ${PREFIX}/share/bzflag/data
${INSTALL_DATA} ${WRKSRC}/data/* ${PREFIX}/share/bzflag/data
.include <bsd.port.mk>

3
games/bzflag/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (bzflag-1.7g0.tgz) = 689009fa98416ac1abba4677870c7b9f
RMD160 (bzflag-1.7g0.tgz) = 1a8ce4a67e0188d950a4d856471a076bf80d0907
SHA1 (bzflag-1.7g0.tgz) = 660fd95038fc2d372f006213cca7984e6745d9fe

View File

@ -0,0 +1,104 @@
# bzflag
# Copyright 1993-1999, Chris Schoeneman
#
# This package is free software; you can redistribute it and/or
# modify it under the terms of the license found in the file
# named LICENSE that should have accompanied this file.
#
# THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# configuration for generic linux
#
CONFIG = linux
#
# use XF86 vidmode extension (comment out to disable)
#
XF86VIDMODE_DEF = -DXF86VIDMODE_EXT
XF86VIDMODE_LIB = -lXxf86vm
#
# install locations
#
INSTALL_DATA_DIR = ${PORTPREFIX}/share/bzflag/data
#
# tools
#
AR = /usr/bin/ar cru
#CC = /usr/bin/gcc
#CXX = /usr/bin/g++
CD = cd
CP = /bin/cp
LD = /usr/bin/ld
MKDIR = /bin/mkdir
NROFF = /usr/bin/nroff
RM = /bin/rm -f
RMR = $(RM) -r
SHELL = /bin/sh
ECHO = echo
#
# compiler definitions
#
PCDEFS = $(XF86VIDMODE_DEF)
PCXXDEFS = $(XF86VIDMODE_DEF)
#
# compiler options
#
PCOPTS = -Wall -W -ansi $(ACOPTS)
PCXXOPTS = -Wall -W -fno-exceptions -fno-rtti $(ACXXOPTS)
COPT = -DNDEBUG ${PORTCFLAGS} -DUSBJOYSTICK
CXXOPT = -DNDEBUG ${PORTCXXFLAGS} -DUSBJOYSTICK -ffast-math -fomit-frame-pointer \
-fnonnull-objects -fexpensive-optimizations
CDEBUG = -DDEBUG -g
CXXDEBUG = -DDEBUG -g
CWOFF =
CXXWOFF =
#
# search paths
#
PCINCS = -I/usr/include -I/usr/X11R6/include
PCXXINCS = -I/usr/include -I/usr/X11R6/include
#
# linker options
#
PLDOPTS = -L${X11BASE}/lib
#
# dirt
#
PDIRT = *.[eou] a.out core ar.tmp.*
#
# libraries
#
AUDIO_LIBS = \
$(NULL)
DISPLAY_LIBS = \
$(XF86VIDMODE_LIB) \
$(NULL)
GL_LIBS = \
-lGLU \
-lGL \
$(NULL)
IMAGE_LIBS = \
$(NULL)
NETWORK_LIBS = \
$(NULL)
WINDOW_LIBS = \
-lXext \
-lX11 \
$(NULL)

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-Make-common,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- Make-common.orig Thu Nov 15 02:29:07 2001
+++ Make-common Wed May 15 10:39:32 2002
@@ -167,13 +167,13 @@ $(COMMONPREF)clobber: clean $(_FORCE)
#
# default to optimized build
#
-ifdef DEBUG
+.ifdef DEBUG
COPTIMIZER = $(CDEBUG)
CXXOPTIMIZER = $(CXXDEBUG)
-else
+.else
COPTIMIZER = $(COPT)
CXXOPTIMIZER = $(CXXOPT)
-endif
+.endif
#
# slurp up configuration

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-config,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- config.orig Wed Jun 19 05:19:22 2002
+++ config Mon Jul 1 17:01:33 2002
@@ -34,9 +34,9 @@ VERSIONID = 1.7e6
#
# uncomment to enable debug render modes
#
-ifdef DEBUG
+.ifdef DEBUG
DEBUG_RENDERING = -DDEBUG_RENDERING
-endif
+.endif
#
# uncomment to enable robot tanks

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-include_network_h,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- include/network.h.orig Tue Jun 4 07:40:27 2002
+++ include/network.h Mon Jul 1 17:05:30 2002
@@ -41,7 +41,7 @@
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
-#if defined(_old_linux_) || (!defined(__linux__) && !defined(sun) && !defined(__FreeBSD__) && !defined(macintosh))
+#if defined(_old_linux_) || (!defined(__linux__) && !defined(sun) && !defined(__FreeBSD__) && !defined(macintosh)) && !defined(__OpenBSD__)
#include <bstring.h>
#endif
@@ -68,6 +68,10 @@
#endif
#if defined(__FreeBSD__) && !defined(_MACOSX_)
+#define AddrLen socklen_t
+#endif
+
+#if defined(__OpenBSD__) && !defined(_MACOSX_)
#define AddrLen socklen_t
#endif

View File

@ -0,0 +1,33 @@
$OpenBSD: patch-man_Makefile,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- man/Makefile.orig Tue Jun 4 07:40:27 2002
+++ man/Makefile Mon Jul 1 17:01:33 2002
@@ -25,25 +25,25 @@ TARGETS = *.[1-8] *.z *.gz
PRINTSRC = find . \( -name '*.[1-8]s' \) -print | \
sed -e 's/^\.\///' -e '/\//d'
-targets: sourceform packed gzipped
+targets: sourceform
# generate nroff source
sourceform:
$(PRINTSRC) | \
sed -e 's/\.\([1-8]\)s$$/.\1/' | \
- xargs -l10 $(MAKE) $(MFLAGS)
+ xargs -n10 $(MAKE) $(MFLAGS)
# generate packed compiled nroff
packed: sourceform
$(PRINTSRC) | \
sed -e 's/\.[1-8]s$$/\.z/' | \
- xargs -l10 $(MAKE) $(MFLAGS)
+ xargs -n10 $(MAKE) $(MFLAGS)
# generate gzipped compiled nroff
gzipped: sourceform
$(PRINTSRC) | \
sed -e 's/\.[1-8]s$$/\.gz/' | \
- xargs -l10 $(MAKE) $(MFLAGS)
+ xargs -n10 $(MAKE) $(MFLAGS)
# replace tokens in source to make nroff source
.1s.1 .2s.2 .3s.3 .4s.4 .5s.5 .6s.6 .7s.7 .8s.8:

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-src_bzflag_HUDRenderer_cxx,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/bzflag/HUDRenderer.cxx.orig Mon Jul 1 13:47:53 2002
+++ src/bzflag/HUDRenderer.cxx Mon Jul 1 13:48:31 2002
@@ -23,9 +23,6 @@
#include "World.h"
#include "OpenGLGState.h"
#include "texture.h"
-#if !defined(_MACOSX_)
-#include <malloc.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_bzflag_Makefile,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/bzflag/Makefile.orig Fri Feb 2 03:04:25 2001
+++ src/bzflag/Makefile Wed May 15 10:39:32 2002
@@ -64,7 +64,7 @@ LLDLIBS = \
$(GL_LIBS) \
$(DISPLAY_LIBS) \
$(WINDOW_LIBS) \
- -lm \
+ -lm -lusbhid -lossaudio \
$(NULL)
targets: $(TARGETS)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_bzflag_ServerLink_cxx,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/bzflag/ServerLink.cxx.orig Tue Jun 4 07:40:31 2002
+++ src/bzflag/ServerLink.cxx Mon Jul 1 17:01:33 2002
@@ -775,7 +775,7 @@ void ServerLink::sendUDPlinkRequest()
if ((urecvfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
return; // we cannot comply
}
- for (int portno=17200; portno < 65000; portno++) {
+ for (int portno=49152; portno < 65535; portno++) {
::memset((unsigned char *)&serv_addr, 0, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_geometry_Makefile,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/geometry/Makefile.orig Mon Nov 26 12:29:52 2001
+++ src/geometry/Makefile Wed May 15 10:39:33 2002
@@ -22,10 +22,10 @@ CXXFILES = \
QuadWallSceneNode.cxx \
TriWallSceneNode.cxx \
PolyWallSceneNode.cxx \
- EighthDimSceneNode.cxx \
+ EighthDPyrSceneNode.cxx \
EighthDBaseSceneNode.cxx \
EighthDBoxSceneNode.cxx \
- EighthDPyrSceneNode.cxx \
+ EighthDimSceneNode.cxx \
ShellSceneNode.cxx \
TracerSceneNode.cxx \
PTSceneNode.cxx \

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-src_net_Makefile,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/net/Makefile.orig Tue Feb 13 02:25:30 2001
+++ src/net/Makefile Wed May 15 10:39:33 2002
@@ -16,8 +16,8 @@ TARGETS = $(LIBDIR)/libNet.a
CXXFILES = \
Address.cxx \
- Pack.cxx \
Ping.cxx \
+ Pack.cxx \
multicast.cxx \
udpnetwork.cxx \
network.cxx \

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-src_platform_LinuxMedia_cxx,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/platform/LinuxMedia.cxx.orig Tue Jun 4 00:40:34 2002
+++ src/platform/LinuxMedia.cxx Sun Jul 14 21:49:05 2002
@@ -23,7 +23,7 @@
#include <unistd.h>
#include <sys/wait.h>
#include "bzsignal.h"
-#include <sys/soundcard.h>
+#include <soundcard.h>
#include <sys/ioctl.h>
#include <TimeKeeper.h>
#include <errno.h>
@@ -119,7 +119,7 @@ boolean LinuxMedia::openAudio()
boolean LinuxMedia::checkForAudioHardware()
{
boolean flag=False;
- if (!access("/dev/dsp", W_OK)) flag=True;
+ if (!access("/dev/audio", W_OK)) flag=True;
if (!access("/dev/sound/dsp", W_OK)) flag=True;
return flag;
}
@@ -176,11 +176,11 @@ boolean LinuxMedia::openAudioHardware(
audioLowWaterMark = 2;
// open device (but don't wait for it)
- audioPortFd = open("/dev/dsp", O_WRONLY | O_NDELAY, 0);
+ audioPortFd = open("/dev/audio", O_WRONLY | O_NDELAY, 0);
if (audioPortFd == -1) {
audioPortFd = open("/dev/sound/dsp", O_WRONLY | O_NDELAY, 0);
if (audioPortFd == -1) {
- fprintf(stderr, "Failed to open audio device /dev/dsp or /dev/sound/dsp (%d)\n", errno);
+ fprintf(stderr, "Failed to open audio device /dev/audio or /dev/sound/dsp (%d)\n", errno);
return False;
}
}

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_platform_Makefile,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/platform/Makefile.orig Fri Feb 2 03:04:26 2001
+++ src/platform/Makefile Wed May 15 10:39:33 2002
@@ -16,13 +16,13 @@ include Make-$(CONFIG)
TARGETS = $(LIBDIR)/libPlatform.a
CXXFILES = \
+ $(PCXXFILES) \
PlatformFactory.cxx \
BzfDisplay.cxx \
BzfVisual.cxx \
BzfWindow.cxx \
BzfMedia.cxx \
wave.cxx \
- $(PCXXFILES) \
$(NULL)
targets: $(TARGETS)

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_platform_XWindow_h,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/platform/XWindow.h.orig Thu Nov 15 02:27:08 2001
+++ src/platform/XWindow.h Wed May 15 10:39:33 2002
@@ -36,11 +36,10 @@ extern "C" {
#endif
#ifdef __FreeBSD__
#include <libusb.h>
-#else
-#include <usb.h>
#endif
#include <dev/usb/usb.h>
#include <dev/usb/usbhid.h>
+#include <usbhid.h>
#ifdef __cplusplus
#undef class
}

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-src_platform_usbjoy_cxx,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/platform/usbjoy.cxx.orig Tue Jun 4 07:40:35 2002
+++ src/platform/usbjoy.cxx Mon Jul 1 17:01:33 2002
@@ -46,7 +46,7 @@ private:
int data_buf_offset;
};
-usb_joystick *stick;
+usb_joystick *stick=NULL;
usb_joystick::usb_joystick(const char *name)
{
@@ -67,7 +67,7 @@ usb_joystick::usb_joystick(const char *n
return;
}
- data_buf_size = hid_report_size(rd, hid_input, &report_id);
+ data_buf_size = hid_report_size(rd, hid_input, report_id);
if ((data_buf = (char *)malloc(data_buf_size)) == NULL) {
hid_dispose_report_desc(rd);
}
@@ -75,7 +75,7 @@ usb_joystick::usb_joystick(const char *n
int is_joystick = 0;
int interesting_hid = FALSE;
- for (d = hid_start_parse(rd, 1 << hid_input); hid_get_item(d, &h); ) {
+ for (d = hid_start_parse(rd, 1 << hid_input, NULL); hid_get_item(d, &h); ) {
int page = HID_PAGE(h.usage);
int usage = HID_USAGE(h.usage);
is_joystick = is_joystick ||

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_scene_Makefile,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
--- src/scene/Makefile.orig Fri Feb 2 03:04:26 2001
+++ src/scene/Makefile Wed May 15 10:39:33 2002
@@ -15,9 +15,9 @@ include $(DEPTH)/Make-common
TARGETS = $(LIBDIR)/libSceneDB.a
CXXFILES = \
- SceneDatabase.cxx \
ZSceneDatabase.cxx \
BSPSceneDatabase.cxx \
+ SceneDatabase.cxx \
$(NULL)
targets: $(TARGETS)

18
games/bzflag/pkg/DESCR Normal file
View File

@ -0,0 +1,18 @@
BZFlag is a 3D multi-player tank battle game that allows users to play
against each other in a networked environment. There are five teams:
red, green, blue, purple and rogue (rogue tanks are black). Destroying a
player on another team scores a win, while being destroyed or destroying
a teammate scores a loss. Rogues have no teammates (not even other
rogues), so they cannot shoot teammates and they do not have a team
score.
There are two main styles of play: capture-the-flag and free-for-all. In
capture-the-flag, each team (except rogues) has a team base and each
team with at least one player has a team flag. The object is to capture
an enemy team's flag by bringing it to your team's base. This destroys
every player on the captured team, subtracts one from that team's score,
and adds one to your team's score. In free-for-all, there are no team
flags or team bases. The object is simply to get as high a score as
possible.
WWW: ${HOMEPAGE}

64
games/bzflag/pkg/PLIST Normal file
View File

@ -0,0 +1,64 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/02/03 04:09:56 pvalchev Exp $
bin/bzflag
bin/bzfls
bin/bzfrelay
bin/bzfs
man/man6/bzflag.6
man/man6/bzfls.6
man/man6/bzfrelay.6
man/man6/bzfs.6
share/bzflag/data/Bzflag.fti
share/bzflag/data/Bzflag.ftr
share/bzflag/data/Bzfs.fti
share/bzflag/data/bbolt.rgb
share/bzflag/data/blaser.rgb
share/bzflag/data/boom.wav
share/bzflag/data/boxwall.rgb
share/bzflag/data/caution.rgb
share/bzflag/data/clouds.rgb
share/bzflag/data/explode1.rgb
share/bzflag/data/explosion.wav
share/bzflag/data/fire.wav
share/bzflag/data/fixedbr.rgb
share/bzflag/data/fixedmr.rgb
share/bzflag/data/flag.rgb
share/bzflag/data/flag_alert.wav
share/bzflag/data/flag_drop.wav
share/bzflag/data/flag_grab.wav
share/bzflag/data/flag_lost.wav
share/bzflag/data/flag_won.wav
share/bzflag/data/flage.rgb
share/bzflag/data/gbolt.rgb
share/bzflag/data/glaser.rgb
share/bzflag/data/ground.rgb
share/bzflag/data/helvbi.rgb
share/bzflag/data/helvbr.rgb
share/bzflag/data/jump.wav
share/bzflag/data/killteam.wav
share/bzflag/data/land.wav
share/bzflag/data/laser.wav
share/bzflag/data/lock.wav
share/bzflag/data/missile.rgb
share/bzflag/data/missile.wav
share/bzflag/data/mountain.rgb
share/bzflag/data/panel.rgb
share/bzflag/data/pbolt.rgb
share/bzflag/data/phantom.wav
share/bzflag/data/plaser.rgb
share/bzflag/data/pop.wav
share/bzflag/data/pyrwall.rgb
share/bzflag/data/rbolt.rgb
share/bzflag/data/ricochet.wav
share/bzflag/data/rlaser.rgb
share/bzflag/data/roof.rgb
share/bzflag/data/shock.wav
share/bzflag/data/teamgrab.wav
share/bzflag/data/teleport.wav
share/bzflag/data/timesbi.rgb
share/bzflag/data/timesbr.rgb
share/bzflag/data/title.rgb
share/bzflag/data/wall.rgb
share/bzflag/data/ybolt.rgb
share/bzflag/data/ylaser.rgb
@dirrm share/bzflag/data
@dirrm share/bzflag