SUMMARY="yab is an extended version of yabsic, a BASIC programming language"
DESCRIPTION="
yab is an extended version of yabasic, a BASIC programming language, with \
special commands designed for BeOS, Haiku and Zeta.
"
HOMEPAGE="http://sourceforge.net/projects/yab-interpreter"
SRC_URI="git+https://github.com/HaikuArchives/Yab.git"
REVISION="2"
#CHECKSUM_MD5="2b465895d9eb2e8383f035dd67b88a20"
LICENSE="Artistic
	GNU GPL v2"
COPYRIGHT="1995-2006 Marc-Oliver Ihm (yabasic)
	2006-2009 Jan Bungeroth (yab improvements)"

ARCHITECTURES="!x86_gcc2 !x86 !x86_64"
SECONDARY_ARCHITECTURE="!x86_gcc2 !x86"

#SOURCE_DIR="yab-$portVersion"

PROVIDES="
	yab$secondaryArchSuffix = $portVersion
	cmd:yab$secondaryArchSuffix
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:ncurses$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	devel:libncurses$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:bison
	cmd:flex
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:mkdepend
	cmd:perl
	makefile_engine
	"

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

INSTALL()
{
	$YABDIR=$appsDir/yab
	mkdir -p ${YABDIR}
	cp -a ${YABDIR}apps/yab
	cp -a Documentation ${YABDIR}
	cp -a Programs ${YABDIR}
	cp -a yab-IDE ${YABDIR}
}
