From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnP1w-0002yX-Nj for guix-patches@gnu.org; Thu, 31 Aug 2017 08:57:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnP1q-0000Js-Qg for guix-patches@gnu.org; Thu, 31 Aug 2017 08:57:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56010) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dnP1q-0000Jo-MP for guix-patches@gnu.org; Thu, 31 Aug 2017 08:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dnP1q-0006em-G4 for guix-patches@gnu.org; Thu, 31 Aug 2017 08:57:02 -0400 Subject: [bug#28214] [PATCH] gnu: hdf5: Add output for Fortran interface. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170824.115309.1248640013266066348.post@thomasdanckaert.be> Date: Thu, 31 Aug 2017 14:56:30 +0200 In-Reply-To: <20170824.115309.1248640013266066348.post@thomasdanckaert.be> (Thomas Danckaert's message of "Thu, 24 Aug 2017 11:53:09 +0200 (CEST)") Message-ID: <87wp5jsxoh.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Thomas Danckaert Cc: 28214@debbugs.gnu.org Hi Thomas, Thomas Danckaert skribis: > From ea5b67230713bf79d625743eb18f57bf36d40407 Mon Sep 17 00:00:00 2001 > From: Thomas Danckaert > 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 fo= rtran > 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 =E2=80=98patch-settings= =E2=80=99 phase, and one that does the Fortran thing? Apart from that it LGTM! Thanks, Ludo=E2=80=99.