From 9eccb494d3b74c800b5da0c0abbb6201de471f194f7557f0872cda087c8c9dad Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 1 Mar 2018 16:14:54 +0000 Subject: [PATCH] - 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) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=722 --- Mesa-drivers.changes | 7 ++++ Mesa-drivers.spec | 7 +--- Mesa.changes | 7 ++++ Mesa.spec | 7 +--- ...py-make-the-script-python-2-3-compat.patch | 37 +++++++++++++------ 5 files changed, 44 insertions(+), 21 deletions(-) rename u_r600-egd_tables.py-added-support-for-python-3.patch => u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch (79%) diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index f3e5e22..3d8e6a6 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +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 diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index d9f2f07..d866307 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -139,8 +139,7 @@ Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch # Upstream -Patch43: u_r600-egd_tables.py-added-support-for-python-3.patch -Patch44: n_egd_tables_h.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 Patch46: u_glsl-linker-error.patch @@ -750,9 +749,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %patch32 -p1 %endif -#%patch43 -p1 -# fails once src/gallium/drivers/r600/egd_tables.h is part of release tarball -%patch44 -p1 +%patch43 -p1 %patch45 -p1 %patch46 -p1 diff --git a/Mesa.changes b/Mesa.changes index f3e5e22..3d8e6a6 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +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 diff --git a/Mesa.spec b/Mesa.spec index 8323768..c17fe8b 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -138,8 +138,7 @@ Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch # Upstream -Patch43: u_r600-egd_tables.py-added-support-for-python-3.patch -Patch44: n_egd_tables_h.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 Patch46: u_glsl-linker-error.patch @@ -749,9 +748,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %patch32 -p1 %endif -#%patch43 -p1 -# fails once src/gallium/drivers/r600/egd_tables.h is part of release tarball -%patch44 -p1 +%patch43 -p1 %patch45 -p1 %patch46 -p1 diff --git a/u_r600-egd_tables.py-added-support-for-python-3.patch b/u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch similarity index 79% rename from u_r600-egd_tables.py-added-support-for-python-3.patch rename to u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch index 3a514c1..b3d34d3 100644 --- a/u_r600-egd_tables.py-added-support-for-python-3.patch +++ b/u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch @@ -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 -Date: Fri, 23 Feb 2018 12:46:18 +0100 -Subject: [PATCH] r600/egd_tables.py: added support for python 3 +Date: Thu, 1 Mar 2018 16:38:37 +0100 +Subject: [PATCH] r600/egd_tables.py: make the script python 2+3 compatible Patch by "Tomas Chvatal" with modifications by "Michal Srb" to not break python 2. + 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 +Reviewed-by: Tomas Chvatal +Reviewed-by: Dylan Baker --- - src/gallium/drivers/r600/egd_tables.py | 52 +++++++++++++++++----------------- - 1 file changed, 26 insertions(+), 26 deletions(-) + src/gallium/drivers/r600/egd_tables.py | 53 +++++++++++++++++----------------- + 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 -index d7b78c7fb1..b3b8b50292 100644 +index d7b78c7fb1..4796456330 100644 --- a/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 = [ '"%s\\0" /* %s */' % ( - te[0].encode('string_escape'), -+ te[0].encode('unicode_escape'), ++ te[0], ', '.join(str(idx) for idx in te[2]) ) 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_offsets = IntTable("int") @@ -40,7 +55,7 @@ index d7b78c7fb1..b3b8b50292 100644 #ifndef 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 op; }; @@ -68,7 +83,7 @@ index d7b78c7fb1..b3b8b50292 100644 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): values_offsets.append(-1) values_offsets[value[1]] = strings.add(strip_prefix(value[0]))