[PATCH 0/6] Scilab: Fixup install of local Scilab packages.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
N
N
Nicolas Graves wrote on 3 Apr 08:21 +0200
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
20240403062146.1652-1-ngraves@ngraves.fr
This patch series brings a few changes forward for Scilab.
Patches 1,2 and 4 are cleanup patches.
Patches 3 and 5 are necessary to be able to have an error log when
Scilab calls configure during installation of external scilab
packages.
Patch 6 fixes package installation for packages that have help
included (currently requires java).

Nicolas Graves (6):
gnu: scilab: Remove unecessary code.
gnu: scilab: Sort dynamic_link deleted files.
gnu: scilab: Fixup badly-written compilerDetection.sh script.
gnu: scilab: Simpler and more robust version setting.
gnu: scilab: Improve compilerDetection.sh.
gnu: scilab: Improve package management robustness in scilab-cli.

gnu/packages/maths.scm | 20 +++++------
.../scilab-better-compiler-detection.patch | 36 +++++++++++++++++++
.../patches/scilab-tbx_build_help.patch | 36 +++++++++++++++++++
3 files changed, 82 insertions(+), 10 deletions(-)
create mode 100644 gnu/packages/patches/scilab-better-compiler-detection.patch
create mode 100644 gnu/packages/patches/scilab-tbx_build_help.patch

--
2.41.0
N
N
Nicolas Graves wrote on 3 Apr 08:25 +0200
[PATCH 1/6] gnu: scilab: Remove unecessary code.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240403062528.5483-1-ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab):
[arguments]<#:phases>: In pre-build phase, remove unecessary
code, due to the former introduction of the rewrap-scilab-cli
phase.

