diff options
author | YOSHIOKA Takuma <lo48576@hard-wi.red> | 2021-01-20 21:26:01 +0900 |
---|---|---|
committer | YOSHIOKA Takuma <lo48576@hard-wi.red> | 2021-01-20 21:26:01 +0900 |
commit | 23b7a081b5d8f52330a3a9950d4fb6c3494e4fb5 (patch) | |
tree | d850839b7c52412dcf578136a1222aa328962d8a | |
parent | net-im/nheko: Remove old ebuild. (diff) | |
download | guru-23b7a081b5d8f52330a3a9950d4fb6c3494e4fb5.tar.gz guru-23b7a081b5d8f52330a3a9950d4fb6c3494e4fb5.tar.bz2 guru-23b7a081b5d8f52330a3a9950d4fb6c3494e4fb5.zip |
media-gfx/silicon: Apply a patch to unblock python 3.9
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: YOSHIOKA Takuma <lo48576@hard-wi.red>
-rw-r--r-- | media-gfx/silicon/files/rust-xcb-0.8.2-python-3.9.patch | 43 | ||||
-rw-r--r-- | media-gfx/silicon/silicon-0.4.0.ebuild | 14 |
2 files changed, 52 insertions, 5 deletions
diff --git a/media-gfx/silicon/files/rust-xcb-0.8.2-python-3.9.patch b/media-gfx/silicon/files/rust-xcb-0.8.2-python-3.9.patch new file mode 100644 index 000000000..a7e346d8d --- /dev/null +++ b/media-gfx/silicon/files/rust-xcb-0.8.2-python-3.9.patch @@ -0,0 +1,43 @@ +From b41c79a73069160af5290c328acecd499f5d216a Mon Sep 17 00:00:00 2001 +From: Michel Alexandre Salim <michel@michel-slm.name> +Date: Mon, 8 Jun 2020 22:59:11 -0700 +Subject: [PATCH] Use `ElementTree` instead of `cElementTree` + +`cElementTree` has been deprecated since Python 3.3; `ElementTree` will use a fast implementation whenever available. + +`cElementTree` is actually removed as of Python 3.9 beta 1, and on Python 3.8 it's an alias to `ElementTree`. + +See https://docs.python.org/3.8/library/xml.etree.elementtree.html + +Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name> +--- + xcbgen/matcher.py | 2 +- + xcbgen/state.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xcbgen/matcher.py b/xcbgen/matcher.py +index bfa315eb..97ae5f9f 100644 +--- a/xcbgen/matcher.py ++++ b/xcbgen/matcher.py +@@ -7,7 +7,7 @@ + ''' + + from os.path import join +-from xml.etree.cElementTree import parse ++from xml.etree.ElementTree import parse + + from xcbgen.xtypes import * + +diff --git a/xcbgen/state.py b/xcbgen/state.py +index 1f5479e9..95af5a40 100644 +--- a/xcbgen/state.py ++++ b/xcbgen/state.py +@@ -2,7 +2,7 @@ + This module contains the namespace class and the singleton module class. + ''' + from os.path import dirname, basename +-from xml.etree.cElementTree import parse ++from xml.etree.ElementTree import parse + + from xcbgen import matcher + from xcbgen.error import * diff --git a/media-gfx/silicon/silicon-0.4.0.ebuild b/media-gfx/silicon/silicon-0.4.0.ebuild index e5356468b..0f5b4d797 100644 --- a/media-gfx/silicon/silicon-0.4.0.ebuild +++ b/media-gfx/silicon/silicon-0.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 2017-2020 Gentoo Authors +# Copyright 2017-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Auto-Generated by cargo-ebuild 0.3.1 @@ -188,11 +188,8 @@ LICENSE="Apache-2.0 Boost-1.0 BSD-2 CC0-1.0 MIT MPL-2.0 ZLIB" SLOT="0" KEYWORDS="~amd64 ~x86" -# Python 3.9 cannot be used for now. -# See <https://github.com/rtbo/rust-xcb/issues/84> -# (fixed but not yet released). BDEPEND=" - <dev-lang/python-3.9 + dev-lang/python virtual/pkgconfig" DEPEND=" media-libs/fontconfig @@ -201,6 +198,13 @@ DEPEND=" RDEPEND="${DEPEND} x11-misc/xclip" +src_unpack() { + cargo_src_unpack + + # Apply patch <https://github.com/rtbo/rust-xcb/pull/87> for python 3.9 support. + ( cd "${WORKDIR}"/cargo_home/gentoo/xcb-0.8.2 && eapply "${FILESDIR}"/rust-xcb-0.8.2-python-3.9.patch ) +} + src_install() { cargo_src_install |