DESCRIPTION="a simple, self-contained and portable build system" 
HOMEPAGE="http://hypertriton.com/bsdbuild/" 
SOURCE_URI="http://stable.hypertriton.com/bsdbuild/bsdbuild-2.9.tar.gz"
REVISION="1"
STATUS_HAIKU="broken"
DEPEND="dev-lang/perl >= 5.10
	dev-lang/lua >= 5.1"
CHECKSUM_MD5="fd0d4a754024a39d9cf1f5e42f8075b5"
BUILD()
{
	cd bsdbuild-2.9
	cp mkconfigure.pl mkconfigure
#	cp gen-dotdepend.pl gen-dotdepend-tmp.pl
	sed -i 's#/usr/bin/perl#/boot/common/bin/perl#' mkconfigure
	sed -i 's#$INSTALLDIR/gen-dotdepend.pl#./gen-dotdepend.pl#' mkconfigure
	cat configure.in | mkconfigure > configure
	rm mkconfigure	
	./configure --prefix=/boot/common \
		--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
		--datadir=`finddir B_COMMON_DATA_DIRECTORY` \
		--infodir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/info \
		--localedir=`finddir B_COMMON_DATA_DIRECTORY`/locale \
		--sbindir=`finddir B_COMMON_BIN_DIRECTORY` \
		--sharedir=`finddir B_COMMON_DATA_DIRECTORY`
	make
}

INSTALL()
{
	cd bsdbuild-2.9
	make install
}

TEST()
{
	cd bsdbuild-2.9
#	make test
#	make check
}

LICENSE="BSD (2-clause)"
COPYRIGHT="2002-2011 Hypertrition, Inc."
