summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortriaxx <triaxx@pkgsrc.org>2021-01-06 15:50:02 +0000
committertriaxx <triaxx@pkgsrc.org>2021-01-06 15:50:02 +0000
commitc8eca33b4730ed609e2879056ae0cfe0c5b970cd (patch)
treedce4e50aeefa9544ce23c4046ce4c59943f0fc9e
parent0dd81079626bfd2c203723bc0addcc438db2c842 (diff)
downloadpkgsrc-c8eca33b4730ed609e2879056ae0cfe0c5b970cd.tar.gz
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.
-rw-r--r--graphics/MesaLib/Makefile3
-rw-r--r--graphics/MesaLib/distinfo7
-rw-r--r--graphics/MesaLib/patches/patch-src_intel_genxml_gen__sort__tags.py57
-rw-r--r--graphics/MesaLib/patches/patch-src_mapi_glapi_gen_glX__XML.py25
-rw-r--r--graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py43
5 files changed, 132 insertions, 3 deletions
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile
index 516f06fa90f..3b42766ebb8 100644
--- a/graphics/MesaLib/Makefile
+++ b/graphics/MesaLib/Makefile
@@ -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 --git a/graphics/MesaLib/distinfo b/graphics/MesaLib/distinfo
index 790f9d6c788..50c39c54cc1 100644
--- a/graphics/MesaLib/distinfo
+++ b/graphics/MesaLib/distinfo
@@ -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_glxclient.h) = f0358179ae397bc8677597b0ccb9a471f40f15de
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-64__tls.h) = cbbb95b96414609a9cd05af75c9544f8e6938280
SHA1 (patch-src_mapi_entry__x86__tls.h) = d85680aa658d159017e8bad1589f95f3830ac577
+SHA1 (patch-src_mapi_entry__x86-64__tls.h) = cbbb95b96414609a9cd05af75c9544f8e6938280
+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 --git a/graphics/MesaLib/patches/patch-src_intel_genxml_gen__sort__tags.py b/graphics/MesaLib/patches/patch-src_intel_genxml_gen__sort__tags.py
new file mode 100644
index 00000000000..6a11453144b
--- /dev/null
+++ b/graphics/MesaLib/patches/patch-src_intel_genxml_gen__sort__tags.py
@@ -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 --git a/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_glX__XML.py b/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_glX__XML.py
new file mode 100644
index 00000000000..2ae4dc1673d
--- /dev/null
+++ b/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_glX__XML.py
@@ -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 --git a/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py b/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py
new file mode 100644
index 00000000000..cd10c7d3cc3
--- /dev/null
+++ b/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py
@@ -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 )
+