gnu: hdf5: Avoid unneeded store references to compilers.

* gnu/packages/maths.scm (hdf5) [arguments]: Add phase to patch
  "libhdf5.settings", removing references to the C/C++/Fortran compilers.
master
Thomas Danckaert 2017-08-31 17:29:36 +02:00 committed by Thomas Danckaert
parent e3a1a1deda
commit fd0378a147
No known key found for this signature in database
GPG Key ID: 5C3B064C724A5726
1 changed files with 10 additions and 0 deletions

View File

@ -673,6 +673,16 @@ incompatible with HDF5.")
(string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath="
(assoc-ref outputs "fortran") "/lib")))
#t))
(add-after 'configure 'patch-settings
(lambda _
;; libhdf5.settings contains the full path of the
;; compilers used, and its contents are included in
;; libhdf5.so. We truncate the hashes to avoid
;; unnecessary store references to those compilers:
(substitute* "src/libhdf5.settings"
(("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
(string-append prefix (string-take hash 10) "...")))
#t))
(add-after 'install 'patch-references
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin"))