Description: Substitute changelog entry time for build time
 Upstream compiles a build time string into the program, which breaks
 build reproducibility. This patch adds an override option to
 CMakeLists.txt and the debian/rules uses this to pass in the date of
 the latest debian/changelog entry.
Author: Andreas Bombe <aeb@debian.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: git/CMakeLists.txt
===================================================================
--- git.orig/CMakeLists.txt	2020-12-19 02:38:48.531926619 +0100
+++ git/CMakeLists.txt	2020-12-19 02:38:48.531926619 +0100
@@ -60,7 +60,14 @@
 
 set(LIME_SUITE_LIBVER "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
 set(LIME_SUITE_VERSION "${LIME_SUITE_LIBVER}-${LIME_SUITE_EXTVER}")
-string(TIMESTAMP BUILD_TIMESTAMP "%Y-%m-%d")
+
+if (NOT $ENV{SOURCE_DATE_EPOCH})
+    message(FATAL_ERROR "SOURCE_DATE_EPOCH not set")
+else (NOT $ENV{SOURCE_DATE_EPOCH})
+    execute_process(COMMAND date --date=@$ENV{SOURCE_DATE_EPOCH} -I
+	OUTPUT_VARIABLE BUILD_TIMESTAMP
+	OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif (NOT $ENV{SOURCE_DATE_EPOCH})
 
 #LIME_SUITE_ROOT is compiled into the library to locate the install base.
 #By default, the LIME_SUITE_ROOT is set to the CMAKE_INSTALL_PREFIX.