Change-Id: I49b17886405e1ed8161e71b51655fa393ff7f10b
---
gnu/packages/maths.scm | 4 ----
1 file changed, 4 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 479591889f..8defc83534 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9883,10 +9883,6 @@ (define-public scilab
((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")
--
2.41.0
N
N
Nicolas Graves wrote on 3 Apr 08:25 +0200
[PATCH 2/6] gnu: scilab: Sort dynamic_link deleted files.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240403062528.5483-2-ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab):
[source]<origin>(snippet) Sort dynamic_link deleted files.

Change-Id: Iecc013bcef6ddc146daba10b4944ff84141d83cc
---
gnu/packages/maths.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 8defc83534..0cb31abf7b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9762,9 +9762,9 @@ (define-public scilab
"compile"
"config.guess"
"config.sub"
- "ltmain.sh"
"depcomp"
"install-sh"
+ "ltmain.sh"
"missing"))
(delete-file-recursively "modules/dynamic_link/src/scripts/m4")
(for-each delete-file
--
2.41.0
N
N
Nicolas Graves wrote on 3 Apr 08:25 +0200
[PATCH 3/6] gnu: scilab: Fixup badly-written compilerDetection.sh script.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240403062528.5483-3-ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab)
[arguments]<#:phases>: Fix compilerDetection.sh script in phase
bootstrap-dynamic_link-scripts.

Change-Id: I7b1c78c4637fa1bc965eca8c516bf0b6cd4b92d1
---
gnu/packages/maths.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0cb31abf7b..c920bc2f30 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9880,7 +9880,11 @@ (define-public scilab
(add-after 'bootstrap 'bootstrap-dynamic_link-scripts
(lambda _
(with-directory-excursion "modules/dynamic_link/src/scripts"
- ((assoc-ref %standard-phases 'bootstrap)))))
+ ((assoc-ref %standard-phases 'bootstrap))
+ (substitute* "compilerDetection.sh"
+ (("PATHTOCONFIGURE=.*")
+ "PATHTOCONFIGURE=${BASH_SOURCE[0]%/*}/\n")
+ (("PROGNAME.*") "\n")))))
(add-before 'build 'pre-build
(lambda* (#:key inputs #:allow-other-keys)
;; Fix core.start.
--
2.41.0
N
N
Nicolas Graves wrote on 3 Apr 08:25 +0200
[PATCH 5/6] gnu: scilab: Improve compilerDetection.sh.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240403062528.5483-5-ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab)[source]<origin>: Improve
compilerDetection.sh error reporting on Guix.
* gnu/packages/patches/scilab-better-compiler-detection.patch :
Add patch.

Change-Id: Ic055650bc490f8963bf130a126ffbbb51f437811
---
gnu/packages/maths.scm | 1 +
.../scilab-better-compiler-detection.patch | 36 +++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 gnu/packages/patches/scilab-better-compiler-detection.patch

Toggle diff (56 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 9223a86eab..0d530851b1 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9718,6 +9718,7 @@ (define-public scilab
(sha256
(base32
"08nyfli3x7gd396ffd1a8zn9fj3gm6a8yw0ggm547c09sp2rgvl7"))
+ (patches (search-patches "scilab-better-compiler-detection.patch"))
(modules '((guix build utils)
(ice-9 ftw)))
(snippet
diff --git a/gnu/packages/patches/scilab-better-compiler-detection.patch b/gnu/packages/patches/scilab-better-compiler-detection.patch
new file mode 100644
index 0000000000..225f773826
--- /dev/null
+++ b/gnu/packages/patches/scilab-better-compiler-detection.patch
@@ -0,0 +1,36 @@
+From fada18edd8905f3321fd1719b1c0a46c66d214af Mon Sep 17 00:00:00 2001
+From: Nicolas Graves <ngraves@ngraves.fr>
+Date: Wed, 27 Mar 2024 06:29:25 +0100
+Subject: [PATCH] scilab: Better debugging in compilerDetection.sh.
+
+---
+ .../dynamic_link/src/scripts/compilerDetection.sh | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh b/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
+index 0a22a695555..ead86eb58ac 100755
+--- a/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
++++ b/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
+@@ -18,10 +18,16 @@ if test -x "$(which gcc 2>/dev/null)"; then
+ fi
+
+ # Relaunch configure if files are missing
+-if test ! -s Makefile.orig -o ! -s libtool; then
++if test ! -s Makefile.orig -o ! -s libtool; then
+ echo "Detection of C/C++/Fortran Compilers"
+ ./configure --disable-static --disable-dependency-tracking "$@"
+- mv Makefile Makefile.orig
+-else
++ configure_exit_status=$?
++ if [ $configure_exit_status -ne 0 ]; then
++ cat config.log
++ exit $configure_exit_status
++ else
++ mv Makefile Makefile.orig
++ fi
++else
+ echo "Detection of compilers already done"
+ fi
+--
+2.41.0
+
--
2.41.0
N
N
Nicolas Graves wrote on 3 Apr 08:25 +0200
[PATCH 4/6] gnu: scilab: Simpler and more robust version setting.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240403062528.5483-4-ngraves@ngraves.fr
* 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(-)

Toggle diff (19 lines)
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
--
2.41.0
N
N
Nicolas Graves wrote on 3 Apr 08:25 +0200
[PATCH 6/6] gnu: scilab: Improve package management robustness in scilab-cli.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240403062528.5483-6-ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab)[source]<origin>: Improve
package management robustness in scilab-cli by allowing
tbx_build_help to log the scilab mode incompatibility error and not
process the rest of the function instead of failing with it.
* gnu/packages/patches/scilab-tbx_build_help.patch :
Add patch.

Change-Id: I8ee94afb4aba906cbc8c7ca67f4c89aa0cf55ae6
---
gnu/packages/maths.scm | 3 +-
.../patches/scilab-tbx_build_help.patch | 36 +++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/scilab-tbx_build_help.patch

Toggle diff (58 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0d530851b1..1c9a5dcf02 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9718,7 +9718,8 @@ (define-public scilab
(sha256
(base32
"08nyfli3x7gd396ffd1a8zn9fj3gm6a8yw0ggm547c09sp2rgvl7"))
- (patches (search-patches "scilab-better-compiler-detection.patch"))
+ (patches (search-patches "scilab-better-compiler-detection.patch"
+ "scilab-tbx_build_help.patch"))
(modules '((guix build utils)
(ice-9 ftw)))
(snippet
diff --git a/gnu/packages/patches/scilab-tbx_build_help.patch b/gnu/packages/patches/scilab-tbx_build_help.patch
new file mode 100644
index 0000000000..6e6826d494
--- /dev/null
+++ b/gnu/packages/patches/scilab-tbx_build_help.patch
@@ -0,0 +1,36 @@
+From c59d78c5a5c8c187450f157cf7f8480455e8e6a2 Mon Sep 17 00:00:00 2001
+From: Nicolas Graves <ngraves@ngraves.fr>
+Date: Wed, 3 Apr 2024 03:32:23 +0200
+Subject: [PATCH] scilab: tbx_build_help: Allow for some flexibility under
+ -nwni.
+
+---
+ .../modules_manager/macros/tbx_build_help.sci | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/scilab/modules/modules_manager/macros/tbx_build_help.sci b/scilab/modules/modules_manager/macros/tbx_build_help.sci
+index 7862e33a868..5593ee3dc04 100644
+--- a/scilab/modules/modules_manager/macros/tbx_build_help.sci
++++ b/scilab/modules/modules_manager/macros/tbx_build_help.sci
+@@ -58,12 +58,12 @@ function tbx_build_help(moduletitle, path)
+
+ // Check scilab mode
+ if and(getscilabmode() <> ["STD" "NW"]) then
+- error(msprintf(gettext("%s: documentation cannot be built in this scilab mode: %s.\n"),"tbx_build_help",getscilabmode()));
++ msprintf(gettext("%s: documentation cannot be built in this scilab mode: %s.\n"),"tbx_build_help",getscilabmode());
++ else
++ directory_language = basename(path);
++ default_language = "en_US"
++
++ xmltojar(path, moduletitle, directory_language, default_language);
+ end
+
+- directory_language = basename(path);
+- default_language = "en_US"
+-
+- xmltojar(path, moduletitle, directory_language, default_language);
+-
+ endfunction
+--
+2.41.0
+
--
2.41.0
N
N
Nicolas Graves wrote on 10 Apr 07:48 +0200
Re: [PATCH 0/6] Scilab: Fixup install of local Scilab packages.
(name . David Elsing)(address . david.elsing@posteo.net)(address . 70158@debbugs.gnu.org)
87seztdazj.fsf@ngraves.fr
On 2024-04-08 22:31, David Elsing wrote:

Toggle quote (6 lines)
> Hi Nicolas,
>
> I'm not really familiar with Scilab itself, I worked on the package to
> update the SuiteSparse dependency and noticed that many files were
> autogenerated.

Thanks for your review David.
Toggle quote (5 lines)
>
> Here are some comments about your patches:
> - I think patches 1, 2 and 4 can be combined, as well as patches 3, 5
> and 6, or was there a reason to split them?

6 is separate from 3 and 5, I'll merge the other though, thanks!

Toggle quote (3 lines)
> - For patch 4, I don't think you need to mention how many lines are
> saved in the commit message. :)

DONE

Toggle quote (6 lines)
> - For patches 5 and 6, my impression was that patch files should have a
> comment and mention the upstream status if relevant. Maybe you can
> additionally make a merge request upstream for them, as they do not
> seem specific to Guix? Patch files should also be registered in
> gnu/local.mk.

I will.

Toggle quote (5 lines)
> - `guix lint` mentions that "bash-minimal" should be in 'inputs' when
> 'wrap-program' is used. This is relevant for cross builds, but at the
> moment, dune-build-system (for OCaml packages) does not support cross
> builds anyway. It wouldn't hurt to add bash-minimal anyway though.

Thanks, will add that too.

Toggle quote (6 lines)
>
> Otherwise, they look fine to me.
>
> Cheers,
> David

--
Best regards,
Nicolas Graves
N
N
Nicolas Graves wrote on 10 Apr 09:15 +0200
[PATCH v2 1/3] gnu: scilab: Cleanup.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240410071517.30074-1-ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab):
[arguments]<#:phases>: In pre-build phase, remove unecessary
code, due to the former introduction of the rewrap-scilab-cli
phase. More robust version setting in the set-version phase. It
anticipates for the next release which will not use "main" anymore.
[source]<origin>(snippet) Sort dynamic_link deleted files.
[inputs]: Add bash-minimal.

Change-Id: I49b17886405e1ed8161e71b51655fa393ff7f10b
---
gnu/packages/maths.scm | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 03760f3f3e..00b3ed213b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9759,9 +9759,9 @@ (define-public scilab
"compile"
"config.guess"
"config.sub"
- "ltmain.sh"
"depcomp"
"install-sh"
+ "ltmain.sh"
"missing"))
(delete-file-recursively "modules/dynamic_link/src/scripts/m4")
(for-each delete-file
@@ -9785,6 +9785,7 @@ (define-public scilab
(inputs (list `(,pcre "bin")
`(,pcre "out")
arpack-ng
+ bash-minimal
curl
fftw
gettext-minimal
@@ -9842,10 +9843,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
@@ -9879,10 +9878,6 @@ (define-public scilab
((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")
--
2.41.0
N
N
Nicolas Graves wrote on 10 Apr 09:15 +0200
[PATCH v2 2/3] gnu: scilab: Fixup and improve compilerDetection.sh script.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240410071517.30074-2-ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab)
[arguments]<#:phases>: Fix compilerDetection.sh script in phase
bootstrap-dynamic_link-scripts.
[source]<origin>(patches): Add scilab-better-compiler-detection.patch.
* gnu/packages/patches/scilab-better-compiler-detection.patch: Add
file.
* gnu/local.mk(dist_path_DATA): Add
scilab-better-compiler-detection.patch.

Change-Id: I7b1c78c4637fa1bc965eca8c516bf0b6cd4b92d1
---
gnu/local.mk | 1 +
gnu/packages/maths.scm | 7 +++-
.../scilab-better-compiler-detection.patch | 36 +++++++++++++++++++
3 files changed, 43 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/scilab-better-compiler-detection.patch

Toggle diff (81 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 255bb870e9..f8f4fd40d5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2047,6 +2047,7 @@ dist_patch_DATA = \
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
%D%/packages/patches/scalapack-gcc-10-compilation.patch \
%D%/packages/patches/scheme48-tests.patch \
+ %D%/packages/patches/scilab-better-compiler-detection.patch \
%D%/packages/patches/scons-test-environment.patch \
%D%/packages/patches/screen-hurd-path-max.patch \
%D%/packages/patches/scsh-nonstring-search-path.patch \
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 00b3ed213b..0b6d8596eb 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9715,6 +9715,7 @@ (define-public scilab
(sha256
(base32
"08nyfli3x7gd396ffd1a8zn9fj3gm6a8yw0ggm547c09sp2rgvl7"))
+ (patches (search-patches "scilab-better-compiler-detection.patch"))
(modules '((guix build utils)
(ice-9 ftw)))
(snippet
@@ -9875,7 +9876,11 @@ (define-public scilab
(add-after 'bootstrap 'bootstrap-dynamic_link-scripts
(lambda _
(with-directory-excursion "modules/dynamic_link/src/scripts"
- ((assoc-ref %standard-phases 'bootstrap)))))
+ ((assoc-ref %standard-phases 'bootstrap))
+ (substitute* "compilerDetection.sh"
+ (("PATHTOCONFIGURE=.*")
+ "PATHTOCONFIGURE=${BASH_SOURCE[0]%/*}/\n")
+ (("PROGNAME.*") "\n")))))
(add-before 'build 'pre-build
(lambda* (#:key inputs #:allow-other-keys)
;; Fix core.start.
diff --git a/gnu/packages/patches/scilab-better-compiler-detection.patch b/gnu/packages/patches/scilab-better-compiler-detection.patch
new file mode 100644
index 0000000000..225f773826
--- /dev/null
+++ b/gnu/packages/patches/scilab-better-compiler-detection.patch
@@ -0,0 +1,36 @@
+From fada18edd8905f3321fd1719b1c0a46c66d214af Mon Sep 17 00:00:00 2001
+From: Nicolas Graves <ngraves@ngraves.fr>
+Date: Wed, 27 Mar 2024 06:29:25 +0100
+Subject: [PATCH] scilab: Better debugging in compilerDetection.sh.
+
+---
+ .../dynamic_link/src/scripts/compilerDetection.sh | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh b/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
+index 0a22a695555..ead86eb58ac 100755
+--- a/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
++++ b/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
+@@ -18,10 +18,16 @@ if test -x "$(which gcc 2>/dev/null)"; then
+ fi
+
+ # Relaunch configure if files are missing
+-if test ! -s Makefile.orig -o ! -s libtool; then
++if test ! -s Makefile.orig -o ! -s libtool; then
+ echo "Detection of C/C++/Fortran Compilers"
+ ./configure --disable-static --disable-dependency-tracking "$@"
+- mv Makefile Makefile.orig
+-else
++ configure_exit_status=$?
++ if [ $configure_exit_status -ne 0 ]; then
++ cat config.log
++ exit $configure_exit_status
++ else
++ mv Makefile Makefile.orig
++ fi
++else
+ echo "Detection of compilers already done"
+ fi
+--
+2.41.0
+
--
2.41.0
N
N
Nicolas Graves wrote on 10 Apr 09:15 +0200
[PATCH v2 3/3] gnu: scilab: Improve package management robustness in scilab-cli.
(address . 70158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240410071517.30074-3-ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab)[source]<origin>: Improve
package management robustness in scilab-cli by allowing
tbx_build_help to log the scilab mode incompatibility error and not
process the rest of the function instead of failing with it.
* gnu/packages/patches/scilab-tbx_build_help.patch :
Add patch.
* gnu/local.mk(dist_patch_DATA): Add
gnu/packages/patches/scilab-tbx_build_help.patch.

Change-Id: I8ee94afb4aba906cbc8c7ca67f4c89aa0cf55ae6
---
gnu/local.mk | 1 +
gnu/packages/maths.scm | 3 +-
.../patches/scilab-tbx_build_help.patch | 38 +++++++++++++++++++
3 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/scilab-tbx_build_help.patch

Toggle diff (72 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index f8f4fd40d5..f373fa016c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2048,6 +2048,7 @@ dist_patch_DATA = \
%D%/packages/patches/scalapack-gcc-10-compilation.patch \
%D%/packages/patches/scheme48-tests.patch \
%D%/packages/patches/scilab-better-compiler-detection.patch \
+ %D%/packages/patches/scilab-tbx_build_help.patch \
%D%/packages/patches/scons-test-environment.patch \
%D%/packages/patches/screen-hurd-path-max.patch \
%D%/packages/patches/scsh-nonstring-search-path.patch \
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0b6d8596eb..0d5382629d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9715,7 +9715,8 @@ (define-public scilab
(sha256
(base32
"08nyfli3x7gd396ffd1a8zn9fj3gm6a8yw0ggm547c09sp2rgvl7"))
- (patches (search-patches "scilab-better-compiler-detection.patch"))
+ (patches (search-patches "scilab-better-compiler-detection.patch"
+ "scilab-tbx_build_help.patch"))
(modules '((guix build utils)
(ice-9 ftw)))
(snippet
diff --git a/gnu/packages/patches/scilab-tbx_build_help.patch b/gnu/packages/patches/scilab-tbx_build_help.patch
new file mode 100644
index 0000000000..d2a9b41357
--- /dev/null
+++ b/gnu/packages/patches/scilab-tbx_build_help.patch
@@ -0,0 +1,38 @@
+From c59d78c5a5c8c187450f157cf7f8480455e8e6a2 Mon Sep 17 00:00:00 2001
+From: Nicolas Graves <ngraves@ngraves.fr>
+Date: Wed, 3 Apr 2024 03:32:23 +0200
+Subject: [PATCH] scilab: tbx_build_help: Allow for some flexibility under
+ -nwni.
+
+upstream reference: https://gitlab.com/scilab/scilab/-/merge_requests/818
+
+---
+ .../modules_manager/macros/tbx_build_help.sci | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/scilab/modules/modules_manager/macros/tbx_build_help.sci b/scilab/modules/modules_manager/macros/tbx_build_help.sci
+index 7862e33a868..5593ee3dc04 100644
+--- a/scilab/modules/modules_manager/macros/tbx_build_help.sci
++++ b/scilab/modules/modules_manager/macros/tbx_build_help.sci
+@@ -58,12 +58,12 @@ function tbx_build_help(moduletitle, path)
+
+ // Check scilab mode
+ if and(getscilabmode() <> ["STD" "NW"]) then
+- error(msprintf(gettext("%s: documentation cannot be built in this scilab mode: %s.\n"),"tbx_build_help",getscilabmode()));
++ msprintf(gettext("%s: documentation cannot be built in this scilab mode: %s.\n"),"tbx_build_help",getscilabmode());
++ else
++ directory_language = basename(path);
++ default_language = "en_US"
++
++ xmltojar(path, moduletitle, directory_language, default_language);
+ end
+
+- directory_language = basename(path);
+- default_language = "en_US"
+-
+- xmltojar(path, moduletitle, directory_language, default_language);
+-
+ endfunction
+--
+2.41.0
+
--
2.41.0
N
N
Nicolas Graves wrote on 23 Apr 23:40 +0200
Re: [bug#70158] [PATCH v2 2/3] gnu: scilab: Fixup and improve compilerDetection.sh script.
871q6v92rf.fsf@ngraves.fr
The content of this patch has been merged upstream and will be provided
in the next version of scilab.

As these improvements are not blocking, this patch can be discarded. 1
and 3 are still useful though.

Nicolas


On 2024-04-10 09:15, Nicolas Graves via Guix-patches via wrote:

Toggle quote (97 lines)
> * gnu/packages/maths.scm (scilab)
> [arguments]<#:phases>: Fix compilerDetection.sh script in phase
> bootstrap-dynamic_link-scripts.
> [source]<origin>(patches): Add scilab-better-compiler-detection.patch.
> * gnu/packages/patches/scilab-better-compiler-detection.patch: Add
> file.
> * gnu/local.mk(dist_path_DATA): Add
> scilab-better-compiler-detection.patch.
>
> Change-Id: I7b1c78c4637fa1bc965eca8c516bf0b6cd4b92d1
> ---
> gnu/local.mk | 1 +
> gnu/packages/maths.scm | 7 +++-
> .../scilab-better-compiler-detection.patch | 36 +++++++++++++++++++
> 3 files changed, 43 insertions(+), 1 deletion(-)
> create mode 100644 gnu/packages/patches/scilab-better-compiler-detection.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 255bb870e9..f8f4fd40d5 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -2047,6 +2047,7 @@ dist_patch_DATA = \
> %D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
> %D%/packages/patches/scalapack-gcc-10-compilation.patch \
> %D%/packages/patches/scheme48-tests.patch \
> + %D%/packages/patches/scilab-better-compiler-detection.patch \
> %D%/packages/patches/scons-test-environment.patch \
> %D%/packages/patches/screen-hurd-path-max.patch \
> %D%/packages/patches/scsh-nonstring-search-path.patch \
> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
> index 00b3ed213b..0b6d8596eb 100644
> --- a/gnu/packages/maths.scm
> +++ b/gnu/packages/maths.scm
> @@ -9715,6 +9715,7 @@ (define-public scilab
> (sha256
> (base32
> "08nyfli3x7gd396ffd1a8zn9fj3gm6a8yw0ggm547c09sp2rgvl7"))
> + (patches (search-patches "scilab-better-compiler-detection.patch"))
> (modules '((guix build utils)
> (ice-9 ftw)))
> (snippet
> @@ -9875,7 +9876,11 @@ (define-public scilab
> (add-after 'bootstrap 'bootstrap-dynamic_link-scripts
> (lambda _
> (with-directory-excursion "modules/dynamic_link/src/scripts"
> - ((assoc-ref %standard-phases 'bootstrap)))))
> + ((assoc-ref %standard-phases 'bootstrap))
> + (substitute* "compilerDetection.sh"
> + (("PATHTOCONFIGURE=.*")
> + "PATHTOCONFIGURE=${BASH_SOURCE[0]%/*}/\n")
> + (("PROGNAME.*") "\n")))))
> (add-before 'build 'pre-build
> (lambda* (#:key inputs #:allow-other-keys)
> ;; Fix core.start.
> diff --git a/gnu/packages/patches/scilab-better-compiler-detection.patch b/gnu/packages/patches/scilab-better-compiler-detection.patch
> new file mode 100644
> index 0000000000..225f773826
> --- /dev/null
> +++ b/gnu/packages/patches/scilab-better-compiler-detection.patch
> @@ -0,0 +1,36 @@
> +From fada18edd8905f3321fd1719b1c0a46c66d214af Mon Sep 17 00:00:00 2001
> +From: Nicolas Graves <ngraves@ngraves.fr>
> +Date: Wed, 27 Mar 2024 06:29:25 +0100
> +Subject: [PATCH] scilab: Better debugging in compilerDetection.sh.
> +
> +---
> + .../dynamic_link/src/scripts/compilerDetection.sh | 12 +++++++++---
> + 1 file changed, 9 insertions(+), 3 deletions(-)
> +
> +diff --git a/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh b/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
> +index 0a22a695555..ead86eb58ac 100755
> +--- a/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
> ++++ b/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
> +@@ -18,10 +18,16 @@ if test -x "$(which gcc 2>/dev/null)"; then
> + fi
> +
> + # Relaunch configure if files are missing
> +-if test ! -s Makefile.orig -o ! -s libtool; then
> ++if test ! -s Makefile.orig -o ! -s libtool; then
> + echo "Detection of C/C++/Fortran Compilers"
> + ./configure --disable-static --disable-dependency-tracking "$@"
> +- mv Makefile Makefile.orig
> +-else
> ++ configure_exit_status=$?
> ++ if [ $configure_exit_status -ne 0 ]; then
> ++ cat config.log
> ++ exit $configure_exit_status
> ++ else
> ++ mv Makefile Makefile.orig
> ++ fi
> ++else
> + echo "Detection of compilers already done"
> + fi
> +--
> +2.41.0
> +

--
Best regards,
Nicolas Graves
L
L
Ludovic Courtès wrote on 1 May 23:46 +0200
Re: [bug#70158] [PATCH v2 1/3] gnu: scilab: Cleanup.
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 70158-done@debbugs.gnu.org)
87sez12ojo.fsf@gnu.org
Hi,

Applied v2, included patch 2/3. Substitutes are available.

Thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70158@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70158
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch