SUMMARY="online multiplayer 3D tank battle game"
DESCRIPTION="BZFlag is a free online multiplayer 3D tank battle game. The name \
originates from \"Battle Zone Capture The Flag\". It runs on Windows, Mac OSX, \
Linux, BSD, and other platforms. It was one of the most popular games ever on \
Silicon Graphics machines and continues to be developed and improved to this day.
"
HOMEPAGE="http://www.bzflag.org/"
REVISION="1"
ARCHITECTURES=""
SECONDARY_ARCHITECTURES="x86"
if [ $effectiveTargetArchitecture == "x86" ]; then
	ARCHITECTURES+="x86_gcc2 $ARCHITECTURES"
fi

SOURCE_URI="http://downloads.sourceforge.net/project/bzflag/bzflag%20source/$portVersion/bzflag-$portVersion.tar.bz2"
CHECKSUM_SHA256="4f7bc52284cc4b39fc352855e555b2b064c1de6a18f7474e249073070762c811"
PATCHES="bzflag-$portVersion.patchset"

PROVIDES="
	bzflag$secondaryArchSuffix = $portVersion
	cmd:bzadmin$secondaryArchSuffix
	cmd:bzfs$secondaryArchSuffix
	lib:HoldTheFlag$secondaryArchSuffix
	lib:Phoenix$secondaryArchSuffix
	lib:SAMPLE_PLUGIN$secondaryArchSuffix
	lib:TimeLimit$secondaryArchSuffix
	lib:airspawn$secondaryArchSuffix
	lib:autoFlagReset$secondaryArchSuffix
	lib:chathistory$secondaryArchSuffix
	lib:customflagsample$secondaryArchSuffix
	lib:fairCTF$secondaryArchSuffix
	lib:fastmap$secondaryArchSuffix
	lib:flagStay$secondaryArchSuffix
	lib:hiddenAdmin$secondaryArchSuffix
	lib:keepaway$secondaryArchSuffix
	lib:killall$secondaryArchSuffix
	lib:koth$secondaryArchSuffix
	lib:logDetail$secondaryArchSuffix
	lib:nagware$secondaryArchSuffix
	lib:playHistoryTracker$secondaryArchSuffix
	lib:rabbitTimer$secondaryArchSuffix
	lib:rabidRabbit$secondaryArchSuffix
	lib:recordmatch$secondaryArchSuffix
	lib:regFlag$secondaryArchSuffix
	lib:RogueGenocide$secondaryArchSuffix
	lib:serverControl$secondaryArchSuffix
	lib:shockwaveDeath$secondaryArchSuffix
	lib:teamflagreset$secondaryArchSuffix
	lib:thiefControl$secondaryArchSuffix
	lib:timedctf$secondaryArchSuffix
	lib:wwzones$secondaryArchSuffix
"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libgcc_s$secondaryArchSuffix
	lib:libstdc++$secondaryArchSuffix
	lib:libcares$secondaryArchSuffix
	lib:libcrypto$secondaryArchSuffix
	lib:libcurl$secondaryArchSuffix
	lib:libssl$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcares$secondaryArchSuffix
	devel:libcurl$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
"

BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:gawk
	cmd:gcc$secondaryArchSuffix
	cmd:make
"

BUILD()
{
	export LDFLAGS=-lnetwork
	runConfigure ./configure --disable-ares-build --disable-curl-build --disable-zlib-build
	make $jobArgs
}

INSTALL()
{
	make install

	rm $libDir/*.la
}

LICENSE="GNU LGPL v2.1"
COPYRIGHT="1993-2010 Tim Riker"
