me
/
guix
Archived
1
0
Fork 0

gnu: Add openrgb.

* gnu/packages/hardware.scm (openrgb): New variable.
* gnu/packages/patches/openrgb-unbundle-hueplusplus.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Leo Famulari <leo@famulari.name>
master
John Kehayias 2022-01-02 11:55:27 -05:00 committed by Leo Famulari
parent fb8568857f
commit b1cf1d44f4
No known key found for this signature in database
GPG Key ID: 2646FA30BACA7F08
3 changed files with 132 additions and 0 deletions

View File

@ -1560,6 +1560,7 @@ dist_patch_DATA = \
%D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \
%D%/packages/patches/openssh-hurd.patch \ %D%/packages/patches/openssh-hurd.patch \
%D%/packages/patches/openresolv-restartcmd-guix.patch \ %D%/packages/patches/openresolv-restartcmd-guix.patch \
%D%/packages/patches/openrgb-unbundle-hueplusplus.patch \
%D%/packages/patches/opensles-add-license-file.patch \ %D%/packages/patches/opensles-add-license-file.patch \
%D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-runpath.patch \
%D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \

View File

@ -65,6 +65,7 @@
#:use-module (guix build-system meson) #:use-module (guix build-system meson)
#:use-module (guix build-system python) #:use-module (guix build-system python)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix svn-download) #:use-module (guix svn-download)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
@ -650,6 +651,78 @@ be dangerous and may void your CPU or system board's warranty.")
technology, such as head mounted displays with built in head tracking.") technology, such as head mounted displays with built in head tracking.")
(license license:boost1.0))) (license license:boost1.0)))
(define-public openrgb
(package
(name "openrgb")
(version "0.7")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.com/CalcProgrammer1/OpenRGB")
(commit (string-append "release_" version))))
(file-name (git-file-name name version))
(sha256
(base32 "0xhfaz0b74nfnh7il2cz5c0338xlzay00g6hc2h3lsncarj8d5n7"))
(patches
(search-patches "openrgb-unbundle-hueplusplus.patch"))
(modules '((guix build utils)))
(snippet
'(begin
;; Delete the bundled hueplusplus and json libraries.
(delete-file-recursively "dependencies/hueplusplus-1.0.0")
(delete-file-recursively "dependencies/json")))))
(build-system cmake-build-system)
(arguments
(list
#:tests? #f ; doesn't have tests
#:make-flags
#~(list (string-append "INSTALL_ROOT=" #$output ))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'unbundle
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "OpenRGB.pro"
(("dependencies/hueplusplus-1.0.0/include/hueplusplus")
(string-append #$(this-package-input "hueplusplus")
"/include/hueplusplus"))
(("dependencies/json")
(string-append #$(this-package-input "json-modern-cxx")
"/include/nlohmann")))))
;; Call qmake instead of configure to create a Makefile.
(replace 'configure
(lambda _ (invoke "qmake" "PREFIX=/" "OpenRGB.pro"))))))
(inputs
(list hidapi
hueplusplus
json-modern-cxx
libusb
mbedtls-apache
qtbase-5))
(native-inputs
(list pkg-config))
(synopsis "RGB lighting control")
(description
"OpenRGB is lighting control that doesn't depend on manufacturer software.
ASUS, ASRock, Corsair, G.Skill, Gigabyte, HyperX, MSI, Razer, ThermalTake, and more
supported.
Features:
@itemize
@item Set colors and select effect modes for a wide variety of RGB hardware
@item Save and load profiles
@item Control lighting from third party software using the OpenRGB SDK
@item Command line interface
@item Connect multiple instances of OpenRGB to synchronize lighting across multiple PCs
@item Can operate standalone or in a client/headless server configuration
@item View device information
@item No official/manufacturer software required
@item Graphical view of device LEDs makes creating custom patterns easy
@end itemize")
(home-page "https://openrgb.org/")
(license license:gpl2))) ; Included libccmmk is lgpl3+, CRC is bsd-3
(define-public wavemon (define-public wavemon
(package (package
(name "wavemon") (name "wavemon")

View File

@ -0,0 +1,58 @@
Remove references to hueplusplus in order to unbundle and use the input package.
diff --git a/OpenRGB.pro b/OpenRGB.pro
index 61758892..8702d998 100644
--- a/OpenRGB.pro
+++ b/OpenRGB.pro
@@ -493,35 +493,6 @@ SOURCES +=
dependencies/Swatches/swatches.cpp \
dependencies/dmiinfo.cpp \
dependencies/ColorWheel/ColorWheel.cpp \
- dependencies/hueplusplus-1.0.0/src/Action.cpp \
- dependencies/hueplusplus-1.0.0/src/APICache.cpp \
- dependencies/hueplusplus-1.0.0/src/BaseDevice.cpp \
- dependencies/hueplusplus-1.0.0/src/BaseHttpHandler.cpp \
- dependencies/hueplusplus-1.0.0/src/Bridge.cpp \
- dependencies/hueplusplus-1.0.0/src/BridgeConfig.cpp \
- dependencies/hueplusplus-1.0.0/src/CLIPSensors.cpp \
- dependencies/hueplusplus-1.0.0/src/ColorUnits.cpp \
- dependencies/hueplusplus-1.0.0/src/EntertainmentMode.cpp \
- dependencies/hueplusplus-1.0.0/src/ExtendedColorHueStrategy.cpp \
- dependencies/hueplusplus-1.0.0/src/ExtendedColorTemperatureStrategy.cpp \
- dependencies/hueplusplus-1.0.0/src/Group.cpp \
- dependencies/hueplusplus-1.0.0/src/HueCommandAPI.cpp \
- dependencies/hueplusplus-1.0.0/src/HueDeviceTypes.cpp \
- dependencies/hueplusplus-1.0.0/src/HueException.cpp \
- dependencies/hueplusplus-1.0.0/src/Light.cpp \
- dependencies/hueplusplus-1.0.0/src/ModelPictures.cpp \
- dependencies/hueplusplus-1.0.0/src/NewDeviceList.cpp \
- dependencies/hueplusplus-1.0.0/src/Scene.cpp \
- dependencies/hueplusplus-1.0.0/src/Schedule.cpp \
- dependencies/hueplusplus-1.0.0/src/Sensor.cpp \
- dependencies/hueplusplus-1.0.0/src/SimpleBrightnessStrategy.cpp \
- dependencies/hueplusplus-1.0.0/src/SimpleColorHueStrategy.cpp \
- dependencies/hueplusplus-1.0.0/src/SimpleColorTemperatureStrategy.cpp \
- dependencies/hueplusplus-1.0.0/src/StateTransaction.cpp \
- dependencies/hueplusplus-1.0.0/src/TimePattern.cpp \
- dependencies/hueplusplus-1.0.0/src/UPnP.cpp \
- dependencies/hueplusplus-1.0.0/src/Utils.cpp \
- dependencies/hueplusplus-1.0.0/src/ZLLSensors.cpp \
dependencies/libe131/src/e131.c \
dependencies/libcmmk/src/libcmmk.c \
main.cpp \
@@ -1188,6 +1159,7 @@ unix:!macx {
-lmbedx509 \
-lmbedtls \
-lmbedcrypto \
+ -lhueplusplusshared \
COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion")
if (!versionAtLeast(COMPILER_VERSION, "9")) {
@@ -1218,7 +1190,6 @@ unix:!macx {
}
SOURCES += \
- dependencies/hueplusplus-1.0.0/src/LinHttpHandler.cpp \
i2c_smbus/i2c_smbus_linux.cpp \
serial_port/find_usb_serial_port_linux.cpp \
AutoStart/AutoStart-Linux.cpp \