diff mbox series

[bug#70158,4/6] gnu: scilab: Simpler and more robust version setting.

Message ID 20240403062528.5483-4-ngraves@ngraves.fr
State New
Headers show
Series Scilab: Fixup install of local Scilab packages. | expand

Commit Message

Nicolas Graves April 3, 2024, 6:25 a.m. UTC
* gnu/packages/maths.scm (scilab):
  [arguments]<#:phases>: Simpler and more robust version setting in
  version.h.in. It saves two lines and anticipates for the next
  release which will not use "main" anymore.

Change-Id: Ib052756a55528e991da54d880205c75ab2c6fa5f
---
 gnu/packages/maths.scm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index c920bc2f30..9223a86eab 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9846,10 +9846,8 @@  (define-public scilab
             (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)))))))
+                  (("branch-[a-z0-9\\.]*")  ; version
+                   #$(version-major+minor (package-version this-package))))))
             (add-after 'unpack 'restrain-to-scilab-cli
               (lambda _
                 ;; Install only scilab-cli.desktop