summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2019-05-16 12:14:31 +0100
committerTony Vroon <chainsaw@gentoo.org>2019-05-16 12:15:20 +0100
commitbb42f42e01fafe107eb30977080e8811d10b6b72 (patch)
treebc973ec521f98a8d8d996321a64a7db1853b524e /app-misc/ckb
parentkde-frameworks/sonnet: Disable broken tests for 5.57.0 (diff)
downloadgentoo-bb42f42e01fafe107eb30977080e8811d10b6b72.tar.gz
gentoo-bb42f42e01fafe107eb30977080e8811d10b6b72.tar.bz2
gentoo-bb42f42e01fafe107eb30977080e8811d10b6b72.zip
app-misc/ckb: Version bump to 0.4.0
Adds coping mechanisms for non-modular kernels like mine, sent upstream. Copes with significantly changed build system and shortens ebuild accordingly. I am taking maintainership. Closes: https://bugs.gentoo.org/680918 Suggested-By: Chicago <chicago@blkid.net> Signed-Off-By: Tony Vroon <chainsaw@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11
Diffstat (limited to 'app-misc/ckb')
-rw-r--r--app-misc/ckb/Manifest1
-rw-r--r--app-misc/ckb/ckb-0.4.0.ebuild50
-rw-r--r--app-misc/ckb/files/ckb-0.4.0-modprobe.patch72
-rw-r--r--app-misc/ckb/metadata.xml5
4 files changed, 127 insertions, 1 deletions
diff --git a/app-misc/ckb/Manifest b/app-misc/ckb/Manifest
index 6882c728c07d..2dc7598a993c 100644
--- a/app-misc/ckb/Manifest
+++ b/app-misc/ckb/Manifest
@@ -1 +1,2 @@
DIST ckb-0.2.9.tar.gz 664625 BLAKE2B 37dc9c75876ca46fb10241da7b223ca67e5b9c0a998386f0f82eba15a97045e269b1f8a75dea18297865826bff241c21b255a507fd26e73747ee2656a228c4ce SHA512 7910f089d7b01ceade5ae8282db931c9decb9296d4c9c5fc2419eb7fb4ba5a2c0f85721a3a6846ed24a72f61b18374baa7fd27e11329b5d2f65b21916e8b96e1
+DIST ckb-0.4.0.tar.gz 838586 BLAKE2B 42d786d1934cce6bb082ba4c9f7081401153fa2bd209f290659cfd42787ef69fad9ad86c35df973f1934a03699a1472aa2a1ceb8ef70f46316558e764e5cd88c SHA512 81058d1e31e7328dac1b3a83cb443b9d9f29593e872d189766c1dfe8b502965fd9ea7a962423e94d5053c99d8dd8c50bd98638c11631a2ca586fb9ade700284f
diff --git a/app-misc/ckb/ckb-0.4.0.ebuild b/app-misc/ckb/ckb-0.4.0.ebuild
new file mode 100644
index 000000000000..a0ae03736993
--- /dev/null
+++ b/app-misc/ckb/ckb-0.4.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop cmake-utils systemd
+
+DESCRIPTION="Corsair K65/K70/K95 Driver"
+HOMEPAGE="https://github.com/ckb-next/ckb-next"
+SRC_URI="https://github.com/ckb-next/ckb-next/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="
+ >=dev-libs/quazip-0.7.2[qt5(+)]
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ virtual/libudev:=
+ x11-libs/libX11
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( CHANGELOG.md README.md )
+PATCHES=( "${FILESDIR}/${P}-modprobe.patch" )
+S="${WORKDIR}/${PN}-next-${PV}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DDISABLE_UPDATER=yes
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/ckb.initd ckb-daemon
+ cmake-utils_src_install
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/app-misc/ckb/files/ckb-0.4.0-modprobe.patch b/app-misc/ckb/files/ckb-0.4.0-modprobe.patch
new file mode 100644
index 000000000000..31dc3303b328
--- /dev/null
+++ b/app-misc/ckb/files/ckb-0.4.0-modprobe.patch
@@ -0,0 +1,72 @@
+---
+ src/daemon/input_linux.c | 21 ++++++++++++++-------
+ src/gui/mainwindow.cpp | 14 ++++++++------
+ 2 files changed, 22 insertions(+), 13 deletions(-)
+
+diff --git a/src/daemon/input_linux.c b/src/daemon/input_linux.c
+index 0391243e..8489f5b5 100644
+--- a/src/daemon/input_linux.c
++++ b/src/daemon/input_linux.c
+@@ -55,13 +55,20 @@ int uinputopen(struct uinput_user_dev* indev, int mouse){
+ ///
+ /// Some tips on using [uinput_user_dev in](http://thiemonge.org/getting-started-with-uinput)
+ int os_inputopen(usbdevice* kb){
+- /// First check whether the uinput module is loaded by the kernel.
+- ///
+- // Load the uinput module (if it's not loaded already)
+- if(system("modprobe uinput") != 0) {
+- ckb_fatal("Failed to load uinput module\n");
+- return 1;
++ /// Let's see if uinput is already available
++ int fd = open("/dev/uinput", O_RDWR);
++ if(fd < 0){
++ fd = open("/dev/input/uinput", O_RDWR);
++ }
++
++ // If not available, load the module
++ if(fd < 0){
++ if(system("modprobe uinput") != 0) {
++ ckb_fatal("Failed to load uinput module\n");
++ return 1;
++ }
+ }
++ close(fd);
+
+ if(IS_SINGLE_EP(kb)) {
+ kb->uinput_kb = 0;
+@@ -79,7 +86,7 @@ int os_inputopen(usbdevice* kb){
+ indev.id.product = kb->product;
+ indev.id.version = kb->fwversion;
+ // Open keyboard
+- int fd = uinputopen(&indev, 0);
++ fd = uinputopen(&indev, 0);
+ kb->uinput_kb = fd;
+ if(fd <= 0)
+ return 0;
+diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
+index 968764e7..1eb95bda 100644
+--- a/src/gui/mainwindow.cpp
++++ b/src/gui/mainwindow.cpp
+@@ -282,14 +282,16 @@ void MainWindow::updateVersion(){
+ if(kextstatOut.isEmpty())
+ daemonWarning.append(tr("<br /><b>Warning:</b> System Extension by \"Fumihiko Takayama\" is not allowed in Security & Privacy. Please allow it and then unplug and replug your devices."));
+ #elif defined(Q_OS_LINUX)
+- QProcess modprobe;
+- modprobe.start("modprobe", QStringList("uinput"));
++ if(!(QFileInfo("/dev/uinput").exists() || QFileInfo("/dev/input/uinput").exists())){
++ QProcess modprobe;
++ modprobe.start("modprobe", QStringList("uinput"));
+
+- if(!modprobe.waitForFinished())
+- qDebug() << "Modprobe error";
++ if(!modprobe.waitForFinished())
++ qDebug() << "Modprobe error";
+
+- if(modprobe.exitCode())
+- daemonWarning.append(tr("<br /><b>Warning:</b> The uinput module could not be loaded. If this issue persists after rebooting, compile a kernel with CONFIG_INPUT_UINPUT=y."));
++ if(modprobe.exitCode())
++ daemonWarning.append(tr("<br /><b>Warning:</b> The uinput module could not be loaded. If this issue persists after rebooting, compile a kernel with CONFIG_INPUT_UINPUT=y."));
++ }
+ #endif
+ settingsWidget->setStatus(tr("No devices connected") + daemonWarning);
+ }
diff --git a/app-misc/ckb/metadata.xml b/app-misc/ckb/metadata.xml
index 2a82acaed1c4..dd1c6d1b01c8 100644
--- a/app-misc/ckb/metadata.xml
+++ b/app-misc/ckb/metadata.xml
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
<upstream>
<remote-id type="github">ccMSC/ckb</remote-id>
</upstream>