From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Robst Subject: Re: [PATCH] gnu: Add hdf4 Date: Wed, 25 May 2016 18:42:04 +0100 (BST) Message-ID: References: <20160523181719.GA11083@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5cp9-0007ai-3d for guix-devel@gnu.org; Wed, 25 May 2016 13:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5cp3-0005GJ-Cn for guix-devel@gnu.org; Wed, 25 May 2016 13:42:26 -0400 Received: from smtp-out4.electric.net ([192.162.216.188]:57225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5cp3-0005Af-0n for guix-devel@gnu.org; Wed, 25 May 2016 13:42:21 -0400 Received: from 1b5coo-0003pp-TO by out4a.electric.net with emc1-ok (Exim 4.87) (envelope-from ) id 1b5coo-0003qS-UM for guix-devel@gnu.org; Wed, 25 May 2016 10:42:06 -0700 Received: from [192.171.137.70] (helo=bsmail.nerc-bas.ac.uk) by out4a.electric.net with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.87) (envelope-from ) id 1b5coo-0003pp-TO for guix-devel@gnu.org; Wed, 25 May 2016 10:42:06 -0700 Received: from ams3.nerc-bas.ac.uk (ams3 [10.2.1.142]) by bsmail.nerc-bas.ac.uk (8.13.8/8.13.8) with ESMTP id u4PHg49B031959 for ; Wed, 25 May 2016 18:42:05 +0100 Received: from [10.14.1.90] (helo=jpro.nerc-bas.ac.uk) by ams3.nerc-bas.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1b5com-0001Uc-Jr for guix-devel@gnu.org; Wed, 25 May 2016 17:42:04 +0000 In-Reply-To: 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: guix-devel@gnu.org Hi, On Tue, 24 May 2016, Eric Bavier wrote: > Could we apply a variation of the hdf5-config-date.patch? Ok, I've based a patch on this one, and removed the other unreproduciable output, so I've not got a reproduciable build. > This description is noticeably more verbose than that of the hdf5 > package. It seems like the first two sentences are not necessary here. > It would also be nice to summarize how hdf4 differs from hdf5. I've shortened the description, and added a statement that hdf4 is not compatable with hdf5. It's difficult to add more details of the differences without becoming verbose again, but let me know if you think it needs to be tweaked again. Jeremy -- jpro@bas.ac.uk | (work) 01223 221402 (fax) 01223 362616 Unix System Administrator - British Antarctic Survey #include >From 41816d45609674bbc62847960522e49a1646f6d3 Mon Sep 17 00:00:00 2001 From: Jeremy Robst Date: Mon, 23 May 2016 17:59:00 +0100 Subject: [PATCH] gnu: Add hdf4 * gnu/packages/maths.scm (hdf4): New variable --- gnu/packages/maths.scm | 41 +++++++++++++++++ gnu/packages/patches/hdf4-config-settings.patch | 55 +++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 gnu/packages/patches/hdf4-config-settings.patch diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 19ed44f..ab4785b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -408,6 +408,47 @@ plotting engine by third-party applications like Octave.") (license (license:fsf-free "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))) +(define-public hdf4 + (package + (name "hdf4") + (version "4.2.11") + (source + (origin + (method url-fetch) + (uri (string-append + "http://www.hdfgroup.org/ftp/HDF/releases/HDF" version + "/src/hdf-" version ".tar.bz2")) + (sha256 + (base32 + "16yr50j845zlfx20skmw3y75ww77akk9gg0affjqkg66ih5r03mv")) + (patches (list (search-patch "hdf4-config-settings.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("gfortran" ,gfortran) + ("bison" ,bison) + ("flex" ,flex))) + (inputs + `(("zlib" ,zlib) + ("libjpeg" ,libjpeg))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-configure + (lambda _ + (substitute* + '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in") + (("/bin/rm") "rm") + (("/bin/mkdir") "mkdir")) + #t))))) + (home-page "https://www.hdfgroup.org/products/hdf4/") + (synopsis + "Library and multi-object file format for storing and managing data") + (description "HDF4 is a library and multi-object file format for storing +and managing data between machines. HDF4 is an older hiearchical data format, +incompatible with HDF5.") + (license (license:non-copyleft + "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING")))) + (define-public hdf5 (package (name "hdf5") diff --git a/gnu/packages/patches/hdf4-config-settings.patch b/gnu/packages/patches/hdf4-config-settings.patch new file mode 100644 index 0000000..e79362e --- /dev/null +++ b/gnu/packages/patches/hdf4-config-settings.patch @@ -0,0 +1,55 @@ +Honor SOURCE_DATE_EPOCH when exporting configuraton date. +Remove unreproducible configuration data. + +--- a/configure ++++ b/configure +@@ -23169,7 +23169,14 @@ + + + ## Configuration date +- CONFIG_DATE="`date`" ++ CONFIG_DATE="`date -u`" ++if test -n "$SOURCE_DATE_EPOCH"; then ++ CONFIG_DATE=`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 + + ## User doing the configuration + CONFIG_USER="`whoami`@`hostname`" + +--- a/libhdf4.settings.in ++++ b/libhdf4.settings.in +@@ -5,17 +5,17 @@ + ------------------- + HDF4 Version: @H4_VERSION@ + Configured on: @CONFIG_DATE@ +- Configured by: @CONFIG_USER@ ++ Configured by: guix + Configure mode: @CONFIG_MODE@ +- Host system: @host_cpu@-@host_vendor@-@host_os@ +- Uname information: @UNAME_INFO@ ++ Host system: guix ++ Uname information: guix + Libraries: @STATIC_SHARED@ + Installation point: @prefix@ + + Compiling Options: + ------------------ + Compilation Mode: @CONFIG_MODE@ +- C compiler: @CC_VERSION@ ++ C compiler: + CFLAGS: @CFLAGS@ + CPPFLAGS: @CPPFLAGS@ + Shared Libraries: @enable_shared@ +@@ -29,7 +29,7 @@ + Languages: + ---------- + Fortran: @BUILD_FORTRAN@ +-@HDF_BUILD_FORTRAN_TRUE@ Fortran Compiler: @F77_VERSION@ ++@HDF_BUILD_FORTRAN_TRUE@ Fortran Compiler: + @HDF_BUILD_FORTRAN_TRUE@ FFLAGS: @FFLAGS@ + + Features: -- 1.7.10.4