SUMMARY="A REXX interpreter with Haiku scripting integration"
DESCRIPTION="Rexx (Restructured Extended Executor) is an interpreted \
programming language developed at IBM by Mike Cowlishaw. It is a structured, \
high-level programming language designed for ease of learning and reading.

BeBRexx 1.3.2 is the first public release of a port of Bill Vlachoudis' BRexx \
version 1.3 to BeOS, a REXX interpreter with a number of improvements and \
additions:
* Support for Haiku application scripting.
* Support for running BRexx scripts from the desktop.
* Additional functions and features."
HOMEPAGE="http://www.verifiedlogic.com/"
SOURCE_URI="http://www.verifiedlogic.com/BeBRexx.zip"
CHECKSUM_SHA256="0386a9f04e04a120af5785c034e254bbfedc24973e241fe744e6777b453c8055"
LICENSE="
	Public Domain
	BSD (3-clause)
	"
COPYRIGHT="
	1991-1999, Be Incorporated
	1999 Willy Langeveld
	1999 Vassilis Vlachoudis
	"
REVISION="1"
ARCHITECTURES="x86_gcc2"

PROVIDES="
	brexx = $portVersion
	cmd:PortManager
	cmd:Squares
	cmd:rx
	lib:libPortManager
	"
REQUIRES="
	haiku
	"
BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc
	cmd:make
	"

SOURCE_DIR="BeBRexx"

PATCHES="brexx-$portVersion.patchset"

BUILD()
{
	make all OBJ_DIR=obj
}

INSTALL()
{
	mkdir -p $binDir
	mkdir -p $libDir

	copyattr -d PortManager/obj/PortManager $binDir
	copyattr -d Squares/obj/Squares $binDir
	copyattr -d src/obj/rx $binDir

	copyattr -d PortLib/obj/libPortManager.so $libDir
}

TEST()
{
	export LIBRARY_PATH=PortLib/obj:$LIBRARY_PATH
	make test OBJ_DIR=obj
}
