GNU bug report logs - #72071
[PATCH 0/2] Fix hdf5-parallel-openmpi

Previous Next

Package: guix-patches;

Reported by: Luca Cirrottola <luca.cirrottola <at> inria.fr>

Date: Fri, 12 Jul 2024 09:45:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Bug is archived. No further changes may be made.

Full log


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

From: Luca Cirrottola <luca.cirrottola <at> inria.fr>
To: 72071 <at> debbugs.gnu.org
Cc: Luca Cirrottola <luca.cirrottola <at> inria.fr>
Subject: [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
---
 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





This bug report was last modified 333 days ago.

Previous Next


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