SUMMARY="A desktop app to use various dictionaries"
DESCRIPTION="BSAP is an English-Polish, Polish-English dictionary program that \
uses dictionary data files from sap. It can also read dictionary data from \
Collins dictionary released by YDP."
HOMEPAGE="https://github.com/ytmytm/beos-bsap"
COPYRIGHT="2004-2018 Maciej Witkowiak"
LICENSE="GNU GPL v2"
REVISION="1"
srcGitRev="0f04a2464778fc2c92e11a5cbe481c037ccd7c2e"
SOURCE_URI="https://github.com/ytmytm/beos-bsap/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="3e741f06495244327d137c9ad1fec2b2304029f2aa832fe08d58078c59fea6f8"
SOURCE_FILENAME="beos-bsap-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="beos-bsap-$srcGitRev"
PATCHES="bsap-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
if [ "$targetArchitecture" = x86_gcc2 ]; then
SECONDARY_ARCHITECTURES="x86"
fi

PROVIDES="
	bsap$secondaryArchSuffix = $portVersion
	app:BSAP = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:g++$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	make OBJ_DIR=objects
}

INSTALL()
{
	mkdir -p $appsDir
	cp objects/BSAP $appsDir
	addAppDeskbarSymlink $appsDir/BSAP
}
