gnu: offlineimap: Update to 7.0.12.
[jackhill/guix/guix.git] / gnu / packages / patches / netcdf-config-date.patch
CommitLineData
889187a4
EB
1Honor SOURCE_DATE_EPOCH when exporting configuration date.
2Autoconf-level patch submitted upstream on Fri Apr 15 23:07:42 UTC 2016
3
4--- a/configure
5+++ b/configure
6@@ -2866,7 +2866,17 @@
7
8
9 # Configuration Date
10- CONFIG_DATE="`date`"
11+ CONFIG_DATE="`date -u`"
12+if test -n "$SOURCE_DATE_EPOCH"; then
13+ CONFIG_DATE=`date -u -d "@$SOURCE_DATE_EPOCH" 2>/dev/null \
14+ || date -u -r "$SOURCE_DATE_EPOCH" 2>/dev/null`
15+ if test -z "$CONFIG_DATE"; then
16+ as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
17+ fi
18+fi
19+cat >>confdefs.h <<_ACEOF
20+#define CONFIG_DATE "$CONFIG_DATE"
21+_ACEOF
22
23 # Find out about the host we're building on.
24 ac_aux_dir=
25--- a/libdispatch/derror.c
26+++ b/libdispatch/derror.c
27@@ -13,7 +13,7 @@
28 #endif
29
30 /* Tell the user the version of netCDF. */
31-static const char nc_libvers[] = PACKAGE_VERSION " of "__DATE__" "__TIME__" $";
32+static const char nc_libvers[] = PACKAGE_VERSION " of "CONFIG_DATE" $";
33
34 /**
35 \defgroup lib_version Library Version
36--- a/config.h.in
37+++ b/config.h.in
38@@ -393,6 +393,9 @@
39 /* Define to the version of this package. */
40 #undef PACKAGE_VERSION
41
42+/* Define to the configuration date */
43+#undef CONFIG_DATE
44+
45 /* The size of `double', as computed by sizeof. */
46 #undef SIZEOF_DOUBLE
47