diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2024-01-26 13:00:42 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-01-27 09:48:32 -0800 |
commit | 2c6caea18f965b937bb0d23a9982b2e4651c2318 (patch) | |
tree | 1922e9936d37a4c7e0be881928b5ee3f518f436c | |
parent | 10c75cbde1be8bb7667bd084d379995ac3c5026f (diff) | |
download | meta-openembedded-2c6caea18f965b937bb0d23a9982b2e4651c2318.tar.gz |
jack: fix build with python3 on host
* first backport from waflib fixes:
| DEBUG: Executing shell function do_configure
| Traceback (most recent call last):
| File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/./waf", line 166, in <module>
| from waflib import Scripting
| File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Scripting.py", line 10, in <module>
| from waflib import Utils, Configure, Logs, Options, ConfigSet, Context, Errors, Build, Node
| File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Configure.py", line 16, in <module>
| from waflib import ConfigSet, Utils, Options, Logs, Context, Build, Errors
| File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Options.py", line 14, in <module>
| from waflib import Logs, Utils, Context, Errors
| File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Context.py", line 9, in <module>
| import os, re, imp, sys
| ModuleNotFoundError: No module named 'imp'
the 2nd one avoids SyntaxWarning from waf --version which causes
waf_preconfigure to fail, because SyntaxWarning ends in
waf_preconfigure to fail, because SyntaxWarning ends in bb.utils.vercmp_string_op:
jack/1.9.22/git $ python3 waf --version
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Context.py:617: SyntaxWarning: invalid escape sequence '\_'
"""
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Build.py:107: SyntaxWarning: invalid escape sequence '\*'
"""List of targets to build (default: \*)"""
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Task.py:1047: SyntaxWarning: invalid escape sequence '\w'
re_cond = re.compile('(?P<var>\w+)|(?P<or>\|)|(?P<and>&)')
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/TaskGen.py:730: SyntaxWarning: invalid escape sequence '\w'
re_m4 = re.compile('@(\w+)@', re.M)
waf 2.0.12 (54841218840ffa34fddf834680a5a17db69caa12)
As reported in
https://lists.openembedded.org/g/openembedded-core/message/194348
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 267 insertions, 1 deletions
diff --git a/meta-oe/recipes-multimedia/jack/jack/0001-Conceal-imp-warnings-in-Python3.patch b/meta-oe/recipes-multimedia/jack/jack/0001-Conceal-imp-warnings-in-Python3.patch new file mode 100644 index 000000000..8411d12ca --- /dev/null +++ b/meta-oe/recipes-multimedia/jack/jack/0001-Conceal-imp-warnings-in-Python3.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From f864a2aa29377a77c3aef61ce917cc03d099c430 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Nagy <tnagy@waf.io> | ||
3 | Date: Wed, 14 Aug 2019 22:05:45 +0200 | ||
4 | Subject: [PATCH] Conceal imp warnings in Python3 | ||
5 | |||
6 | --- | ||
7 | Upstream-Status: Backport [from waflib not jack: https://gitlab.com/ita1024/waf/-/commit/d2060dfd8af4edb5824153ff24e207b39ecd67a2.patch] | ||
8 | |||
9 | waflib/Context.py | 9 ++++++++- | ||
10 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/waflib/Context.py b/waflib/Context.py | ||
13 | index 761b521f..38ab03f1 100644 | ||
14 | --- a/waflib/Context.py | ||
15 | +++ b/waflib/Context.py | ||
16 | @@ -6,10 +6,17 @@ | ||
17 | Classes and functions enabling the command system | ||
18 | """ | ||
19 | |||
20 | -import os, re, imp, sys | ||
21 | +import os, re, sys | ||
22 | from waflib import Utils, Errors, Logs | ||
23 | import waflib.Node | ||
24 | |||
25 | +if sys.hexversion > 0x3040000: | ||
26 | + import types | ||
27 | + class imp(object): | ||
28 | + new_module = lambda x: types.ModuleType(x) | ||
29 | +else: | ||
30 | + import imp | ||
31 | + | ||
32 | # the following 3 constants are updated on each new release (do not touch) | ||
33 | HEXVERSION=0x2000c00 | ||
34 | """Constant updated on new releases""" | ||
diff --git a/meta-oe/recipes-multimedia/jack/jack/0002-Fix-all-DeprecationWarning-invalid-escape-sequence.patch b/meta-oe/recipes-multimedia/jack/jack/0002-Fix-all-DeprecationWarning-invalid-escape-sequence.patch new file mode 100644 index 000000000..cbced56a6 --- /dev/null +++ b/meta-oe/recipes-multimedia/jack/jack/0002-Fix-all-DeprecationWarning-invalid-escape-sequence.patch | |||
@@ -0,0 +1,229 @@ | |||
1 | From bcba27168d99a3919b730e6a533cf79ab3b24eee Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= <contact@tiger-222.fr> | ||
3 | Date: Sat, 5 Jan 2019 12:02:42 +0100 | ||
4 | Subject: [PATCH] Fix all DeprecationWarning: invalid escape sequence | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Signed-off-by: Mickaƫl Schoentgen <contact@tiger-222.fr> | ||
10 | --- | ||
11 | Upstream-Status: Backport [from waflib not jack: https://gitlab.com/ita1024/waf/-/commit/412a9b819e86a0061f990c7245f0f5db76d0eda3] | ||
12 | |||
13 | waflib/Build.py | 2 +- | ||
14 | waflib/ConfigSet.py | 2 +- | ||
15 | waflib/Context.py | 2 +- | ||
16 | waflib/Task.py | 2 +- | ||
17 | waflib/TaskGen.py | 2 +- | ||
18 | waflib/Tools/c_config.py | 2 +- | ||
19 | waflib/Tools/c_preproc.py | 6 +++--- | ||
20 | waflib/Tools/msvc.py | 16 ++++++++-------- | ||
21 | waflib/Utils.py | 2 +- | ||
22 | waflib/ansiterm.py | 2 +- | ||
23 | 10 files changed, 19 insertions(+), 19 deletions(-) | ||
24 | |||
25 | diff --git a/waflib/Build.py b/waflib/Build.py | ||
26 | index c9661df1..9e733c9e 100644 | ||
27 | --- a/waflib/Build.py | ||
28 | +++ b/waflib/Build.py | ||
29 | @@ -104,7 +104,7 @@ class BuildContext(Context.Context): | ||
30 | """Amount of jobs to run in parallel""" | ||
31 | |||
32 | self.targets = Options.options.targets | ||
33 | - """List of targets to build (default: \*)""" | ||
34 | + """List of targets to build (default: \\*)""" | ||
35 | |||
36 | self.keep = Options.options.keep | ||
37 | """Whether the build should continue past errors""" | ||
38 | diff --git a/waflib/ConfigSet.py b/waflib/ConfigSet.py | ||
39 | index 84736c9c..901fba6c 100644 | ||
40 | --- a/waflib/ConfigSet.py | ||
41 | +++ b/waflib/ConfigSet.py | ||
42 | @@ -11,7 +11,7 @@ The values put in :py:class:`ConfigSet` must be serializable (dicts, lists, stri | ||
43 | |||
44 | import copy, re, os | ||
45 | from waflib import Logs, Utils | ||
46 | -re_imp = re.compile('^(#)*?([^#=]*?)\ =\ (.*?)$', re.M) | ||
47 | +re_imp = re.compile(r'^(#)*?([^#=]*?)\ =\ (.*?)$', re.M) | ||
48 | |||
49 | class ConfigSet(object): | ||
50 | """ | ||
51 | diff --git a/waflib/Context.py b/waflib/Context.py | ||
52 | index 38ab03f1..5799a60a 100644 | ||
53 | --- a/waflib/Context.py | ||
54 | +++ b/waflib/Context.py | ||
55 | @@ -614,7 +614,7 @@ class Context(ctx): | ||
56 | Logs.pprint(color, msg) | ||
57 | |||
58 | def load_special_tools(self, var, ban=[]): | ||
59 | - """ | ||
60 | + r""" | ||
61 | Loads third-party extensions modules for certain programming languages | ||
62 | by trying to list certain files in the extras/ directory. This method | ||
63 | is typically called once for a programming language group, see for | ||
64 | diff --git a/waflib/Task.py b/waflib/Task.py | ||
65 | index 6aebc607..0c5cb994 100644 | ||
66 | --- a/waflib/Task.py | ||
67 | +++ b/waflib/Task.py | ||
68 | @@ -1044,7 +1044,7 @@ def funex(c): | ||
69 | exec(c, dc) | ||
70 | return dc['f'] | ||
71 | |||
72 | -re_cond = re.compile('(?P<var>\w+)|(?P<or>\|)|(?P<and>&)') | ||
73 | +re_cond = re.compile(r'(?P<var>\w+)|(?P<or>\|)|(?P<and>&)') | ||
74 | re_novar = re.compile(r'^(SRC|TGT)\W+.*?$') | ||
75 | reg_act = re.compile(r'(?P<backslash>\\)|(?P<dollar>\$\$)|(?P<subst>\$\{(?P<var>\w+)(?P<code>.*?)\})', re.M) | ||
76 | def compile_fun_shell(line): | ||
77 | diff --git a/waflib/TaskGen.py b/waflib/TaskGen.py | ||
78 | index a74e6431..3776bac1 100644 | ||
79 | --- a/waflib/TaskGen.py | ||
80 | +++ b/waflib/TaskGen.py | ||
81 | @@ -727,7 +727,7 @@ def sequence_order(self): | ||
82 | self.bld.prev = self | ||
83 | |||
84 | |||
85 | -re_m4 = re.compile('@(\w+)@', re.M) | ||
86 | +re_m4 = re.compile(r'@(\w+)@', re.M) | ||
87 | |||
88 | class subst_pc(Task.Task): | ||
89 | """ | ||
90 | diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py | ||
91 | index d2b3c0d8..60cc0ecd 100644 | ||
92 | --- a/waflib/Tools/c_config.py | ||
93 | +++ b/waflib/Tools/c_config.py | ||
94 | @@ -239,7 +239,7 @@ def validate_cfg(self, kw): | ||
95 | |||
96 | @conf | ||
97 | def exec_cfg(self, kw): | ||
98 | - """ | ||
99 | + r""" | ||
100 | Executes ``pkg-config`` or other ``-config`` applications to collect configuration flags: | ||
101 | |||
102 | * if atleast_pkgconfig_version is given, check that pkg-config has the version n and return | ||
103 | diff --git a/waflib/Tools/c_preproc.py b/waflib/Tools/c_preproc.py | ||
104 | index 7e04b4a7..68e5f5ae 100644 | ||
105 | --- a/waflib/Tools/c_preproc.py | ||
106 | +++ b/waflib/Tools/c_preproc.py | ||
107 | @@ -75,13 +75,13 @@ re_lines = re.compile( | ||
108 | re.IGNORECASE | re.MULTILINE) | ||
109 | """Match #include lines""" | ||
110 | |||
111 | -re_mac = re.compile("^[a-zA-Z_]\w*") | ||
112 | +re_mac = re.compile(r"^[a-zA-Z_]\w*") | ||
113 | """Match macro definitions""" | ||
114 | |||
115 | re_fun = re.compile('^[a-zA-Z_][a-zA-Z0-9_]*[(]') | ||
116 | """Match macro functions""" | ||
117 | |||
118 | -re_pragma_once = re.compile('^\s*once\s*', re.IGNORECASE) | ||
119 | +re_pragma_once = re.compile(r'^\s*once\s*', re.IGNORECASE) | ||
120 | """Match #pragma once statements""" | ||
121 | |||
122 | re_nl = re.compile('\\\\\r*\n', re.MULTILINE) | ||
123 | @@ -660,7 +660,7 @@ def extract_macro(txt): | ||
124 | # empty define, assign an empty token | ||
125 | return (v, [[], [('T','')]]) | ||
126 | |||
127 | -re_include = re.compile('^\s*(<(?:.*)>|"(?:.*)")') | ||
128 | +re_include = re.compile(r'^\s*(<(?:.*)>|"(?:.*)")') | ||
129 | def extract_include(txt, defs): | ||
130 | """ | ||
131 | Process a line in the form:: | ||
132 | diff --git a/waflib/Tools/msvc.py b/waflib/Tools/msvc.py | ||
133 | index 17b347d4..ff58449d 100644 | ||
134 | --- a/waflib/Tools/msvc.py | ||
135 | +++ b/waflib/Tools/msvc.py | ||
136 | @@ -281,7 +281,7 @@ def gather_wince_supported_platforms(): | ||
137 | |||
138 | def gather_msvc_detected_versions(): | ||
139 | #Detected MSVC versions! | ||
140 | - version_pattern = re.compile('^(\d\d?\.\d\d?)(Exp)?$') | ||
141 | + version_pattern = re.compile(r'^(\d\d?\.\d\d?)(Exp)?$') | ||
142 | detected_versions = [] | ||
143 | for vcver,vcvar in (('VCExpress','Exp'), ('VisualStudio','')): | ||
144 | prefix = 'SOFTWARE\\Wow6432node\\Microsoft\\' + vcver | ||
145 | @@ -367,7 +367,7 @@ def gather_wsdk_versions(conf, versions): | ||
146 | :param versions: list to modify | ||
147 | :type versions: list | ||
148 | """ | ||
149 | - version_pattern = re.compile('^v..?.?\...?.?') | ||
150 | + version_pattern = re.compile(r'^v..?.?\...?.?') | ||
151 | try: | ||
152 | all_versions = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\Microsoft SDKs\\Windows') | ||
153 | except OSError: | ||
154 | @@ -525,7 +525,7 @@ def gather_icl_versions(conf, versions): | ||
155 | :param versions: list to modify | ||
156 | :type versions: list | ||
157 | """ | ||
158 | - version_pattern = re.compile('^...?.?\....?.?') | ||
159 | + version_pattern = re.compile(r'^...?.?\....?.?') | ||
160 | try: | ||
161 | all_versions = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Intel\\Compilers\\C++') | ||
162 | except OSError: | ||
163 | @@ -579,7 +579,7 @@ def gather_intel_composer_versions(conf, versions): | ||
164 | :param versions: list to modify | ||
165 | :type versions: list | ||
166 | """ | ||
167 | - version_pattern = re.compile('^...?.?\...?.?.?') | ||
168 | + version_pattern = re.compile(r'^...?.?\...?.?.?') | ||
169 | try: | ||
170 | all_versions = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Intel\\Suites') | ||
171 | except OSError: | ||
172 | @@ -683,7 +683,7 @@ def find_lt_names_msvc(self, libname, is_static=False): | ||
173 | if not is_static and ltdict.get('library_names', ''): | ||
174 | dllnames=ltdict['library_names'].split() | ||
175 | dll=dllnames[0].lower() | ||
176 | - dll=re.sub('\.dll$', '', dll) | ||
177 | + dll=re.sub(r'\.dll$', '', dll) | ||
178 | return (lt_libdir, dll, False) | ||
179 | elif ltdict.get('old_library', ''): | ||
180 | olib=ltdict['old_library'] | ||
181 | @@ -700,7 +700,7 @@ def find_lt_names_msvc(self, libname, is_static=False): | ||
182 | @conf | ||
183 | def libname_msvc(self, libname, is_static=False): | ||
184 | lib = libname.lower() | ||
185 | - lib = re.sub('\.lib$','',lib) | ||
186 | + lib = re.sub(r'\.lib$','',lib) | ||
187 | |||
188 | if lib in g_msvc_systemlibs: | ||
189 | return lib | ||
190 | @@ -747,11 +747,11 @@ def libname_msvc(self, libname, is_static=False): | ||
191 | for libn in libnames: | ||
192 | if os.path.exists(os.path.join(path, libn)): | ||
193 | Logs.debug('msvc: lib found: %s', os.path.join(path,libn)) | ||
194 | - return re.sub('\.lib$', '',libn) | ||
195 | + return re.sub(r'\.lib$', '',libn) | ||
196 | |||
197 | #if no lib can be found, just return the libname as msvc expects it | ||
198 | self.fatal('The library %r could not be found' % libname) | ||
199 | - return re.sub('\.lib$', '', libname) | ||
200 | + return re.sub(r'\.lib$', '', libname) | ||
201 | |||
202 | @conf | ||
203 | def check_lib_msvc(self, libname, is_static=False, uselib_store=None): | ||
204 | diff --git a/waflib/Utils.py b/waflib/Utils.py | ||
205 | index a0cc2a09..da1b73e7 100644 | ||
206 | --- a/waflib/Utils.py | ||
207 | +++ b/waflib/Utils.py | ||
208 | @@ -730,7 +730,7 @@ def unversioned_sys_platform(): | ||
209 | if s == 'cli' and os.name == 'nt': | ||
210 | # ironpython is only on windows as far as we know | ||
211 | return 'win32' | ||
212 | - return re.split('\d+$', s)[0] | ||
213 | + return re.split(r'\d+$', s)[0] | ||
214 | |||
215 | def nada(*k, **kw): | ||
216 | """ | ||
217 | diff --git a/waflib/ansiterm.py b/waflib/ansiterm.py | ||
218 | index 0d20c637..027f0ad6 100644 | ||
219 | --- a/waflib/ansiterm.py | ||
220 | +++ b/waflib/ansiterm.py | ||
221 | @@ -264,7 +264,7 @@ else: | ||
222 | 'u': pop_cursor, | ||
223 | } | ||
224 | # Match either the escape sequence or text not containing escape sequence | ||
225 | - ansi_tokens = re.compile('(?:\x1b\[([0-9?;]*)([a-zA-Z])|([^\x1b]+))') | ||
226 | + ansi_tokens = re.compile(r'(?:\x1b\[([0-9?;]*)([a-zA-Z])|([^\x1b]+))') | ||
227 | def write(self, text): | ||
228 | try: | ||
229 | wlock.acquire() | ||
diff --git a/meta-oe/recipes-multimedia/jack/jack_1.9.22.bb b/meta-oe/recipes-multimedia/jack/jack_1.9.22.bb index b5c52a6ed..bb844e4ff 100644 --- a/meta-oe/recipes-multimedia/jack/jack_1.9.22.bb +++ b/meta-oe/recipes-multimedia/jack/jack_1.9.22.bb | |||
@@ -16,7 +16,10 @@ LIC_FILES_CHKSUM = " \ | |||
16 | 16 | ||
17 | DEPENDS = "libsamplerate0 libsndfile1" | 17 | DEPENDS = "libsamplerate0 libsndfile1" |
18 | 18 | ||
19 | SRC_URI = "git://github.com/jackaudio/jack2.git;branch=master;protocol=https" | 19 | SRC_URI = "git://github.com/jackaudio/jack2.git;branch=master;protocol=https \ |
20 | file://0001-Conceal-imp-warnings-in-Python3.patch \ | ||
21 | file://0002-Fix-all-DeprecationWarning-invalid-escape-sequence.patch \ | ||
22 | " | ||
20 | SRCREV = "4f58969432339a250ce87fe855fb962c67d00ddb" | 23 | SRCREV = "4f58969432339a250ce87fe855fb962c67d00ddb" |
21 | 24 | ||
22 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" | 25 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" |