ninja: v1.5.1.

This commit is contained in:
Augustin Cavalier
2014-07-15 10:50:08 -04:00
parent 98d0435866
commit 27bbe92503
3 changed files with 104 additions and 118 deletions

View File

@@ -1,57 +0,0 @@
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.
"

View File

@@ -0,0 +1,51 @@
SUMMARY="A small build system similar to make."
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.
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, KDE, Blender, etc."
HOMEPAGE="http://martine.github.io/ninja/"
LICENSE="Apache v2"
COPYRIGHT="2014 Google Inc."
SRC_URI="https://github.com/martine/ninja/archive/v1.5.1.tar.gz"
CHECKSUM_SHA256="fba77b9ed4b4dd0e86c4513776938dc64bd4508dc2055b04c0c6df68bcfa397d"
PATCHES="ninja-1.5.1.patch"
REVISION="1"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
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
"
BUILD()
{
python ./bootstrap.py
}
INSTALL()
{
mkdir -p $prefix/bin
cp ninja $prefix/bin
}

View File

@@ -1,69 +1,19 @@
From d5b906ba41f20ba28ea7044c8933c069dd915616 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 3 Oct 2013 10:06:13 +0200
Subject: Add minimal Haiku support
From c7705cf4c57cfde854547a12ad380ef6b02a81ef Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Tue, 15 Jul 2014 10:39:30 -0400
Subject: [PATCH] Add minimal Haiku support; based on Adrien's patch.
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
From ae6f3e8c5b4d18198ef0c798c4609ac9607ea16f Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 13 Oct 2013 22:39:03 +0200
Subject: Disable has_re2c test
* The test triggers some bug in our python port, leading to a corrupted
build.ninja file (first 40 lines are written twice to the file).
* re2c is not needed when just building ninja anyway.
---
configure.py | 7 +------
platform_helper.py | 7 ++++++-
src/util.cc | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/configure.py b/configure.py
index 9fe3be8..61ac9dd 100755
index 64123a0..d49a77d 100755
--- a/configure.py
+++ b/configure.py
@@ -241,12 +241,7 @@ if not platform.is_windows() and not platform.is_solaris():
@@ -247,12 +247,7 @@ if not platform.is_windows() and not platform.is_solaris():
n.comment('the depfile parser and ninja lexers are generated using re2c.')
def has_re2c():
@@ -77,6 +27,48 @@ index 9fe3be8..61ac9dd 100755
if has_re2c():
n.rule('re2c',
command='re2c -b -i --no-generation-date -o $out $in',
diff --git a/platform_helper.py b/platform_helper.py
index bc3a125..efc0887 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', 'gnukfreebsd', '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
@@ -81,3 +83,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 484b0c1..dae7e3f 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -414,7 +414,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