SUMMARY="Script Creation Utility for Maniac Mansion Virtual Machine"
DESCRIPTION="
ScummVM is a program which allows you to run certain classic graphical \
point-and-click adventure games, provided you already have their data files. \
The clever part about this: ScummVM just replaces the executables shipped with \
the games, allowing you to play them on systems for which they were never \
designed!
"
HOMEPAGE="http://scummvm.org"
SRC_URI="http://prdownloads.sourceforge.net/scummvm/scummvm-1.6.0.tar.bz2?download"
CHECKSUM_SHA256="396060da6a8f391438055c292a280048d29dc408c5b615db43256a86f0e57ec4"
SRC_FILENAME="scummvm-$portVersion.tar.bz2"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2001-2013 ScummVM Team"

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

PROVIDES="
	scummvm = $portVersion
	app:scummvm = $portVersion
"
REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libSDL$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libogg$secondaryArchSuffix
	lib:libvorbis$secondaryArchSuffix
"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	devel:libSDL$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	devel:libogg$secondaryArchSuffix
	devel:libvorbis$secondaryArchSuffix
	devel:libglu$secondaryArchSuffix
"
BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:nasm$secondaryArchSuffix
	cmd:libtoolize
"

SOURCE_DIR="scummvm-1.6.0"

BUILD()
{
	libtoolize --force --copy --install
	./configure --prefix=$prefix --bindir=$appsDir --libdir=$libDir --datarootdir=$dataDir --mandir=$manDir --docdir=$docDir \
		--enable-release
	make
}
INSTALL()
{
	make install
	
	addAppDeskbarSymlink $appsDir/scummvm
}
