SUMMARY="A 2D arcade shoot-em-up game"
DESCRIPTION="Powermanga is an arcade 2D shoot-em-up game with 41 levels \
and more than 200 sprites.
Join POWERMANGA, an elite unit tasked to clear space of pirates, \
and improve the safety of peaceful voyagers and navigators.
Collect gems to upgrade your ship (red, green), restore energy (purple) \
and gain satellite shields (yellow).
Upgrades include mobility boost, guided missiles, rear fire shot, and more.

Controls:
ARROW KEYS -> Move spaceship
SPACE -> Shoot
CTRL -> Aquire an activated option
ESC -> Display menu
P -> Pause the game
F -> Toggle fullscreen"
HOMEPAGE="http://linux.tlk.fr/games/Powermanga"
REVISION="1"
COPYRIGHT="1998-2019 TLK Games"
LICENSE="GNU GPL v3"
SOURCE_URI="https://github.com/brunonymous/powermanga/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="010987a3cb27a1f9388a212f637977692284b5616952efa1efae09d2464e9249"
SOURCE_DIR="Powermanga-$portVersion"
PATCHES="powermanga-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"

GLOBAL_WRITABLE_FILES="
	settings/Powermanga directory keep-old
	"

PROVIDES="
	powermanga$secondaryArchSuffix = $portVersion
	app:Powermanga
	"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libpng$secondaryArchSuffix
	lib:libSDL_1.2$secondaryArchSuffix
	lib:libSDL_mixer_1.2$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libpng16$secondaryArchSuffix
	devel:libSDL_1.2$secondaryArchSuffix
	devel:libSDL_mixer_1.2$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	./bootstrap
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	addAppDeskbarSymlink $appsDir/Powermanga/powermanga "Powermanga"
}
