SUMMARY="A small build system similar to make."
HOMEPAGE="http://martine.github.io/ninja/"
LICENSE="Apache v2"
COPYRIGHT="2011 Google Inc."
SRC_URI="git://github.com/martine/ninja.git#v1.4.0"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	ninja$secondaryArchSuffix = $portVersion
	cmd:ninja = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	haiku_devel >= $haikuVersion
	cmd:python
	cmd:g++$secondaryArchSuffix
	cmd:gcc$secondaryArchSuffix
	cmd:as$secondaryArchSuffix
"

PATCHES="ninja-1.4.0.patchset"

BUILD()
{
	python ./bootstrap.py
}

INSTALL()
{
	mkdir -p $binDir
	cp ninja $binDir
}

DESCRIPTION="
Ninja is a small build system with a focus on speed. It differs from other \
build systems in two major respects: it is designed to have its input files \
generated by a higher-level build system, and it is designed to run builds as \
fast as possible.
Why yet another build system? Where other build systems are high-level \
languages Ninja aims to be an assembler.
Ninja build files are human-readable but not especially convenient to write by \
hand. (See the generated build file used to build Ninja itself.) These \
constrained build files allow Ninja to evaluate incremental builds quickly. \
For the Chrome browser on Linux (the motivating project behind Ninja), Ninja \
is under a second for a no-op build where the equivalent Makefiles took over \
ten seconds.
Ninja's low-level approach makes it perfect for embedding into more featureful \
build systems. Via gyp it can build Chrome and v8 and node.js etc.; via CMake \
it can build LLVM and KDE and Blender etc.
"
