SUMMARY="The Legend of Edgar is a platform game"
DESCRIPTION="Edgar must battle his way across the world, solving puzzles and \
defeating powerful enemies to achieve his quest. When Edgar's father fails \
to return home after venturing out one dark and stormy night, Edgar fears the \
worst: he has been captured by the evil sorceror who lives in a fortress \
beyond the forbidden swamp. Donning his armour, Edgar sets off to rescue him, \
but his quest will not be easy..."
HOMEPAGE="http://www.parallelrealities.co.uk/p/legend-of-edgar.html"
LICENSE="GNU GPL v2"
COPYRIGHT="2009-2014 Parallel Realities"
SOURCE_URI="http://sourceforge.net/projects/legendofedgar/files/1.16/edgar-1.16-1.tar.gz"
CHECKSUM_SHA256="33884b1adb09f826dbe653ea19004bd0c11baf4f25651c4e49f05d2def5dc8f4"
REVISION="1"

ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86 ?x86_64"

SOURCE_DIR="edgar-1.16"

PATCHES="edgar-1.16.patch"

PROVIDES="
	edgar = $portVersion
	app:edgar = $portVersion
	cmd:edgar = $portVersion
	"
REQUIRES="
	haiku
	lib:libintl
	lib:libpng
	lib:libSDL
	lib:libSDL_image
	lib:libSDL_mixer
	lib:libSDL_ttf
	lib:libz
	"
BUILD_REQUIRES="
	haiku_devel
	devel:libintl
	devel:libpng
	devel:libSDL
	devel:libSDL_image
	devel:libSDL_mixer
	devel:libSDL_ttf
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc
	"

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	installDir=$appsDir/"Edgar/"
	mkdir -p "$installDir"
	make install DESTDIR="$installDir" BIN_DIR="$installDir" DATA_DIR="$installDir"games/edgar/

	addAppDeskbarSymlink $appsDir/Edgar/edgar Edgar
}
