SUMMARY="The Device Tree Compiler"
DESCRIPTION="
The Device Tree Compiler
" 
HOMEPAGE="http://git.jdl.com/gitweb/?p=dtc.git;a=summary" 
SRC_URI="git://git.jdl.com/software/dtc.git#v1.4.0"
LICENSE="GNU GPL v2"
COPYRIGHT="2005 David Gibson, IBM Corporation"
REVISION="1"

ARCHITECTURES="x86"

PROVIDES="
	dtc = $portVersion
	cmd:convert_dtsv0 = $portVersion
	cmd:dtc = $portVersion
	cmd:dtdiff = $portVersion
	cmd:fdtdump = $portVersion
	cmd:fdtget = $portVersion
	cmd:fdtput = $portVersion
	lib:libfdt = $portVersion
	lib:libfdt_1.4.0 = $portVersion
	devel:libfdt = $portVersion
	"

REQUIRES="
	haiku >= $haikuVersion
	"

BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:bison >= 2.5
	cmd:flex
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

PATCHES="dtc-${portVersion}.patch"

BUILD()
{
	make PREFIX=$prefix $jobArgs
}

INSTALL()
{
	make install PREFIX=$prefix INCLUDEDIR=$includeDir

	prepareInstalledDevelLibs libfdt
}

TEST()
{
	make tests
}
