From 0b8e113a954a44ec1f32eebcc74e2db818c7847d Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 24 Jan 2023 18:16:56 +0100 Subject: x11-misc/safeeyes: Fix py311 + switch to dev-libs/libayatana-appindicator Closes: https://bugs.gentoo.org/891951 Signed-off-by: Sebastian Pipping --- .../files/safeeyes-2.1.5-python-3.11.patch | 25 +++++++++++ x11-misc/safeeyes/safeeyes-2.1.5-r1.ebuild | 48 ++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 x11-misc/safeeyes/files/safeeyes-2.1.5-python-3.11.patch create mode 100644 x11-misc/safeeyes/safeeyes-2.1.5-r1.ebuild diff --git a/x11-misc/safeeyes/files/safeeyes-2.1.5-python-3.11.patch b/x11-misc/safeeyes/files/safeeyes-2.1.5-python-3.11.patch new file mode 100644 index 000000000000..e494dfc1a2ce --- /dev/null +++ b/x11-misc/safeeyes/files/safeeyes-2.1.5-python-3.11.patch @@ -0,0 +1,25 @@ +From 1fabfb9eddc2b67d174dffba0e46ecb4fb4dec71 Mon Sep 17 00:00:00 2001 +From: tibequadorian +Date: Tue, 24 Jan 2023 18:39:49 +0100 +Subject: [PATCH] utility.py: Fix getargspec error with python 3.11 + +--- + safeeyes/utility.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/safeeyes/utility.py b/safeeyes/utility.py +index bf2dede..7e08735 100644 +--- a/safeeyes/utility.py ++++ b/safeeyes/utility.py +@@ -666,7 +666,7 @@ def has_method(module, method_name, no_of_args=0): + Check whether the given function is defined in the module or not. + """ + if hasattr(module, method_name): +- if len(inspect.getargspec(getattr(module, method_name)).args) == no_of_args: ++ if len(inspect.getfullargspec(getattr(module, method_name)).args) == no_of_args: + return True + return False + +-- +2.39.1 + diff --git a/x11-misc/safeeyes/safeeyes-2.1.5-r1.ebuild b/x11-misc/safeeyes/safeeyes-2.1.5-r1.ebuild new file mode 100644 index 000000000000..debfe192fcfa --- /dev/null +++ b/x11-misc/safeeyes/safeeyes-2.1.5-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="tk" # for site-packages/Xlib/ext/randr.py +DISTUTILS_USE_PEP517=setuptools + +inherit xdg distutils-r1 + +DESCRIPTION="Linux alternative to EyeLeo" +HOMEPAGE="https://github.com/slgobinath/SafeEyes" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86" +IUSE="" + +PATCHES=( + "${FILESDIR}"/${P}-python-3.11.patch +) + +RDEPEND=" + dev-libs/libayatana-appindicator + dev-python/Babel[${PYTHON_USEDEP}] + dev-python/croniter[${PYTHON_USEDEP}] + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] + dev-python/python-xlib[${PYTHON_USEDEP}] + media-sound/alsa-utils + x11-apps/xprop + x11-libs/gtk+:3[introspection] + x11-libs/libnotify[introspection] + x11-misc/xprintidle + " + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update +} -- cgit v1.2.3-65-gdbad