commit:     359e9be7de782eada1c1652ac384eb8af165f76b
Author:     Vladimir Pavljuchenkov <spiderx <AT> spiderx <DOT> dp <DOT> ua>
AuthorDate: Sat May  4 23:26:01 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 28 01:54:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=359e9be7

x11-misc/libinput-gestures: add 2.76

Closes: https://bugs.gentoo.org/929885

Signed-off-by: Vladimir Pavljuchenkov <spiderx <AT> spiderx.dp.ua>
Closes: https://github.com/gentoo/gentoo/pull/36553
Signed-off-by: Sam James <sam <AT> gentoo.org>

 x11-misc/libinput-gestures/Manifest                |  1 +
 .../files/libinput-gestures-2.76-zombie.patch      | 22 ++++++++
 .../libinput-gestures-2.76.ebuild                  | 58 ++++++++++++++++++++++
 x11-misc/libinput-gestures/metadata.xml            |  3 ++
 4 files changed, 84 insertions(+)

diff --git a/x11-misc/libinput-gestures/Manifest 
b/x11-misc/libinput-gestures/Manifest
index f8c64f82b33f..9b0e7421cee2 100644
--- a/x11-misc/libinput-gestures/Manifest
+++ b/x11-misc/libinput-gestures/Manifest
@@ -1 +1,2 @@
 DIST libinput-gestures-2.73.tar.gz 28771 BLAKE2B 
9f3c546b637b0038431517e2df5e3dfba4fbb7db708f108dd7a979e6674b2bdd44b2b877b5e200c05373a57bfeffefadfde59bc6c403f7188e349c2e051d8683
 SHA512 
8e46931c76541eb836b1bd79295f05fdc0e22091d1693eac1cc9c16407830806f9e56819e5fb8ba3eed7a26664946010d24d62d99131bcf71b1d8a3682f34ec6
+DIST libinput-gestures-2.76.tar.gz 28913 BLAKE2B 
d1c610af1eaf48170c08bea1eb92ce3cc36efc8f8035ea5f00cdf151bfe5c8d14368e4a37f8eb9cca7e59742136ba65909c9a468ba254a78d35dcaba7500ce62
 SHA512 
001c6c64e9ca52b4a7453837448803c797cc746fac04ad15613aa20a6bb33c44b441c343dfa56f23fa195fc7216a6d6c00a88f13e39481a12654a3a1a6dbdd98

diff --git 
a/x11-misc/libinput-gestures/files/libinput-gestures-2.76-zombie.patch 
b/x11-misc/libinput-gestures/files/libinput-gestures-2.76-zombie.patch
new file mode 100644
index 000000000000..231b78dd092f
--- /dev/null
+++ b/x11-misc/libinput-gestures/files/libinput-gestures-2.76-zombie.patch
@@ -0,0 +1,22 @@
+# https://github.com/bulletmark/libinput-gestures/pull/242
+# https://github.com/bulletmark/libinput-gestures/issues/334
+--- ../libinput-gestures       2024-05-05 22:27:48.297359689 +0300
++++ ../libinput-gestures       2024-05-05 22:29:17.473224613 +0300
+@@ -10,6 +10,7 @@
+ import platform
+ import re
+ import shlex
++import signal
+ import subprocess
+ import sys
+ import threading
+@@ -781,6 +782,9 @@
+     cmd = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,
+             bufsize=1, universal_newlines=True)
+ 
++    # Avoid producing zombie processes
++    signal.signal(signal.SIGCHLD, signal.SIG_IGN)
++
+     # Store PIDs for potential kill
+     pidfile.write(f'{os.getpid()}\n{cmd.pid}\n')
+     pidfile.flush()

diff --git a/x11-misc/libinput-gestures/libinput-gestures-2.76.ebuild 
b/x11-misc/libinput-gestures/libinput-gestures-2.76.ebuild
new file mode 100644
index 000000000000..0422a315dd2d
--- /dev/null
+++ b/x11-misc/libinput-gestures/libinput-gestures-2.76.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit python-single-r1 xdg
+
+DESCRIPTION="Actions gestures on your touchpad using libinput"
+HOMEPAGE="https://github.com/bulletmark/libinput-gestures";
+SRC_URI="https://github.com/bulletmark/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="experimental"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="test"
+
+RDEPEND="${PYTHON_DEPS}
+       dev-libs/libinput
+       x11-misc/wmctrl
+       x11-misc/xdotool"
+DEPEND="dev-libs/libinput
+       dev-util/desktop-file-utils"
+
+src_prepare() {
+       default
+
+       use experimental && eapply "${FILESDIR}/${P}"-zombie.patch
+
+       # 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
+       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 3 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
+}

diff --git a/x11-misc/libinput-gestures/metadata.xml 
b/x11-misc/libinput-gestures/metadata.xml
index bb7f9a08a603..a9fcc6c99925 100644
--- a/x11-misc/libinput-gestures/metadata.xml
+++ b/x11-misc/libinput-gestures/metadata.xml
@@ -16,6 +16,9 @@
        typically an xdotool command to action desktop/window/application
        keyboard combinations and commands.
        </longdescription>
+       <use>
+               <flag name="experimental">avoid producing zombie 
processes</flag>
+       </use>
        <upstream>
                <remote-id 
type="github">bulletmark/libinput-gestures</remote-id>
        </upstream>

Reply via email to