From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mM+WEDQmxWAi5AAAgWs5BA (envelope-from ) for ; Sat, 12 Jun 2021 23:25:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gKojDDQmxWCONgAAbx9fmQ (envelope-from ) for ; Sat, 12 Jun 2021 21:25:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DCFDCAF27 for ; Sat, 12 Jun 2021 23:25:07 +0200 (CEST) Received: from localhost ([::1]:57172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsB7q-0005HG-OQ for larch@yhetil.org; Sat, 12 Jun 2021 17:25:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsB7m-0005Gn-39 for guix-patches@gnu.org; Sat, 12 Jun 2021 17:25:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsB7l-0002Ls-QO for guix-patches@gnu.org; Sat, 12 Jun 2021 17:25:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsB7l-0008QZ-MI for guix-patches@gnu.org; Sat, 12 Jun 2021 17:25:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48982] [PATCH] gnu: brightnessctl: Add elogind support. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Jun 2021 21:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48982@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162353306832306 (code B ref -1); Sat, 12 Jun 2021 21:25:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jun 2021 21:24:28 +0000 Received: from localhost ([127.0.0.1]:42228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsB77-0008OZ-27 for submit@debbugs.gnu.org; Sat, 12 Jun 2021 17:24:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:44652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsB74-0008OR-GT for submit@debbugs.gnu.org; Sat, 12 Jun 2021 17:24:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsB74-0005FG-9u for guix-patches@gnu.org; Sat, 12 Jun 2021 17:24:18 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:55705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsB72-0001tM-Bw for guix-patches@gnu.org; Sat, 12 Jun 2021 17:24:18 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 88E28240005 for ; Sat, 12 Jun 2021 21:24:14 +0000 (UTC) From: Brice Waegeneire Date: Sat, 12 Jun 2021 23:24:10 +0200 Message-Id: <20210612212410.13185-1-brice@waegenei.re> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.178.230; envelope-from=brice@waegenei.re; helo=relay10.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623533108; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dQWIS0L3z488TZOCvWhO+Wgffn8sYR2sUGIaHtmPlko=; b=DqN2AQzxK1dddcAQntGq4tVHQwQSmwSKAuHI2PNXpLeT5LXupF95FZAyFsqtonmqFAn+Iz bfC//+iO3ZvRTnUAqLGQ37dC0UoQG1ChbAvcPctDmrCLqBEQcKRhOLhI6axFlb/q34NhuX E9jXgLCifED4hGpG/kFxsQD59p8bz38EKYI3/dDgp0Q8/VNyUuQs0Xaz1dt7fyofxkY+ht QpZwShiaIe+e7Y27mkQegwB+mbslPY4ePbzKXwYV5D6YN1Tf8o2pLT8940SkQD9bHHuVby e2eZJFWtd6w89gRaeg/hRzkmF9lydMPGh4eRnH/mOyvPNcvf/UQBnnqj4yPZ2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623533108; a=rsa-sha256; cv=none; b=rvgiI2u97pCkVfctwOdW8r1jh22retDQWjM3w53pk4A/m8rjrWShLoJnJia+1hAVie27qU CjXP7hrQfii49cIBfFHH97vptuaph/2wObWe8sW0OFh/Kxw1N2HBX0wWB7WaMBJ4ioYW/3 1eaI8Vi5BnUlUoL3PqHTBE8FGiWq1yOJg3aKlPMOIkpKHfwNJpRLet9RgF5IxEf7iGm3vg yks18hW8JAOsTVs/9MLqd2ccC4OLehk/0ssP9NJk8dgsuy9oi9viLgORKcZiGFJKs8gxPw ojSJ3N2PTBhDzM5ts5TWULE+qUQEwoPFqxK3yGbsGqEYsEKlGnMR7Rou9t124w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.07 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: DCFDCAF27 X-Spam-Score: 0.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: Zr1hdhc5QKck * gnu/packages/patches/brightnessctl-elogind-support.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/linux.scm (brightnessctl)[source]: Apply it. [make-flags]: Enable logind support. [native-inputs]: Add pkg-config. [inputs]: Add elogind. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 13 +++++++++---- .../patches/brightnessctl-elogind-support.patch | 13 +++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/brightnessctl-elogind-support.patch diff --git a/gnu/local.mk b/gnu/local.mk index 73556cc184..26b3e86e22 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -851,6 +851,7 @@ dist_patch_DATA = \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ %D%/packages/patches/bc-fix-cross-compilation.patch \ %D%/packages/patches/bear-disable-preinstall-tests.patch \ + %D%/packages/patches/brightnessctl-elogind-support.patch \ %D%/packages/patches/bsdiff-CVE-2014-9862.patch \ %D%/packages/patches/bsd-games-2.17-64bit.patch \ %D%/packages/patches/bsd-games-add-configure-config.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 2b0c32666c..c8917f1830 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -36,14 +36,13 @@ ;;; Copyright © 2019, 2020 Maxim Cournoyer ;;; Copyright © 2019 Stefan Stefanović ;;; Copyright © 2019 Pierre Langlois -;;; Copyright © 2019, 2020 Brice Waegeneire +;;; Copyright © 2019, 2020, 2021 Brice Waegeneire ;;; Copyright © 2019 Kei Kebreau ;;; Copyright © 2020 Oleg Pykhalov ;;; Copyright © 2020 Pierre Neidhardt ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen -;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2020 Morgan Smith ;;; Copyright © 2020 John Soo ;;; Copyright © 2020 Michael Rohleder @@ -6413,13 +6412,15 @@ set the screen to be pitch black at a value of 0 (or higher). (file-name (git-file-name name version)) (sha256 (base32 - "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq")))) + "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq")) + (patches (search-patches "brightnessctl-elogind-support.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests #:make-flags (list (string-append "CC=" ,(cc-for-target)) (string-append "PREFIX=" %output) - (string-append "UDEVDIR=" %output "/lib/udev/rules.d/")) + (string-append "UDEVDIR=" %output "/lib/udev/rules.d/") + "ENABLE_SYSTEMD=1") #:phases (modify-phases %standard-phases (delete 'configure) @@ -6428,6 +6429,10 @@ set the screen to be pitch black at a value of 0 (or higher). (substitute* "90-brightnessctl.rules" (("/bin/") "/run/current-system/profile/bin/")) #t))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("elogind" ,elogind))) (synopsis "Backlight and LED brightness control") (description "This program allows you read and control device brightness. Devices diff --git a/gnu/packages/patches/brightnessctl-elogind-support.patch b/gnu/packages/patches/brightnessctl-elogind-support.patch new file mode 100644 index 0000000000..8125f1c459 --- /dev/null +++ b/gnu/packages/patches/brightnessctl-elogind-support.patch @@ -0,0 +1,13 @@ +From https://github.com/Hummer12007/brightnessctl/issues/67 + +--- a/Makefile ++++ b/Makefile +@@ -18,6 +18,8 @@ MODE = ${MODE_${INSTALL_UDEV_RULES}} + ifdef ENABLE_SYSTEMD + CFLAGS += ${shell pkg-config --cflags libsystemd} + LDLIBS += ${shell pkg-config --libs libsystemd} ++ CFLAGS += ${shell pkg-config --cflags libelogind} ++ LDLIBS += ${shell pkg-config --libs libelogind} + CPPFLAGS += -DENABLE_SYSTEMD + INSTALL_UDEV_RULES=0 + MODE = 0755 -- 2.31.1