diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2022-06-14 12:07:19 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-06-30 13:39:28 -0400 |
commit | 274af1c051914ecea38b84bfddad3720da33bada (patch) | |
tree | 0908eb88b34b3df1a8d4a76cecfdee9892954cf8 /meta-oe/recipes-benchmark | |
parent | 6be254ceb593cf3ab344c06c938e99d26874f7d8 (diff) | |
download | meta-openembedded-274af1c051914ecea38b84bfddad3720da33bada.tar.gz |
glmark2: fix compatibility with python-3.11
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-benchmark')
-rw-r--r-- | meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch | 76 | ||||
-rw-r--r-- | meta-oe/recipes-benchmark/glmark2/glmark2_git.bb | 3 |
2 files changed, 78 insertions, 1 deletions
diff --git a/meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch b/meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch new file mode 100644 index 000000000..c56fa64e5 --- /dev/null +++ b/meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From b85ba8c3ff3fb9ae708576ccef03434d2ef73054 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 14 Jun 2022 09:54:18 +0000 | ||
4 | Subject: [PATCH] waflib: fix compatibility with python-3.11 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | * https://docs.python.org/3.11/whatsnew/3.11.html#changes-in-the-python-api | ||
10 | |||
11 | open(), io.open(), codecs.open() and fileinput.FileInput no longer | ||
12 | accept 'U' (“universal newline”) in the file mode. This flag was | ||
13 | deprecated since Python 3.3. In Python 3, the “universal newline” is | ||
14 | used by default when a file is open in text mode. The newline parameter | ||
15 | of open() controls how universal newlines works. (Contributed by Victor | ||
16 | Stinner in bpo-37330.) | ||
17 | |||
18 | * fixes: | ||
19 | Waf: The wscript in '/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git' is unreadable | ||
20 | Traceback (most recent call last): | ||
21 | File "/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git/waflib/Scripting.py", line 104, in waf_entry_point | ||
22 | set_main_module(os.path.normpath(os.path.join(Context.run_dir,Context.WSCRIPT_FILE))) | ||
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
24 | File "/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git/waflib/Scripting.py", line 135, in set_main_module | ||
25 | Context.g_module=Context.load_module(file_path) | ||
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
27 | File "/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git/waflib/Context.py", line 343, in load_module | ||
28 | code=Utils.readf(path,m='rU',encoding=encoding) | ||
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
30 | File "/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git/waflib/Utils.py", line 117, in readf | ||
31 | f=open(fname,m) | ||
32 | ^^^^^^^^^^^^^ | ||
33 | ValueError: invalid mode: 'rUb' | ||
34 | |||
35 | Upstream-Status: Submitted [https://github.com/glmark2/glmark2/pull/178] | ||
36 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
37 | --- | ||
38 | waflib/ConfigSet.py | 2 +- | ||
39 | waflib/Context.py | 4 ++-- | ||
40 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
41 | |||
42 | diff --git a/waflib/ConfigSet.py b/waflib/ConfigSet.py | ||
43 | index 16142a2..87de4ad 100644 | ||
44 | --- a/waflib/ConfigSet.py | ||
45 | +++ b/waflib/ConfigSet.py | ||
46 | @@ -140,7 +140,7 @@ class ConfigSet(object): | ||
47 | Utils.writef(filename,''.join(buf)) | ||
48 | def load(self,filename): | ||
49 | tbl=self.table | ||
50 | - code=Utils.readf(filename,m='rU') | ||
51 | + code=Utils.readf(filename,m='r') | ||
52 | for m in re_imp.finditer(code): | ||
53 | g=m.group | ||
54 | tbl[g(2)]=eval(g(3)) | ||
55 | diff --git a/waflib/Context.py b/waflib/Context.py | ||
56 | index 8f2cbfb..f3e35ae 100644 | ||
57 | --- a/waflib/Context.py | ||
58 | +++ b/waflib/Context.py | ||
59 | @@ -109,7 +109,7 @@ class Context(ctx): | ||
60 | cache[node]=True | ||
61 | self.pre_recurse(node) | ||
62 | try: | ||
63 | - function_code=node.read('rU',encoding) | ||
64 | + function_code=node.read('r',encoding) | ||
65 | exec(compile(function_code,node.abspath(),'exec'),self.exec_dict) | ||
66 | finally: | ||
67 | self.post_recurse(node) | ||
68 | @@ -340,7 +340,7 @@ def load_module(path,encoding=None): | ||
69 | pass | ||
70 | module=imp.new_module(WSCRIPT_FILE) | ||
71 | try: | ||
72 | - code=Utils.readf(path,m='rU',encoding=encoding) | ||
73 | + code=Utils.readf(path,encoding=encoding) | ||
74 | except EnvironmentError: | ||
75 | raise Errors.WafError('Could not read the file %r'%path) | ||
76 | module_dir=os.path.dirname(path) | ||
diff --git a/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb b/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb index 1406f68b0..188d4e5bd 100644 --- a/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb +++ b/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb | |||
@@ -18,7 +18,8 @@ SRC_URI = " \ | |||
18 | file://0001-fix-dispmanx-build.patch \ | 18 | file://0001-fix-dispmanx-build.patch \ |
19 | file://0002-run-dispmanx-fullscreen.patch \ | 19 | file://0002-run-dispmanx-fullscreen.patch \ |
20 | file://0001-libmatrix-Include-missing-utility-header.patch \ | 20 | file://0001-libmatrix-Include-missing-utility-header.patch \ |
21 | " | 21 | file://0001-waflib-fix-compatibility-with-python-3.11.patch \ |
22 | " | ||
22 | SRCREV = "0858b450cd88c84a15b99dda9698d44e7f7e8c70" | 23 | SRCREV = "0858b450cd88c84a15b99dda9698d44e7f7e8c70" |
23 | 24 | ||
24 | S = "${WORKDIR}/git" | 25 | S = "${WORKDIR}/git" |