Skip to content

Commit

Permalink
app-misc/ckb: fixes to package
Browse files Browse the repository at this point in the history
* Migrate cmake-utils to cmake eclass
* fix GCC10 compilation (#715046, thanks to Erik Zeek <[email protected]>)

Closes: https://bugs.gentoo.org/715046
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Azamat H. Hackimov <[email protected]>
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
winterheart authored and SoapGentoo committed Nov 29, 2020
1 parent 9759347 commit 4dd504a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
42 changes: 42 additions & 0 deletions app-misc/ckb/ckb-0.4.2-r1.ebuild
Original file line number Diff line number Diff line change
@@ -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
}
28 changes: 28 additions & 0 deletions app-misc/ckb/files/ckb-0.4.2-gcc10.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From a9f41cd8b8f5b04c0c66c6d94f96a9725943831e Mon Sep 17 00:00:00 2001
From: Erik Zeek <[email protected]>
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 <[email protected]>
---
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;

0 comments on commit 4dd504a

Please sign in to comment.