SUMMARY="A button football simulation"
DESCRIPTION="A turn based game where you play football (soccer) with buttons, \
boxes and simple rules."
REVISION="1"
LICENSE="GNU GPL v3"
COPYRIGHT="2009-2010 The DNTeam"
HOMEPAGE="http://sourceforge.net/projects/digenv/"

SOURCE_URI="http://www.mirrorservice.org/sites/downloads.sourceforge.net/d/di/digenv/xut/$portVersion/xut-$portVersion.tar.bz2"
CHECKSUM_SHA256="bbaca1531439cad1f5a040571b8208d87c129a597c93d06d1598eb512e86fef3"
SOURCE_DIR="xut"
PATCHES="xut-$portVersion.patchset"

PROVIDES="
	xut$secondaryArchSuffix = $portVersion
	cmd:xut$secondaryArchSuffix
"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libglu$secondaryArchSuffix
	lib:libgl$secondaryArchSuffix
	lib:libgcc_s$secondaryArchSuffix
	lib:libstdc++$secondaryArchSuffix
	lib:libsdl$secondaryArchSuffix
	lib:libsdl_image$secondaryArchSuffix
	lib:libsdl_ttf$secondaryArchSuffix
	lib:libcal3d$secondaryArchSuffix
	lib:libogg$secondaryArchSuffix
	lib:libopenal$secondaryArchSuffix
	lib:libvorbis$secondaryArchSuffix
	lib:libvorbisfile$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
"

BUILD_REQUIRES="
	devel:libglu$secondaryArchSuffix
	devel:libsdl$secondaryArchSuffix
	devel:libsdl_image$secondaryArchSuffix
	devel:libsdl_ttf$secondaryArchSuffix
	devel:libcal3d$secondaryArchSuffix
	devel:libogg$secondaryArchSuffix
	devel:libopenal$secondaryArchSuffix
	devel:libvorbis$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:autoconf
	cmd:gcc$secondaryArchSuffix
	cmd:make
"

ARCHITECTURES="x86"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	# x86_gcc2 is fine as primary target architecture as long as we're building
	# for a different secondary architecture.
	ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

BUILD()
{
	autoconf
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	mkdir -p bin
	make install
	cp -r data/* $dataDir/xut/
}
