From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 70158@debbugs.gnu.org
Subject: [bug#70158] [PATCH v2 2/3] gnu: scilab: Fixup and improve compilerDetection.sh script.
Date: Tue, 23 Apr 2024 23:40:20 +0200 [thread overview]
Message-ID: <871q6v92rf.fsf@ngraves.fr> (raw)
In-Reply-To: <20240410071517.30074-2-ngraves@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:
> * 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
next prev parent reply other threads:[~2024-04-23 21:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 6:21 [bug#70158] [PATCH 0/6] Scilab: Fixup install of local Scilab packages Nicolas Graves via Guix-patches via
2024-04-03 6:25 ` [bug#70158] [PATCH 1/6] gnu: scilab: Remove unecessary code Nicolas Graves via Guix-patches via
2024-04-03 6:25 ` [bug#70158] [PATCH 2/6] gnu: scilab: Sort dynamic_link deleted files Nicolas Graves via Guix-patches via
2024-04-03 6:25 ` [bug#70158] [PATCH 3/6] gnu: scilab: Fixup badly-written compilerDetection.sh script Nicolas Graves via Guix-patches via
2024-04-03 6:25 ` [bug#70158] [PATCH 4/6] gnu: scilab: Simpler and more robust version setting Nicolas Graves via Guix-patches via
2024-04-03 6:25 ` [bug#70158] [PATCH 5/6] gnu: scilab: Improve compilerDetection.sh Nicolas Graves via Guix-patches via
2024-04-03 6:25 ` [bug#70158] [PATCH 6/6] gnu: scilab: Improve package management robustness in scilab-cli Nicolas Graves via Guix-patches via
2024-04-10 7:15 ` [bug#70158] [PATCH v2 1/3] gnu: scilab: Cleanup Nicolas Graves via Guix-patches via
2024-04-10 7:15 ` [bug#70158] [PATCH v2 2/3] gnu: scilab: Fixup and improve compilerDetection.sh script Nicolas Graves via Guix-patches via
2024-04-23 21:40 ` Nicolas Graves via Guix-patches via [this message]
2024-04-10 7:15 ` [bug#70158] [PATCH v2 3/3] gnu: scilab: Improve package management robustness in scilab-cli Nicolas Graves via Guix-patches via
2024-05-01 21:46 ` bug#70158: [PATCH v2 1/3] gnu: scilab: Cleanup Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871q6v92rf.fsf@ngraves.fr \
--to=guix-patches@gnu.org \
--cc=70158@debbugs.gnu.org \
--cc=ngraves@ngraves.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).