From 5c0c10ac00989423a245fdf993c0ffd67ef6d4d0 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 13 Oct 2013 22:44:13 +0200 Subject: [PATCH] Fix ninja recipe * Workaround bug in python to get the build working * Mark the recipe as working. --- dev-util/ninja/ninja-1.4.0.recipe | 4 ++- dev-util/ninja/patches/ninja-1.4.0.patchset | 33 ++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/dev-util/ninja/ninja-1.4.0.recipe b/dev-util/ninja/ninja-1.4.0.recipe index cf93d8c50..dad0224b6 100644 --- a/dev-util/ninja/ninja-1.4.0.recipe +++ b/dev-util/ninja/ninja-1.4.0.recipe @@ -4,7 +4,7 @@ LICENSE="Apache v2" COPYRIGHT="2011 Google Inc." SRC_URI="git://github.com/martine/ninja.git#v1.4.0" REVISION="1" -ARCHITECTURES="!x86_gcc2 !x86" +ARCHITECTURES="x86_gcc2 x86" SECONDARY_ARCHITECTURES="x86" PROVIDES=" @@ -18,6 +18,7 @@ REQUIRES=" BUILD_PREREQUIRES=" haiku${secondaryArchSuffix}_devel >= $haikuVersion + haiku_devel >= $haikuVersion cmd:python cmd:g++$secondaryArchSuffix cmd:gcc$secondaryArchSuffix @@ -33,6 +34,7 @@ BUILD() INSTALL() { + mkdir -p $binDir cp ninja $binDir } diff --git a/dev-util/ninja/patches/ninja-1.4.0.patchset b/dev-util/ninja/patches/ninja-1.4.0.patchset index 1a86057a9..44356c8b4 100644 --- a/dev-util/ninja/patches/ninja-1.4.0.patchset +++ b/dev-util/ninja/patches/ninja-1.4.0.patchset @@ -1,4 +1,4 @@ -From 2fa2d0ca09ffb589f08dc11330f91364228f0bdd Mon Sep 17 00:00:00 2001 +From d5b906ba41f20ba28ea7044c8933c069dd915616 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 3 Oct 2013 10:06:13 +0200 Subject: Add minimal Haiku support @@ -49,3 +49,34 @@ index 6ba3c6c..7142d13 100644 -- 1.8.3.4 + +From ae6f3e8c5b4d18198ef0c798c4609ac9607ea16f Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +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. + +diff --git a/configure.py b/configure.py +index 9fe3be8..61ac9dd 100755 +--- a/configure.py ++++ b/configure.py +@@ -241,12 +241,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(): +- import subprocess +- try: +- proc = subprocess.Popen(['re2c', '-V'], stdout=subprocess.PIPE) +- return int(proc.communicate()[0], 10) >= 1103 +- except OSError: +- return False ++ return False + if has_re2c(): + n.rule('re2c', + command='re2c -b -i --no-generation-date -o $out $in', +-- +1.8.3.4 +