guix-commits
[Top][All Lists]
Advanced

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

06/10: gnu: hdf5: Have configure honor SOURCE_DATE_EPOCH.


From: Eric Bavier
Subject: 06/10: gnu: hdf5: Have configure honor SOURCE_DATE_EPOCH.
Date: Thu, 12 May 2016 20:02:43 +0000 (UTC)

bavier pushed a commit to branch master
in repository guix.

commit b8d9c93bde155af13e633f8b84b56372c2044c43
Author: Eric Bavier <address@hidden>
Date:   Fri Apr 15 10:39:54 2016 -0500

    gnu: hdf5: Have configure honor SOURCE_DATE_EPOCH.
    
    * gnu/packages/patches/hdf5-config-date.patch: New patch.
    * gnu/packages/maths.scm (hdf5)[source]: Use it.
    * gnu-system.am (dist_patch_DATA): Add it.
---
 gnu/local.mk                                |    1 +
 gnu/packages/maths.scm                      |    6 ++++--
 gnu/packages/patches/hdf5-config-date.patch |   21 +++++++++++++++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 76d596d..0582d9e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -531,6 +531,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch       \
   gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch       \
   gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \
+  gnu/packages/patches/hdf5-config-date.patch                  \
   gnu/packages/patches/hop-bigloo-4.0b.patch                   \
   gnu/packages/patches/hop-linker-flags.patch                  \
   gnu/packages/patches/hydra-automake-1.15.patch               \
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 4a10f6f..df21d5e 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -414,7 +414,8 @@ plotting engine by third-party applications like Octave.")
                           version "/src/hdf5-"
                           version ".tar.bz2"))
       (sha256
-       (base32 "0sj8x0gfs5fb28gipnynb9wpkz113h8wq9sva9mxx66kv27xsdgw"))))
+       (base32 "0sj8x0gfs5fb28gipnynb9wpkz113h8wq9sva9mxx66kv27xsdgw"))
+      (patches (list (search-patch "hdf5-config-date.patch")))))
     (build-system gnu-build-system)
     (inputs
      `(("zlib" ,zlib)))
@@ -424,7 +425,8 @@ plotting engine by third-party applications like Octave.")
          (add-before 'configure 'patch-configure
            (lambda _
              (substitute* "configure"
-               (("/bin/mv") "mv"))))
+               (("/bin/mv") "mv"))
+             #t))
          (add-after 'install 'patch-references
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
diff --git a/gnu/packages/patches/hdf5-config-date.patch 
b/gnu/packages/patches/hdf5-config-date.patch
new file mode 100644
index 0000000..c105435
--- /dev/null
+++ b/gnu/packages/patches/hdf5-config-date.patch
@@ -0,0 +1,21 @@
+Honor SOURCE_DATE_EPOCH when exporting configuration date.
+Autoconf-level patch submitted upstream on Wed Apr 13 17:03:23 UTC 2016
+
+--- a/configure
++++ b/configure
+@@ -27737,7 +28573,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="address@hidden"



reply via email to

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