diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 2ae40b1..2059249 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 8 14:26:50 UTC 2018 - tchvatal@suse.com + +- Switch to python3 during build instead of python2 + * Add patch u_mesa-python3-only.patch + ------------------------------------------------------------------- Mon Jan 8 07:55:49 UTC 2018 - msrb@suse.com diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index d56491e..c4af1e2 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -139,6 +139,8 @@ Patch21: n_Define-GLAPIVAR-separate-from-GLAPI.patch Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch Patch42: u_r600-Add-support-for-B5G5R5A1.patch +# Upstream +Patch43: u_mesa-python3-only.patch BuildRequires: autoconf >= 2.60 BuildRequires: automake @@ -149,9 +151,9 @@ BuildRequires: gcc-c++ BuildRequires: imake BuildRequires: libtool BuildRequires: pkgconfig -BuildRequires: python-base -BuildRequires: python-mako -BuildRequires: python-xml +BuildRequires: python3-base +BuildRequires: python3-mako +BuildRequires: python3-xml BuildRequires: pkgconfig(dri2proto) BuildRequires: pkgconfig(dri3proto) BuildRequires: pkgconfig(expat) @@ -741,6 +743,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %endif %patch42 -p1 +%patch43 -p1 # Remove requires to libglvnd/libglvnd-devel from baselibs.conf when # disabling libglvnd build; ugly ... @@ -764,6 +767,7 @@ egl_platforms=x11,drm %endif autoreconf -fvi +export PYTHON2=/usr/bin/python3 %configure \ %if %{drivers} --disable-gles1 \ diff --git a/Mesa.changes b/Mesa.changes index 2ae40b1..2059249 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 8 14:26:50 UTC 2018 - tchvatal@suse.com + +- Switch to python3 during build instead of python2 + * Add patch u_mesa-python3-only.patch + ------------------------------------------------------------------- Mon Jan 8 07:55:49 UTC 2018 - msrb@suse.com diff --git a/Mesa.spec b/Mesa.spec index 7dbf75e..15213b7 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -138,6 +138,8 @@ Patch21: n_Define-GLAPIVAR-separate-from-GLAPI.patch Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch Patch32: archlinux_glvnd-fix-gl-dot-pc.patch Patch42: u_r600-Add-support-for-B5G5R5A1.patch +# Upstream +Patch43: u_mesa-python3-only.patch BuildRequires: autoconf >= 2.60 BuildRequires: automake @@ -148,9 +150,9 @@ BuildRequires: gcc-c++ BuildRequires: imake BuildRequires: libtool BuildRequires: pkgconfig -BuildRequires: python-base -BuildRequires: python-mako -BuildRequires: python-xml +BuildRequires: python3-base +BuildRequires: python3-mako +BuildRequires: python3-xml BuildRequires: pkgconfig(dri2proto) BuildRequires: pkgconfig(dri3proto) BuildRequires: pkgconfig(expat) @@ -740,6 +742,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %endif %patch42 -p1 +%patch43 -p1 # Remove requires to libglvnd/libglvnd-devel from baselibs.conf when # disabling libglvnd build; ugly ... @@ -763,6 +766,7 @@ egl_platforms=x11,drm %endif autoreconf -fvi +export PYTHON2=/usr/bin/python3 %configure \ %if %{drivers} --disable-gles1 \ diff --git a/u_mesa-python3-only.patch b/u_mesa-python3-only.patch new file mode 100644 index 0000000..a56396d --- /dev/null +++ b/u_mesa-python3-only.patch @@ -0,0 +1,111 @@ +diff --git a/src/gallium/drivers/r600/egd_tables.py b/src/gallium/drivers/r600/egd_tables.py +index d7b78c7fb1..7bda44ce83 100644 +--- a/src/gallium/drivers/r600/egd_tables.py ++++ b/src/gallium/drivers/r600/egd_tables.py +@@ -1,4 +1,4 @@ +- ++#!/usr/bin/python3 + CopyRight = ''' + /* + * Copyright 2015 Advanced Micro Devices, Inc. +@@ -60,7 +60,7 @@ class StringTable: + """ + fragments = [ + '"%s\\0" /* %s */' % ( +- te[0].encode('string_escape'), ++ te[0].encode('unicode_escape'), + ', '.join(str(idx) for idx in te[2]) + ) + for te in self.table +@@ -217,10 +217,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 +242,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 +266,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():