pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/MesaLib MesaLib: Fix build with Python 3.9
details: https://anonhg.NetBSD.org/pkgsrc/rev/0363c8b3d6ea
branches: trunk
changeset: 444400:0363c8b3d6ea
user: triaxx <triaxx%pkgsrc.org@localhost>
date: Wed Jan 06 15:50:02 2021 +0000
description:
MesaLib: Fix build with Python 3.9
Apply patches from upstream to remove getchildren() in some generation
scripts. This deprecated call has been removed in Python 3.9.
diffstat:
graphics/MesaLib/Makefile | 3 +-
graphics/MesaLib/distinfo | 7 +-
graphics/MesaLib/patches/patch-src_intel_genxml_gen__sort__tags.py | 57 ++++++++++
graphics/MesaLib/patches/patch-src_mapi_glapi_gen_glX__XML.py | 25 ++++
graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py | 43 +++++++
5 files changed, 132 insertions(+), 3 deletions(-)
diffs (173 lines):
diff -r 86af104dd5c7 -r 0363c8b3d6ea graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Wed Jan 06 15:12:43 2021 +0000
+++ b/graphics/MesaLib/Makefile Wed Jan 06 15:50:02 2021 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.194 2020/05/03 11:04:46 nia Exp $
+# $NetBSD: Makefile,v 1.195 2021/01/06 15:50:02 triaxx Exp $
DISTNAME= mesa-20.0.6
PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
+PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= https://mesa.freedesktop.org/archive/
EXTRACT_SUFX= .tar.xz
diff -r 86af104dd5c7 -r 0363c8b3d6ea graphics/MesaLib/distinfo
--- a/graphics/MesaLib/distinfo Wed Jan 06 15:12:43 2021 +0000
+++ b/graphics/MesaLib/distinfo Wed Jan 06 15:50:02 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.155 2020/05/02 12:13:43 tnn Exp $
+$NetBSD: distinfo,v 1.156 2021/01/06 15:50:02 triaxx Exp $
SHA1 (mesa-20.0.6.tar.xz) = 5bf6d97770c7f010db3ea27944cfdcda079d39c8
RMD160 (mesa-20.0.6.tar.xz) = 00da0ca66f22ce929798ee9ad81456d5fa052837
@@ -26,9 +26,12 @@
SHA1 (patch-src_glx_glxcurrent.c) = a872950c2cb08f60c1d018d0490c610a764ab468
SHA1 (patch-src_glx_glxext.c) = 15c2c5e0c6b5095ce849fb86ad148aa05d7d907a
SHA1 (patch-src_intel_compiler_brw__fs__bank__conflicts.cpp) = 6276d2c6846bb4dd08699921bec4e20202a17478
+SHA1 (patch-src_intel_genxml_gen__sort__tags.py) = e50d30fe74b09b100049e61660aa3606469a4047
SHA1 (patch-src_intel_tools_aubinator__error__decode.c) = d8f636e3c3e76763a505a1dce23de0b198ad62fa
+SHA1 (patch-src_mapi_entry__x86__tls.h) = d85680aa658d159017e8bad1589f95f3830ac577
SHA1 (patch-src_mapi_entry__x86-64__tls.h) = cbbb95b96414609a9cd05af75c9544f8e6938280
-SHA1 (patch-src_mapi_entry__x86__tls.h) = d85680aa658d159017e8bad1589f95f3830ac577
+SHA1 (patch-src_mapi_glapi_gen_gl__XML.py) = 505ba3d98f8b0b05d652c05dd52997bf5323d0fb
+SHA1 (patch-src_mapi_glapi_gen_glX__XML.py) = 5b71960652c8bd1038695a51366635d00761aeeb
SHA1 (patch-src_mapi_u__current.c) = 4e3ec6e253af3737f77ecd43e56044ba2b81e699
SHA1 (patch-src_mapi_u__current.h) = 9f4744681381a0959fda2926a436f296c89577f3
SHA1 (patch-src_mesa_main_extensions.c) = 2f48bdb1176c2878bb33bcfab7556172b50a987e
diff -r 86af104dd5c7 -r 0363c8b3d6ea graphics/MesaLib/patches/patch-src_intel_genxml_gen__sort__tags.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib/patches/patch-src_intel_genxml_gen__sort__tags.py Wed Jan 06 15:50:02 2021 +0000
@@ -0,0 +1,57 @@
+$NetBSD: patch-src_intel_genxml_gen__sort__tags.py,v 1.1 2021/01/06 15:50:02 triaxx Exp $
+
+Remove deprecated .getchildren() that are no longer supported in Python 3.9.
+https://cgit.freedesktop.org/mesa/mesa/commit/src/intel/genxml/gen_sort_tags.py?id=6a841
+
+--- src/intel/genxml/gen_sort_tags.py.orig 2021-01-06 15:09:48.383488000 +0100
++++ src/intel/genxml/gen_sort_tags.py
+@@ -65,7 +65,7 @@
+ return
+ if node.tag != 'struct' and node.tag != 'group':
+ return
+- for c in node.getchildren():
++ for c in node:
+ add_struct_refs(items, c)
+
+
+@@ -115,7 +115,7 @@
+ for a in attribs:
+ if a in node.attrib:
+ f.write(' {0}="{1}"'.format(a, node.attrib[a]))
+- children = node.getchildren()
++ children = list(node)
+ if len(children) > 0:
+ f.write('>\n')
+ for c in children:
+@@ -138,7 +138,7 @@
+ enum_dict = {}
+ for e in enums:
+ values = e.findall('./value')
+- e[:] = sorted(e.getchildren(), key=get_value)
++ e[:] = sorted(e, key=get_value)
+ enum_dict[e.attrib['name']] = e
+
+ # Structs are a bit annoying because they can refer to each other. We sort
+@@ -147,7 +147,7 @@
+ structs = sorted(xml.findall('./struct'), key=get_name)
+ wrapped_struct_dict = {}
+ for s in structs:
+- s[:] = sorted(s.getchildren(), key=get_start)
++ s[:] = sorted(s, key=get_start)
+ ws = Struct(s)
+ wrapped_struct_dict[ws.name] = ws
+
+@@ -161,11 +161,11 @@
+
+ instructions = sorted(xml.findall('./instruction'), key=get_name)
+ for i in instructions:
+- i[:] = sorted(i.getchildren(), key=get_start)
++ i[:] = sorted(i, key=get_start)
+
+ registers = sorted(xml.findall('./register'), key=get_name)
+ for r in registers:
+- r[:] = sorted(r.getchildren(), key=get_start)
++ r[:] = sorted(r, key=get_start)
+
+ genxml[:] = enums + sorted_structs.values() + instructions + registers
+
diff -r 86af104dd5c7 -r 0363c8b3d6ea graphics/MesaLib/patches/patch-src_mapi_glapi_gen_glX__XML.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_glX__XML.py Wed Jan 06 15:50:02 2021 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_mapi_glapi_gen_glX__XML.py,v 1.1 2021/01/06 15:50:02 triaxx Exp $
+
+Remove deprecated .getchildren() that are no longer supported in Python 3.9.
+https://cgit.freedesktop.org/mesa/mesa/commit/src/mapi/glapi/gen/glX_XML.py?id=7a680
+
+--- src/mapi/glapi/gen/glX_XML.py.orig 2021-01-06 15:15:12.263181000 +0100
++++ src/mapi/glapi/gen/glX_XML.py
+@@ -48,7 +48,7 @@
+
+ self.functions = {}
+
+- for child in element.getchildren():
++ for child in element:
+ if child.tag == "size":
+ n = child.get( "name" )
+ c = child.get( "count" )
+@@ -130,7 +130,7 @@
+ self.counter_list.append(param.counter)
+
+
+- for child in element.getchildren():
++ for child in element:
+ if child.tag == "glx":
+ rop = child.get( 'rop' )
+ sop = child.get( 'sop' )
diff -r 86af104dd5c7 -r 0363c8b3d6ea graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py Wed Jan 06 15:50:02 2021 +0000
@@ -0,0 +1,43 @@
+$NetBSD: patch-src_mapi_glapi_gen_gl__XML.py,v 1.1 2021/01/06 15:50:02 triaxx Exp $
+
+Remove deprecated .getchildren() that are no longer supported in Python 3.9.
+https://cgit.freedesktop.org/mesa/mesa/commit/src/mapi/glapi/gen/gl_XML.py?id=7a680
+
+--- src/mapi/glapi/gen/gl_XML.py.orig 2021-01-06 15:17:59.922890000 +0100
++++ src/mapi/glapi/gen/gl_XML.py
+@@ -713,7 +713,7 @@
+
+ parameters = []
+ return_type = "void"
+- for child in element.getchildren():
++ for child in element:
+ if child.tag == "return":
+ return_type = child.get( "type", "void" )
+ elif child.tag == "param":
+@@ -743,7 +743,7 @@
+ if param.is_image():
+ self.images.append( param )
+
+- if element.getchildren():
++ if list(element):
+ self.initialized = 1
+ self.entry_point_parameters[name] = parameters
+ else:
+@@ -873,7 +873,7 @@
+
+
+ def process_OpenGLAPI(self, file_name, element):
+- for child in element.getchildren():
++ for child in element:
+ if child.tag == "category":
+ self.process_category( child )
+ elif child.tag == "OpenGLAPI":
+@@ -893,7 +893,7 @@
+ [cat_type, key] = classify_category(cat_name, cat_number)
+ self.categories[cat_type][key] = [cat_name, cat_number]
+
+- for child in cat.getchildren():
++ for child in cat:
+ if child.tag == "function":
+ func_name = real_function_name( child )
+
Home |
Main Index |
Thread Index |
Old Index