diff --git a/dev-util/ninja/ninja-1.4.0.recipe b/dev-util/ninja/ninja-1.4.0.recipe new file mode 100644 index 000000000..cf93d8c50 --- /dev/null +++ b/dev-util/ninja/ninja-1.4.0.recipe @@ -0,0 +1,59 @@ +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 + cmd:python + cmd:g++$secondaryArchSuffix + cmd:gcc$secondaryArchSuffix + cmd:as$secondaryArchSuffix +" + +PATCHES="ninja-1.4.0.patchset" + +BUILD() +{ + python ./bootstrap.py +} + +INSTALL() +{ + 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. + " diff --git a/dev-util/ninja/patches/ninja-1.4.0.patchset b/dev-util/ninja/patches/ninja-1.4.0.patchset new file mode 100644 index 000000000..1a86057a9 --- /dev/null +++ b/dev-util/ninja/patches/ninja-1.4.0.patchset @@ -0,0 +1,51 @@ +From 2fa2d0ca09ffb589f08dc11330f91364228f0bdd Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Thu, 3 Oct 2013 10:06:13 +0200 +Subject: Add minimal Haiku support + + +diff --git a/platform_helper.py b/platform_helper.py +index b7447a1..bf7a99e 100644 +--- a/platform_helper.py ++++ b/platform_helper.py +@@ -19,7 +19,7 @@ import sys + + def platforms(): + return ['linux', 'darwin', 'freebsd', 'openbsd', 'solaris', 'sunos5', +- 'mingw', 'msvc', 'gnukfreebsd8', 'bitrig'] ++ 'mingw', 'msvc', 'gnukfreebsd8', 'bitrig', 'haiku'] + + class Platform( object ): + def __init__( self, platform): +@@ -43,6 +43,8 @@ class Platform( object ): + self._platform = 'msvc' + elif self._platform.startswith('bitrig'): + self._platform = 'bitrig' ++ elif self._platform.startswith('haiku'): ++ self._platform = 'haiku' + + def platform(self): + return self._platform +@@ -73,3 +75,6 @@ class Platform( object ): + + def is_bitrig(self): + return self._platform == 'bitrig' ++ ++ def is_haiku(self): ++ return self._platform == 'haiku' +diff --git a/src/util.cc b/src/util.cc +index 6ba3c6c..7142d13 100644 +--- a/src/util.cc ++++ b/src/util.cc +@@ -310,7 +310,7 @@ int GetProcessorCount() { + #endif + } + +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__HAIKU__) + double GetLoadAverage() { + // TODO(nicolas.despres@gmail.com): Find a way to implement it on Windows. + // Remember to also update Usage() when this is fixed. +-- +1.8.3.4 +