Hello community,

here is the log from the commit of package Mesa for openSUSE:Factory checked in 
at 2018-09-19 14:34:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/Mesa (Old)
 and      /work/SRC/openSUSE:Factory/.Mesa.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "Mesa"

Wed Sep 19 14:34:11 2018 rev:336 rq: version:unknown

Changes:
--------
--- /work/SRC/openSUSE:Factory/Mesa/Mesa-drivers.changes        2018-09-18 
11:37:27.408288048 +0200
+++ /work/SRC/openSUSE:Factory/.Mesa.new/Mesa-drivers.changes   2018-09-19 
14:34:17.495266025 +0200
@@ -2,95 +1,0 @@
-Tue Sep 11 13:28:26 UTC 2018 - [email protected]
-
-- get rid of libwayland-egl1/libwayland-egl-devel completely; also
-  for older Leap versions
-
--------------------------------------------------------------------
-Mon Sep 10 13:29:24 UTC 2018 - [email protected]
-
-- update to 18.2.0
-  * This release consists of nearly 2200 commits from approximately
-    130 developers.
-  * The top highlights include:
-    - OpenGL 4.3 on virgl.
-    - OpenGL 4.4 Compatibility profile on radeonsi.
-    - OpenGL ES 3.2 on radeonsi and virgl.
-    - GL_ARB_ES3_2_compatibility on radeonsi.
-    - GL_ARB_fragment_shader_interlock on i965.
-    - GL_ARB_sample_locations and GL_NV_sample_locations on nvc0 (GM200+).
-    - GL_ANDROID_extension_pack_es31a on radeonsi.
-    - GL_KHR_texture_compression_astc_ldr on radeonsi.
-    - GL_NV_conservative_raster and GL_NV_conservative_raster_dilate on
-      nvc0 (GM200+).
-    - GL_NV_conservative_raster_pre_snap_triangles on nvc0 (GP102+).
-    - multisampled images on nvc0 (GM107+) (now supported on GF100+).
-  * Additional features:
-    - ANV Extensions:
-      - VK_KHR_bind_memory2.
-      - VK_KHR_external_fence.
-      - VK_KHR_external_fence_capabilities.
-      - VK_KHR_external_semaphore.
-      - VK_KHR_external_semaphore_capabilities.
-      - VK_KHR_maintenance2.
-      - VK_KHR_maintenance3.
-      - VK_KHR_multiview.
-      - VK_KHR_relaxed_block_layout.
-      - VK_KHR_sampler_ycbcr_conversion.
-      - VK_KHR_8bit_storage.
-      - VK_KHR_create_renderpass2.
-      - VK_KHR_display.
-      - VK_KHR_display_swapchain.
-      - VK_KHR_external_fence_fd.
-      - VK_KHR_external_semaphore_fd.
-      - VK_KHR_get_display_properties2.
-      - VK_KHR_image_format_list.
-    - RADV Extensions:
-      - VK_KHR_bind_memory2.
-      - VK_KHR_external_fence.
-      - VK_KHR_external_fence_capabilities.
-      - VK_KHR_maintenance2.
-      - VK_KHR_maintenance3.
-      - VK_KHR_multiview.
-      - VK_KHR_relaxed_block_layout.
-      - VK_KHR_create_renderpass2.
-      - VK_KHR_display.
-      - VK_KHR_display_swapchain.
-      - VK_KHR_draw_indirect_count.
-      - VK_KHR_external_fence_fd.
-      - VK_KHR_get_display_properties2.
-      - VK_KHR_get_surface_capabilities2.
-      - VK_KHR_image_format_list.
-    - New GL extensions supported by all drivers:
-      - GL_OES_EGL_image_external.
-      - GL_OES_EGL_image_external_essl3.
-    - freedreno:
-      - GL 3.0's multisample anti-aliasing support on a5xx.
-      - GL_ARB_texture_multisample support on a5xx.
-      - GLES3.1's GS5 Packing/bitfield/conversion functions support on a5xx.
-      - Dynamically uniform UBO array indices.
-      - Packing/bitfield/conversion functions.
-      - Enhanced textureGather.
-      - GL_OES_texture_buffer.
-      - GL_ARB_seamless_cubemap_per_texture.
-    - i965:
-      - GL_OES_texture_view on gen8+.
-      - GL_EXT_texture_norm16.
-    - nouveau:
-      - GL_ARB_post_depth_coverage.
-      - GL_ARB_sample_locations.
-      - GL_EXT_texture_norm16.
-    - r600:
-      - GL_EXT_texture_norm16.
-    - radeonsi:
-      - GL_EXT_texture_norm16.
-    - virgl:
-      - GL_ARB_seamless_cubemap_per_texture.
-      - GL_ARB_shader_stencil_export.
-- supersedes u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch,
-  u_intel_anv-make-scripts-python-2-3-compat.patch
-- U_intel-decoder-mark-total_length-as-MAYBE_UNUSED-in-g.patch,
-  U_intel-aubinator-mark-ftruncate_res-as-MAYBE_UNUSED-i.patch,
-  U_python-Fix-rich-comparisons.patch,
-  U_python-Use-key-functions-when-sorting-containers.patch
-  * buildfixes ...
-
--------------------------------------------------------------------
Mesa.changes: same change

