From: Luca Cirrottola <luca.cirrottola@inria.fr>
To: 72071@debbugs.gnu.org
Cc: Luca Cirrottola <luca.cirrottola@inria.fr>
Subject: [bug#72071] [PATCH 1/1] Backup original settings, so they can be restored before the check phase and patched again before the install phase (since the install-data target depends on this file).
Date: Thu, 25 Jul 2024 14:49:03 +0200 [thread overview]
Message-ID: <20240725124903.528781-2-luca.cirrottola@inria.fr> (raw)
In-Reply-To: <20240725124903.528781-1-luca.cirrottola@inria.fr>
---
gnu/packages/maths.scm | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 8116569bca..6787f9bb49 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1729,7 +1729,13 @@ (define-public hdf5-1.8
(("libhdf5hl_fortran_la_LDFLAGS =")
(string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath="
(assoc-ref outputs "fortran") "/lib")))))
- (add-after 'configure 'patch-settings
+ (add-after 'configure 'copy-settings
+ (lambda _
+ ;; Backup the original settings (because they are needed as a test
+ ;; reference during the "check" phase) before patching them in the
+ ;; "patch-settings-for-build" phase.
+ (copy-file "src/libhdf5.settings" "libhdf5_settings.orig")))
+ (add-before 'build 'patch-settings-for-build
(lambda _
;; libhdf5.settings contains the full path of the
;; compilers used, and its contents are included in
@@ -1742,7 +1748,19 @@ (define-public hdf5-1.8
;; settings file reproducible.
(("Uname information:.*")
"Uname information: Linux\n"))))
- (add-after 'install 'patch-references
+ (add-before 'check 'restore-settings-for-check
+ (lambda _
+ ;; Swap the file that has been patched in the
+ ;; "patch-settings-for-build" phase with the original one which
+ ;; has been saved in the "copy-settings" phase, so that it can be
+ ;; used as a test reference in the "check" phase.
+ (copy-file "src/libhdf5.settings" "libhdf5_settings.patched")
+ (rename-file "libhdf5_settings.orig" "src/libhdf5.settings")))
+ (add-before 'install 'patch-settings-for-install
+ (lambda _
+ ;; Restore the patched settings file before installation.
+ (rename-file "libhdf5_settings.patched" "src/libhdf5.settings")))
+ (add-after 'install 'patch-references
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin"))
(zlib (assoc-ref inputs "zlib")))
--
2.34.1
next prev parent reply other threads:[~2024-07-25 12:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 9:40 [bug#72071] [PATCH 0/2] Fix hdf5-parallel-openmpi Luca Cirrottola
2024-07-12 9:48 ` [bug#72071] [PATCH 1/2] Solve issue https://issues.guix.gnu.org/68313 by updating HDF5 version to 1.14.3 (containing the official fix https://github.com/HDFGroup/hdf5/pull/3421) Luca Cirrottola
2024-07-12 9:49 ` [bug#72071] [PATCH 2/2] Fix broken HDF5 test: Do not modify the file src/libhdf5.settings generated by the configure script, as it will be checked against a new version generated by the test code in test/test_check_version.sh.in Luca Cirrottola
2024-07-19 16:01 ` [bug#72071] [PATCH 0/2] Fix hdf5-parallel-openmpi Ludovic Courtès
2024-07-25 10:08 ` Luca Cirrottola
2024-07-25 12:49 ` [bug#72071] [PATCH 0/1] Split the patch-settings phase into copy-settings, patch-settings-for-build, restore-settings-for-check, patch-settings-for-install Luca Cirrottola
2024-07-25 12:49 ` Luca Cirrottola [this message]
2024-07-29 17:36 ` [bug#72071] [PATCH 0/2] A clean series of patches Luca Cirrottola
2024-07-29 17:36 ` [bug#72071] [PATCH 1/2] Solve issue https://issues.guix.gnu.org/68313 by updating HDF5 version to 1.14.3 (containing the official fix https://github.com/HDFGroup/hdf5/pull/3421) Luca Cirrottola
2024-07-29 17:36 ` [bug#72071] [PATCH 2/2] Skip test_check_version since the patch-settings phase needs to modify the test reference file Luca Cirrottola
2024-08-19 10:37 ` bug#72071: [PATCH 0/2] A clean series of patches 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240725124903.528781-2-luca.cirrottola@inria.fr \
--to=luca.cirrottola@inria.fr \
--cc=72071@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.