summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-01-16 00:55:28 +0100
committerSlávek Banko <slavek.banko@axis.cz>2021-01-16 00:55:28 +0100
commit46ca3fa9524fb1800a26b65fc49b1e5bc41be613 (patch)
tree0affa528ab2b7cd1104d939ac7967e0ff6220e06
parentbda2d7559f18b2e02050dc433c5ff70cec8e3362 (diff)
downloadtork-46ca3fa9524fb1800a26b65fc49b1e5bc41be613.tar.gz
tork-46ca3fa9524fb1800a26b65fc49b1e5bc41be613.zip
Replace __DATE__ with PACKAGE_DATETIME in the crash handler
to allow reproducible build. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ConfigureChecks.cmake6
-rw-r--r--config.h.cmake3
-rw-r--r--src/crashhandler.cpp12
3 files changed, 19 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index b36d0e7..4479983 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -39,6 +39,12 @@ check_include_file( "sys/time.h" HAVE_SYS_TIME_H )
check_include_files( "sys/time.h;time.h" TIME_WITH_SYS_TIME )
+##### get the date and time of the package
+
+tde_read_src_metadata()
+tde_curdatetime( PACKAGE_DATETIME )
+
+
##### check for GnuTLS or OpenSSL( default )
if( WITH_GNUTLS )
diff --git a/config.h.cmake b/config.h.cmake
index 59360ae..f9532cf 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -7,6 +7,9 @@
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
+/* Date and time of the package */
+#cmakedefine PACKAGE_DATETIME "@PACKAGE_DATETIME@"
+
/* OpenSSL support */
#cmakedefine USE_OPENSSL 1
diff --git a/src/crashhandler.cpp b/src/crashhandler.cpp
index 3deb9a6..cd2bafc 100644
--- a/src/crashhandler.cpp
+++ b/src/crashhandler.cpp
@@ -10,6 +10,10 @@
* *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <tqfile.h>
#include <tqregexp.h>
#include <tqtextstream.h>
@@ -90,10 +94,14 @@ namespace torK
body += "======== DEBUG INFORMATION =======\n"
"Version: " TORK_VERSION "\n"
+#if defined( PACKAGE_DATETIME )
+ "Date, time: " PACKAGE_DATETIME "\n"
+#else
"Build date: " __DATE__ "\n"
+#endif
"CC version: " __VERSION__ "\n" //assuming we're using GCC
- "KDElibs: " TDE_VERSION_STRING "\n"
- "TQt: %2\n"
+ "TDElibs: " TDE_VERSION_STRING "\n"
+ "TQt: %2\n"
"CPU count: %6\n";
TQString cpucount = "unknown";