Old:
----
  U_intel-aubinator-mark-ftruncate_res-as-MAYBE_UNUSED-i.patch
  U_intel-decoder-mark-total_length-as-MAYBE_UNUSED-in-g.patch
  U_python-Fix-rich-comparisons.patch
  U_python-Use-key-functions-when-sorting-containers.patch
  mesa-18.2.0.tar.xz
  mesa-18.2.0.tar.xz.sha1sum

New:
----
  mesa-18.1.7.tar.xz
  mesa-18.1.7.tar.xz.sha1sum
  u_intel_anv-make-scripts-python-2-3-compat.patch
  u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ Mesa-drivers.spec ++++++
--- /var/tmp/diff_new_pack.2RlkmX/_old  2018-09-19 14:34:22.587262603 +0200
+++ /var/tmp/diff_new_pack.2RlkmX/_new  2018-09-19 14:34:22.587262603 +0200
@@ -42,7 +42,7 @@
 
 %define glamor 1
 %define _name_archive mesa
-%define _version 18.2.0
+%define _version 18.1.7
 %define with_opencl 0
 %define with_vulkan 0
 %define with_llvm 0
@@ -112,7 +112,7 @@
 %endif
 
 Name:           Mesa-drivers
-Version:        18.2.0
+Version:        18.1.7
 Release:        0
 Summary:        System for rendering 3-D graphics
 License:        MIT
@@ -135,14 +135,11 @@
 # currently needed for libglvnd support
 Patch31:        archlinux_0001-Fix-linkage-against-shared-glapi.patch
 # Upstream
+Patch43:        u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch
+Patch44:        u_intel_anv-make-scripts-python-2-3-compat.patch
 Patch47:        u_st-dri-don-t-set-queryDmaBufFormats-queryDmaBufModif.patch
 Patch48:        mako_4_radv.patch
 
-Patch50:        U_intel-decoder-mark-total_length-as-MAYBE_UNUSED-in-g.patch
-Patch51:        U_intel-aubinator-mark-ftruncate_res-as-MAYBE_UNUSED-i.patch
-Patch52:        U_python-Fix-rich-comparisons.patch
-Patch53:        U_python-Use-key-functions-when-sorting-containers.patch
-
 BuildRequires:  autoconf >= 2.60
 BuildRequires:  automake
 BuildRequires:  fdupes
@@ -181,7 +178,6 @@
 BuildRequires:  pkgconfig(xdamage)
 BuildRequires:  pkgconfig(xext)
 BuildRequires:  pkgconfig(xfixes)
-BuildRequires:  pkgconfig(xrandr)
 BuildRequires:  pkgconfig(xshmfence)
 BuildRequires:  pkgconfig(xvmc)
 BuildRequires:  pkgconfig(xxf86vm)
@@ -278,6 +274,9 @@
 Obsoletes:      s2tc-devel < %{version}
 Provides:       libtxc_dxtn-devel = %{version}
 Obsoletes:      libtxc_dxtn-devel < %{version}
