Subject: Re: [bug#72541] [PATCH] gnu: gerbv: Fix missing version.

From: Evgeny Pisemsky <[email-masked]>
Date: Sat, 07 Sep 2024 19:30:23 +0300

Hello!

The problem is certainly in this script or its environment, since the
only place where version can come from is this line in configure.ac:

AC_INIT([gerbv], [m4_esyscmd(utils/git-version-gen.sh 2.10.0)])

This gave me the idea to do substitution there to avoid running it.

As for wrong flag, I suggest just removing it.

Alter these changes gerbv builds and works fine for me.

Updated patch attached.
>From 5bc5612026d51a2614b29668addf0f8de0aefe76 Mon Sep 17 00:00:00 2001
Message-ID: <[email-masked]>
From: Evgeny Pisemsky <[email-masked]>
Date: Sat, 7 Sep 2024 18:40:06 +0300
Subject: [PATCH] gnu: gerbv: Fix missing version.

* gnu/packages/engineering.scm (gerbv): Fix missing version.
[source]: Change indentation.
[arguments]: Remove wrong configure flags, avoid running git version generator.

Change-Id: I29a38fff03127d9ce2b5e04ca638dacfc3720125
---
 gnu/packages/engineering.scm | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 26f47dbf9d..d2e524a7f8 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -27,7 +27,7 @@
 ;;; Copyright © 2021 Ivan Gankevich <[email-masked]>
 ;;; Copyright © 2021, 2022 Petr Hodina <[email-masked]>
 ;;; Copyright © 2021 Foo Chuan Wei <[email-masked]>
-;;; Copyright © 2022 Evgeny Pisemsky <[email-masked]>
+;;; Copyright © 2022, 2024 Evgeny Pisemsky <[email-masked]>
 ;;; Copyright © 2022 Olivier Dion <[email-masked]>
 ;;; Copyright © 2022 Peter Polidoro <[email-masked]>
 ;;; Copyright © 2022 Malte Frank Gerdes <[email-masked]>
@@ -837,18 +837,24 @@ (define-public gerbv
   (package
     (name "gerbv")
     (version "2.10.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/gerbv/gerbv")
-                    (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "06bcm5zw7whsnnmfld3gl2j907lxc68gnsbzr2pc4w6qc923rgmj"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/gerbv/gerbv")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "06bcm5zw7whsnnmfld3gl2j907lxc68gnsbzr2pc4w6qc923rgmj"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("CFLAGS=-fcommon")))
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'avoid-git-version-gen
+                     (lambda _
+                       (substitute* "configure.ac"
+                         (("utils/git-version-gen.sh")
+                          "echo -n")))))))
     (native-inputs (list autoconf
                          automake
                          desktop-file-utils

base-commit: 18d02443e1ec37779ee3cf63f9aaff1746bfdd8e
-- 
2.45.2