SUMMARY="A game like Deflektor (C64) or Mindbender (Amiga)"
DESCRIPTION="
Make the Laser reach the target by rotating mirrors, but take care of not \
overheating.
"
HOMEPAGE="http://www.artsoft.org/mirrormagic/"
LICENSE="GNU GPL v2"
COPYRIGHT="1989-2003 Artsoft Entertainment"
SOURCE_URI="http://www.artsoft.org/RELEASES/unix/mirrormagic/mirrormagic-2.0.2.tar.gz"
CHECKSUM_SHA256="79b3f13d493523438eeb988beffc272c804bc7a4361b83167a082c77e74b3ce2"
REVISION="1"
ARCHITECTURES="x86_gcc2"

PROVIDES="
	mirrormagic = $portVersion
	app:mirrormagic = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libsdl$secondaryArchSuffix
	lib:libsdl_image$secondaryArchSuffix
	lib:libsdl_mixer$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libsdl$secondaryArchSuffix
	devel:libsdl_image$secondaryArchSuffix
	devel:libsdl_mixer$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	haiku_devel
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"

PATCHES="mirrormagic-2.0.2.patchset"
BUILD()
{
	# parallel build not available.
	make sdl
}

INSTALL()
{
	destDir="$appsDir/Mirror Magic"
	mkdir -p "$destDir"
	cp -r mirrormagic graphics levels music sounds "$destDir"
	addAppDeskbarSymlink "$destDir/mirrormagic" "Mirror Magic"
}