+%if 0%{?suse_version} < 1550 && (0%{?suse_version} > 1320 || (0%{?sle_version} 
>= 120300 && 0%{?is_opensuse}))
+Requires:       libwayland-egl-devel
+%endif
 
 %description devel
 Mesa is a 3-D graphics library with an API which is very similar to
@@ -575,6 +574,24 @@
 This package provides the development environment for compiling
 programs against the GBM library.
 
+%package -n libwayland-egl1
+Summary:        Additional egl functions for wayland
+Group:          System/Libraries
+
+%description -n libwayland-egl1
+This package provides additional functions for egl-using programs
+that run within the wayland framework. This allows for applications
+that need not run full-screen and cooperate with a compositor.
+
+%package -n libwayland-egl-devel
+Summary:        Development files for libwayland-egl1
+Group:          Development/Libraries/C and C++
+Requires:       libwayland-egl1 = %{version}
+
+%description -n libwayland-egl-devel
+This package is required to link wayland client applications to the EGL
+implementation of Mesa.
+
 %package -n Mesa-libd3d
 Summary:        Mesa Direct3D9 state tracker
 # Manually provide d3d library (bnc#918294)
@@ -727,12 +744,10 @@
 %patch31 -p1
 %endif
 
+%patch43 -p1
+%patch44 -p1
 %patch47 -p1
 %patch48 -p1
-%patch50 -p1
-%patch51 -p1
-%patch52 -p1
-%patch53 -p1
 
 # Remove requires to libglvnd/libglvnd-devel from baselibs.conf when
 # disabling libglvnd build; ugly ...
@@ -831,9 +846,11 @@
 %make_install
 find %{buildroot} -type f -name "*.la" -delete -print
 
+%if !(0%{?suse_version} < 1550 && (0%{?suse_version} > 1320 || 
(0%{?sle_version} >= 120300 && 0%{?is_opensuse})))
 # libwayland-egl is provided by wayland itself
 rm -f %{buildroot}/%{_libdir}/libwayland-egl.so*
 rm -f %{buildroot}/%{_libdir}/pkgconfig/wayland-egl.pc
+%endif
 
 %if %{drivers}
 # Delete things that we do not package in the Mesa-drivers variant, but can
@@ -924,6 +941,10 @@
 
 %postun libglapi0 -p /sbin/ldconfig
 
+%post   -n libwayland-egl1 -p /sbin/ldconfig
+
+%postun -n libwayland-egl1 -p /sbin/ldconfig
+
 %post -n Mesa-libd3d -p /sbin/ldconfig
 
 %postun -n Mesa-libd3d -p /sbin/ldconfig
@@ -1008,6 +1029,15 @@
 %{_libdir}/libOSMesa.so
 %{_libdir}/pkgconfig/osmesa.pc
 
+%if 0%{?suse_version} < 1550 && (0%{?suse_version} > 1320 || (0%{?sle_version} 
>= 120300 && 0%{?is_opensuse}))
+%files -n libwayland-egl1
+%{_libdir}/libwayland-egl.so.1*
+
+%files -n libwayland-egl-devel
+%{_libdir}/libwayland-egl.so
+%{_libdir}/pkgconfig/wayland-egl.pc
+%endif
+
 %files -n libgbm1
 %{_libdir}/libgbm.so.1*
 

++++++ Mesa.spec ++++++
--- /var/tmp/diff_new_pack.2RlkmX/_old  2018-09-19 14:34:22.687262535 +0200
+++ /var/tmp/diff_new_pack.2RlkmX/_new  2018-09-19 14:34:22.727262509 +0200
@@ -41,7 +41,7 @@
 
 %define glamor 1
 %define _name_archive mesa
-%define _version 18.2.0
+%define _version 18.1.7
 %define with_opencl 0
 %define with_vulkan 0
 %define with_llvm 0
@@ -111,7 +111,7 @@
 %endif
 
 Name:           Mesa
-Version:        18.2.0
+Version:        18.1.7
 Release:        0
 Summary:        System for rendering 3-D graphics
 License:        MIT
@@ -134,14 +134,11 @@
 # currently needed for libglvnd support
 Patch31:        archlinux_0001-Fix-linkage-against-shared-glapi.patch
 # Upstream
