Gentoo Archives: gentoo-commits

From: John Helmert III <ajak@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/ckb/, app-misc/ckb/files/
Date: Sat, 25 Sep 2021 20:48:15
Message-Id: 1632602806.97302339c8c2d04c2ea5dae831f03aa8e499694a.ajak@gentoo
1 commit: 97302339c8c2d04c2ea5dae831f03aa8e499694a
2 Author: John Helmert III <ajak <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 25 18:53:35 2021 +0000
4 Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 25 20:46:46 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97302339
7
8 app-misc/ckb: fix compatibility with libinput drivers 1.2.0
9
10 Closes: https://bugs.gentoo.org/814797
11 Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
12
13 app-misc/ckb/ckb-0.4.4-r2.ebuild | 65 +++++++++++++++++++++++
14 app-misc/ckb/files/ckb-0.4.4-libinput-1.2.0.patch | 29 ++++++++++
15 2 files changed, 94 insertions(+)
16
17 diff --git a/app-misc/ckb/ckb-0.4.4-r2.ebuild b/app-misc/ckb/ckb-0.4.4-r2.ebuild
18 new file mode 100644
19 index 00000000000..e5c7f397433
20 --- /dev/null
21 +++ b/app-misc/ckb/ckb-0.4.4-r2.ebuild
22 @@ -0,0 +1,65 @@
23 +# Copyright 1999-2021 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +inherit xdg cmake
29 +
30 +DESCRIPTION="Corsair K65/K70/K95 Driver"
31 +HOMEPAGE="https://github.com/ckb-next/ckb-next"
32 +SRC_URI="https://github.com/ckb-next/ckb-next/archive/v${PV}.tar.gz -> ${P}.tar.gz"
33 +
34 +LICENSE="GPL-2"
35 +SLOT="0"
36 +KEYWORDS="~amd64"
37 +IUSE="systemd"
38 +
39 +RDEPEND="
40 + dev-libs/libdbusmenu-qt
41 + dev-libs/quazip:0=
42 + dev-qt/qtcore:5
43 + dev-qt/qtdbus:5
44 + dev-qt/qtgui:5
45 + dev-qt/qtnetwork:5
46 + dev-qt/qtwidgets:5
47 + dev-qt/qtx11extras:5
48 + media-sound/pulseaudio
49 + virtual/libudev:=
50 + x11-libs/libX11
51 + x11-libs/libxcb:=
52 + x11-libs/xcb-util-wm"
53 +DEPEND="${RDEPEND}"
54 +BDEPEND="dev-qt/linguist-tools:5"
55 +
56 +S="${WORKDIR}/${PN}-next-${PV}"
57 +
58 +PATCHES=(
59 + "${FILESDIR}/${P}-libinput-1.2.0.patch"
60 +)
61 +
62 +src_configure() {
63 + local mycmakeargs=(
64 + -DDISABLE_UPDATER=yes
65 + -DFORCE_INIT_SYSTEM=$(usex systemd systemd openrc)
66 + )
67 + cmake_src_configure
68 +}
69 +
70 +src_install() {
71 + cmake_src_install
72 + dodoc CHANGELOG.md
73 +
74 + newinitd "${FILESDIR}"/ckb.initd ckb-daemon
75 +}
76 +
77 +pkg_postinst() {
78 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
79 + elog "The ckb daemon will have to be started before use:"
80 + elog
81 + if use systemd ; then
82 + elog "# systemctl start ckb-next-daemon"
83 + else
84 + elog "# rc-service ckb start"
85 + fi
86 + fi
87 +}
88
89 diff --git a/app-misc/ckb/files/ckb-0.4.4-libinput-1.2.0.patch b/app-misc/ckb/files/ckb-0.4.4-libinput-1.2.0.patch
90 new file mode 100644
91 index 00000000000..211d5e4ea01
92 --- /dev/null
93 +++ b/app-misc/ckb/files/ckb-0.4.4-libinput-1.2.0.patch
94 @@ -0,0 +1,29 @@
95 +From dc4dc54c5ebac7e4b455d8df35076fc044a581a7 Mon Sep 17 00:00:00 2001
96 +From: Tasos Sahanidis <tasos@××××××××.com>
97 +Date: Mon, 20 Sep 2021 14:48:18 +0300
98 +Subject: [PATCH] Don't enable unneeded axes in mouse device
99 +
100 +Specifically, we used to enable HI_RES wheel events without ever
101 +sending any. This breaks scrolling in latest libinput as it expects
102 +us to actually send HI_RES events.
103 +---
104 + src/daemon/input_linux.c | 6 ++++--
105 + 1 file changed, 4 insertions(+), 2 deletions(-)
106 +
107 +diff --git a/src/daemon/input_linux.c b/src/daemon/input_linux.c
108 +index 68cc0ebb..a9ac8c8e 100644
109 +--- a/src/daemon/input_linux.c
110 ++++ b/src/daemon/input_linux.c
111 +@@ -25,8 +25,10 @@ int uinputopen(struct uinput_user_dev* indev, int mouse){
112 + ioctl(fd, UI_SET_KEYBIT, i);
113 + // Enable mouse axes
114 + ioctl(fd, UI_SET_EVBIT, EV_REL);
115 +- for(int i = 0; i < REL_CNT; i++)
116 +- ioctl(fd, UI_SET_RELBIT, i);
117 ++ ioctl(fd, UI_SET_RELBIT, REL_X);
118 ++ ioctl(fd, UI_SET_RELBIT, REL_Y);
119 ++ ioctl(fd, UI_SET_RELBIT, REL_WHEEL);
120 ++ ioctl(fd, UI_SET_RELBIT, REL_HWHEEL);
121 + } else {
122 + // Enable common keyboard keys
123 + for(int i = KEY_ESC; i <= KEY_MEDIA; i++)