commit:     0b8e113a954a44ec1f32eebcc74e2db818c7847d
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 17:16:56 2023 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Tue Jan 24 17:53:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b8e113a

x11-misc/safeeyes: Fix py311 + switch to dev-libs/libayatana-appindicator

Closes: https://bugs.gentoo.org/891951
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>

 .../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(+)

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 <[email protected]>
+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
+}

Reply via email to