Subject: [PATCH v3 7/8] gnu: scilab: Add phase set-version.

From: Nicolas Graves <[email-masked]>
Date: Mon, 6 Nov 2023 00:51:50 +0100

* gnu/packages/maths.scm (scilab): Add phase set-version.
[arguments](phases): Add phase set-version.

Change-Id: I0e461a229931d159196cae73d1db584250c579b2
---
 gnu/packages/maths.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ce0b5a8949..dae4c528e2 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9662,6 +9662,13 @@ (define-public scilab
                 (substitute* "modules/Makefile.am"
                   (("libscilab_cli_la_LDFLAGS = .*\\)" all)
                    (string-append all " -lcurl")))))
+            (add-after 'unpack 'set-version
+              (lambda _
+                (substitute* "modules/core/includes/version.h.in"
+                  (("scilab-branch-main")  ; version
+                   (string-append
+                    "scilab-"
+                    #$(version-major+minor (package-version this-package)))))))
             (add-after 'unpack 'restrain-to-scilab-cli
               (lambda _
                 ;; Install only scilab-cli.desktop
-- 
2.41.0