SUMMARY="A compiler-compiler tool for aspect-oriented programming"
DESCRIPTION="\
Tree Compiler-Compiler (treecc) is designed to assist in the development of \
compilers and other language- based tools. It manages the generation of code \
to handle abstract syntax trees and operations upon the trees. \
"
HOMEPAGE="http://www.gnu.org/software/dotgnu/treecc/treecc.html"
SOURCE_URI="http://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-0.3.10.tar.gz"
CHECKSUM_SHA256="5e9d20a6938e0c6fedfed0cabc7e9e984024e4881b748d076e8c75f1aeb6efe7"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2001-2003 Southern Storm Software, Pty Ltd
	2003 Free Software Foundation, Inc.
	"
ARCHITECTURES="x86_gcc2 x86 x86_64"

PROVIDES="
	treecc = $portVersion
	cmd:treecc = $portVersion
	"

REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc
	cmd:awk
	cmd:bison
	cmd:libtoolize
	cmd:aclocal
	cmd:autoconf
	"

PATCHES="treecc-0.3.10.patchset"

BUILD()
{
	sed -i "s/expr_c_LDADD = -lm/expr_c_LDADD = /" examples/Makefile*
	libtoolize -fci
	aclocal
	autoconf
	automake --add-missing
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	
	rm $libDir/libtreecc.a
#	mkdir -p $binDir
#	cp -a objects/projectx $binDir
}