+Patch43:        u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch
+Patch44:        u_intel_anv-make-scripts-python-2-3-compat.patch
 Patch47:        u_st-dri-don-t-set-queryDmaBufFormats-queryDmaBufModif.patch
 Patch48:        mako_4_radv.patch
 
-Patch50:        U_intel-decoder-mark-total_length-as-MAYBE_UNUSED-in-g.patch
-Patch51:        U_intel-aubinator-mark-ftruncate_res-as-MAYBE_UNUSED-i.patch
-Patch52:        U_python-Fix-rich-comparisons.patch
-Patch53:        U_python-Use-key-functions-when-sorting-containers.patch
-
 BuildRequires:  autoconf >= 2.60
 BuildRequires:  automake
 BuildRequires:  fdupes
@@ -180,7 +177,6 @@
 BuildRequires:  pkgconfig(xdamage)
 BuildRequires:  pkgconfig(xext)
 BuildRequires:  pkgconfig(xfixes)
-BuildRequires:  pkgconfig(xrandr)
 BuildRequires:  pkgconfig(xshmfence)
 BuildRequires:  pkgconfig(xvmc)
 BuildRequires:  pkgconfig(xxf86vm)
@@ -277,6 +273,9 @@
 Obsoletes:      s2tc-devel < %{version}
 Provides:       libtxc_dxtn-devel = %{version}
 Obsoletes:      libtxc_dxtn-devel < %{version}
+%if 0%{?suse_version} < 1550 && (0%{?suse_version} > 1320 || (0%{?sle_version} 
>= 120300 && 0%{?is_opensuse}))
+Requires:       libwayland-egl-devel
+%endif
 
 %description devel
 Mesa is a 3-D graphics library with an API which is very similar to
@@ -574,6 +573,24 @@
 This package provides the development environment for compiling
 programs against the GBM library.
 
+%package -n libwayland-egl1
+Summary:        Additional egl functions for wayland
+Group:          System/Libraries
+
+%description -n libwayland-egl1
+This package provides additional functions for egl-using programs
+that run within the wayland framework. This allows for applications
+that need not run full-screen and cooperate with a compositor.
+
+%package -n libwayland-egl-devel
+Summary:        Development files for libwayland-egl1
+Group:          Development/Libraries/C and C++
+Requires:       libwayland-egl1 = %{version}
+
+%description -n libwayland-egl-devel
+This package is required to link wayland client applications to the EGL
+implementation of Mesa.
+
 %package -n Mesa-libd3d
 Summary:        Mesa Direct3D9 state tracker
 # Manually provide d3d library (bnc#918294)
@@ -726,12 +743,10 @@
 %patch31 -p1
 %endif
 
+%patch43 -p1
+%patch44 -p1
 %patch47 -p1
 %patch48 -p1
-%patch50 -p1
-%patch51 -p1
-%patch52 -p1
-%patch53 -p1
 
 # Remove requires to libglvnd/libglvnd-devel from baselibs.conf when
 # disabling libglvnd build; ugly ...
@@ -830,9 +845,11 @@
 %make_install
 find %{buildroot} -type f -name "*.la" -delete -print
 
+%if !(0%{?suse_version} < 1550 && (0%{?suse_version} > 1320 || 
(0%{?sle_version} >= 120300 && 0%{?is_opensuse})))
 # libwayland-egl is provided by wayland itself
 rm -f %{buildroot}/%{_libdir}/libwayland-egl.so*
 rm -f %{buildroot}/%{_libdir}/pkgconfig/wayland-egl.pc
+%endif
 
 %if %{drivers}
 # Delete things that we do not package in the Mesa-drivers variant, but can
@@ -923,6 +940,10 @@
 
 %postun libglapi0 -p /sbin/ldconfig
 
+%post   -n libwayland-egl1 -p /sbin/ldconfig
+
+%postun -n libwayland-egl1 -p /sbin/ldconfig
+
 %post -n Mesa-libd3d -p /sbin/ldconfig
 
 %postun -n Mesa-libd3d -p /sbin/ldconfig
