ocamlgraph-honor-source-date-epoch.patch
1 | From 354ef78aac0b887fae3c10b28eb2b0d83f66bdfe Mon Sep 17 00:00:00 2001 |
2 | From: Julien Lepiller <julien@lepiller.eu> |
3 | Date: Mon, 2 Jan 2017 17:05:24 +0100 |
4 | Subject: [PATCH] Honor SOURCE_DATE_EPOCH |
5 | |
6 | --- |
7 | Makefile.in | 7 ++++++- |
8 | 1 file changed, 6 insertions(+), 1 deletion(-) |
9 | |
10 | diff --git a/Makefile.in b/Makefile.in |
11 | index a32b4b8..ef4c174 100644 |
12 | --- a/Makefile.in |
13 | +++ b/Makefile.in |
14 | @@ -113,11 +113,16 @@ graph.cmx: $(CMI) $(CMX) |
15 | $(OCAMLOPT) $(INCLUDES) -pack -o $@ $^ |
16 | |
17 | VERSION=1.8.7 |
18 | +ifdef SOURCE_DATE_EPOCH |
19 | +BUILD_DATE=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || date) |
20 | +else |
21 | +BUILD_DATE=$(shell date) |
22 | +endif |
23 | |
24 | src/version.ml: Makefile |
25 | rm -f $@ |
26 | echo "let version = \""$(VERSION)"\"" > $@ |
27 | - echo "let date = \""`date`"\"" >> $@ |
28 | + echo "let date = \""$(BUILD_DATE)"\"" >> $@ |
29 | |
30 | # gtk2 graph editor |
31 | ################### |
32 | -- |
33 | 2.11.0 |
34 | |
35 |