build: update waf to version 1.8.1

Fixes #1164
This commit is contained in:
Stefano Pigozzi 2014-10-11 20:35:10 +02:00
parent 227e470ee2
commit d906d09162
4 changed files with 9 additions and 21 deletions

View File

@ -5,9 +5,9 @@
from __future__ import print_function
import os, sys, stat, hashlib, subprocess
WAFRELEASE = "waf-1.7.16"
WAFRELEASE = "waf-1.8.1"
WAFURL = "http://ftp.waf.io/pub/release/" + WAFRELEASE
SHA256HASH = "b64dc26c882572415fd450b745006107965f3fe17b357e3eb43d6676c9635a61"
SHA256HASH = "ec658116ba0b96629d91fde0b32321849e866e0819f1e835c4c2c7f7ffe1a21d"
if os.path.exists("waf"):
wafver = subprocess.check_output(['./waf', '--version']).decode()
@ -31,6 +31,8 @@ if SHA256HASH == hashlib.sha256(waf).hexdigest():
print("Checksum verified.")
else:
print("The checksum of the downloaded file does not match!")
print(" - got: {}".format(hashlib.sha256(waf).hexdigest()))
print(" - expected: {}".format(SHA256HASH))
print("Please download and verify the file manually.")
sys.exit(1)

View File

@ -1,5 +1,5 @@
def __cp_to_variant__(ctx, variant, basename):
src = ctx.bldnode.search(basename).read()
src = ctx.bldnode.search_node(basename).read()
node = ctx.bldnode.make_node("{0}/{1}".format(variant, basename))
node.parent.mkdir()
node.write(src)

View File

@ -30,28 +30,14 @@ def m_hook(self, node):
def build(ctx):
from waflib import Task
import syms
def nice_path(node):
return node.path_from(node.ctx.launch_node())
cls = Task.classes['cprogram']
class cprogram(cls):
run_str = cls.hcode + '${LAST_LINKFLAGS}'
def __str__(self):
tgt_str = ' '.join([a.nice_path() for a in self.outputs])
return 'linking -> {0}\n'.format(tgt_str)
cls = Task.classes['cshlib']
class cshlib(cls):
def __str__(self):
tgt_str = ' '.join([a.nice_path() for a in self.outputs])
return 'linking -> {0}\n'.format(tgt_str)
cls = Task.classes['compile_sym']
class compile_sym(cls):
def __str__(self):
tgt_str = ' '.join([a.nice_path() for a in self.outputs])
return 'compile_sym -> {0}\n'.format(tgt_str)
cls = Task.classes['macplist']
class macplist(cls):
def run(self):

View File

@ -815,7 +815,7 @@ def is_debug_build(ctx):
def configure(ctx):
ctx.resetenv(ctx.options.variant)
ctx.check_waf_version(mini='1.7.15')
ctx.check_waf_version(mini='1.8.1')
target = os.environ.get('TARGET')
(cc, pkg_config, windres) = ('cc', 'pkg-config', 'windres')