Subject: [PATCH 30/31] gnu: giza: Update to 1.5.0.

From: Sharlatan Hellseher <[email-masked]>
Date: Tue, 20 May 2025 23:24:52 +0100

* gnu/packages/maths.scm (giza): Update to 1.5.0.
[arguments] <phases>: Add 'start-xorg-server; use custom 'check.
[native-inputs]: Add xorg-server-for-tests.

Change-Id: Ife69e71839a2d7a244f21ea84f30a12dfa8f0310
---
 gnu/packages/maths.scm | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index eea9f8f718..2fd3ae7777 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -51,7 +51,7 @@
 ;;; Copyright © 2021, 2023, 2024 Guillaume Le Vaillant <[email-masked]>
 ;;; Copyright © 2021 Pierre-Antoine Bouttier <[email-masked]>
 ;;; Copyright © 2022 Zhu Zihao <[email-masked]>
-;;; Copyright © 2022 Sharlatan Hellseher <[email-masked]>
+;;; Copyright © 2022-2025 Sharlatan Hellseher <[email-masked]>
 ;;; Copyright © 2022 Philip McGrath <[email-masked]>
 ;;; Copyright © 2022 Marek Felšöci <[email-masked]>
 ;;; Copyright © 2022 vicvbcun <[email-masked]>
@@ -1402,21 +1402,39 @@ (define-public feedgnuplot
 (define-public giza
   (package
     (name "giza")
-    (version "1.4.1")
+    (version "1.5.0")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/danieljprice/giza")
              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "17h8hkhcqlvgryyp5n206fbqpals2vbnjy4f6f1zwj9jiblgi5mj"))
-       (file-name (git-file-name name version))))
+        (base32 "1qair5j6rq17hwvyxl6k2n4hkvgjw5wczmfzn7qh7kcv3qpg9p5l"))))
     (build-system gnu-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'start-xorg-server
+            (lambda* (#:key inputs #:allow-other-keys)
+              (system "Xvfb :99 -screen 0 1920x1080x24 &")
+              (setenv "DISPLAY" ":99")))
+          ;; Tests are interactive, see
+          ;; <https://github.com/danieljprice/giza/blob/v1.5.0/.github/workflows/build.yml#L52>.
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "sh" "-c" "yes '' | make check")))))))
     (native-inputs
-     (list perl pkg-config))
+     (list perl
+           pkg-config
+           xorg-server-for-tests))
     (inputs
-     (list cairo freetype gfortran))
+     (list cairo
+           freetype
+           gfortran))
     (home-page "https://danieljprice.github.io/giza/")
     (synopsis "Scientific plotting library for C/Fortran")
     (description
-- 
2.49.0