guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#28214] [PATCH] gnu: hdf5: Add output for Fortran interface.


From: Ludovic Courtès
Subject: [bug#28214] [PATCH] gnu: hdf5: Add output for Fortran interface.
Date: Thu, 31 Aug 2017 14:56:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi Thomas,

Thomas Danckaert <address@hidden> skribis:

> From ea5b67230713bf79d625743eb18f57bf36d40407 Mon Sep 17 00:00:00 2001
> From: Thomas Danckaert <address@hidden>
> Date: Thu, 24 Aug 2017 11:00:59 +0200
> Subject: [PATCH] gnu: hdf5: Add output for fortran interface.
>
> * gnu/packages/maths.scm (hdf5) [native-inputs]: Add gfortran.
>   [outputs]: Add "fortran".
>   [arguments]: Enable Fortran compilation; add "/lib" directory of the fortran
>   output to the runpath of the Fortran libs; patch "libhdf5.settings" to
>   remove references to the C/C++/Fortran compilers; add a 'split phase to move
>   all Fortran-related files to the the Fortran output store location.

[...]

> +         (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"
> +              (("(Fortran Compiler: /gnu/store/)([a-Z0-9]*)" all prefix hash)
> +               (string-append prefix (string-take hash 10) "..."))
> +              (("(C Compiler: /gnu/store/)([a-Z0-9]*)" all prefix hash)
> +               (string-append prefix (string-take hash 10) "..."))
> +              (("(C\\+\\+ Compiler: /gnu/store/)([a-Z0-9]*)" all prefix hash)
> +               (string-append prefix (string-take hash 10) "...")))

Nice trick with the ellipses.  :-)

How about making it two patches: one that adds this ‘patch-settings’
phase, and one that does the Fortran thing?

Apart from that it LGTM!

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]