GNU bug report logs - #65853
[PATCH] gnu: scilab: Fix and hardcode script inputs.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Sun, 10 Sep 2023 16:20:02 UTC

Severity: normal

Tags: patch

Merged with 65856, 65857

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65853 in the body.
You can then email your comments to 65853 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to andreas <at> enge.fr, efraim <at> flashner.co.il, bavier <at> posteo.net, guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Sun, 10 Sep 2023 16:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to andreas <at> enge.fr, efraim <at> flashner.co.il, bavier <at> posteo.net, guix-patches <at> gnu.org. (Sun, 10 Sep 2023 16:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH] gnu: scilab: Fix and hardcode script inputs.
Date: Sun, 10 Sep 2023 18:18:42 +0200
* gnu/packages/maths.scm (scilab): Fix script inputs.
[inputs]: Reorder alphabetically. Add coreutils, grep, sed.
[arguments](phases): Add phase hardcode-script-inputs.
---
 gnu/packages/maths.scm | 43 ++++++++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 38e71e18f8..40883d71c1 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8448,22 +8448,25 @@ (define-public scilab
         (base32 "0phg9pn24yw98hbh475ik84dnikf1225b2knh7qbhdbdx6fm2d57"))))
     (build-system gnu-build-system)
     (native-inputs (list pkg-config gfortran))
-    (inputs (list libxml2
+    (inputs (list arpack-ng
+                  coreutils
+                  curl
+                  fftw
+                  gettext-minimal
+                  grep
+                  hdf5-1.8
+                  lapack
+                  libxml2
+                  libx11
+                  matio
+                  openblas
                   `(,pcre "bin")
                   `(,pcre "out")
                   readline
-                  hdf5-1.8
-                  curl
-                  openblas
-                  lapack
-                  arpack-ng
-                  fftw
-                  gettext-minimal
+                  sed
                   suitesparse-3
                   tcl
-                  tk
-                  libx11
-                  matio))
+                  tk))
     (arguments
      `(#:tests? #f
        #:configure-flags
@@ -8534,7 +8537,23 @@ (define-public scilab
                   (("if \\(array_size > 0\\)")
                    "if (*array_size > 0)"))
                 ;; Set SCIHOME to /tmp before macros compilation.
-                (setenv "SCIHOME" "/tmp"))))))
+                (setenv "SCIHOME" "/tmp")))
+            (add-after 'install 'hardcode-script-inputs
+              (lambda _
+                (substitute* (string-append #$output "/bin/scilab")
+                  (("grep")
+                   #$(file-append (this-package-input "grep") "/bin/grep"))
+                  (("sed")
+                   #$(file-append (this-package-input "sed") "/bin/sed"))
+                  (("uname")
+                   #$(file-append (this-package-input "coreutils")
+                                  "/bin/uname"))
+                  (("dirname")
+                   #$(file-append (this-package-input "coreutils")
+                                  "/bin/dirname"))
+                  (("basename")
+                   #$(file-append (this-package-input "coreutils")
+                                  "/bin/basename"))))))))
     (home-page "https://scilab.org")
     (synopsis "Software for engineers and scientists")
     (description "This package provides the non-graphical version of the Scilab

base-commit: 2eb6df537c36da8bf8e81ff698421f6fb1bfd1ab
prerequisite-patch-id: eb618ab7b10483d917c308a38792af98baa517e2
prerequisite-patch-id: 40b6c9f09f27833367a71ec25d77afae4d2a835e
prerequisite-patch-id: c12968d02d99c253f858586a86b16fa32d41f1c1
prerequisite-patch-id: 09d995d48139f8e61183d5634cda13a01cdb50f7
prerequisite-patch-id: 86baa45ec2aad977c8c8135f7613aa391155de6d
prerequisite-patch-id: 3425fbbff6a603d60b4e143ea2141aabf4ddc92c
prerequisite-patch-id: c373c01aab5dcba3503a97d51c62a595147a041c
prerequisite-patch-id: cda857c790b88c681c4e713c5f71e40291970daf
prerequisite-patch-id: 8e234d0f4d93d2aad499eec8842be3d28da98707
prerequisite-patch-id: 5f664cb2fd995a53765c5ffc19a708ac795cc0c4
prerequisite-patch-id: ed447cba9cf9b7e1a1b47aa27acb14f8f2da0a8e
prerequisite-patch-id: 9f80c5bbbfb8cd3347951c4d57634e93ffa79924
prerequisite-patch-id: 1aaa9f0d466e2d6837f75844df48a98beb70ff24
prerequisite-patch-id: 34502820d8c0355b3ed2638c457084edeaba029d
prerequisite-patch-id: a96258da9e78cfb9ac9893cdcdeb38b69b75f134
-- 
2.41.0





Merged 65853 65856 65857. Request was from Nicolas Graves <ngraves <at> ngraves.fr> to control <at> debbugs.gnu.org. (Sun, 10 Sep 2023 17:50:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Thu, 28 Sep 2023 16:38:01 GMT) Full text and rfc822 format available.

Message #10 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 65853 <at> debbugs.gnu.org, Andreas Enge <andreas <at> enge.fr>,
 Eric Bavier <bavier <at> posteo.net>
Subject: Re: [bug#65853] [PATCH] gnu: scilab: Fix and hardcode script inputs.
Date: Thu, 28 Sep 2023 19:36:23 +0300
[Message part 1 (text/plain, inline)]
A couple of things I noticed:

On Sun, Sep 10, 2023 at 06:18:42PM +0200, Nicolas Graves wrote:
> * gnu/packages/maths.scm (scilab): Fix script inputs.
> [inputs]: Reorder alphabetically. Add coreutils, grep, sed.
> [arguments](phases): Add phase hardcode-script-inputs.
> ---
>  gnu/packages/maths.scm | 43 ++++++++++++++++++++++++++++++------------
>  1 file changed, 31 insertions(+), 12 deletions(-)
> 
> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
> index 38e71e18f8..40883d71c1 100644
> --- a/gnu/packages/maths.scm
> +++ b/gnu/packages/maths.scm
> @@ -8448,22 +8448,25 @@ (define-public scilab
>          (base32 "0phg9pn24yw98hbh475ik84dnikf1225b2knh7qbhdbdx6fm2d57"))))
>      (build-system gnu-build-system)
>      (native-inputs (list pkg-config gfortran))
> -    (inputs (list libxml2
> +    (inputs (list arpack-ng
> +                  coreutils

This can be coreutils-minimal

> +                  curl
> +                  fftw
> +                  gettext-minimal
> +                  grep
> +                  hdf5-1.8
> +                  lapack
> +                  libxml2
> +                  libx11
> +                  matio
> +                  openblas
>                    `(,pcre "bin")
>                    `(,pcre "out")
>                    readline
> -                  hdf5-1.8
> -                  curl
> -                  openblas
> -                  lapack
> -                  arpack-ng
> -                  fftw
> -                  gettext-minimal
> +                  sed
>                    suitesparse-3
>                    tcl
> -                  tk
> -                  libx11
> -                  matio))
> +                  tk))
>      (arguments
>       `(#:tests? #f
>         #:configure-flags
> @@ -8534,7 +8537,23 @@ (define-public scilab
>                    (("if \\(array_size > 0\\)")
>                     "if (*array_size > 0)"))
>                  ;; Set SCIHOME to /tmp before macros compilation.
> -                (setenv "SCIHOME" "/tmp"))))))
> +                (setenv "SCIHOME" "/tmp")))
> +            (add-after 'install 'hardcode-script-inputs
> +              (lambda _
> +                (substitute* (string-append #$output "/bin/scilab")
> +                  (("grep")
> +                   #$(file-append (this-package-input "grep") "/bin/grep"))

These can be (search-input-file #$inputs "/bin/grep") to make it easier
to swap out the packages for something else if people want.

> +                  (("sed")

I checked the script, it should be ((" sed ") since there are a couple
of instances of 'sed' in the script which aren't invocations of sed.

> +                   #$(file-append (this-package-input "sed") "/bin/sed"))
> +                  (("uname")
> +                   #$(file-append (this-package-input "coreutils")
> +                                  "/bin/uname"))
> +                  (("dirname")
> +                   #$(file-append (this-package-input "coreutils")
> +                                  "/bin/dirname"))
> +                  (("basename")
> +                   #$(file-append (this-package-input "coreutils")
> +                                  "/bin/basename"))))))))

