Subject: [PATCH 2/2] gnu: hdf5-1.14: Remove spurious include directories.

From: David Elsing <[email-masked]>
Date: Mon, 3 Jul 2023 22:00:47 +0000

* gnu/packages/maths.scm (hdf5-1.14)[arguments]: Use
'substitute-keyword-arguments' to add 'remove-subfiling-cppflags phase.
---
 gnu/packages/maths.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b2029db615..5ba9e07058 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1672,7 +1672,18 @@ (define-public hdf5-1.14
         (base32 "181bdh8hp7v9xqwcby3lknr92lxlicc2hqscba3f5nhf8lrr9rz4"))
        (modules '((guix build utils)))
        (snippet hdf5-snippet)
-       (patches (search-patches "hdf5-config-date.patch"))))))
+       (patches (search-patches "hdf5-config-date.patch"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments hdf5-1.10)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            ;; Remove include flag to directory in source tree
+            (add-after 'configure 'remove-subfiling-cppflags
+              (lambda _
+                (substitute* '("src/libhdf5.settings"
+                               "bin/h5cc"
+                               "c++/src/h5c++")
+                  (("-I.*/src/H5FDsubfiling") ""))))))))))
 
 (define-public hdf5
   ;; Default version of HDF5.
-- 
2.40.1