[gnome-boxes/flatpak-master-fixup: 4/8] flatpak: Ship virglrenderer patch fixing its use of python3
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/flatpak-master-fixup: 4/8] flatpak: Ship virglrenderer patch fixing its use of python3
- Date: Mon, 5 Aug 2019 07:21:50 +0000 (UTC)
commit 2d2bf7bb72b229616ffe94cddc09e327bf031b6c
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Aug 2 14:13:54 2019 +0200
flatpak: Ship virglrenderer patch fixing its use of python3
https://github.com/freedesktop/virglrenderer/commit/9b91cc380fdd5
build-aux/flatpak/org.gnome.Boxes.json | 4 ++
...irglrenderer-gallium-auxiliary-python-fix.patch | 68 ++++++++++++++++++++++
2 files changed, 72 insertions(+)
---
diff --git a/build-aux/flatpak/org.gnome.Boxes.json b/build-aux/flatpak/org.gnome.Boxes.json
index a6cd3ff2..235722a1 100644
--- a/build-aux/flatpak/org.gnome.Boxes.json
+++ b/build-aux/flatpak/org.gnome.Boxes.json
@@ -338,6 +338,10 @@
"type" : "archive",
"url" :
"https://github.com/freedesktop/virglrenderer/archive/virglrenderer-0.7.0.tar.gz",
"sha256" : "e6cf19db769d44a7bc9cf5028d12e0b169c73444714badbd480c97d0386b2a98"
+ },
+ {
+ "type" : "patch",
+ "path" : "virglrenderer-gallium-auxiliary-python-fix.patch"
}
]
},
diff --git a/build-aux/flatpak/virglrenderer-gallium-auxiliary-python-fix.patch
b/build-aux/flatpak/virglrenderer-gallium-auxiliary-python-fix.patch
new file mode 100644
index 00000000..9ebab4cf
--- /dev/null
+++ b/build-aux/flatpak/virglrenderer-gallium-auxiliary-python-fix.patch
@@ -0,0 +1,68 @@
+From 9b91cc380fdd5bf993f64a9cd452dbc4c98872fa Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied redhat com>
+Date: Wed, 19 Sep 2018 10:36:17 +1000
+Subject: [PATCH] update u_format_parse from mesa to handle python3
+
+---
+ src/gallium/auxiliary/util/u_format_parse.py | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/auxiliary/util/u_format_parse.py b/src/gallium/auxiliary/util/u_format_parse.py
+index 929017a..48cc012 100755
+--- a/src/gallium/auxiliary/util/u_format_parse.py
++++ b/src/gallium/auxiliary/util/u_format_parse.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+
+ '''
+ /**************************************************************************
+@@ -30,6 +29,9 @@
+ '''
+
+
++from __future__ import division
++
++
+ VOID, UNSIGNED, SIGNED, FIXED, FLOAT = range(5)
+
+ SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_0, SWIZZLE_1, SWIZZLE_NONE, = range(7)
+@@ -70,14 +72,20 @@ def __str__(self):
+ return s
+
+ def __eq__(self, other):
++ if other is None:
++ return False
++
+ return self.type == other.type and self.norm == other.norm and self.pure == other.pure and
self.size == other.size
+
++ def __ne__(self, other):
++ return not self == other
++
+ def max(self):
+ '''Maximum representable number.'''
+ if self.type == FLOAT:
+ return VERY_LARGE
+ if self.type == FIXED:
+- return (1 << (self.size/2)) - 1
++ return (1 << (self.size // 2)) - 1
+ if self.norm:
+ return 1
+ if self.type == UNSIGNED:
+@@ -91,7 +99,7 @@ def min(self):
+ if self.type == FLOAT:
+ return -VERY_LARGE
+ if self.type == FIXED:
+- return -(1 << (self.size/2))
++ return -(1 << (self.size // 2))
+ if self.type == UNSIGNED:
+ return 0
+ if self.norm:
+@@ -313,7 +321,7 @@ def _parse_channels(fields, layout, colorspace, swizzles):
+ return channels
+
+ def parse(filename):
+- '''Parse the format descrition in CSV format in terms of the
++ '''Parse the format description in CSV format in terms of the
+ Channel and Format classes above.'''
+
+ stream = open(filename)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]