Are there more binaries which should be substituted? I saw glxgears,
chcon, a couple instances of java, pwd, valgrind, docbook paths. And
then there's a couple of other scripts and binaries in the bin/ folder.
I think it'd be better to use wrap-script or wrap-program and then use
substitute* to strip the leading /usr/bin/ from the different calls to
the different binaries.

>      (home-page "https://scilab.org")
>      (synopsis "Software for engineers and scientists")
>      (description "This package provides the non-graphical version of the Scilab
> 
> base-commit: 2eb6df537c36da8bf8e81ff698421f6fb1bfd1ab
> prerequisite-patch-id: eb618ab7b10483d917c308a38792af98baa517e2
> prerequisite-patch-id: 40b6c9f09f27833367a71ec25d77afae4d2a835e
> prerequisite-patch-id: c12968d02d99c253f858586a86b16fa32d41f1c1
> prerequisite-patch-id: 09d995d48139f8e61183d5634cda13a01cdb50f7
> prerequisite-patch-id: 86baa45ec2aad977c8c8135f7613aa391155de6d
> prerequisite-patch-id: 3425fbbff6a603d60b4e143ea2141aabf4ddc92c
> prerequisite-patch-id: c373c01aab5dcba3503a97d51c62a595147a041c
> prerequisite-patch-id: cda857c790b88c681c4e713c5f71e40291970daf
> prerequisite-patch-id: 8e234d0f4d93d2aad499eec8842be3d28da98707
> prerequisite-patch-id: 5f664cb2fd995a53765c5ffc19a708ac795cc0c4
> prerequisite-patch-id: ed447cba9cf9b7e1a1b47aa27acb14f8f2da0a8e
> prerequisite-patch-id: 9f80c5bbbfb8cd3347951c4d57634e93ffa79924
> prerequisite-patch-id: 1aaa9f0d466e2d6837f75844df48a98beb70ff24
> prerequisite-patch-id: 34502820d8c0355b3ed2638c457084edeaba029d
> prerequisite-patch-id: a96258da9e78cfb9ac9893cdcdeb38b69b75f134
> -- 
> 2.41.0
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Thu, 28 Sep 2023 18:32:02 GMT) Full text and rfc822 format available.

Message #13 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 65853 <at> debbugs.gnu.org, Andreas Enge <andreas <at> enge.fr>,
 Eric Bavier <bavier <at> posteo.net>
Subject: Re: [bug#65853] [PATCH] gnu: scilab: Fix and hardcode script inputs.
Date: Thu, 28 Sep 2023 20:30:58 +0200
On 2023-09-28 19:36, Efraim Flashner wrote:

> A couple of things I noticed:
>
> On Sun, Sep 10, 2023 at 06:18:42PM +0200, Nicolas Graves wrote:
>> +                  coreutils
>
> This can be coreutils-minimal
>

Will change it.
>> +                  (("grep")
>> +                   #$(file-append (this-package-input "grep") "/bin/grep"))
>
> These can be (search-input-file #$inputs "/bin/grep") to make it easier
> to swap out the packages for something else if people want.
>

Fine for me.

>> +                  (("sed")
>
> I checked the script, it should be ((" sed ") since there are a couple
> of instances of 'sed' in the script which aren't invocations of sed.

Yes I indeed noticed it too, probably forgot to resubmit a patch but my
local version works well.
>
>> +                   #$(file-append (this-package-input "sed") "/bin/sed"))
>> +                  (("uname")
>> +                   #$(file-append (this-package-input "coreutils")
>> +                                  "/bin/uname"))
>> +                  (("dirname")
>> +                   #$(file-append (this-package-input "coreutils")
>> +                                  "/bin/dirname"))
>> +                  (("basename")
>> +                   #$(file-append (this-package-input "coreutils")
>> +                                  "/bin/basename"))))))))
>
> Are there more binaries which should be substituted? I saw glxgears,
> chcon, a couple instances of java, pwd, valgrind, docbook paths. And
> then there's a couple of other scripts and binaries in the bin/ folder.
> I think it'd be better to use wrap-script or wrap-program and then use
> substitute* to strip the leading /usr/bin/ from the different calls to
> the different binaries.

