SUMMARY="Find treasure and escape back to save the Goon Docks from demolition."
HOMEPAGE="http://www2.braingames.getput.com/goonies/"
LICENSE="GNU GPL v2"
COPYRIGHT="2006-2009 Brain Games"
SRC_URI="http://braingames.jorito.net/goonies/downloads/goonies.src_1.4.1528.tgz"
CHECKSUM_SHA256="9e9c1e67a41dfae512e975b6931828cdc82f07397921ca0a41a81c3020a73799"
REVISION="1"
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"

PROVIDES="
	goonies = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libsdl$secondaryArchSuffix
	lib:libSDL_image$secondaryArchSuffix
	lib:libSDL_mixer$secondaryArchSuffix
#	lib:libSDL_sound$secondaryArchSuffix
#	lib:libSDL_ttf$secondaryArchSuffix
	lib:libGLU$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libsdl$secondaryArchSuffix
	devel:libSDL_image$secondaryArchSuffix
	devel:libSDL_mixer$secondaryArchSuffix
#	devel:libSDL_sound$secondaryArchSuffix
#	devel:libSDL_ttf$secondaryArchSuffix
	devel:libGLU$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	haiku_devel >= $haikuVersion
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"

PATCHES="goonies-$portVersion.patchset"
BUILD()
{
	make $jobArgs
}

INSTALL()
{
	installDir=$appsDir/"Goonies"
	mkdir -p "$installDir"
	make install PREFIX="$installDir" GAMEDIR="$installDir"

#	cd "$installDir"
#	echo -e "#!/bin/sh\n`cat roadfighter`" > roadfighter

	addAppDeskbarSymlink "$installDir/goonies" "Goonies"
}

DESCRIPTION="
The action takes place in the sleepy seaside town of Cauldron Point - down in 
an area known as the Goon Docks. The Goonies are a group of local kids - Mikey, 
Brand, Mouth, Chunk and Data. One day they find an old treasure map in Mikey's 
attic. Data figures that this must be the fabulous hidden treasure of the 
notorious local pirate, One-Eyed Willy. The girls, Andy and Stef, join the 
other Goonies and the adventure begins. But the secret underground tunnels they 
are exploring are actually the hideout of the Fratelli Gang, and the Goonies 
are soon trapped! The Goonies have a powerful ally on their side, however, in 
the form of the huge and amiable Sloth.

When you play this game, you are Sloth! Can you help the Goonies find the 
treasure and escape back to save the Goon Docks from demolition?
"
