Subject: [PATCH v4 20/68] gnu: xfce4-session: Switch to git source.

From: [email-masked]
Date: Tue, 31 Dec 2024 14:43:50 +0800

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

* gnu/packages/xfce.scm (xfce4-session)[source]: Switch to git-fetch.
[arguments]: Add "--enable-maintainer-mode" to configure-flags.
Remove 'patch-configure phase.
[native-inputs]: Add xfce4-dev-tools.
[home-page]: Set to docs.xfce.org.

Change-Id: Id234bc39d803f616d386771896347a7a8185fe81
---
 gnu/packages/xfce.scm | 52 +++++++++++++++++++------------------------
 1 file changed, 23 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 8fa5f3a0a3..235c4e69a8 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -684,41 +684,35 @@ (define-public xfce4-session
   (package
     (name "xfce4-session")
     (version "4.20.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://archive.xfce.org/src/xfce/"
-                                  "xfce4-session/" (version-major+minor version) "/"
-                                  "xfce4-session-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "11agss7x749i4wnw82czv0b053mhqn34hwi8rihj6sgfwqzj6aaj"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  (substitute* "libxfsm/xfsm-shutdown-common.h"
-                    (("/sbin/shutdown -h now")  "halt")
-                    (("/sbin/shutdown -r now")  "restart")
-                    (("/usr/sbin/pm-suspend")   "pm-suspend")
-                    (("/usr/sbin/pm-hibernate") "pm-hibernate"))
-                  #t))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append "https://gitlab.xfce.org/xfce/" name))
+             (commit (string-append name "-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0zzmszwm22nnwybagnvan62qbqcgcr7fnp288qcr9bkkag5y8zcs"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (substitute* "libxfsm/xfsm-shutdown-common.h"
+             (("/sbin/shutdown -h now")  "halt")
+             (("/sbin/shutdown -r now")  "restart")
+             (("/usr/sbin/pm-suspend")   "pm-suspend")
+             (("/usr/sbin/pm-hibernate") "pm-hibernate"))
+           #t))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
-       (list (string-append "--with-xsession-prefix=" %output)
+       (list "--enable-maintainer-mode" ;for xfce4-session-settings_ui.h
+        (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-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")))))))
+       '("gtk_update_icon_cache=true")))
     (native-inputs
-     (list (list glib "bin") pkg-config intltool))
+     (list xfce4-dev-tools))
     (inputs
      (list iceauth
            gtk-layer-shell
@@ -728,7 +722,7 @@ (define-public xfce4-session
            libwnck
            libxfce4ui
            libxfce4windowing))
-    (home-page "https://www.xfce.org/")
+    (home-page "https://docs.xfce.org/xfce/xfce4-session/")
     (synopsis "Xfce session manager")
     (description
      "Session manager for Xfce, it will restore your session on startup and
-- 
2.46.0