I don't use more than that for a CLI usage. The thing is that we already
build without the GUI (so without java). Maybe valgrind could be useful
for debugging, docbook for documentation...

I'll take a look in the coming weeks, but I can guarantee it works for
me, so I propose we should process with this one, and add other patches
on top when someone needs them. But we should be mindful that all
possible paths / binaries are not reachable when the script is run
(IIRC, they also depend on the OS and options).

-- 
Best regards,
Nicolas Graves




Information forwarded to andreas <at> enge.fr, efraim <at> flashner.co.il, bavier <at> posteo.net, guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Thu, 28 Sep 2023 19:04:01 GMT) Full text and rfc822 format available.

Message #16 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v2] gnu: scilab: Fix and hardcode script inputs.
Date: Thu, 28 Sep 2023 21:03:10 +0200
* gnu/packages/maths.scm (scilab): Fix script inputs.
[inputs]: Reorder alphabetically. Add coreutils-minimal, grep, sed.
[arguments](phases): Add phase hardcode-script-inputs.
---
 gnu/packages/maths.scm | 46 +++++++++++++++++++++++++++---------------
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 62d4adfbd1..f7e1de41f3 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8433,22 +8433,25 @@ (define-public scilab
         (base32 "0phg9pn24yw98hbh475ik84dnikf1225b2knh7qbhdbdx6fm2d57"))))
     (build-system gnu-build-system)
     (native-inputs (list pkg-config gfortran))