@@ -1007,6 +1028,15 @@
 %{_libdir}/libOSMesa.so
 %{_libdir}/pkgconfig/osmesa.pc
 
+%if 0%{?suse_version} < 1550 && (0%{?suse_version} > 1320 || (0%{?sle_version} 
>= 120300 && 0%{?is_opensuse}))
+%files -n libwayland-egl1
+%{_libdir}/libwayland-egl.so.1*
+
+%files -n libwayland-egl-devel
+%{_libdir}/libwayland-egl.so
+%{_libdir}/pkgconfig/wayland-egl.pc
+%endif
+
 %files -n libgbm1
 %{_libdir}/libgbm.so.1*
 


++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.2RlkmX/_old  2018-09-19 14:34:23.731261834 +0200
+++ /var/tmp/diff_new_pack.2RlkmX/_new  2018-09-19 14:34:23.755261818 +0200
@@ -23,6 +23,7 @@
        requires "Mesa-libglapi-devel-<targettype> = <version>"
        requires "libOSMesa-devel-<targettype> = <version>"
        requires "libgbm-devel-<targettype> = <version>"
+       requires "libwayland-egl-devel-<targettype> = <version>"
        requires "libglvnd-devel-<targettype> >= 0.1.0"
        obsoletes "XFree86-Mesa-devel-<targettype> 
xorg-x11-Mesa-devel-<targettype>"
        provides  "XFree86-Mesa-devel-<targettype> 
xorg-x11-Mesa-devel-<targettype>"
@@ -62,6 +63,12 @@
 libgbm1
 libgbm-devel
        requires "libgbm1-<targettype> = <version>"
+libwayland-egl-devel
+       targetarch aarch64 requires "libwayland-egl1-<targettype> = <version>"
+       targetarch ppc64 requires "libwayland-egl1-<targettype> = <version>"
+       targetarch ppc64le requires "libwayland-egl1-<targettype> = <version>"
+       targetarch s390x requires "libwayland-egl1-<targettype> = <version>"
+       targetarch x86_64 requires "libwayland-egl1-<targettype> = <version>"
 Mesa-libglapi0
 Mesa-libglapi-devel
        requires "Mesa-libglapi0-<targettype> = <version>"
@@ -98,6 +105,7 @@
 libvdpau_r300
 libvdpau_r600
 libvdpau_radeonsi
+libwayland-egl1
 Mesa-dri-vc4
 Mesa-dri-nouveau
 Mesa-dri

++++++ mesa-18.2.0.tar.xz -> mesa-18.1.7.tar.xz ++++++
/work/SRC/openSUSE:Factory/Mesa/mesa-18.2.0.tar.xz 
/work/SRC/openSUSE:Factory/.Mesa.new/mesa-18.1.7.tar.xz differ: char 25, line 1

++++++ mesa-18.2.0.tar.xz.sha1sum -> mesa-18.1.7.tar.xz.sha1sum ++++++
--- /work/SRC/openSUSE:Factory/Mesa/mesa-18.2.0.tar.xz.sha1sum  2018-09-18 
11:37:51.008263033 +0200
+++ /work/SRC/openSUSE:Factory/.Mesa.new/mesa-18.1.7.tar.xz.sha1sum     
2018-09-19 14:34:21.619263253 +0200
@@ -1 +1 @@
-73723d9f3815487f474d84eb91a5cd17edfb63d4  mesa-18.2.0.tar.xz
+8f86e16a1c03665e55bc284c0e4a5b0a953bcadc  mesa-18.1.7.tar.xz

++++++ u_intel_anv-make-scripts-python-2-3-compat.patch ++++++
Index: mesa-18.1.0-rc1/src/intel/vulkan/anv_extensions.py
===================================================================
--- mesa-18.1.0-rc1.orig/src/intel/vulkan/anv_extensions.py
+++ mesa-18.1.0-rc1/src/intel/vulkan/anv_extensions.py
@@ -29,13 +29,15 @@ import copy
 import re
 import xml.etree.cElementTree as et
 
+
 def _bool_to_c_expr(b):
     if b is True:
-        return 'true';
+        return 'true'
     elif b is False:
-        return 'false';
+        return 'false'
     else:
