This commit is contained in:
2025-03-17 14:52:18 +01:00
parent 3f4ae21918
commit cdc3b11bb1
17 changed files with 307 additions and 1 deletions

View File

@ -0,0 +1 @@
DIST OpenRGB-release_0.9.tar.bz2 28689813 BLAKE2B 9fcf08d5e4d07ffc0f7867516f09044e18ce488bcdd99c8b44e0afe291b8a21a7ba92d6e7fd683ef22462a262004a992621efb59a5df6ed7551f4e9f75843241 SHA512 fb1bdbc7bcbd3bac888be313cfb6403a13d39de659ac6993858f9c1b17ad40e9c4a7d4c7c90682181841db1659a0ee298363c442a7120d43347aaf4485e7dccf

View File

@ -0,0 +1,15 @@
Don't install udev rules
This is handled by udev eclass instead
--- a/OpenRGB.pro
+++ b/OpenRGB.pro
@@ -1246,7 +1246,5 @@ unix:!macx {
icon.files+=qt/OpenRGB.png
metainfo.path=$$PREFIX/share/metainfo/
metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml
- rules.path=$$PREFIX/lib/udev/rules.d/
- rules.files+=60-openrgb.rules
INSTALLS += target desktop icon metainfo rules
}
GitLab

View File

@ -0,0 +1,12 @@
--- a/OpenRGB.pro
+++ b/OpenRGB.pro
@@ -46,9 +46,6 @@ TEMPLATE = app
#-----------------------------------------------------------------------------------------------#
win32:BUILDDATE = $$system(date /t)
unix:BUILDDATE = $$system(date -R -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}")
-GIT_COMMIT_ID = $$system(git log -n 1 --pretty=format:"%H")
-GIT_COMMIT_DATE = $$system(git log -n 1 --pretty=format:"%ci")
-GIT_BRANCH = $$system(git branch --show-current)
DEFINES += \
VERSION_STRING=\\"\"\"$$VERSION\\"\"\" \

View File

