commit:     a89eef78de204ae343be56e6fb2ffa693cf2b6a5
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 13:43:44 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sun May 15 13:46:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a89eef78

x11-misc/libinput-gestures: add 2.73

And now we actually respect the PYTHON_TARGET setting
instead of just running whichever version is set as
the system version

Closes: https://github.com/gentoo/gentoo/pull/19262
Closes: https://bugs.gentoo.org/814164
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 x11-misc/libinput-gestures/Manifest                |  1 +
 .../libinput-gestures-2.73-python-39-tests.patch   | 13 ++++
 .../libinput-gestures-2.73.ebuild                  | 69 ++++++++++++++++++++++
 3 files changed, 83 insertions(+)

diff --git a/x11-misc/libinput-gestures/Manifest 
b/x11-misc/libinput-gestures/Manifest
index fb5cc8b8f5c9..65576df08937 100644
--- a/x11-misc/libinput-gestures/Manifest
+++ b/x11-misc/libinput-gestures/Manifest
@@ -1 +1,2 @@
 DIST libinput-gestures-2.56.tar.gz 26293 BLAKE2B 
b48a33c13efc63545bcb5ae722066493bd6aba083a07b1ebbf10eea69afa2a8f9d80a92b60dda3e8472a55851b70e84cf7c10e0bf3428c2278dd3ef5b6f65d0d
 SHA512 
f215444dbe7e70ae137404beb25d5a60c5a618fb2d3d20eb9b4cf3f94cbc93a7e42a5fa82efdea082e2fa229c95d86c02df91c59f4a51c067e47ccf5dcf79fa7
+DIST libinput-gestures-2.73.tar.gz 28771 BLAKE2B 
9f3c546b637b0038431517e2df5e3dfba4fbb7db708f108dd7a979e6674b2bdd44b2b877b5e200c05373a57bfeffefadfde59bc6c403f7188e349c2e051d8683
 SHA512 
8e46931c76541eb836b1bd79295f05fdc0e22091d1693eac1cc9c16407830806f9e56819e5fb8ba3eed7a26664946010d24d62d99131bcf71b1d8a3682f34ec6

diff --git 
a/x11-misc/libinput-gestures/files/libinput-gestures-2.73-python-39-tests.patch 
b/x11-misc/libinput-gestures/files/libinput-gestures-2.73-python-39-tests.patch
new file mode 100644
index 000000000000..4d14f13f2b8d
--- /dev/null
+++ 
b/x11-misc/libinput-gestures/files/libinput-gestures-2.73-python-39-tests.patch
@@ -0,0 +1,13 @@
+diff --git a/internal b/internal
+index 432179d..6898173 100755
+--- a/internal
++++ b/internal
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env python3
+ 'Command line program to exercise/test/debug the _internal command.'
+ # Mark Blakeney, Oct 2019
+-import sys, importlib, argparse
++import sys, importlib.util, importlib.machinery, argparse
+ from pathlib import Path
+ 
+ CMD = '_internal'

diff --git a/x11-misc/libinput-gestures/libinput-gestures-2.73.ebuild 
b/x11-misc/libinput-gestures/libinput-gestures-2.73.ebuild
new file mode 100644
index 000000000000..0335db2c4cf6
--- /dev/null
+++ b/x11-misc/libinput-gestures/libinput-gestures-2.73.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit python-single-r1 xdg
+
+DESCRIPTION="Actions gestures on your touchpad using libinput"
+HOMEPAGE="https://github.com/bulletmark/libinput-gestures";
+if [[ ${PV} == *9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/bulletmark/${PN}.git";
+else
+       SRC_URI="https://github.com/bulletmark/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+# This is completely broken
+RESTRICT="test"
+
+RDEPEND="${PYTHON_DEPS}
+       dev-libs/libinput
+       x11-misc/wmctrl
+       x11-misc/xdotool
+"
+DEPEND="
+       dev-libs/libinput
+       dev-util/desktop-file-utils
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-python-39-tests.patch"
+)
+
+src_prepare() {
+       default
+
+       # Fix docdir installation path
+       sed -i "/^DOCDIR/s@\$NAME@${PF}@" libinput-gestures-setup \
+               || die "sed failed for libinput-gestures-setup"
+}
+
+src_test() {
+       emake test
+}
+
+src_install() {
+       default
+       # Actually respect the python target setting
+       python_doscript "${PN}"
+}
+
+pkg_postinst() {
+       xdg_icon_cache_update
+
+       elog "You must be in the input group to read the touchpad device."
+
+       if ! has_version x11-libs/gtk+:3 ; then
+               elog "${PN}-setup script supports GNOME via x11-libs/gtk+:3."
+       fi
+       if ! has_version kde-plasma/kde-cli-tools:5 ; then
+               elog "${PN}-setup script supports Plasma 5 via 
kde-plasma/kde-cli-tools:5."
+       fi
+}

Reply via email to