1
0
xorg-x11-server/u_xorg-x11-server-reproducible.patch
2018-03-06 15:29:04 +00:00

34 lines
1.1 KiB
Diff

Author: Chris Lamb <chris@chris-lamb.co.uk>
Date: Thu, 20 Jul 2017 15:42:15 +0100
Subject: configure.ac: Make BUILD_{DATE,TIME} respect SOURCE_DATE_EPOCH
References: boo#1047218
upstreaming in generalized form
https://lists.x.org/pipermail/xorg-devel/2017-July/054127.html from lamby
still not in 2018-02-20 with 1.19.6
Signed-off-by: Bernhard M. Wiedemann <bwiedemann suse de>
Index: xorg-server-1.19.3/configure.ac
===================================================================
--- xorg-server-1.19.3.orig/configure.ac
+++ xorg-server-1.19.3/configure.ac
@@ -2555,9 +2555,14 @@ AC_DEFINE_DIR(PROJECTROOT, prefix, [Over
AC_DEFINE_DIR(SYSCONFDIR, sysconfdir, [sysconfdir])
AC_SUBST([RELEASE_DATE])
-BUILD_DATE="`date +'%Y%m%d'`"
+if test "x$SOURCE_DATE_EPOCH" = "x"; then
+ BUILD_DATE="`date +'%Y%m%d'`"
+ BUILD_TIME="`date +'1%H%M%S'`"
+else
+ BUILD_DATE="`date --utc --date="@$SOURCE_DATE_EPOCH" +'%Y%m%d'`"
+ BUILD_TIME="`date --utc --date="@$SOURCE_DATE_EPOCH" +'1%H%M%S'`"
+fi
AC_SUBST([BUILD_DATE])
-BUILD_TIME="`date +'1%H%M%S'`"
AC_SUBST([BUILD_TIME])
DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"