From patchwork Sun Jan 2 17:16:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 35891 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 97ED427BBEA; Sun, 2 Jan 2022 17:17:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_PDS_PRO_TLD autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EA46827BBE9 for ; Sun, 2 Jan 2022 17:17:24 +0000 (GMT) Received: from localhost ([::1]:50122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n44U0-0002fO-4t for patchwork@mira.cbaines.net; Sun, 02 Jan 2022 12:17:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n44Te-0002d2-5b for guix-patches@gnu.org; Sun, 02 Jan 2022 12:17:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50267) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n44Td-0000oK-Q9 for guix-patches@gnu.org; Sun, 02 Jan 2022 12:17:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n44Td-0003Ll-NB for guix-patches@gnu.org; Sun, 02 Jan 2022 12:17:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52960] [PATCH 2/2] gnu: Add openrgb. References: <8kDa5BwxgvImH1twP-arHvnr2uWjd9fD1W1aps78RfNGeGGJHrssV32IjguzF08xnrg1Bu-jiqlt9A1dmVj02SP2qKesg6vQMcDQy7SB7Qs=@protonmail.com> In-Reply-To: <8kDa5BwxgvImH1twP-arHvnr2uWjd9fD1W1aps78RfNGeGGJHrssV32IjguzF08xnrg1Bu-jiqlt9A1dmVj02SP2qKesg6vQMcDQy7SB7Qs=@protonmail.com> Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Jan 2022 17:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52960 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "52960@debbugs.gnu.org" <52960@debbugs.gnu.org> Received: via spool by 52960-submit@debbugs.gnu.org id=B52960.164114380412848 (code B ref 52960); Sun, 02 Jan 2022 17:17:01 +0000 Received: (at 52960) by debbugs.gnu.org; 2 Jan 2022 17:16:44 +0000 Received: from localhost ([127.0.0.1]:33580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n44TM-0003LA-84 for submit@debbugs.gnu.org; Sun, 02 Jan 2022 12:16:44 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]:46910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n44TK-0003Ku-Pv for 52960@debbugs.gnu.org; Sun, 02 Jan 2022 12:16:43 -0500 Date: Sun, 02 Jan 2022 17:16:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1641143796; bh=wHazHrm4GmodZ65XV5WyGNYg/V3Ki8A1ylXE8fQ0ahM=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=v47LdeNbZgaGXfJIxq/R+VWkXopHM3CcbpQ70jcojHNc2L8jfiDqRIVrSwWx3egHU X2tf+LxKFCDIpHDTLJQbQs6jnqRHBJFYesCU07ZZnk3Zzxua4d0gRCb9D8w+87zhoZ 4FmpjV8gPCYZ+hjvCOnvjLGM6wA3QkDS/oHnIY6R7Uzd9atmouEJ+2sQTDac4ud15L fhDiJ9Ex7ao+O0wNjuyVbz81focfq+EnBhXhJVEx24iUWgCLVI3etg6qp5tW55+Z1E 2/dq+334YLaCIjbOwAuUfmJU+KecihxBU2bRYj/QrFlPEcp4sXu1TxJrd5V9m0siIY hdB7uZtFQapDg== Message-ID: <5qKkTt1McZS-UbTwU5kWWoWP9ITNBOXiPGzPszfABZ5JfEQwS99cu-8rV-8X6U7P9gywqc5v8pQkF6nio8dhyIyN1lGq57LKUSD2vZF5vKw=@protonmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias X-getmail-retrieved-from-mailbox: Patches Empty Message From a94e57199dfe0fa9c3b11d5b6075f7be25105f74 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Sun, 2 Jan 2022 11:55:27 -0500 Subject: [PATCH 2/2] 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. --- gnu/local.mk | 1 + gnu/packages/hardware.scm | 69 +++++++++++++++++++ .../openrgb-unbundle-hueplusplus.patch | 58 ++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 gnu/packages/patches/openrgb-unbundle-hueplusplus.patch diff --git a/gnu/local.mk b/gnu/local.mk index b427edb4a4..a162275eca 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1559,6 +1559,7 @@ dist_patch_DATA = \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openssh-hurd.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/openssl-runpath.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index 227a359adb..a146132b04 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -651,6 +651,75 @@ (define-public openhmd technology, such as head mounted displays with built in head tracking.") (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 + `(#:tests? #f ; doesn't have tests + #: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") + (search-input-directory inputs "include/hueplusplus")) + (("dependencies/json") + (search-input-directory inputs "include/nlohmann"))))) + ;; Call qmake instead of configure to create a Makefile. + (replace 'configure + (lambda _ (invoke "qmake" "PREFIX=/" "OpenRGB.pro")))) + #:make-flags + (list (string-append "INSTALL_ROOT=" (assoc-ref %outputs "out"))))) + (inputs + (list hidapi + hueplusplus + json-modern-cxx + libusb + mbedtls-apache + qtbase-5)) + (native-inputs + (list pkg-config)) + (synopsis "Open source 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 (package (name "wavemon") diff --git a/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch b/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch new file mode 100644 index 0000000000..7454e1efbe --- /dev/null +++ b/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch @@ -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 \ -- 2.34.0