SHA256
1
0
forked from pool/Mesa

Accepting request 581791 from X11:XOrg

- replaced u_r600-egd_tables.py-added-support-for-python-3.patch
  with fixed u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch 
  and enabled it again; removed again n_egd_tables_h.patch (boo#1082303)

- added n_egd_tables_h.patch and disabled u_mesa-python3-only.patch
  * use pregenerated egd_tables.h (via python2) instead of trying
    to generate it during buildtime with python3 using an apparently
    broken patch (boo#1082303)

OBS-URL: https://build.opensuse.org/request/show/581791
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/Mesa?expand=0&rev=318
This commit is contained in:
Dominique Leuenberger 2018-03-04 10:54:06 +00:00 committed by Git OBS Bridge
commit 516dc02b74
5 changed files with 58 additions and 13 deletions

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Mar 1 15:47:35 UTC 2018 - sndirsch@suse.com
- replaced u_r600-egd_tables.py-added-support-for-python-3.patch
with fixed u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch
and enabled it again; removed again n_egd_tables_h.patch (boo#1082303)
-------------------------------------------------------------------
Thu Mar 1 13:29:46 UTC 2018 - sndirsch@suse.com
- added n_egd_tables_h.patch and disabled u_mesa-python3-only.patch
* use pregenerated egd_tables.h (via python2) instead of trying
to generate it during buildtime with python3 using an apparently
broken patch (boo#1082303)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 28 14:57:00 UTC 2018 - sndirsch@suse.com Wed Feb 28 14:57:00 UTC 2018 - sndirsch@suse.com

View File

@ -139,7 +139,7 @@ Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch
Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch
Patch32: archlinux_glvnd-fix-gl-dot-pc.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch
# Upstream # Upstream
Patch43: u_r600-egd_tables.py-added-support-for-python-3.patch Patch43: u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch
Patch45: n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch Patch45: n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch
Patch46: u_glsl-linker-error.patch Patch46: u_glsl-linker-error.patch

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Mar 1 15:47:35 UTC 2018 - sndirsch@suse.com
- replaced u_r600-egd_tables.py-added-support-for-python-3.patch
with fixed u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch
and enabled it again; removed again n_egd_tables_h.patch (boo#1082303)
-------------------------------------------------------------------
Thu Mar 1 13:29:46 UTC 2018 - sndirsch@suse.com
- added n_egd_tables_h.patch and disabled u_mesa-python3-only.patch
* use pregenerated egd_tables.h (via python2) instead of trying
to generate it during buildtime with python3 using an apparently
broken patch (boo#1082303)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 28 14:57:00 UTC 2018 - sndirsch@suse.com Wed Feb 28 14:57:00 UTC 2018 - sndirsch@suse.com

View File

@ -138,7 +138,7 @@ Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch
Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch
Patch32: archlinux_glvnd-fix-gl-dot-pc.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch
# Upstream # Upstream
Patch43: u_r600-egd_tables.py-added-support-for-python-3.patch Patch43: u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch
Patch45: n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch Patch45: n_Disable-AMDGPU-GFX9-Vega-on-LLVM-lessthan-6.0.0.patch
Patch46: u_glsl-linker-error.patch Patch46: u_glsl-linker-error.patch

View File

@ -1,31 +1,46 @@
From c1714e8bf49fc0034c91ffed4adfbb067dbdf856 Mon Sep 17 00:00:00 2001 From 62f6252476505bf556d1ad9e7c58cf7c1c6e510c Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <sndirsch@suse.de> From: Stefan Dirsch <sndirsch@suse.de>
Date: Fri, 23 Feb 2018 12:46:18 +0100 Date: Thu, 1 Mar 2018 16:38:37 +0100
Subject: [PATCH] r600/egd_tables.py: added support for python 3 Subject: [PATCH] r600/egd_tables.py: make the script python 2+3 compatible
Patch by "Tomas Chvatal" <tchvatal@suse.com> with modifications Patch by "Tomas Chvatal" <tchvatal@suse.com> with modifications
by "Michal Srb" <msrb@suse.com> to not break python 2. by "Michal Srb" <msrb@suse.com> to not break python 2.
https://bugzilla.suse.com/show_bug.cgi?id=1082303 https://bugzilla.suse.com/show_bug.cgi?id=1082303
v2:
- no longer try to encode a unicode
- make use of 'from __future__ import print_function', so semantics
of print statements in python2 are closer to print functions in python3
https://lists.freedesktop.org/archives/mesa-dev/2018-February/187056.html
Signed-off-by: Stefan Dirsch <sndirsch@suse.de> Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
Reviewed-by: Tomas Chvatal <tchvatal@suse.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
--- ---
src/gallium/drivers/r600/egd_tables.py | 52 +++++++++++++++++----------------- src/gallium/drivers/r600/egd_tables.py | 53 +++++++++++++++++-----------------
1 file changed, 26 insertions(+), 26 deletions(-) 1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/src/gallium/drivers/r600/egd_tables.py b/src/gallium/drivers/r600/egd_tables.py diff --git a/src/gallium/drivers/r600/egd_tables.py b/src/gallium/drivers/r600/egd_tables.py
index d7b78c7fb1..b3b8b50292 100644 index d7b78c7fb1..4796456330 100644
--- a/src/gallium/drivers/r600/egd_tables.py --- a/src/gallium/drivers/r600/egd_tables.py
+++ b/src/gallium/drivers/r600/egd_tables.py +++ b/src/gallium/drivers/r600/egd_tables.py
@@ -60,7 +60,7 @@ class StringTable: @@ -1,3 +1,4 @@
+from __future__ import print_function
CopyRight = '''
/*
@@ -60,7 +61,7 @@ class StringTable:
""" """
fragments = [ fragments = [
'"%s\\0" /* %s */' % ( '"%s\\0" /* %s */' % (
- te[0].encode('string_escape'), - te[0].encode('string_escape'),
+ te[0].encode('unicode_escape'), + te[0],
', '.join(str(idx) for idx in te[2]) ', '.join(str(idx) for idx in te[2])
) )
for te in self.table for te in self.table
@@ -217,10 +217,10 @@ def write_tables(regs, packets): @@ -217,10 +218,10 @@ def write_tables(regs, packets):
strings = StringTable() strings = StringTable()
strings_offsets = IntTable("int") strings_offsets = IntTable("int")
@ -40,7 +55,7 @@ index d7b78c7fb1..b3b8b50292 100644
#ifndef EG_TABLES_H #ifndef EG_TABLES_H
#define EG_TABLES_H #define EG_TABLES_H
@@ -242,20 +242,20 @@ struct eg_packet3 { @@ -242,20 +243,20 @@ struct eg_packet3 {
unsigned name_offset; unsigned name_offset;
unsigned op; unsigned op;
}; };
@ -68,7 +83,7 @@ index d7b78c7fb1..b3b8b50292 100644
reg.fields_idx = fields_idx reg.fields_idx = fields_idx
@@ -266,34 +266,34 @@ struct eg_packet3 { @@ -266,34 +267,34 @@ struct eg_packet3 {
while value[1] >= len(values_offsets): while value[1] >= len(values_offsets):
values_offsets.append(-1) values_offsets.append(-1)
values_offsets[value[1]] = strings.add(strip_prefix(value[0])) values_offsets[value[1]] = strings.add(strip_prefix(value[0]))