From patchwork Sun Jan 2 17:15:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 35890 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 D4F7927BBEA; Sun, 2 Jan 2022 17:16:34 +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 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 43FCA27BBE9 for ; Sun, 2 Jan 2022 17:16:34 +0000 (GMT) Received: from localhost ([::1]:49504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n44TB-0002Ev-AI for patchwork@mira.cbaines.net; Sun, 02 Jan 2022 12:16:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n44Sh-0002EO-Fr for guix-patches@gnu.org; Sun, 02 Jan 2022 12:16:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n44Sg-0000bH-GI for guix-patches@gnu.org; Sun, 02 Jan 2022 12:16:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n44Sg-0003Je-8y for guix-patches@gnu.org; Sun, 02 Jan 2022 12:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52960] [PATCH 1/2] gnu: Add hueplusplus. 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:16:02 +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.164114372612694 (code B ref 52960); Sun, 02 Jan 2022 17:16:02 +0000 Received: (at 52960) by debbugs.gnu.org; 2 Jan 2022 17:15:26 +0000 Received: from localhost ([127.0.0.1]:33574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n44S5-0003If-N7 for submit@debbugs.gnu.org; Sun, 02 Jan 2022 12:15:26 -0500 Received: from mail-4316.protonmail.ch ([185.70.43.16]:13303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n44S3-0003IQ-6o for 52960@debbugs.gnu.org; Sun, 02 Jan 2022 12:15:23 -0500 Date: Sun, 02 Jan 2022 17:15:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1641143716; bh=FLczIIml1WJnapW6V6jwZ6xIzsF+CRDmAC+kGgeKCjQ=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=nUFHMejDvb3FbWD+XqUzEwMQQBey+awXXnaQ2NPzAw51/wVDaeU7/q2hgj3ae+erf OwiYYdwFNQ2Wu7oERmQejweAjNHOnbctPsIEImD4SHacdAlwEhUM4ACYbyaAxWiORW RORvpf8199/2G3c30YN42FjFxx3/2sx8IQyNh3YuEzGwR8AzznbBNNXWkVkj0VXAtD fUz8Rplk6WbZHewDskyswuA7VjueL1/JFIkAAM1oq4vq0cSchQet488BWnrsTTUPeF PCjVsNNDtCcyhfGCKy1S6BcBDRBc6ZD3108sGHjiO5DTKvOBzJMOMXAbPLmYkxfdmA haJNGHBpKsWkg== Message-ID: 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 ea9b2e7650f0cae46912d23e598b6bcfd148a2bf Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Sun, 2 Jan 2022 11:38:03 -0500 Subject: [PATCH 1/2] gnu: Add hueplusplus. * gnu/packages/hardware.scm (hueplusplus): New variable. * gnu/packages/patches/hueplusplus-mbedtls.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/hardware.scm | 39 ++++++++++++++++++- .../patches/hueplusplus-mbedtls.patch | 20 ++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/hueplusplus-mbedtls.patch diff --git a/gnu/local.mk b/gnu/local.mk index 852f9f3246..b427edb4a4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1260,6 +1260,7 @@ dist_patch_DATA = \ %D%/packages/patches/helm-fix-gcc-9-build.patch \ %D%/packages/patches/http-parser-CVE-2020-8287.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ + %D%/packages/patches/hueplusplus-mbedtls.patch \ %D%/packages/patches/hurd-cross.patch \ %D%/packages/patches/hurd-xattr.patch \ %D%/packages/patches/hydra-disable-darcs-test.patch \ diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index 28647477fe..227a359adb 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2021 Petr Hodina ;;; Copyright © 2021 Raghav Gururajan ;;; Copyright © 2021 Vinicius Monego -;;; Copyright © 2021 John Kehayias +;;; Copyright © 2021, 2022 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -341,6 +341,43 @@ (define-public headsetcontrol battery state, controlling LEDs, and setting the inactive time.") (license license:gpl3+))) +(define-public hueplusplus + (package + (name "hueplusplus") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/enwi/hueplusplus") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1jy8m2a0h0kf0aw8jbniz069q9j7cx67b1zlv2vz1ymq921qk0pm")) + (patches + (search-patches "hueplusplus-mbedtls.patch")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f)) ;; Tests require Google's gtest and gmock + (inputs + (list mbedtls-apache)) + (synopsis "Simple C++ library to control Philips Hue lights") + (description "Hueplusplus is a simple and easy to use library for Philips Hue Lights. +Features: + +@itemize +@item find bridges with SSDP or set an ip manually +@item all common light functions (brightness, color, temperature) +@item extended @code{alert()} functions, which alert in a specific +color (good for notifications) +@item supports sensors, rules, groups, scenes and schedules +@item streaming with entertainment mode +@item documented with doxygen +@item tested with google test, google mock and gcov/lcov +@end itemize") + (home-page "https://github.com/enwi/hueplusplus") + (license license:lgpl3))) + (define-public i7z (let ((revision "0") (commit "1a41ff13db747e962456ddbb5ccb2b7fc43ca0cb")) diff --git a/gnu/packages/patches/hueplusplus-mbedtls.patch b/gnu/packages/patches/hueplusplus-mbedtls.patch new file mode 100644 index 0000000000..894590af8d --- /dev/null +++ b/gnu/packages/patches/hueplusplus-mbedtls.patch @@ -0,0 +1,20 @@ +Remove references to bundled mbedtls library to use the one from inputs. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e27d21..f0eb1a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -85,13 +85,6 @@ endif() + + set(USE_STATIC_MBEDTLS_LIBRARY ON) + set(USE_SHARED_MBEDTLS_LIBRARY OFF) +-add_subdirectory("lib/mbedtls" EXCLUDE_FROM_ALL) +- +-# Compile the mbedtls library as a static with position independent code, +-# because we need it for both a shared and static library +-set_property(TARGET mbedtls PROPERTY POSITION_INDEPENDENT_CODE ON) +-set_property(TARGET mbedcrypto PROPERTY POSITION_INDEPENDENT_CODE ON) +-set_property(TARGET mbedx509 PROPERTY POSITION_INDEPENDENT_CODE ON) + + add_subdirectory(src) + -- 2.34.0