-        return b;
+        return b
+
 
 class Extension:
     def __init__(self, name, ext_version, enable):
@@ -43,11 +45,13 @@ class Extension:
         self.ext_version = int(ext_version)
         self.enable = _bool_to_c_expr(enable)
 
+
 class ApiVersion:
     def __init__(self, max_patch_version, enable):
         self.max_patch_version = max_patch_version
         self.enable = _bool_to_c_expr(enable)
 
+
 # Supported API versions.  Each one is the maximum patch version for the given
 # version.  Version come in increasing order and each version is available if
 # it's provided "enable" condition is true and all previous versions are
@@ -60,7 +64,7 @@ API_VERSIONS = [
     ApiVersion('1.1.0',     'device->has_syncobj_wait'),
 ]
 
-MAX_API_VERSION = None # Computed later
+MAX_API_VERSION = None  # Computed later
 
 # On Android, we disable all surface and swapchain extensions. Android's Vulkan
 # loader implements VK_KHR_surface and VK_KHR_swapchain, and applications
@@ -113,6 +117,7 @@ EXTENSIONS = [
               'device->has_context_priority'),
 ]
 
+
 class VkVersion:
     def __init__(self, string):
         split = string.split('.')
@@ -146,14 +151,59 @@ class VkVersion:
         patch = self.patch if self.patch is not None else 0
         return (self.major << 22) | (self.minor << 12) | patch
 
-    def __cmp__(self, other):
+    def __eq__(self, other):
+        # If only one of them has a patch version, "ignore" it by making
+        # other's patch version match self.
+        if (self.patch is None) != (other.patch is None):
+            other = copy.copy(other)
+            other.patch = self.patch
+
+        return self.__int_ver() == other.__int_ver()
+
+    def __ne__(self, other):
+        # If only one of them has a patch version, "ignore" it by making
+        # other's patch version match self.
+        if (self.patch is None) != (other.patch is None):
+            other = copy.copy(other)
+            other.patch = self.patch
+
+        return self.__int_ver() != other.__int_ver()
+
+    def __lt__(self, other):
+        # If only one of them has a patch version, "ignore" it by making
+        # other's patch version match self.
+        if (self.patch is None) != (other.patch is None):
+            other = copy.copy(other)
+            other.patch = self.patch
+
+        return self.__int_ver() < other.__int_ver()
+
+    def __le__(self, other):
+        # If only one of them has a patch version, "ignore" it by making
+        # other's patch version match self.
+        if (self.patch is None) != (other.patch is None):
+            other = copy.copy(other)
+            other.patch = self.patch
+
+        return self.__int_ver() <= other.__int_ver()
+
+    def __ge__(self, other):
+        # If only one of them has a patch version, "ignore" it by making
+        # other's patch version match self.
+        if (self.patch is None) != (other.patch is None):
+            other = copy.copy(other)
+            other.patch = self.patch
+
+        return self.__int_ver() >= other.__int_ver()
+
+    def __gt__(self, other):
         # If only one of them has a patch version, "ignore" it by making
         # other's patch version match self.
         if (self.patch is None) != (other.patch is None):
             other = copy.copy(other)
             other.patch = self.patch
 
-        return self.__int_ver().__cmp__(other.__int_ver())
+        return self.__int_ver() > other.__int_ver()
 
 
 MAX_API_VERSION = VkVersion('0.0.0')
Index: mesa-18.1.0-rc1/src/intel/vulkan/anv_entrypoints_gen.py
===================================================================
--- mesa-18.1.0-rc1.orig/src/intel/vulkan/anv_entrypoints_gen.py
+++ mesa-18.1.0-rc1/src/intel/vulkan/anv_entrypoints_gen.py
@@ -145,7 +145,7 @@ static const struct string_map_entry str
 /* Hash table stats:
  * size ${len(strmap.sorted_strings)} entries
  * collisions entries:
-% for i in xrange(10):
+% for i in range(10):
  *     ${i}${'+' if i == 9 else ' '}     ${strmap.collisions[i]}
 % endfor
  */
