Subject: [bug#77146] [PATCH v2 2/2] gnu: icewm: Switch to git-fetch and use cmake-build-system.

From: Andy Tai <[email-masked]>
Date: Sat, 22 Mar 2025 01:22:31 -0700

From: Zheng Junjie <[email-masked]>

* gnu/packages/wm.scm (icewm)[source]: Switch to git-fetch
[build-system]: use cmake-build-system.
[arguments]<#:phases>: Adjust skip-failing-test phase.

Change-Id: I6c666962a01114831bbc73f3f3f9e22bcc38afc8
---
 gnu/packages/wm.scm | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 02ac353a9cc..1288d996027 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1030,14 +1030,15 @@ (define-public icewm
     (name "icewm")
     (version "3.7.2")
     (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/ice-wm/icewm/releases/download/"
-                    version "/icewm-" version ".tar.lz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ice-wm/icewm")
+                    (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1n02y9i54b4xd0px6mfvwpvm2w796mg26iymsbq63xsjfcsqmvdl"))))
-    (build-system gnu-build-system)
+                "0zrj9ka9sglxchmkcgzdbjgzzzcfrfnk4ydhwzbi91vrrq7c6sh3"))))
+    (build-system cmake-build-system)
     (native-inputs (list pkg-config))
     (inputs (list fontconfig
                   fribidi
@@ -1065,9 +1066,9 @@ (define-public icewm
                  ;; strtest.cc tests failing due to $HOME and /etc setup
                  ;; difference under guix
                  (lambda _
-                   (substitute* "src/Makefile.in"
-                     (("TESTS = strtest\\$\\(EXEEXT\\)")
-                      "TESTS = ")))))))
+                   (substitute* "src/CMakeLists.txt"
+                     (("add_test\\(strtest \\$\\{CMAKE_BINARY_DIR\\}/strtest\\)")
+                      "")))))))
     (home-page "https://ice-wm.org/")
     (synopsis "Window manager for the X Window System")
     (description
-- 
2.43.0