summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/ckb')
-rw-r--r--app-misc/ckb/Manifest3
-rw-r--r--app-misc/ckb/ckb-0.6.0-r1.ebuild (renamed from app-misc/ckb/ckb-0.4.4.ebuild)49
-rw-r--r--app-misc/ckb/ckb-0.6.0-r2.ebuild77
-rw-r--r--app-misc/ckb/ckb-9999.ebuild (renamed from app-misc/ckb/ckb-0.4.3-r2.ebuild)47
-rw-r--r--app-misc/ckb/files/ckb-0.6.0-fix-bashism.patch16
-rw-r--r--app-misc/ckb/files/ckb-0.6.0-odr.patch32
-rw-r--r--app-misc/ckb/files/ckb.initd29
-rw-r--r--app-misc/ckb/metadata.xml8
8 files changed, 193 insertions, 68 deletions
diff --git a/app-misc/ckb/Manifest b/app-misc/ckb/Manifest
index 25b8c7424c1a..ceef690989a2 100644
--- a/app-misc/ckb/Manifest
+++ b/app-misc/ckb/Manifest
@@ -1,2 +1 @@
-DIST ckb-0.4.3.tar.gz 1588845 BLAKE2B bdf11580c8224dfe0a7d01f99e3bea1d36fa3d7c1de84ec991ee4454c838db614bd74757ec3b952d28ab672244bb4c28888f6b80366255cfb57ec37ff8742c1d SHA512 6772812fb9608251f3a14efeb16960966be446462ab3f5b1bec896761aeae9e5f5cf9c07b21e509dbef057825c3017323f82f066519cb512ebe2fc6eea6ec217
-DIST ckb-0.4.4.tar.gz 1593244 BLAKE2B 99476d3be98b3edac540b67b275a1ebec440f2a55d8bedd9bbdc815abd15bbeb3d035c703faa2dfdf9f4dcb70f49024c82b2990b1151b0ad5b78b741430d80f9 SHA512 b03d301a6b984957b5a3047769f25311c479f7992c59222b0ce9314b3204dac2d937c26997b97ec2ee1fdc79e3208c76a57a5c603dc1cd99ffb39fd426f58385
+DIST ckb-0.6.0.tar.gz 1835972 BLAKE2B a6d905cf4a62e9395e008628a2b585681f4fa4af52305a11e49d2f00db990a966be79f97e0ae684031a45bf77b372548b64e2b0f87e344eaa0eb67c07117f89c SHA512 34236199d420b663bb71db9400622bb868a3a0b384b58d5da3f80d2bd7ec9586d4e4ac9caad0b047b8440dc4200e4dd6077f4e0d1edb5a75a1327bf9c9ba9392
diff --git a/app-misc/ckb/ckb-0.4.4.ebuild b/app-misc/ckb/ckb-0.6.0-r1.ebuild
index 296ba6dabec8..ff1d9c5f596f 100644
--- a/app-misc/ckb/ckb-0.4.4.ebuild
+++ b/app-misc/ckb/ckb-0.6.0-r1.ebuild
@@ -1,40 +1,53 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit xdg cmake
+inherit cmake udev xdg
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"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ckb-next/ckb-next.git"
+else
+ SRC_URI="https://github.com/ckb-next/ckb-next/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64"
+ S="${WORKDIR}/${PN}-next-${PV}"
+fi
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64"
+IUSE="systemd"
RDEPEND="
dev-libs/libdbusmenu-qt
- dev-libs/quazip:0=
+ dev-libs/quazip:0=[qt5(+)]
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtwidgets:5
dev-qt/qtx11extras:5
- media-sound/pulseaudio
+ || (
+ media-libs/libpulse
+ media-sound/apulse[sdk]
+ )
virtual/libudev:=
- x11-libs/libX11
x11-libs/libxcb:=
x11-libs/xcb-util-wm"
DEPEND="${RDEPEND}"
BDEPEND="dev-qt/linguist-tools:5"
-S="${WORKDIR}/${PN}-next-${PV}"
+PATCHES=(
+ "${FILESDIR}/${P}-fix-bashism.patch"
+)
src_configure() {
local mycmakeargs=(
-DDISABLE_UPDATER=yes
+ -DFORCE_INIT_SYSTEM=$(usex systemd systemd openrc)
)
cmake_src_configure
}
@@ -42,18 +55,22 @@ src_configure() {
src_install() {
cmake_src_install
dodoc CHANGELOG.md
-
- newinitd "${FILESDIR}"/ckb.initd ckb-daemon
}
pkg_postinst() {
+ udev_reload
+
if [[ -z "${REPLACING_VERSIONS}" ]]; then
elog "The ckb daemon will have to be started before use:"
elog
- elog "OpenRC:"
- elog "# rc-service ckb start"
- elog
- elog "Systemd:"
- elog "# systemctl start ckb-next-daemon"
+ if use systemd ; then
+ elog "# systemctl start ckb-next-daemon"
+ else
+ elog "# rc-config start ckb-next-daemon"
+ fi
fi
}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-misc/ckb/ckb-0.6.0-r2.ebuild b/app-misc/ckb/ckb-0.6.0-r2.ebuild
new file mode 100644
index 000000000000..c70828a260ad
--- /dev/null
+++ b/app-misc/ckb/ckb-0.6.0-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake udev xdg
+
+DESCRIPTION="Corsair K65/K70/K95 Driver"
+HOMEPAGE="https://github.com/ckb-next/ckb-next"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ckb-next/ckb-next.git"
+else
+ SRC_URI="https://github.com/ckb-next/ckb-next/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/${PN}-next-${PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="systemd"
+
+RDEPEND="
+ dev-libs/libdbusmenu-qt
+ dev-libs/quazip:0=[qt5(+)]
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ || (
+ media-libs/libpulse
+ media-sound/apulse[sdk]
+ )
+ virtual/libudev:=
+ x11-libs/libxcb:=
+ x11-libs/xcb-util-wm"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-qt/linguist-tools:5"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-bashism.patch"
+ "${FILESDIR}/${P}-odr.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DDISABLE_UPDATER=yes
+ -DFORCE_INIT_SYSTEM=$(usex systemd systemd openrc)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ dodoc CHANGELOG.md
+}
+
+pkg_postinst() {
+ udev_reload
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "The ckb daemon will have to be started before use:"
+ elog
+ if use systemd ; then
+ elog "# systemctl start ckb-next-daemon"
+ else
+ elog "# rc-config start ckb-next-daemon"
+ fi
+ fi
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-misc/ckb/ckb-0.4.3-r2.ebuild b/app-misc/ckb/ckb-9999.ebuild
index 296ba6dabec8..278944d48117 100644
--- a/app-misc/ckb/ckb-0.4.3-r2.ebuild
+++ b/app-misc/ckb/ckb-9999.ebuild
@@ -1,40 +1,49 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit xdg cmake
+inherit cmake udev xdg
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"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ckb-next/ckb-next.git"
+else
+ SRC_URI="https://github.com/ckb-next/ckb-next/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/${PN}-next-${PV}"
+fi
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64"
+IUSE="systemd"
RDEPEND="
dev-libs/libdbusmenu-qt
- dev-libs/quazip:0=
+ dev-libs/quazip:0=[qt5(+)]
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtwidgets:5
dev-qt/qtx11extras:5
- media-sound/pulseaudio
+ || (
+ media-libs/libpulse
+ media-sound/apulse[sdk]
+ )
virtual/libudev:=
- x11-libs/libX11
x11-libs/libxcb:=
x11-libs/xcb-util-wm"
DEPEND="${RDEPEND}"
BDEPEND="dev-qt/linguist-tools:5"
-S="${WORKDIR}/${PN}-next-${PV}"
-
src_configure() {
local mycmakeargs=(
-DDISABLE_UPDATER=yes
+ -DFORCE_INIT_SYSTEM=$(usex systemd systemd openrc)
)
cmake_src_configure
}
@@ -42,18 +51,22 @@ src_configure() {
src_install() {
cmake_src_install
dodoc CHANGELOG.md
-
- newinitd "${FILESDIR}"/ckb.initd ckb-daemon
}
pkg_postinst() {
+ udev_reload
+
if [[ -z "${REPLACING_VERSIONS}" ]]; then
elog "The ckb daemon will have to be started before use:"
elog
- elog "OpenRC:"
- elog "# rc-service ckb start"
- elog
- elog "Systemd:"
- elog "# systemctl start ckb-next-daemon"
+ if use systemd ; then
+ elog "# systemctl start ckb-next-daemon"
+ else
+ elog "# rc-config start ckb-next-daemon"
+ fi
fi
}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-misc/ckb/files/ckb-0.6.0-fix-bashism.patch b/app-misc/ckb/files/ckb-0.6.0-fix-bashism.patch
new file mode 100644
index 000000000000..8cdc2aa59a0e
--- /dev/null
+++ b/app-misc/ckb/files/ckb-0.6.0-fix-bashism.patch
@@ -0,0 +1,16 @@
+From https://github.com/ckb-next/ckb-next/commit/76a47f95b442a1ae5a9c7448566eaafd8863ca8d
+From: Willow Barraco <contact@willowbarraco.fr>
+Date: Wed, 19 Jul 2023 09:38:09 +0200
+Subject: [PATCH] Fix ckb-next-daemon OpenRC service file
+
+--- a/linux/openrc/ckb-next-daemon.in
++++ b/linux/openrc/ckb-next-daemon.in
+@@ -7,4 +7,4 @@ command="@CMAKE_INSTALL_PREFIX@/bin/ckb-next-daemon"
+ description="Corsair Keyboards and Mice Daemon"
+ pidfile="/dev/input/ckb0/pid"
+ logfile="/var/log/${RC_SVCNAME}.log"
+-start_stop_daemon_args+="--background --stdout ${logfile} --stderr ${logfile}"
++start_stop_daemon_args="$start_stop_daemon_args --background --stdout ${logfile} --stderr ${logfile}"
+--
+2.43.0
+
diff --git a/app-misc/ckb/files/ckb-0.6.0-odr.patch b/app-misc/ckb/files/ckb-0.6.0-odr.patch
new file mode 100644
index 000000000000..9547fe4edaf9
--- /dev/null
+++ b/app-misc/ckb/files/ckb-0.6.0-odr.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/924410
+
+From c5b68a00867b2add28bfd62430c45781ac2e9cb8 Mon Sep 17 00:00:00 2001
+From: John Helmert III <ajak@gentoo.org>
+Date: Fri, 16 Feb 2024 22:14:24 -0800
+Subject: [PATCH] ckbsettingswriter: mirror QT version guards from ckbsettings
+
+The differing definitions between ckbsettingswriter.cpp and
+ckbsettings.cpp trigger compilation errors with -Werror=odr.
+
+Signed-off-by: John Helmert III <ajak@gentoo.org>
+--- a/src/gui/ckbsettingswriter.cpp
++++ b/src/gui/ckbsettingswriter.cpp
+@@ -1,9 +1,18 @@
+ #include "ckbsettingswriter.h"
++
++#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
++#include <QRecursiveMutex>
++#else
+ #include <QMutex>
++#endif
+
+ // Mirror ckbsettings.cpp
+ extern QAtomicInt cacheWritesInProgress;
++#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
++extern QRecursiveMutex settingsMutex, settingsCacheMutex;
++#else
+ extern QMutex settingsMutex, settingsCacheMutex;
++#endif
+ #define lockMutex QMutexLocker locker(backing == _globalSettings ? &mutex : 0)
+ #define lockMutexStatic QMutexLocker locker(&settingsMutex)
+ #define lockMutexStatic2 QMutexLocker locker2(&settingsMutex)
diff --git a/app-misc/ckb/files/ckb.initd b/app-misc/ckb/files/ckb.initd
deleted file mode 100644
index 76af0fd8438b..000000000000
--- a/app-misc/ckb/files/ckb.initd
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/sbin/openrc-run
-## Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_started_commands="reload"
-command="/usr/bin/ckb-daemon"
-description="Controller for Corsair Keyboard Driver"
-pidfile="/run/ckb.pid"
-logfile="/var/run/ckb.log"
-
-start() {
- ebegin "Starting Corsair Keyboard Driver"
- start-stop-daemon --start --exec "${command}" --pidfile "${pidfile}" --background \
- --stdout "${logfile}" --stderr "${logfile}"
- eend $?
-}
-
-stop() {
- ebegin "Stopping Corsair Keyboard Driver"
- start-stop-daemon --stop --exec "${command}" --pidfile "${pidfile}"
- eend $?
-
-}
-
-reload() {
- stop
- sleep 3
- start
-}
diff --git a/app-misc/ckb/metadata.xml b/app-misc/ckb/metadata.xml
index dd1c6d1b01c8..3eca60ac4892 100644
--- a/app-misc/ckb/metadata.xml
+++ b/app-misc/ckb/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>chainsaw@gentoo.org</email>
- <name>Tony Vroon</name>
+ <email>ajak@gentoo.org</email>
+ <name>John Helmert III</name>
</maintainer>
<upstream>
- <remote-id type="github">ccMSC/ckb</remote-id>
+ <remote-id type="github">ckb-next/ckb-next</remote-id>
</upstream>
</pkgmetadata>