From patchwork Sun May 29 17:36:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jeremy Robst X-Patchwork-Id: 12616 Received: (qmail 50571 invoked by uid 89); 29 May 2016 17:37:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.2 required=5.0 tests=BAYES_00, GARBLED_SUBJECT, RP_MATCHES_RCVD, SPF_PASS autolearn=no version=3.3.2 spammy=H*r:4.63, H*F:D*ac.uk, Administrator, 1, 55 X-Spam-Status: No, score=3.2 required=5.0 tests=BAYES_00, GARBLED_SUBJECT, RP_MATCHES_RCVD, SPF_PASS autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: *** X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 29 May 2016 17:37:13 +0000 Received: from localhost ([::1]:56517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b74eF-000884-Jk for patchwork@sourceware.org; Sun, 29 May 2016 13:37:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b74e8-00084Q-Bw for guix-devel@gnu.org; Sun, 29 May 2016 13:37:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b74e4-0004ZI-5r for guix-devel@gnu.org; Sun, 29 May 2016 13:37:03 -0400 Received: from smtp-out4.electric.net ([192.162.216.189]:51685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b74e3-0004XL-P8 for guix-devel@gnu.org; Sun, 29 May 2016 13:37:00 -0400 Received: from 1b74ds-0003Ay-Tk by out4d.electric.net with emc1-ok (Exim 4.87) (envelope-from ) id 1b74ds-0003BG-VP for guix-devel@gnu.org; Sun, 29 May 2016 10:36:48 -0700 Received: by emcmailer; Sun, 29 May 2016 10:36:48 -0700 Received: from [192.171.137.70] (helo=bsmail.nerc-bas.ac.uk) by out4d.electric.net with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1b74ds-0003Ay-Tk for guix-devel@gnu.org; Sun, 29 May 2016 10:36:48 -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 u4THalGf030331 for ; Sun, 29 May 2016 18:36:47 +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 1b74dr-0006oD-4n for guix-devel@gnu.org; Sun, 29 May 2016 17:36:47 +0000 Date: Sun, 29 May 2016 18:36:46 +0100 (BST) From: Jeremy Robst X-X-Sender: jpro@jpro.nerc-bas.ac.uk To: guix-devel@gnu.org Subject: Re: [PATCH] gnu: Add hdf4 In-Reply-To: <87k2iel0bo.fsf@gnu.org> Message-ID: References: <20160523181719.GA11083@jasmine> <20160527171933.GA29109@jasmine> <87k2iel0bo.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) X-Eric-Conspiracy: There is no conspiracy MIME-Version: 1.0 X-Outbound-IP: 192.171.137.70 X-Env-From: jpro@bas.ac.uk X-PolicySMART: 3451204 X-Virus-Status: Scanned by VirusSMART (c) X-Virus-Status: Scanned by VirusSMART (s) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.162.216.189 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list 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+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" Hi, > Jeremy: could you send it as an attachment, or using ‘git send-email’? Here's the patch as an attachment - sorry for the hassle. I will try and work out what's going wrong so I can send proper patches in future. Jeremy 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