1 |
commit: 7dead252ab22cf77f2a5960ba9dfb35eefd1b748 |
2 |
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> |
3 |
AuthorDate: Mon Oct 5 12:38:47 2020 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 6 03:41:42 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dead252 |
7 |
|
8 |
x11-base/xcb-proto: python3_9 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/746548 |
11 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
12 |
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/17799 |
14 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
15 |
|
16 |
.../xcb-proto/files/xcb-proto-1.14-python3_9.patch | 54 ++++++++++++++++++++++ |
17 |
x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild | 4 +- |
18 |
2 files changed, 57 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch b/x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..358cd629eb6 |
23 |
--- /dev/null |
24 |
+++ b/x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch |
25 |
@@ -0,0 +1,54 @@ |
26 |
+diff --git a/xcbgen/align.py b/xcbgen/align.py |
27 |
+index d4c12ee40195cb1986796bed009f5ba70dede1d3..5c4f5177dcb14753dabe6f0c8fee57781202efba 100644 |
28 |
+--- a/xcbgen/align.py |
29 |
++++ b/xcbgen/align.py |
30 |
+@@ -2,7 +2,12 @@ |
31 |
+ This module contains helper classes for alignment arithmetic and checks |
32 |
+ ''' |
33 |
+ |
34 |
+-from fractions import gcd |
35 |
++from sys import version_info |
36 |
++ |
37 |
++if version_info[:2] >= (3, 5): |
38 |
++ from math import gcd |
39 |
++else: |
40 |
++ from fractions import gcd |
41 |
+ |
42 |
+ class Alignment(object): |
43 |
+ |
44 |
+diff --git a/xcbgen/matcher.py b/xcbgen/matcher.py |
45 |
+index 97a8b43bb24d29b6414b1e139c73cde966118ea8..a13ef2846fda2d2be249ca0c5dd06d35b90cf6cc 100644 |
46 |
+--- a/xcbgen/matcher.py |
47 |
++++ b/xcbgen/matcher.py |
48 |
+@@ -7,7 +7,12 @@ we do not create a new type object, we just record the existing one under a new |
49 |
+ ''' |
50 |
+ |
51 |
+ from os.path import join |
52 |
+-from xml.etree.cElementTree import parse |
53 |
++from sys import version_info |
54 |
++ |
55 |
++if version_info[:2] >= (3, 9): |
56 |
++ from xml.etree.ElementTree import parse |
57 |
++else: |
58 |
++ from xml.etree.cElementTree import parse |
59 |
+ |
60 |
+ from xcbgen.xtypes import * |
61 |
+ |
62 |
+diff --git a/xcbgen/state.py b/xcbgen/state.py |
63 |
+index 0dbecdc7b6f96bbf5f0e549787b20f9986039f1b..3b7eeb42bec1b00e5253aa93e58e0cd1fb7a3389 100644 |
64 |
+--- a/xcbgen/state.py |
65 |
++++ b/xcbgen/state.py |
66 |
+@@ -2,7 +2,12 @@ |
67 |
+ This module contains the namespace class and the singleton module class. |
68 |
+ ''' |
69 |
+ from os.path import dirname, basename |
70 |
+-from xml.etree.cElementTree import parse |
71 |
++from sys import version_info |
72 |
++ |
73 |
++if version_info[:2] >= (3, 9): |
74 |
++ from xml.etree.ElementTree import parse |
75 |
++else: |
76 |
++ from xml.etree.cElementTree import parse |
77 |
+ |
78 |
+ from xcbgen import matcher |
79 |
+ from xcbgen.error import * |
80 |
|
81 |
diff --git a/x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild b/x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild |
82 |
index db6a3ce9991..c110c43bc10 100644 |
83 |
--- a/x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild |
84 |
+++ b/x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild |
85 |
@@ -3,7 +3,7 @@ |
86 |
|
87 |
EAPI=7 |
88 |
|
89 |
-PYTHON_COMPAT=( python{3_6,3_7,3_8} ) |
90 |
+PYTHON_COMPAT=( python3_{6,7,8,9} ) |
91 |
XORG_TARBALL_SUFFIX="xz" |
92 |
XORG_MODULE=proto/ |
93 |
XORG_MULTILIB=yes |
94 |
@@ -30,6 +30,8 @@ BDEPEND=" |
95 |
|
96 |
ECONF_SOURCE="${S}" |
97 |
|
98 |
+PATCHES=( "${FILESDIR}"/${PN}-1.14-python3_9.patch ) |
99 |
+ |
100 |
multilib_src_configure() { |
101 |
# Don't use Python to find sitedir here. |
102 |
PYTHON=true default |