Subject: [bug#74989] [PATCH 12/23] gnu: xfce4-session: Update to 4.20.0.

From: [email-masked]
Date: Fri, 20 Dec 2024 11:56:43 +0800

From: 宋文武 <[email-masked]>

* gnu/packages/xfce.scm (xfce4-session): Update to 4.20.0.
[source]: Adjust snippet.
[arguments]: Remove 'patch-xflock phase.  Add 'patch-configure phase.
Pass "--with-wayland-session-prefix" to configure.
[inputs]: Add gtk-layer-shell and libxfce4windowing.  Remove xset.

Change-Id: I0b33e30976ef44da5f505cd2cbd486fd025ec270
---
 gnu/packages/xfce.scm | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 4a502d75a4..925ea17d71 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -687,11 +687,11 @@ (define-public xfce4-session
                                   "xfce4-session-" version ".tar.bz2"))
               (sha256
                (base32
-                "05k5w3n3hyb93a74f0qc6q0lky4vc51vdlsra8d8i2rkqxs5174s"))
+                "11agss7x749i4wnw82czv0b053mhqn34hwi8rihj6sgfwqzj6aaj"))
               (modules '((guix build utils)))
               (snippet
                '(begin
-                  (substitute* "xfsm-shutdown-helper/main.c"
+                  (substitute* "libxfsm/xfsm-shutdown-common.h"
                     (("/sbin/shutdown -h now")  "halt")
                     (("/sbin/shutdown -r now")  "restart")
                     (("/usr/sbin/pm-suspend")   "pm-suspend")
@@ -700,27 +700,30 @@ (define-public xfce4-session
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
-       (list (string-append "--with-xsession-prefix=" %output))
+       (list (string-append "--with-xsession-prefix=" %output)
+             (string-append "--with-wayland-session-prefix=" %output))
        ;; Disable icon cache update.
        #:make-flags
        '("gtk_update_icon_cache=true")
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-xflock
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((xset (assoc-ref inputs "xset")))
-               (substitute* "scripts/xflock4"
-                 (("xset") (string-append xset "/bin/xset")))))))))
+         (add-before 'configure 'patch-configure
+           (lambda _
+             (substitute* "configure"
+               ;; XDG_CHECK_PACKAGE_BINARY requires an absolute path.
+               (("\\$PKG_CONFIG --variable=gdbus_codegen gio-2.0")
+                "type -p gdbus-codegen")))))))
     (native-inputs
-     (list pkg-config intltool))
+     (list (list glib "bin") pkg-config intltool))
     (inputs
      (list iceauth
+           gtk-layer-shell
            upower
            polkit
            libsm
            libwnck
            libxfce4ui
-           xset))
+           libxfce4windowing))
     (home-page "https://www.xfce.org/")
     (synopsis "Xfce session manager")
     (description
-- 
2.46.0