100 lines
3.8 KiB
Diff
100 lines
3.8 KiB
Diff
From 19603d075f7013453c79711a646301df694c7b03 Mon Sep 17 00:00:00 2001
|
|
From: Robin Gareus <robin@gareus.org>
|
|
Date: Mon, 20 Jan 2020 23:08:55 +0100
|
|
Subject: [PATCH 2/8] Update waf to v2.0.19
|
|
|
|
For oe:
|
|
* Removed waf: we cannot patch binary files. Recipe ships waf
|
|
* tools/misc.py was added from master in previous patch so no adjustment here
|
|
|
|
Upstream-Status: Backport [1]
|
|
|
|
[1] https://github.com/Ardour/ardour/commit/19603d075f7013453c79711a646301df694c7b03
|
|
---
|
|
doc/updating_waf.txt | 25 +++++++++++-------
|
|
tools/autowaf.py | 11 ++++----
|
|
tools/waf-str.patch | 11 ++++++++
|
|
4 files changed, 31 insertions(+), 77 deletions(-)
|
|
create mode 100644 tools/waf-str.patch
|
|
|
|
diff --git a/doc/updating_waf.txt b/doc/updating_waf.txt
|
|
index 69c1225d63..0c192d4489 100644
|
|
--- a/doc/updating_waf.txt
|
|
+++ b/doc/updating_waf.txt
|
|
@@ -1,15 +1,20 @@
|
|
-Download waf (https://waf.io/)
|
|
-
|
|
-autowaf.py is present in the tools directory of the Ardour source code.
|
|
-a patch for C++11/clang can be found in tools/waflib.patch (needed for waf 1.8.19)
|
|
-
|
|
-Current waf is build as follows;
|
|
+# Download waf (https://waf.io/)
|
|
+#
|
|
+# autowaf.py and misc.py are present in the tools directory of the Ardour source code.
|
|
+# - waf-str.patch is needed for py2/py3 compatible install_dir:
|
|
+# * in py2 paths are byte-arrays and would need to be converted using .encode("utf-8")
|
|
+# (otherwise waf expands them /t/o/p/a/t/h/s/l/i/k/e/t/h/i/s)
|
|
+# * however py3 cannot handled encoded arrays:
|
|
+# (TypeError: cannot use a string pattern on a bytes-like object)
|
|
+#
|
|
+# Current waf is build as follows:
|
|
|
|
ARDOURSRC=`pwd`
|
|
cd /tmp
|
|
-curl https://waf.io/waf-1.6.11.tar.bz2 | tar xj
|
|
-cd waf-1.6.11
|
|
+curl https://waf.io/waf-2.0.19.tar.bz2 | tar xj
|
|
+cd waf-2.0.19
|
|
+
|
|
+patch -p1 < $ARDOURSRC/tools/waf-str.patch
|
|
|
|
-patch -p1 < $ARDOURSRC/tools/waflib.patch
|
|
-./waf-light -v --make-waf --tools=misc,doxygen,$ARDOURSRC/tools/autowaf.py --prelude=''
|
|
+./waf-light -v --make-waf --tools=misc,doxygen,$ARDOURSRC/tools/autowaf.py,$ARDOURSRC/tools/misc.py --prelude=''
|
|
cp ./waf $ARDOURSRC/waf
|
|
diff --git a/tools/autowaf.py b/tools/autowaf.py
|
|
index f82b80a83f..375dc5909a 100644
|
|
--- a/tools/autowaf.py
|
|
+++ b/tools/autowaf.py
|
|
@@ -140,14 +140,13 @@ def check_pkg(conf, name, **args):
|
|
found = None
|
|
pkg_var_name = 'PKG_' + name.replace('-', '_')
|
|
pkg_name = name
|
|
- if conf.env.PARDEBUG:
|
|
- args['mandatory'] = False # Smash mandatory arg
|
|
- found = conf.check_cfg(package=pkg_name + 'D', args="--cflags --libs", **args)
|
|
- if found:
|
|
- pkg_name += 'D'
|
|
if mandatory:
|
|
args['mandatory'] = True # Unsmash mandatory arg
|
|
- if not found:
|
|
+ if 'atleast_version' in args:
|
|
+ if not 'msg' in args:
|
|
+ args['msg'] = 'Checking for %r >= %s' %(pkg_name, args['atleast_version'])
|
|
+ found = conf.check_cfg(package=pkg_name, args=[pkg_name + " >= " + args['atleast_version'], '--cflags', '--libs'], **args)
|
|
+ else:
|
|
found = conf.check_cfg(package=pkg_name, args="--cflags --libs", **args)
|
|
if found:
|
|
conf.env[pkg_var_name] = pkg_name
|
|
|
|
diff --git a/tools/waf-str.patch b/tools/waf-str.patch
|
|
new file mode 100644
|
|
index 0000000000..8d37f68d32
|
|
--- /dev/null
|
|
+++ b/tools/waf-str.patch
|
|
@@ -0,0 +1,11 @@
|
|
+--- a/waflib/Build.py 2020-01-21 15:01:13.864899388 +0100
|
|
++++ b/waflib/Build.py 2020-01-21 15:01:59.573030630 +0100
|
|
+@@ -953,7 +953,7 @@
|
|
+ tsk.link = kw.get('link', '') or kw.get('install_from', '')
|
|
+ tsk.relative_trick = kw.get('relative_trick', False)
|
|
+ tsk.type = kw['type']
|
|
+- tsk.install_to = tsk.dest = kw['install_to']
|
|
++ tsk.install_to = tsk.dest = str(kw['install_to'])
|
|
+ tsk.install_from = kw['install_from']
|
|
+ tsk.relative_base = kw.get('cwd') or kw.get('relative_base', self.path)
|
|
+ tsk.install_user = kw.get('install_user')
|
|
--
|
|
2.21.0
|
|
|