aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/emacs-source-date-epoch.patch
blob: 41c03ef5147eff6a1058343173534098b097f65c (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Honor SOURCE_DATE_EPOCH variable to avoid non-determinism in generated
"autoloads" files.

--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -378,8 +378,12 @@
   "Insert the section-header line,
 which lists the file name and which functions are in it, etc."
   (insert generate-autoload-section-header)
-  (prin1 `(autoloads ,autoloads ,load-name ,file ,time)
-	 outbuf)
+  (let* ((env  (getenv "SOURCE_DATE_EPOCH"))
+         (time (if env
+                   (seconds-to-time (string-to-number env))
+                 time)))
+    (prin1 `(autoloads ,autoloads ,load-name ,file ,time)
+           outbuf))
   (terpri outbuf)
   ;; Break that line at spaces, to avoid very long lines.
   ;; Make each sub-line into a comment.
59 +0200'>2018-06-27doc: Specify Guile-SQLite3 minimum version....Ludovic Courtès 2018-06-14build: Require Guile-SQLite3....Ludovic Courtès 2018-02-26build: Require Guile >= 2.0.13....Ludovic Courtès 2018-01-07doc: Mark zlib as mandatory, libbz2 as optional....Ludovic Courtès 2018-01-01doc: Update requirements in 'README'....Mathieu Lirzin 2017-09-25README: Replace http:// with https:// where applicable.Marius Bakke 2017-03-18build: Require Guile >= 2.0.9....Ludovic Courtès