summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2020-10-05 14:38:47 +0200
committerMatt Turner <mattst88@gentoo.org>2020-10-05 20:41:42 -0700
commit7dead252ab22cf77f2a5960ba9dfb35eefd1b748 (patch)
tree28f1396a260e1334cba46da1f2cf3ea897bf85c8 /x11-base
parentx11-libs/libxcb: python3_9 (diff)
downloadgentoo-7dead252ab22cf77f2a5960ba9dfb35eefd1b748.tar.gz
gentoo-7dead252ab22cf77f2a5960ba9dfb35eefd1b748.tar.bz2
gentoo-7dead252ab22cf77f2a5960ba9dfb35eefd1b748.zip
x11-base/xcb-proto: python3_9
Closes: https://bugs.gentoo.org/746548 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/17799 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'x11-base')
-rw-r--r--x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch54
-rw-r--r--x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild4
2 files changed, 57 insertions, 1 deletions
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
new file mode 100644
index 000000000000..358cd629eb6d
--- /dev/null
+++ b/x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch
@@ -0,0 +1,54 @@
+diff --git a/xcbgen/align.py b/xcbgen/align.py
+index d4c12ee40195cb1986796bed009f5ba70dede1d3..5c4f5177dcb14753dabe6f0c8fee57781202efba 100644
+--- a/xcbgen/align.py
++++ b/xcbgen/align.py
+@@ -2,7 +2,12 @@
+ This module contains helper classes for alignment arithmetic and checks
+ '''
+
+-from fractions import gcd
++from sys import version_info
++
++if version_info[:2] >= (3, 5):
++ from math import gcd
++else:
++ from fractions import gcd
+
+ class Alignment(object):
+
+diff --git a/xcbgen/matcher.py b/xcbgen/matcher.py
+index 97a8b43bb24d29b6414b1e139c73cde966118ea8..a13ef2846fda2d2be249ca0c5dd06d35b90cf6cc 100644
+--- a/xcbgen/matcher.py
++++ b/xcbgen/matcher.py
+@@ -7,7 +7,12 @@ we do not create a new type object, we just record the existing one under a new
+ '''
+
+ from os.path import join
+-from xml.etree.cElementTree import parse
++from sys import version_info
++
++if version_info[:2] >= (3, 9):
++ from xml.etree.ElementTree import parse
++else:
++ from xml.etree.cElementTree import parse
+
+ from xcbgen.xtypes import *
+
+diff --git a/xcbgen/state.py b/xcbgen/state.py
+index 0dbecdc7b6f96bbf5f0e549787b20f9986039f1b..3b7eeb42bec1b00e5253aa93e58e0cd1fb7a3389 100644
+--- a/xcbgen/state.py
++++ b/xcbgen/state.py
+@@ -2,7 +2,12 @@
+ This module contains the namespace class and the singleton module class.
+ '''
+ from os.path import dirname, basename
+-from xml.etree.cElementTree import parse
++from sys import version_info
++
++if version_info[:2] >= (3, 9):
++ from xml.etree.ElementTree import parse
++else:
++ from xml.etree.cElementTree import parse
+
+ from xcbgen import matcher
+ from xcbgen.error import *
diff --git a/x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild b/x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild
index db6a3ce99915..c110c43bc101 100644
--- a/x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild
+++ b/x11-base/xcb-proto/xcb-proto-1.14-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python{3_6,3_7,3_8} )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
XORG_TARBALL_SUFFIX="xz"
XORG_MODULE=proto/
XORG_MULTILIB=yes
@@ -30,6 +30,8 @@ BDEPEND="
ECONF_SOURCE="${S}"
+PATCHES=( "${FILESDIR}"/${PN}-1.14-python3_9.patch )
+
multilib_src_configure() {
# Don't use Python to find sitedir here.
PYTHON=true default