SUMMARY="One of the first science fiction roguelikes"
DESCRIPTION="In the 22nd century, colony ships were programmed to search \
for earthlike planets along trajectories calculated to visit stars with the \
best likelihood of habitable worlds. One such ship with its crew and \
passengers in cryostasis traveled over 2300 light years before a suitable \
planet was found.

Hope is a temperate world located in the Glory system on the edge of a vast \
nebula often referred to as the Purple Void. The nebula is unique in that it \
contains many unusual star types and other peculiar phenomena.

Over 100 years have passed since the colonists first arrived. It is a new \
beginning of deep space exploration. Technology has improved and mankind is \
no longer dependent on slow cryoships and robot probes. This is the setting of \
Strange Adventures In Infinite Space.

SAIS is a roguelike, which means that the game is different \
every time it is played. Stars, planets, black holes, nebula mass, alien \
patrols, items, lifeforms and other encounters are randomized for each new \
Strange Adventure.

Strange Adventures in Infinite Space (SAIS) was released in 2002 by James \
Ernest and Cheapass Games. It was created by Rich Carlson, Iikka Keränen and \
Bill Sears--aka, Digital Eel."
HOMEPAGE="https://rich.itch.io/strangeadventures"
COPYRIGHT="Digital Eel 2005-2020"
LICENSE="GNU GPL v3"
REVISION="1"
srcGitRev="5dc9f5c2abc966cc07048b7579c3a294c2304080"
SOURCE_URI="https://github.com/kuroneko/sais/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="7516f26eb418336275a2e947dd4cc9880500ab4553d2bb14f8ca628df697232d"
SOURCE_DIR="sais-$srcGitRev"

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

PROVIDES="
	sais$secondaryArchSuffix = $portVersion
	app:sais = $portVersion
	app:strange = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libphysfs$secondaryArchSuffix
	lib:libSDL2_2.0$secondaryArchSuffix
	lib:libSDL2_mixer_2.0$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libphysfs$secondaryArchSuffix
	devel:libSDL2_2.0$secondaryArchSuffix
	devel:libSDL2_mixer_2.0$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:zip
	"

BUILD()
{
	mkdir sais-build && cd sais-build
	cmake -DCMAKE_INSTALL_PREFIX=$appsDir/sais ..
	make all $jobArgs
}

INSTALL()
{
	cd sais-build
	make install
	addAppDeskbarSymlink $appsDir/sais/strange "SAIS"
}
