SUMMARY="A screensaver that sorts randomly generated bars"
DESCRIPTION="Just like the Borg, bringing order to chaos.
SortSave is a re-creation of an old program for the Tandy 1000 computer. The \
original was programmed in BASIC and compiled to run on MS Dos. This version \
has one mode that re-creates the colors that were used in the original, 16 \
colors."
HOMEPAGE="https://github.com/bbjimmy/Sort-Save"
COPYRIGHT="2013-2015 Jim Saxton, Fat Elk Software"
LICENSE="SortSave"
REVISION="1"
SOURCE_URI="https://github.com/bbjimmy/Sort-Save/archive/1.1.tar.gz"
CHECKSUM_SHA256="cf86c6e650d6313d496a7dce49ebd99377d2b94d6835257881664a30a39ecac6"
SOURCE_DIR="Sort-Save-1.1"

ARCHITECTURES="all"

PROVIDES="
	sortsave = $portVersion
	addon:sortsave = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc
	cmd:make
	cmd:unzip
	"

BUILD()
{
	make $jobArgs BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY`
}

INSTALL()
{
	mkdir -p $addOnsDir/Screen\ Savers
	cd objects*
	cp sort-save $addOnsDir/Screen\ Savers/SortSave
	mkdir -p $dataDir/FatElk
	cd ..
	cd FatElk
	unzip -o fatelk.zip
	cp "FAT ELK" $dataDir/FatElk/
	cp "Fat Elk " $dataDir/FatElk/
}
