From 6f4b23e674cefebf0ccefc301974e50db04ce5db Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Wed, 21 Oct 2015 15:59:23 +0300 Subject: gnu: emacs: Honor 'SOURCE_DATE_EPOCH'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested by Ludovic Courtès . * gnu/packages/patches/emacs-source-date-epoch.patch: New patch. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/emacs.scm (emacs)[source]: Use it. --- gnu/packages/emacs.scm | 3 ++- gnu/packages/patches/emacs-source-date-epoch.patch | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/emacs-source-date-epoch.patch (limited to 'gnu') diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6416b00ee0..9751125113 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -70,7 +70,8 @@ (define-public emacs (sha256 (base32 "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx")) - (patches (list (search-patch "emacs-exec-path.patch"))))) + (patches (list (search-patch "emacs-exec-path.patch") + (search-patch "emacs-source-date-epoch.patch"))))) (build-system glib-or-gtk-build-system) (arguments '(#:phases (alist-cons-before diff --git a/gnu/packages/patches/emacs-source-date-epoch.patch b/gnu/packages/patches/emacs-source-date-epoch.patch new file mode 100644 index 0000000000..41c03ef514 --- /dev/null +++ b/gnu/packages/patches/emacs-source-date-epoch.patch @@ -0,0 +1,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. -- cgit v1.2.3