@@ -507,7 +507,7 @@ def get_entrypoints(doc, entrypoints_to_
             assert e.core_version is None
             e.extensions.append(ext)
 
-    return [e for e in entrypoints.itervalues() if e.enabled]
+    return [e for e in entrypoints.values() if e.enabled]
 
 
 def get_entrypoints_defines(doc):
++++++ u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch ++++++
>From 62f6252476505bf556d1ad9e7c58cf7c1c6e510c Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <[email protected]>
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" <[email protected]> with modifications
by "Michal Srb" <[email protected]> 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 <[email protected]>
Reviewed-by: Tomas Chvatal <[email protected]>
Reviewed-by: Dylan Baker <[email protected]>
---
 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..4796456330 100644
--- a/src/gallium/drivers/r600/egd_tables.py
+++ b/src/gallium/drivers/r600/egd_tables.py
@@ -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],
                 ', '.join(str(idx) for idx in te[2])
             )
             for te in self.table
@@ -217,10 +218,10 @@ def write_tables(regs, packets):
     strings = StringTable()
     strings_offsets = IntTable("int")
 
-    print '/* This file is autogenerated by egd_tables.py from evergreend.h. 
Do not edit directly. */'
-    print
-    print CopyRight.strip()
-    print '''
+    print('/* This file is autogenerated by egd_tables.py from evergreend.h. 
Do not edit directly. */')
+    print('')
+    print(CopyRight.strip())
+    print('''
 #ifndef EG_TABLES_H
 #define EG_TABLES_H
 
@@ -242,20 +243,20 @@ struct eg_packet3 {
         unsigned name_offset;
         unsigned op;
 };
-'''
+''')
 
-    print 'static const struct eg_packet3 packet3_table[] = {'
+    print('static const struct eg_packet3 packet3_table[] = {')
     for pkt in packets:
-        print '\t{%s, %s},' % (strings.add(pkt[5:]), pkt)
-    print '};'
-    print
+        print('\t{%s, %s},' % (strings.add(pkt[5:]), pkt))
+    print('};')
+    print('')
 
-    print 'static const struct eg_field egd_fields_table[] = {'
+    print('static const struct eg_field egd_fields_table[] = {')
 
     fields_idx = 0
     for reg in regs:
         if len(reg.fields) and reg.own_fields:
-            print '\t/* %s */' % (fields_idx)
+            print('\t/* %s */' % (fields_idx))
 
             reg.fields_idx = fields_idx
 
@@ -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]))
-                    print '\t{%s, %s(~0u), %s, %s},' % (
+                    print('\t{%s, %s(~0u), %s, %s},' % (
                         strings.add(field.name), field.s_name,
-                        len(values_offsets), 
strings_offsets.add(values_offsets))
+                        len(values_offsets), 
strings_offsets.add(values_offsets)))
                 else:
-                    print '\t{%s, %s(~0u)},' % (strings.add(field.name), 
field.s_name)
+                    print('\t{%s, %s(~0u)},' % (strings.add(field.name), 
field.s_name))
                 fields_idx += 1
 
-    print '};'
-    print
+    print('};')
+    print('')
 
-    print 'static const struct eg_reg egd_reg_table[] = {'
+    print('static const struct eg_reg egd_reg_table[] = {')
     for reg in regs:
         if len(reg.fields):
-            print '\t{%s, %s, %s, %s},' % (strings.add(reg.name), reg.r_name,
-                len(reg.fields), reg.fields_idx if reg.own_fields else 
reg.fields_owner.fields_idx)
+            print('\t{%s, %s, %s, %s},' % (strings.add(reg.name), reg.r_name,
+                len(reg.fields), reg.fields_idx if reg.own_fields else 
reg.fields_owner.fields_idx))
         else:
-            print '\t{%s, %s},' % (strings.add(reg.name), reg.r_name)
-    print '};'
-    print
+            print('\t{%s, %s},' % (strings.add(reg.name), reg.r_name))
+    print('};')
+    print('')
 
     strings.emit(sys.stdout, "egd_strings")
 
-    print
+    print('')
 
     strings_offsets.emit(sys.stdout, "egd_strings_offsets")
 
-    print
-    print '#endif'
+    print('')
+    print('#endif')
 
 
 def main():
-- 
2.13.6


Reply via email to