SUMMARY="A cool 2D platforming game"
DESCRIPTION="Pachi el marciano is a cool 2D platforming game inspired by games like \
Manic Miner, Jet set Willy and more from the 80s."
HOMEPAGE="http://dragontech.sourceforge.net/index.php?lang=en&main=about"
COPYRIGHT="2004 Santiago Radeff, Nicolas Radeff, Peter Hajba"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="http://sourceforge.net/projects/dragontech/files/Pachi%20el%20marciano/Pachi%20el%20marciano%201.0/pachi_source.tgz"
CHECKSUM_SHA256="134a51773d5e441dc31aed4e57b3543afdefe2d8efedeaa05acb85cac0fa9c52"
SOURCE_DIR="Pachi"
PATCHES="pachi-$portVersion.patchset"

ARCHITECTURES="all ?x86"

GLOBAL_WRITABLE_FILES="
	settings/pachi/data/scores.dat auto-merge
	"

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

BUILD_REQUIRES="
	haiku_devel
	devel:libSDL
	devel:libSDL_image
	devel:libSDL_mixer
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoreconf
	cmd:automake
	cmd:awk
	cmd:gcc
	cmd:ld
	cmd:make
	"

BUILD()
{
	autoreconf -vfi
	runConfigure --omit-dirs localStateDir ./configure \
		--localstatedir=$settingsDir
	make $jobArgs
}

INSTALL()
{
	make install
	addAppDeskbarSymlink $binDir/pachi Pachi
}
