SUMMARY="A native spreadsheet application"
DESCRIPTION="This is the open source version of Maarten Hekkelman's Sum-It \
application. Sum-It has basic features, including a plug-in architecture for \
formulas and graphs and im/export of comma or tab separated files."
HOMEPAGE="https://github.com/beos-zealot/OpenSumIt"
COPYRIGHT="1996-1998, 2000 Hekkelman Programmatuur B.V.
	1999-2000 Tim Vernum"
LICENSE="BSD (4-clause)"
REVISION="7"
SOURCE_URI="https://github.com/keegnotrub/OpenSumIt/archive/b1e8e03.tar.gz"
CHECKSUM_SHA256="26172732a28e86bfad3d2c42412d45d42c5ba73213ae5947d6dcaa73e330015a"
SOURCE_DIR="OpenSumIt-b1e8e03102690486f92c9fb0b06084bd8d556e88"
PATCHES="sum_it-$portVersion.patchset"

ARCHITECTURES="all"

PROVIDES="
	sum_it = $portVersion
	app:Sum_It = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:bison
	cmd:flex
	cmd:gcc
	cmd:make
	"

BUILD()
{
	pushd bsl
	make
	PATH=`pwd`:$PATH
	popd

	pushd rez
	make || true # first pass fail for unknown reason
	make
	PATH=`pwd`:$PATH
	popd

	cd sum-it
	make
}

INSTALL()
{
	mkdir -p $appsDir
	cp sum-it/OpenSum-It $appsDir/Sum-It
	addAppDeskbarSymlink $appsDir/Sum-It
}
