SUMMARY="extended version of the yabsic programming language"
DESCRIPTION="
yab is an extended version of yabasic, a BASIC programming language, with \
special commands designed for Haiku.
"
HOMEPAGE="http://sourceforge.net/projects/yab-interpreter"
SRC_URI="git+https://github.com/HaikuArchives/Yab.git#a5681d8a3403c142eae0ad416a59abd2aa7a28e4"


REVISION="2"

LICENSE="Artistic"

COPYRIGHT="1995-2006 Marc-Oliver Ihm (yabasic)
	2006-2009 Jan Bungeroth (yab improvements)
	2013 Jim Saxton (yab improvements)"

ARCHITECTURES="x86_gcc2 x86 ?x86_64"

PROVIDES="
	yab = $portVersion compat >=1.7.02 
	cmd:yab= $portVersion compat >=1.7.02 
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libncurses$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()
{	
	mkdir -p tmp
	cp -r src/* tmp
	cd tmp
	make $jobArgs BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY`
	unzip -o App_YAB.zip
	copyattr App_YAB yab
	
}

INSTALL()
{	
	mkdir -p $binDir
	cp tmp/yab  $binDir/
	
	mkdir -p $appsDir/yab-IDE
	cp -r src $appsDir/yab-IDE/src
	cp -r Documentation $appsDir/yab-IDE/Documentation

	mkdir -p $documentationDir
	ln -s $appsDir/yab-IDE/Documentation $documentationDir/yab-1.7.02
}
