gnu: scilab: Fixup and improve compilerDetection.sh script.
* 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 Signed-off-by: Ludovic Courtès <ludo@gnu.org>master
parent
df1a6c7259
commit
4dec5a30fe
|
@ -2050,6 +2050,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
|
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
|
||||||
%D%/packages/patches/scalapack-gcc-10-compilation.patch \
|
%D%/packages/patches/scalapack-gcc-10-compilation.patch \
|
||||||
%D%/packages/patches/scheme48-tests.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/scons-test-environment.patch \
|
||||||
%D%/packages/patches/screen-hurd-path-max.patch \
|
%D%/packages/patches/screen-hurd-path-max.patch \
|
||||||
%D%/packages/patches/scsh-nonstring-search-path.patch \
|
%D%/packages/patches/scsh-nonstring-search-path.patch \
|
||||||
|
|
|
@ -9724,6 +9724,7 @@ computation is supported via MPI.")
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"08nyfli3x7gd396ffd1a8zn9fj3gm6a8yw0ggm547c09sp2rgvl7"))
|
"08nyfli3x7gd396ffd1a8zn9fj3gm6a8yw0ggm547c09sp2rgvl7"))
|
||||||
|
(patches (search-patches "scilab-better-compiler-detection.patch"))
|
||||||
(modules '((guix build utils)
|
(modules '((guix build utils)
|
||||||
(ice-9 ftw)))
|
(ice-9 ftw)))
|
||||||
(snippet
|
(snippet
|
||||||
|
@ -9884,7 +9885,11 @@ computation is supported via MPI.")
|
||||||
(add-after 'bootstrap 'bootstrap-dynamic_link-scripts
|
(add-after 'bootstrap 'bootstrap-dynamic_link-scripts
|
||||||
(lambda _
|
(lambda _
|
||||||
(with-directory-excursion "modules/dynamic_link/src/scripts"
|
(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
|
(add-before 'build 'pre-build
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; Fix core.start.
|
;; Fix core.start.
|
||||||
|
|
|
@ -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
|
||||||
|
|
Reference in New Issue