Subject: bug#54061: thermald-2.4.7 build fail following upower update to 0.99.15

From: Maxime Devos <[email-masked]>
Date: Sat, 19 Feb 2022 15:55:39 +0100

Paul Jewell schreef op vr 18-02-2022 om 17:07 [+0000]:
> When building thermald-2.4.7, I am getting a build failure:
> 
> [... deprecation error ...]

The attached two patches should fix this.

Greetings,
Maxime.
From eb49c118cb211528adc2bcbb0758d3848b2bcf6b Mon Sep 17 00:00:00 2001
From: Maxime Devos <[email-masked]>
Date: Sat, 19 Feb 2022 14:46:33 +0000
Subject: [PATCH 1/2] gnu: thermald: Use G-expressions.

* gnu/packages/admin.scm
  (thermald)[arguments]<#:configure-flags,#:make-flags,#:phases>: Convert to
  G-exps.
---
 gnu/packages/admin.scm | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 17dc0f1315..0e9f0acb68 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -3879,17 +3879,16 @@ hard-coded.")
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
-       (let ((out (assoc-ref %outputs "out")))
-         (list (string-append "--with-dbus-sys-dir="
-                              out "/etc/dbus-1/system.d")
-               "--localstatedir=/var"))
+       ,#~(list (string-append "--with-dbus-sys-dir="
+                               #$output "/etc/dbus-1/system.d")
+                "--localstatedir=/var")
        #:make-flags
-       (list "V=1")                     ; log build commands
+       ,#~(list "V=1")                  ; log build commands
        #:phases
-       (modify-phases %standard-phases
-         (add-before 'bootstrap 'no-early-./configure
-           (lambda _
-             (setenv "NO_CONFIGURE" "yet"))))))
+       ,#~(modify-phases %standard-phases
+            (add-before 'bootstrap 'no-early-./configure
+              (lambda _
+                (setenv "NO_CONFIGURE" "yet"))))))
     (native-inputs
      (list autoconf
            autoconf-archive
-- 
2.30.2

From d066a7dcd11757fb19edc79028104f7dbcffeab1 Mon Sep 17 00:00:00 2001
From: Maxime Devos <[email-masked]>
Date: Sat, 19 Feb 2022 14:52:17 +0000
Subject: [PATCH 2/2] gnu: thermald: Fix build failure.

* gnu/packages/admin.scm (thermald)[arguments]<#:configure-flags>: Add
'--disable-werror'.

Fixes: <https://issues.guix.gnu.org/54061>
Reported-by: Paul Jewell <[email-masked]>
---
 gnu/packages/admin.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 0e9f0acb68..5b2584cfba 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -3881,7 +3881,10 @@ hard-coded.")
      `(#:configure-flags
        ,#~(list (string-append "--with-dbus-sys-dir="
                                #$output "/etc/dbus-1/system.d")
-                "--localstatedir=/var")
+                "--localstatedir=/var"
+                ;; thermald uses deprecated APIs, see
+                ;; <https://github.com/intel/thermal_daemon/issues/340>.
+                "--disable-werror")
        #:make-flags
        ,#~(list "V=1")                  ; log build commands
        #:phases
-- 
2.30.2