summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>2020-11-29 14:52:12 +0100
committerDavid Seifert <soap@gentoo.org>2020-11-29 14:52:12 +0100
commit4dd504abf0b68bc12d394045501d5626eaa91d5c (patch)
tree438986b66a56df0691ffcd575abe9d5ba8bd508c
parentnet-news/newsboat: clean old (diff)
downloadgentoo-4dd504abf0b68bc12d394045501d5626eaa91d5c.tar.gz
gentoo-4dd504abf0b68bc12d394045501d5626eaa91d5c.tar.bz2
gentoo-4dd504abf0b68bc12d394045501d5626eaa91d5c.zip
app-misc/ckb: fixes to package
* Migrate cmake-utils to cmake eclass * fix GCC10 compilation (#715046, thanks to Erik Zeek <zeekec@gmail.com>) Closes: https://bugs.gentoo.org/715046 Package-Manager: Portage-2.3.99, Repoman-2.3.23 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--app-misc/ckb/ckb-0.4.2-r1.ebuild42
-rw-r--r--app-misc/ckb/files/ckb-0.4.2-gcc10.patch28
2 files changed, 70 insertions, 0 deletions
diff --git a/app-misc/ckb/ckb-0.4.2-r1.ebuild b/app-misc/ckb/ckb-0.4.2-r1.ebuild
new file mode 100644
index 00000000000..5dcd46ea00a
--- /dev/null
+++ b/app-misc/ckb/ckb-0.4.2-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit xdg cmake
+
+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"
+
+RDEPEND="
+ >=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"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}-next-${PV}"
+
+PATCHES=( "${FILESDIR}"/${P}-gcc10.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ -DDISABLE_UPDATER=yes
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ dodoc CHANGELOG.md
+
+ newinitd "${FILESDIR}"/ckb.initd ckb-daemon
+}
diff --git a/app-misc/ckb/files/ckb-0.4.2-gcc10.patch b/app-misc/ckb/files/ckb-0.4.2-gcc10.patch
new file mode 100644
index 00000000000..e070471cdc0
--- /dev/null
+++ b/app-misc/ckb/files/ckb-0.4.2-gcc10.patch
@@ -0,0 +1,28 @@
+From a9f41cd8b8f5b04c0c66c6d94f96a9725943831e Mon Sep 17 00:00:00 2001
+From: Erik Zeek <zeekec@gmail.com>
+Date: Tue, 12 May 2020 09:56:49 -0600
+Subject: [PATCH] Fix gcc-10/-fno-common error
+
+gcc-10 now defaults to -fno-common and does not automatically add extern
+to variables declared in headers.
+
+https://gcc.gnu.org/gcc-10/porting_to.html
+
+Signed-off-by: Erik Zeek <zeekec@gmail.com>
+---
+ src/daemon/devnode.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon/devnode.h b/src/daemon/devnode.h
+index a0b3a931..349e778d 100644
+--- a/src/daemon/devnode.h
++++ b/src/daemon/devnode.h
+@@ -5,7 +5,7 @@
+ #include "usb.h"
+
+ /// Device path base ("/dev/input/ckb" or "/var/run/ckb")
+-const char *const devpath;
++extern const char *const devpath;
+
+ /// Group ID for the control nodes. -1 to give read/write access to everybody
+ extern long gid;