SUMMARY="Logic game with arcade and tactics modes"
DESCRIPTION="Biniax-2 is a original and entertaining game. Takes a minute \
to learn and gives you hours and hours of gameplay. Discover the different \
Biniax-2 faces - for action heroes or careful strategists."
HOMEPAGE="http://biniax.com/"
COPYRIGHT="1991-2004 Silicon Graphics
	1997-2006 Sam Lantinga
	2005-2009 Jordan Tuzsuzov"
LICENSE="Zlib"
REVISION="1"
SOURCE_URI="http://www.tuzsuzov.com/biniax/biniax2-1.30-fullsrc.tar.gz"
CHECKSUM_SHA256="2c09f6f0a5fe453a409d990d72a964636ee91ca91daac99f0db861b8f42531bf"
SOURCE_DIR=""
PATCHES="biniax2-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	biniax2$secondaryArchSuffix = $portVersion
	cmd:biniax2$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libSDL_1.2$secondaryArchSuffix
	lib:libSDL_image_1.2$secondaryArchSuffix
	lib:libSDL_mixer_1.2$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libSDL_1.2$secondaryArchSuffix
	devel:libSDL_image_1.2$secondaryArchSuffix
	devel:libSDL_mixer_1.2$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc$secondaryArchSuffix
	"

PATCH()
{
	sed -i "s|data|$dataDir/biniax2|g" desktop/gfx.c desktop/snd.c
}

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	mkdir -p $appsDir $dataDir/biniax2
	mv biniax2 $appsDir/Biniax2
	cp -rf data/* $dataDir/biniax2
	rm -f $dataDir/biniax2/Thumbs.db

	addAppDeskbarSymlink $appsDir/Biniax2
}