@ -0,0 +1,33 @@
diff --git a/Controllers/SteelSeriesController/SteelSeriesControllerDetect.cpp b/Controllers/SteelSeriesController/SteelSeriesControllerDetect.cpp
index 84a81bd5..f9733c0c 100644
--- a/Controllers/SteelSeriesController/SteelSeriesControllerDetect.cpp
+++ b/Controllers/SteelSeriesController/SteelSeriesControllerDetect.cpp
@@ -74,6 +74,7 @@
#define STEELSERIES_QCK_PRISM_CLOTH_XL_PID 0x150D
#define STEELSERIES_QCK_PRISM_CLOTH_XL_DESTINY_PID 0x151E
#define STEELSERIES_QCK_PRISM_CLOTH_XL_CSGO_NEON_RIDER_PID 0x1514
+#define STEELSERIES_QCK_PRISM_CLOTH_NEO_NOIR_EDITION 0x151C
#define STEELSERIES_QCK_PRISM_CLOTH_3XL_PID 0x1516
#define STEELSERIES_QCK_PRISM_CLOTH_4XL_PID 0x1518
/*-----------------------------------------------------*\
@@ -341,6 +342,7 @@ REGISTER_HID_DETECTOR_I("SteelSeries QCK Prism Cloth Medium",
REGISTER_HID_DETECTOR_I("SteelSeries QCK Prism Cloth XL", DetectSteelSeriesMousemat, STEELSERIES_VID, STEELSERIES_QCK_PRISM_CLOTH_XL_PID, 0 );
REGISTER_HID_DETECTOR_I("SteelSeries QCK Prism Cloth XL Destiny Ed.", DetectSteelSeriesMousemat, STEELSERIES_VID, STEELSERIES_QCK_PRISM_CLOTH_XL_DESTINY_PID, 0 );
REGISTER_HID_DETECTOR_I("SteelSeries QCK Prism Cloth XL CS:GO Neon Rider Ed.", DetectSteelSeriesMousemat, STEELSERIES_VID, STEELSERIES_QCK_PRISM_CLOTH_XL_CSGO_NEON_RIDER_PID, 0 );
+REGISTER_HID_DETECTOR_I("SteelSeries QCK Prism Cloth Neo Noir Edition", DetectSteelSeriesMousemat, STEELSERIES_VID, STEELSERIES_QCK_PRISM_CLOTH_NEO_NOIR_EDITION, 0 );
REGISTER_HID_DETECTOR_I("SteelSeries QCK Prism Cloth 3XL", DetectSteelSeriesMousemat, STEELSERIES_VID, STEELSERIES_QCK_PRISM_CLOTH_3XL_PID, 0 );
REGISTER_HID_DETECTOR_I("SteelSeries QCK Prism Cloth 4XL", DetectSteelSeriesMousemat, STEELSERIES_VID, STEELSERIES_QCK_PRISM_CLOTH_4XL_PID, 0 );
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------*\
diff --git a/scripts/build-udev-rules.sh b/scripts/build-udev-rules.sh
index 07fae703..8c1c6a97 100755
--- a/scripts/build-udev-rules.sh
+++ b/scripts/build-udev-rules.sh
@@ -101,7 +101,7 @@ do
pid=${pid/0x/}
device_name=${device_name//[^[:alnum:][:blank:]]/}
- udev_line=$(printf 'SUBSYSTEMS=="%s|hidraw", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", TAG+="uaccess", TAG+="%s"\n' ${type,,} ${vid,,} ${pid,,} ${device_name// /_})
+ udev_line=$(printf 'SUBSYSTEMS=="%s|hidraw", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", TAG+="uaccess", GROUP="plugdev", TAG+="%s"\n' ${type,,} ${vid,,} ${pid,,} ${device_name// /_})
#Check to ensure that the vid and pid are not blank
if [[ $vid = "" || $pid = "" ]]; then

View File

@ -0,0 +1,12 @@
We install udev to /lib/udev instead, which it doesn't check
--- a/ResourceManager.cpp
+++ b/ResourceManager.cpp
@@ -895,7 +895,6 @@ void ResourceManager::DetectDevicesThreadFunction()
{
if(access("/usr/lib/udev/rules.d/60-openrgb.rules", F_OK) != 0)
{
- udev_not_exist = true;
}
}
else

View File

@ -0,0 +1,105 @@
# Copyright 2020-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit check-reqs flag-o-matic qmake-utils udev xdg-utils
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI=${EGIT_REPO_URI:-"https://gitlab.com/CalcProgrammer1/OpenRGB"}
else
SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_${PV}/OpenRGB-release_${PV}.tar.bz2"
S="${WORKDIR}/OpenRGB-release_${PV}"
KEYWORDS="amd64 ~loong ~x86"
PATCHES=(
"${FILESDIR}"/OpenRGB-0.9-build-system.patch
"${FILESDIR}"/OpenRGB-0.9-steelseries_neo_noir_edition.patch
)
fi
DESCRIPTION="Open source RGB lighting control"
HOMEPAGE="https://openrgb.org https://gitlab.com/CalcProgrammer1/OpenRGB/"
LICENSE="GPL-2"
# subslot is OPENRGB_PLUGIN_API_VERSION from
# https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGBPluginInterface.h
SLOT="0/3"
RDEPEND="
dev-cpp/cpp-httplib:=
dev-libs/hidapi
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
net-libs/mbedtls:0=
virtual/libusb:1
"
DEPEND="
${RDEPEND}
dev-cpp/nlohmann_json
dev-libs/mdns
"
BDEPEND="
dev-qt/linguist-tools:5
virtual/pkgconfig
"
PATCHES+=(
"${FILESDIR}"/OpenRGB-0.7-r1-udev.patch
"${FILESDIR}"/OpenRGB-0.9-udev-check.patch
)
CHECKREQS_DISK_BUILD="2G"
src_prepare() {
default
rm -r dependencies/{httplib,hidapi,libusb,mdns,json,mbedtls}* \
|| die "Failed to remove unneded deps"
}
src_configure() {
# Some plugins require symbols defined in the main binary.
# The upstream build system of plugins bundles OpenRGB as a submodule
# instead, and compiles the .cpp file again.
append-ldflags -Wl,--export-dynamic
# > warning: -pipe ignored because -save-temps specified
filter-flags -pipe
# cpp-httplib >=0.16.0 changed the library name from "httplib" to "cpp-httplib".
# See bug: https://bugs.gentoo.org/934576
local -a libs=()
if has_version "<dev-cpp/cpp-httplib-0.16.0" ; then
libs+=( -lhttplib )
else
libs+=( -lcpp-httplib )
fi
eqmake5 \
INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
DEFINES+="OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" \
LIBS+="${libs[@]}"
}
src_install() {
emake INSTALL_ROOT="${ED}" install
dodoc README.md OpenRGB.patch
rm -r "${ED}"/usr/lib/udev/ || die
udev_dorules 60-openrgb.rules
# This is for plugins. Upstream doesn't install any headers at all.
insinto /usr/include/OpenRGB
find . -name '*.h' -exec cp --parents '{}' "${ED}/usr/include/OpenRGB/" ';' || die
}
pkg_postinst() {
xdg_icon_cache_update
udev_reload
}
pkg_postrm() {
xdg_icon_cache_update
udev_reload
}