SUMMARY="A classic lines puzzle game"
DESCRIPTION="This strategy Game will make you think and concentrate \
for hours if you accept the challenge. The game will randomly place three \
color balls on the game board at every round, you have to strategically \
select one ball (click on ball) and move it to the most convenient location \
(click on target square)."
HOMEPAGE="https://github.com/OpenA/color-lines-sdl"
COPYRIGHT="2011 Peter Kosyh"
LICENSE="GNU GPL v2"
REVISION="5"
SOURCE_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/color-lines/lines_$portVersion.tar.gz"
CHECKSUM_SHA256="e20c87dfcc8f940c8af7784dad12e66fa1cd10d0d97766979fef00eb17c0b0b3"
SOURCE_DIR="lines-$portVersion"
PATCHES="color_lines-$portVersion.patchset"

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

PROVIDES="
	color_lines$secondaryArchSuffix = $portVersion
	app:color_lines = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libSDL_1.2$secondaryArchSuffix
	lib:libSDL_image_1.2$secondaryArchSuffix
	lib:libSDL_mixer_1.2$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libSDL$secondaryArchSuffix
	devel:libSDL_image$secondaryArchSuffix
	devel:libSDL_mixer$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	make PREFIX=$prefix BINDIR=$appsDir GAMEDATADIR=$dataDir/color-lines/
}

INSTALL()
{
	make PREFIX=$prefix BINDIR=$appsDir GAMEDATADIR=$dataDir/color-lines/ \
		install
	rm -rf $prefix/share
	addAppDeskbarSymlink $appsDir/color-lines ColorLines
}
