From 27010c3102d9f2e616bac2ca7ef2aefa4ba9228d Mon Sep 17 00:00:00 2001 From: PF4Public Date: Sun, 25 Jun 2023 20:05:59 +0300 Subject: [PATCH] dev-util/electron: Fixes #238 --- dev-util/electron/electron-20.3.12-r1.ebuild | 3 ++- dev-util/electron/electron-25.2.0.ebuild | 2 +- dev-util/electron/files/python-3.11.patch | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 dev-util/electron/files/python-3.11.patch diff --git a/dev-util/electron/electron-20.3.12-r1.ebuild b/dev-util/electron/electron-20.3.12-r1.ebuild index 790bd408d..9d7b3f9fe 100644 --- a/dev-util/electron/electron-20.3.12-r1.ebuild +++ b/dev-util/electron/electron-20.3.12-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} ) -PYTHON_REQ_USE="xml" +PYTHON_REQ_USE="xml(+)" CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr @@ -1431,6 +1431,7 @@ src_prepare() { "${FILESDIR}/perfetto-system-zlib.patch" "${FILESDIR}/gtk-fix-prefers-color-scheme-query.diff" "${FILESDIR}/restore-x86.patch" + "${FILESDIR}/python-3.11.patch" "${DISTDIR}/${PN}-94814e869b2a9a61c80c3da22bd6b5bd0133933b.patch" ) diff --git a/dev-util/electron/electron-25.2.0.ebuild b/dev-util/electron/electron-25.2.0.ebuild index 0926a475e..b438aaeb8 100644 --- a/dev-util/electron/electron-25.2.0.ebuild +++ b/dev-util/electron/electron-25.2.0.ebuild @@ -1181,7 +1181,7 @@ COMMON_SNAPSHOT_DEPEND=" >=media-libs/alsa-lib-1.0.19:= pulseaudio? ( || ( - media-sound/pulseaudio + media-libs/libpulse >=media-sound/apulse-0.1.9 ) ) diff --git a/dev-util/electron/files/python-3.11.patch b/dev-util/electron/files/python-3.11.patch new file mode 100644 index 000000000..8dde0b1f1 --- /dev/null +++ b/dev-util/electron/files/python-3.11.patch @@ -0,0 +1,11 @@ +--- a/tools/grit/grit/util.py ++++ b/tools/grit/grit/util.py +@@ -209,7 +209,7 @@ + mode = 'rb' + encoding = None + else: +- mode = 'rU' ++ mode = 'r' + + with io.open(filename, mode, encoding=encoding) as f: + return f.read()