From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: Add hdf4 Date: Wed, 12 Oct 2016 14:54:40 +0200 Message-ID: <87shs1ohgv.fsf@gnu.org> References: <20161011.105744.1519945377775544087.post@thomasdanckaert.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buJ3Z-0001x9-Vp for guix-devel@gnu.org; Wed, 12 Oct 2016 08:54:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buJ3V-0003In-K8 for guix-devel@gnu.org; Wed, 12 Oct 2016 08:54:49 -0400 In-Reply-To: <20161011.105744.1519945377775544087.post@thomasdanckaert.be> (Thomas Danckaert's message of "Tue, 11 Oct 2016 10:57:44 +0200 (CEST)") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Thomas Danckaert Cc: guix-devel@gnu.org Hello! Thomas Danckaert skribis: > this patch continues the work done by Jeremy Robst to package HDF4 > > (https://lists.gnu.org/archive/html/guix-devel/2016-06/msg00069.html) Nice! > - Back then, people reported occasional build failures. I've disabled > parallel tests and don't have any problems on my system anymore > (maybe someone else can test?). Will do. > - I've added a patch to allow a shared build with Fortran interface, > and some substitutions to remove bogus RPATH settings from the > Makefiles (otherwise, build directories are included in the RPATH). > > - I've also added a variant =E2=80=9Chdf4-alt=E2=80=9D: by default, HDF4= includes a > netCDF API to access HDF4 files, which clashes with the symbols in > the real netCDF library when you try to use both libraries in your > program. This variant uses the =E2=80=9C--disable-netcdf=E2=80=9D con= figure flag > to avoid this. We could call it =E2=80=9Chdf4-nonetcdf=E2=80=9D, but = the name > =E2=80=9Chdf4-alt=E2=80=9D is used by Debian, so maybe it's good to us= e the same? Would =E2=80=9Chdf4-minimal=E2=80=9D sound appropriate here? That=E2=80=99= s a convention we use in similar cases. Otherwise =E2=80=9Chdf4-alt=E2=80=9D is fine with me. > From dd7eca9a3cfec364a05aa0f52b941f09b4dea039 Mon Sep 17 00:00:00 2001 > From: Thomas Danckaert > Date: Wed, 28 Sep 2016 10:34:58 +0200 > Subject: [PATCH] gnu: Add hdf4 > > * gnu/packages/maths.scm (hdf4, hdf4-alt): New variables. > * gnu/packages/patches/hdf4-reproducibility.patch: New file. > * gnu/packages/patches/hdf4-shared-fortran.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add patches. Please credit Jeremy in a =E2=80=9CCo-authored-by=E2=80=9D tag. I only have cosmetic comments: > + (substitute* > + (map (lambda (dir) (string-append dir "/Makefile.in")) > + '("hdf" "hdf/examples" "hdf/fortran" "hdf/src" > + "hdf/test" "hdf/util" "mfhdf" "mfhdf/dumper" > + "mfhdf/examples" "mfhdf/fortran" "mfhdf/hdfimpor= t" > + "mfhdf/hdiff" "mfhdf/hrepack" "mfhdf/libsrc" > + "mfhdf/ncgen" "mfhdf/ncdump" "mfhdf/nctest" > + "mfhdf/test" "mfhdf/xdr")) Maybe simply (find-files "." "^Makefile\\.in$")? > --- /dev/null > +++ b/gnu/packages/patches/hdf4-reproducibility.patch > @@ -0,0 +1,47 @@ > +Remove/patch unreproducible config data. > +--- > + configure | 9 ++++++++- > + libhdf4.settings.in | 6 +++--- > + 2 files changed, 11 insertions(+), 4 deletions(-) > + > +diff --git a/configure b/configure > +index eb9f346..ebab94d 100755 > +--- a/configure > ++++ b/configure > +@@ -23163,7 +23163,14 @@ H4_VERSION=3D"`cut -d' ' -f3 $srcdir/README.txt= | head -1`" > +=20 > +=20 > + ## Configuration date > +- CONFIG_DATE=3D"`date`" > ++CONFIG_DATE=3D"`date -u`" > ++if test -n "$SOURCE_DATE_EPOCH"; then > ++ CONFIG_DATE=3D`date -u -d "@$SOURCE_DATE_EPOCH" 2>/dev/null \ > ++ || date -u -r "$SOURCE_DATE_EPOCH" 2>/dev/null` > ++ if test -z "$CONFIG_DATE"; then > ++ as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5 > ++ fi > ++fi It=E2=80=99d be enough to just do: - CONFIG_DATE=3D"`date`" + CONFIG_DATE=3D"$SOURCE_DATE_EPOCH" The smaller the patch, the better. :-) Otherwise LGTM. Could you send an updated patch? Thank you! Ludo=E2=80=99.