-    (inputs (list libxml2
+    (inputs (list arpack-ng
+                  coreutils-minimal
+                  curl
+                  fftw
+                  gettext-minimal
+                  grep
+                  hdf5-1.8
+                  lapack
+                  libxml2
+                  libx11
+                  matio
+                  openblas
                   `(,pcre "bin")
                   `(,pcre "out")
                   readline
-                  hdf5-1.8
-                  curl
-                  openblas
-                  lapack
-                  arpack-ng
-                  fftw
-                  gettext-minimal
+                  sed
                   suitesparse-3
                   tcl
-                  tk
-                  libx11
-                  matio))
+                  tk))
     (arguments
      `(#:tests? #f
        #:configure-flags
@@ -8484,10 +8487,6 @@ (define-public scilab
        ,#~(modify-phases %standard-phases
             (add-before 'build 'pre-build
               (lambda _
-                ;; Fix scilab script.
-                (substitute* "bin/scilab"
-                  (("\\/bin\\/ls")
-                   (which "ls")))
                 ;; Fix core.start.
                 (substitute* "modules/core/etc/core.start"
                   (("'SCI/modules")
@@ -8519,7 +8518,22 @@ (define-public scilab
                   (("if \\(array_size > 0\\)")
                    "if (*array_size > 0)"))
                 ;; Set SCIHOME to /tmp before macros compilation.
-                (setenv "SCIHOME" "/tmp"))))))
+                (setenv "SCIHOME" "/tmp")))
+            (add-after 'install 'hardcode-script-inputs
+              (lambda _
+                (substitute* (string-append #$output "/bin/scilab")
+                  (("grep")
+                   (search-inputs-file #$inputs "/bin/grep"))
+                  ((" sed ")  ; some "sed" strings are not binaries invocations
+                   (string-append " " (search-inputs-file #$inputs "/bin/sed") " "))
+                  (("/bin/ls")
+                   (search-inputs-file #$inputs "/bin/ls"))
+                  (("uname")
+                   (search-inputs-file #$inputs "/bin/uname"))
+                  (("dirname")
+                   (search-inputs-file #$inputs "/bin/dirname"))
+                  (("basename")
+                   (search-inputs-file #$inputs "/bin/basename"))))))))
     (home-page "https://scilab.org")
     (synopsis "Software for engineers and scientists")
     (description "This package provides the non-graphical version of the Scilab

base-commit: f9784991eb6c7ec1a20f76d080873a3319be0908
-- 
2.41.0





Merged 65853 65856 65857. Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Thu, 28 Sep 2023 19:13:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Thu, 05 Oct 2023 14:52:01 GMT) Full text and rfc822 format available.

Message #21 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 65853 <at> debbugs.gnu.org, Eric Bavier <bavier <at> posteo.net>,
 Andreas Enge <andreas <at> enge.fr>, 65857 <at> debbugs.gnu.org,
 Efraim Flashner <efraim <at> flashner.co.il>
Subject: Re: bug#65857: [PATCH v2 2/2] gnu: scilab: Set SCIHOME default to
 respect XDG base dirs.
Date: Thu, 05 Oct 2023 16:51:27 +0200
Hi,

Nicolas Graves <ngraves <at> ngraves.fr> skribis:

> +            (add-after 'install 'hardcode-script-inputs
> +              (lambda _
> +                (substitute* (string-append #$output "/bin/scilab")
> +                  (("grep")
> +                   (search-inputs-file #$inputs "/bin/grep"))

I’ll contradict Efraim, but hopefully they’ll pardon me: I’d write it
like so:

  (lambda* (#:key inputs #:allow-other-keys)
    (substitute* …
      (("grep")
       (search-input-file inputs "/bin/grep"))))

That way it’ll DTRT even when creating a variant of this package.

(The code above had a typo too, with “inputs” as plural.)

Could you send one last updated patch?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Thu, 05 Oct 2023 15:10:02 GMT) Full text and rfc822 format available.

Message #24 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 65853 <at> debbugs.gnu.org, Eric Bavier <bavier <at> posteo.net>,
 Andreas Enge <andreas <at> enge.fr>, 65857 <at> debbugs.gnu.org,
 Efraim Flashner <efraim <at> flashner.co.il>
Subject: Re: bug#65857: [PATCH v2 2/2] gnu: scilab: Set SCIHOME default to
 respect XDG base dirs.
Date: Thu, 05 Oct 2023 17:09:20 +0200
On 2023-10-05 16:51, Ludovic Courtès wrote:

> Hi,
>
> Nicolas Graves <ngraves <at> ngraves.fr> skribis:
>
>> +            (add-after 'install 'hardcode-script-inputs
>> +              (lambda _
>> +                (substitute* (string-append #$output "/bin/scilab")
>> +                  (("grep")
>> +                   (search-inputs-file #$inputs "/bin/grep"))
>
> I’ll contradict Efraim, but hopefully they’ll pardon me: I’d write it
> like so:
>
>   (lambda* (#:key inputs #:allow-other-keys)
>     (substitute* …
>       (("grep")
>        (search-input-file inputs "/bin/grep"))))
>
> That way it’ll DTRT even when creating a variant of this package.
>
> (The code above had a typo too, with “inputs” as plural.)
>
> Could you send one last updated patch?

Yes, it also has to be rebased now that scilab is version 2023. 
>
> Thanks,
> Ludo’.

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:02 GMT) Full text and rfc822 format available.

Message #27 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 0/8] Scilab: Big update. 
Date: Mon,  6 Nov 2023 00:51:43 +0100
This patch series now introduces several changes to the scilab package:
1) non-failing tests are included. failing tests are harder to fix,
but it identifies these places quite well.
2) I've read the scilab-cli script to understand that it basically only serves to properly define a few environment variables. We don't need 40ko for this, so I've rewrapped the script to have a clean 110 lines guix-defined scilab-cli. We loose some low-level debugging functionality, but we didn't set the right inputs for this low-level debugging anyway, and I don't expect Scilab developpers to be using guix right now, so that's fine for now. Later we can wrap the script or hardcode inputs if someone needs it. 
3) Updated the version to 2024.0.0. We don't need the hdf5 patch anymore.
4) Set the version so that the welcoming message is up-to-date (not the timestamp though).
5) Set a SCIHOME default value that matches XDG base dirs specification, and doesn't override user-set -scihome (since it happens after when scilab-cli -scihome is called). Now SCIHOME doesn't seem to be read from the user environment at all, so the only way is through -scihome.

Nicolas Graves (8):
  gnu: scilab: Remove uneeded code.
  gnu: scilab: Activate tests and disable failing tests.
  gnu: scilab: Use gexp for tcl and tk libraries.
  gnu: scilab: Add phase rewrap-scilab-cli.
  gnu: scilab: Reindent.
  gnu: scilab: Update to 2024.0.0.
  gnu: scilab: Add phase set-version.
  gnu: scilab: Set default SCIHOME value.

 gnu/packages/maths.scm                        | 236 +++++++++++-------
 .../patches/scilab-hdf5-1.8-api.patch         |  71 ------
 2 files changed, 141 insertions(+), 166 deletions(-)
 delete mode 100644 gnu/packages/patches/scilab-hdf5-1.8-api.patch

-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:02 GMT) Full text and rfc822 format available.

Message #30 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 2/8] gnu: scilab: Activate tests and disable failing tests.
Date: Mon,  6 Nov 2023 00:51:45 +0100
* gnu/packages/maths.scm (scilab): Activate tests and disable failing tests.
[arguments]:
  (tests?): Activate tests.
  (phases):
    [remove-desktop-files]: Extend and rename to restrain-to-scilab-cli.
    [disable-failing-tests]: Add phase.

Change-Id: Icfec349c6efe14e7787ba8d385e5d51f82be82ea
---
 gnu/packages/maths.scm | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 88b52eb4fc..f6d0575979 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9622,8 +9622,6 @@ (define-public scilab
                   tk))
     (arguments
      (list
-      ;; The tests require java code.
-      #:tests? #f
       #:configure-flags
       #~(list
          "--enable-relocatable"
@@ -9663,12 +9661,31 @@ (define-public scilab
                   "modules/scicos/src/translator/makefile.mak"
                   "modules/scicos/src/modelica_compiler/makefile.mak")
                 (("nums\\.cmx?a") ""))))
-          ;; Install only scilab-cli.desktop
-          (add-after 'unpack 'remove-desktop-files
-            (lambda _
-              (substitute* "desktop/Makefile.am"
-                (("desktop_DATA =")
-                 "desktop_DATA = scilab-cli.desktop\nDUMMY ="))))
+            (add-after 'unpack 'restrain-to-scilab-cli
+              (lambda _
+                ;; Install only scilab-cli.desktop
+                (substitute* "desktop/Makefile.am"
+                  (("desktop_DATA =")
+                   "desktop_DATA = scilab-cli.desktop\nDUMMY ="))
+                ;; Replace scilab with scilab-cli for tests.
+                (substitute* "Makefile.incl.am"
+                  (("scilab-bin") "scilab-cli-bin")
+                  (("scilab -nwni") "scilab-cli")
+                  ;; Do not install tests, demos and examples.
+                  ;; This saves up to 140 Mo in the final output.
+                  (("(TESTS|DEMOS|EXAMPLES)_DIR=.*" all kind)
+                   (string-append kind "_DIR=")))))
+            (add-before 'check 'disable-failing-tests
+              (lambda _
+                (substitute* "Makefile"
+                  (("TESTS = .*")
+                   "TESTS =\n"))
+                (substitute* "modules/functions_manager/Makefile"
+                  (("check:.*")
+                   "check:\n"))
+                (substitute* "modules/types/Makefile"
+                  (("\\$\\(MAKE\\) \\$\\(AM_MAKEFLAGS\\) check-am")
+                   ""))))
           ;; These generated files are assumed to be present during
           ;; the build.
           (add-after 'bootstrap 'bootstrap-dynamic_link-scripts
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:03 GMT) Full text and rfc822 format available.

Message #33 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 3/8] gnu: scilab: Use gexp for tcl and tk libraries.
Date: Mon,  6 Nov 2023 00:51:46 +0100
* gnu/packages/maths.scm (scilab): Use gexp for tcl and tk libraries.
[argments](configure-flags): Use gexp for tcl and tk libraries.

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

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f6d0575979..62c935a868 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9621,6 +9621,8 @@ (define-public scilab
                   tcl
                   tk))
     (arguments
+     (let* ((tcl (this-package-input "tcl"))
+            (tk (this-package-input "tk")))
      (list
       #:configure-flags
       #~(list
@@ -9633,18 +9635,10 @@ (define-public scilab
          "--disable-build-help"
          "--with-external-scirenderer"
          ;; Tcl and Tk library locations.
-         (string-append "--with-tcl-include="
-                        (dirname
-                          (search-input-file %build-inputs "include/tcl.h")))
-         (string-append "--with-tcl-library="
-                        (dirname
-                          (search-input-directory %build-inputs "lib/tcl8")))
-         (string-append "--with-tk-include="
-                        (dirname
-                          (search-input-file %build-inputs "include/tk.h")))
-         (string-append "--with-tk-library="
-                        (dirname
-                          (search-input-directory %build-inputs "lib/tk8.6")))
+         (string-append "--with-tcl-include=" #$tcl "/include")
+         (string-append "--with-tcl-library=" #$tcl "/lib")
+         (string-append "--with-tk-include=" #$tk "/include")
+         (string-append "--with-tk-library=" #$tk "/lib")
          (string-append "--with-eigen-include="
                         (search-input-directory %build-inputs "include/eigen3"))
          ;; Find and link to the OCaml Num package
@@ -9709,7 +9703,7 @@ (define-public scilab
                 (apply invoke "make"
                        "src/cpp/parse/parsescilab.cpp"
                        "src/cpp/parse/scanscilab.cpp"
-                       make-flags)))))))
+                       make-flags))))))))
     (home-page "https://www.scilab.org/")
     (synopsis "Software for engineers and scientists")
     (description "This package provides the non-graphical version of the Scilab
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:03 GMT) Full text and rfc822 format available.

Message #36 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 4/8] gnu: scilab: Add phase rewrap-scilab-cli.
Date: Mon,  6 Nov 2023 00:51:47 +0100
* gnu/packages/maths.scm (scilab): Add phase rewrap-scilab-cli.

Change-Id: Ia3ca5df1a4795c34b6c1cdc8c3b0d7cc2badf0cb
---
 gnu/packages/maths.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 62c935a868..68e041c33b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9703,7 +9703,27 @@ (define-public scilab
                 (apply invoke "make"
                        "src/cpp/parse/parsescilab.cpp"
                        "src/cpp/parse/scanscilab.cpp"
-                       make-flags))))))))
+                       make-flags))))
+          ;; The startup script is mostly there to define the following env
+            ;; variables properly. We can do this with guix directly.
+            (add-after 'install 'rewrap-scilab-cli
+              (lambda _
+                (define (bin path) (string-append #$output "/bin/" path))
+                (delete-file (bin "scilab-cli"))
+                (wrap-program (bin "scilab-cli-bin")
+                  `("SCI" = (,(string-append #$output "/share/scilab")))
+                  `("LD_LIBRARY_PATH" ":" prefix
+                    (,(string-append #$output "/lib/scilab")))
+                  `("TCL_LIBRARY" = (,(string-append #$tcl "/lib")))
+                  `("TK_LIBRARY" = (,(string-append #$tk "/lib"))))
+                (copy-file (bin "scilab-cli-bin") (bin "scilab-cli"))
+                (copy-file (bin ".scilab-cli-bin-real") (bin "scilab-cli-bin"))
+                (delete-file (bin ".scilab-cli-bin-real"))
+                (substitute* (bin "scilab-cli")
+                  (("\\.scilab-cli-bin-real")
+                   "scilab-cli-bin")
+                  (("export SCI=")
+                   "unset LANGUAGE\nexport SCI="))))))))
     (home-page "https://www.scilab.org/")
     (synopsis "Software for engineers and scientists")
     (description "This package provides the non-graphical version of the Scilab
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:04 GMT) Full text and rfc822 format available.

Message #39 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 5/8] gnu: scilab: Reindent.
Date: Mon,  6 Nov 2023 00:51:48 +0100
* gnu/packages/maths.scm (scilab): Reindent.

Change-Id: I4813863a8ef5cb36de597ed31bcce0b34cfb1160
---
 gnu/packages/maths.scm | 139 +++++++++++++++++++++--------------------
 1 file changed, 70 insertions(+), 69 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 68e041c33b..e3045f4fee 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -58,6 +58,7 @@
 ;;; Copyright © 2022, 2023 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
 ;;; Copyright © 2022 Maximilian Heisinger <mail <at> maxheisinger.at>
 ;;; Copyright © 2022 Akira Kyle <akira <at> akirakyle.com>
+;;; Copyright © 2022, 2023 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;; Copyright © 2022 Roman Scherer <roman.scherer <at> burningswell.com>
 ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net>
@@ -9572,18 +9573,18 @@ (define-public scilab
 
             ;; And finally some files in the modules directory:
             (for-each
-              (lambda (file)
-                (delete-file
-                  (string-append "modules/dynamic_link/src/scripts/" file)))
-              '("aclocal.m4"
-                "configure"
-                "compile"
-                "config.guess"
-                "config.sub"
-                "ltmain.sh"
-                "depcomp"
-                "install-sh"
-                "missing"))
+             (lambda (file)
+               (delete-file
+                (string-append "modules/dynamic_link/src/scripts/" file)))
+             '("aclocal.m4"
+               "configure"
+               "compile"
+               "config.guess"
+               "config.sub"
+               "ltmain.sh"
+               "depcomp"
+               "install-sh"
+               "missing"))
             (delete-file-recursively "modules/dynamic_link/src/scripts/m4")
             (for-each delete-file
                       '("modules/ast/src/cpp/parse/scanscilab.cpp"
@@ -9623,38 +9624,38 @@ (define-public scilab
     (arguments
      (let* ((tcl (this-package-input "tcl"))
             (tk (this-package-input "tk")))
-     (list
-      #:configure-flags
-      #~(list
-         "--enable-relocatable"
-         "--disable-static-system-lib"
-         "--enable-build-parser"
-         ;; Disable all java code.
-         "--without-gui"
-         "--without-javasci"
-         "--disable-build-help"
-         "--with-external-scirenderer"
-         ;; Tcl and Tk library locations.
-         (string-append "--with-tcl-include=" #$tcl "/include")
-         (string-append "--with-tcl-library=" #$tcl "/lib")
-         (string-append "--with-tk-include=" #$tk "/include")
-         (string-append "--with-tk-library=" #$tk "/lib")
-         (string-append "--with-eigen-include="
-                        (search-input-directory %build-inputs "include/eigen3"))
-         ;; Find and link to the OCaml Num package
-         "OCAMLC=ocamlfind ocamlc -package num"
-         "OCAMLOPT=ocamlfind ocamlopt -package num -linkpkg")
-      #:phases
-      #~(modify-phases %standard-phases
-          ;; The Num library is specified with the OCAMLC and
-          ;; OCAMLOPT variables above.
-          (add-after 'unpack 'fix-ocaml-num
-            (lambda _
-              (substitute*
-                '("modules/scicos/Makefile.modelica.am"
-                  "modules/scicos/src/translator/makefile.mak"
-                  "modules/scicos/src/modelica_compiler/makefile.mak")
-                (("nums\\.cmx?a") ""))))
+       (list
+        #:configure-flags
+        #~(list
+           "--enable-relocatable"
+           "--disable-static-system-lib"
+           "--enable-build-parser"
+           ;; Disable all java code.
+           "--without-gui"
+           "--without-javasci"
+           "--disable-build-help"
+           "--with-external-scirenderer"
+           ;; Tcl and Tk library locations.
+           (string-append "--with-tcl-include=" #$tcl "/include")
+           (string-append "--with-tcl-library=" #$tcl "/lib")
+           (string-append "--with-tk-include=" #$tk "/include")
+           (string-append "--with-tk-library=" #$tk "/lib")
+           (string-append "--with-eigen-include="
+                          (search-input-directory %build-inputs "include/eigen3"))
+           ;; Find and link to the OCaml Num package
+           "OCAMLC=ocamlfind ocamlc -package num"
+           "OCAMLOPT=ocamlfind ocamlopt -package num -linkpkg")
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; The Num library is specified with the OCAMLC and
+            ;; OCAMLOPT variables above.
+            (add-after 'unpack 'fix-ocaml-num
+              (lambda _
+                (substitute*
+                    '("modules/scicos/Makefile.modelica.am"
+                      "modules/scicos/src/translator/makefile.mak"
+                      "modules/scicos/src/modelica_compiler/makefile.mak")
+                  (("nums\\.cmx?a") ""))))
             (add-after 'unpack 'restrain-to-scilab-cli
               (lambda _
                 ;; Install only scilab-cli.desktop
@@ -9680,31 +9681,31 @@ (define-public scilab
                 (substitute* "modules/types/Makefile"
                   (("\\$\\(MAKE\\) \\$\\(AM_MAKEFLAGS\\) check-am")
                    ""))))
-          ;; These generated files are assumed to be present during
-          ;; the build.
-          (add-after 'bootstrap 'bootstrap-dynamic_link-scripts
-            (lambda _
-              (with-directory-excursion "modules/dynamic_link/src/scripts"
-                ((assoc-ref %standard-phases 'bootstrap)))))
-          (add-before 'build 'pre-build
-            (lambda* (#:key inputs #:allow-other-keys)
-              ;; Fix scilab script.
-              (substitute* "bin/scilab"
-                (("/bin/ls")
-                 (search-input-file inputs "bin/ls")))
-              ;; Fix core.start.
-              (substitute* "modules/core/etc/core.start"
-                (("'SCI/modules")
-                 "SCI+'/modules"))))
-          ;; Prevent race condition
-          (add-after 'pre-build 'build-parsers
-            (lambda* (#:key (make-flags #~'()) #:allow-other-keys)
-              (with-directory-excursion "modules/ast"
-                (apply invoke "make"
-                       "src/cpp/parse/parsescilab.cpp"
-                       "src/cpp/parse/scanscilab.cpp"
-                       make-flags))))
-          ;; The startup script is mostly there to define the following env
+            ;; These generated files are assumed to be present during
+            ;; the build.
+            (add-after 'bootstrap 'bootstrap-dynamic_link-scripts
+              (lambda _
+                (with-directory-excursion "modules/dynamic_link/src/scripts"
+                  ((assoc-ref %standard-phases 'bootstrap)))))
+            (add-before 'build 'pre-build
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; Fix scilab script.
+                (substitute* "bin/scilab"
+                  (("/bin/ls")
+                   (search-input-file inputs "bin/ls")))
+                ;; Fix core.start.
+                (substitute* "modules/core/etc/core.start"
+                  (("'SCI/modules")
+                   "SCI+'/modules"))))
+            ;; Prevent race condition
+            (add-after 'pre-build 'build-parsers
+              (lambda* (#:key (make-flags #~'()) #:allow-other-keys)
+                (with-directory-excursion "modules/ast"
+                  (apply invoke "make"
+                         "src/cpp/parse/parsescilab.cpp"
+                         "src/cpp/parse/scanscilab.cpp"
+                         make-flags))))
+            ;; The startup script is mostly there to define the following env
             ;; variables properly. We can do this with guix directly.
             (add-after 'install 'rewrap-scilab-cli
               (lambda _
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:04 GMT) Full text and rfc822 format available.

Message #42 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 6/8] gnu: scilab: Update to 2024.0.0.
Date: Mon,  6 Nov 2023 00:51:49 +0100
Change-Id: Ie1af4dc620cee644388f6b8acf88ea50c4148b65
---
 gnu/packages/maths.scm                        | 16 +++--
 .../patches/scilab-hdf5-1.8-api.patch         | 71 -------------------
 2 files changed, 11 insertions(+), 76 deletions(-)
 delete mode 100644 gnu/packages/patches/scilab-hdf5-1.8-api.patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e3045f4fee..ce0b5a8949 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -104,6 +104,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
@@ -9525,7 +9526,7 @@ (define-public optizelle
 (define-public scilab
   (package
     (name "scilab")
-    (version "2023.1.0")
+    (version "2024.0.0")
     (source
      (origin
        (method git-fetch)
@@ -9535,10 +9536,9 @@ (define-public scilab
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0hbqsnc67b4f8zc690kl79bwhjaasykjlmqbln8iymnjcn3l5ypd"))
+         "08nyfli3x7gd396ffd1a8zn9fj3gm6a8yw0ggm547c09sp2rgvl7"))
        (modules '((guix build utils)
                   (ice-9 ftw)))
-       (patches (search-patches "scilab-hdf5-1.8-api.patch"))
        (snippet
         #~(begin
             ;; Delete everything except for scilab itself:
@@ -9593,7 +9593,7 @@ (define-public scilab
                         "modules/ast/src/cpp/parse/parsescilab.cpp"))))))
     (build-system gnu-build-system)
     (native-inputs
-     (list autoconf
+     (list autoconf-2.71
            autoconf-archive
            automake
            bison
@@ -9610,8 +9610,9 @@ (define-public scilab
                   curl
                   fftw
                   gettext-minimal
-                  hdf5-1.14
+                  hdf5-1.10
                   lapack
+                  libarchive
                   libx11
                   libxml2
                   matio
@@ -9656,6 +9657,11 @@ (define-public scilab
                       "modules/scicos/src/translator/makefile.mak"
                       "modules/scicos/src/modelica_compiler/makefile.mak")
                   (("nums\\.cmx?a") ""))))
+            (add-after 'unpack 'fix-linking
+              (lambda _
+                (substitute* "modules/Makefile.am"
+                  (("libscilab_cli_la_LDFLAGS = .*\\)" all)
+                   (string-append all " -lcurl")))))
             (add-after 'unpack 'restrain-to-scilab-cli
               (lambda _
                 ;; Install only scilab-cli.desktop
diff --git a/gnu/packages/patches/scilab-hdf5-1.8-api.patch b/gnu/packages/patches/scilab-hdf5-1.8-api.patch
deleted file mode 100644
index 8b453e4720..0000000000
--- a/gnu/packages/patches/scilab-hdf5-1.8-api.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-This patch fixes the compilation with hdf5 version >= 1.10. Adapted from
-https://aur.archlinux.org/cgit/aur.git/plain/hdf5_18_api.patch?h=scilab-git.
-
-diff -ur a/scilab/modules/hdf5/includes/HDF5Objects.h b/scilab/modules/hdf5/includes/HDF5Objects.h
---- a/scilab/modules/hdf5/includes/HDF5Objects.h
-+++ b/scilab/modules/hdf5/includes/HDF5Objects.h
-@@ -16,14 +16,12 @@
- #ifndef __HDF5OBJECTS_H__
- #define __HDF5OBJECTS_H__
- 
--#define H5_NO_DEPRECATED_SYMBOLS
- #undef H5_USE_16_API
-+#define H5_USE_18_API
- 
--#define H5Eset_auto_vers 2
- #include <hdf5.h>
- #include <hdf5_hl.h>
- 
--#undef H5_NO_DEPRECATED_SYMBOLS
- 
- //#define __HDF5OBJECTS_DEBUG__
- //#define __HDF5ERROR_PRINT__
-diff -ur a/scilab/modules/hdf5/Makefile.am b/scilab/modules/hdf5/Makefile.am
---- a/scilab/modules/hdf5/Makefile.am
-+++ b/scilab/modules/hdf5/Makefile.am
-@@ -104,8 +104,7 @@
-     -DH5Gopen_vers=2 \
-     -DH5Tget_array_dims_vers=2 \
-     -DH5Acreate_vers=2 \
--    -DH5Rdereference_vers=2 \
--    -DNO_DEPRECATED_SYMBOLS
-+    -DH5Rdereference_vers=2
- 
- 
- libscihdf5_la_CPPFLAGS = \
-diff -ur a/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp b/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
---- a/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
-+++ b/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
-@@ -13,6 +13,8 @@
- *
- */
- 
-+#define H5_USE_18_API
-+
- #include <vector>
- #include "function.hxx"
- #include "string.hxx"
-diff -ur a/scilab/modules/hdf5/src/c/h5_readDataFromFile.c b/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
---- a/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
-+++ b/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
-@@ -13,7 +13,7 @@
- *
- */
- 
--#define H5_NO_DEPRECATED_SYMBOLS
-+#define H5_USE_18_API
- 
- #ifndef _MSC_VER
- #include <sys/time.h>
-diff -ur a/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c b/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
---- a/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
-+++ b/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
-@@ -13,7 +13,7 @@
- *
- */
- 
--#define H5_NO_DEPRECATED_SYMBOLS
-+#define H5_USE_18_API
- 
- #ifndef _MSC_VER
- #include <sys/time.h>
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:05 GMT) Full text and rfc822 format available.

Message #45 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 1/8] gnu: scilab: Remove uneeded code.
Date: Mon,  6 Nov 2023 00:51:44 +0100
* gnu/packages/maths.scm (scilab):
[source](snippet): Remove directory Visual-Studio-settings and file Scilab.sln.
[arguments](configure-flags):
  Remove uneeded FFLAGS environment variable set.
[arguments](phases):
  prebuild: Remove uneeded SCIHOME setting code.

Change-Id: I71c044e19617bf556bbe95e7ba0cdbd716921055
---
 gnu/packages/maths.scm | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ed1708c77b..88b52eb4fc 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9554,7 +9554,8 @@ (define-public scilab
             (for-each delete-file-recursively
                       '("scilab"
                         "config"
-                        "libs/GetWindowsVersion"))
+                        "libs/GetWindowsVersion"
+                        "Visual-Studio-settings"))
             (for-each delete-file
                       (cons* "aclocal.m4"
                              "configure"
@@ -9566,6 +9567,7 @@ (define-public scilab
                              "m4/ltversion.m4"
                              "m4/lt~obsolete.m4"
                              "m4/pkg.m4"
+                             "Scilab.sln"
                              (find-files "." "^Makefile\\.in$")))
 
             ;; And finally some files in the modules directory:
@@ -9649,10 +9651,7 @@ (define-public scilab
                         (search-input-directory %build-inputs "include/eigen3"))
          ;; Find and link to the OCaml Num package
          "OCAMLC=ocamlfind ocamlc -package num"
-         "OCAMLOPT=ocamlfind ocamlopt -package num -linkpkg"
-         ;; There are some 2018-fortran errors that are ignored
-         ;; with this fortran compiler flag.
-         "FFLAGS=-fallow-argument-mismatch")
+         "OCAMLOPT=ocamlfind ocamlopt -package num -linkpkg")
       #:phases
       #~(modify-phases %standard-phases
           ;; The Num library is specified with the OCAMLC and
@@ -9680,14 +9679,12 @@ (define-public scilab
             (lambda* (#:key inputs #:allow-other-keys)
               ;; Fix scilab script.
               (substitute* "bin/scilab"
-                (("\\/bin\\/ls")
+                (("/bin/ls")
                  (search-input-file inputs "bin/ls")))
               ;; Fix core.start.
               (substitute* "modules/core/etc/core.start"
                 (("'SCI/modules")
-                 "SCI+'/modules"))
-              ;; Set SCIHOME to /tmp before macros compilation.
-              (setenv "SCIHOME" "/tmp")))
+                 "SCI+'/modules"))))
           ;; Prevent race condition
           (add-after 'pre-build 'build-parsers
             (lambda* (#:key (make-flags #~'()) #:allow-other-keys)
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:05 GMT) Full text and rfc822 format available.

Message #48 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 7/8] gnu: scilab: Add phase set-version.
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





Information forwarded to guix-patches <at> gnu.org:
bug#65853; Package guix-patches. (Mon, 06 Nov 2023 00:05:05 GMT) Full text and rfc822 format available.

Message #51 received at 65853 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH v3 8/8] gnu: scilab: Set default SCIHOME value.
Date: Mon,  6 Nov 2023 00:51:51 +0100
* gnu/packages/maths.scm (scilab): Set default SCIHOME value.
[argmuments](phases)[rewrap-scilab-cli]: Set default -scihome option
to respect XDG base dirs specification.

Change-Id: I9b55758a3ca1fbc523c3e40e891a2462f3246390
---
 gnu/packages/maths.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index dae4c528e2..355f2132bd 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9734,8 +9734,12 @@ (define (bin path) (string-append #$output "/bin/" path))
                 (copy-file (bin ".scilab-cli-bin-real") (bin "scilab-cli-bin"))
                 (delete-file (bin ".scilab-cli-bin-real"))
                 (substitute* (bin "scilab-cli")
-                  (("\\.scilab-cli-bin-real")
-                   "scilab-cli-bin")
+                  ;; Also set SCIHOME to sensible XDG base dirs value.
+                  (("\\.scilab-cli-bin-real\"")
+                   (string-append
+                    "scilab-cli-bin\" -scihome "
+                    "\"${XDG_STATE_HOME:-$HOME/.local/state}/scilab/"
+                    #$(package-version this-package) "\""))
                   (("export SCI=")
                    "unset LANGUAGE\nexport SCI="))))))))
     (home-page "https://www.scilab.org/")
-- 
2.41.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 23 Nov 2023 10:32:01 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Thu, 23 Nov 2023 10:32:01 GMT) Full text and rfc822 format available.

Message #56 received at 65853-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 65853-done <at> debbugs.gnu.org, 65857-done <at> debbugs.gnu.org
Subject: Re: bug#65857: [PATCH v2 2/2] gnu: scilab: Set SCIHOME default to
 respect XDG base dirs.
Date: Thu, 23 Nov 2023 11:30:42 +0100
Hi Nicolas,

Nicolas Graves <ngraves <at> ngraves.fr> skribis:

>   gnu: scilab: Remove uneeded code.
>   gnu: scilab: Activate tests and disable failing tests.
>   gnu: scilab: Use gexp for tcl and tk libraries.
>   gnu: scilab: Add phase rewrap-scilab-cli.
>   gnu: scilab: Reindent.
>   gnu: scilab: Update to 2024.0.0.
>   gnu: scilab: Add phase set-version.
>   gnu: scilab: Set default SCIHOME value.

I added one commit log that was mostly missing and applied the whole
series.  Thank you!

Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 23 Nov 2023 10:32:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Thu, 23 Nov 2023 10:32:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 23 Nov 2023 10:32:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Thu, 23 Nov 2023 10:32:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 21 Dec 2023 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 140 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.