aboutsummaryrefslogtreecommitdiff
path: root/depends/patches
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-12-24 23:14:34 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-12-25 23:00:37 +0200
commit11736dbe3dbe34bcb430d05810b9e9aa66ec1cd6 (patch)
treee0df5c654da21deaab57cebc1f9796cb11652f0f /depends/patches
parent369978686e156ad34df703f1e60bd90aeaa8f2d6 (diff)
downloadbitcoin-11736dbe3dbe34bcb430d05810b9e9aa66ec1cd6.tar.xz
build, qt: Hardcode last modified timestamp in Qt RCC
This change allows the already built qt package to be reused even with the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds.
Diffstat (limited to 'depends/patches')
-rw-r--r--depends/patches/qt/rcc_hardcode_timestamp.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/depends/patches/qt/rcc_hardcode_timestamp.patch b/depends/patches/qt/rcc_hardcode_timestamp.patch
new file mode 100644
index 0000000000..03f3897975
--- /dev/null
+++ b/depends/patches/qt/rcc_hardcode_timestamp.patch
@@ -0,0 +1,24 @@
+Hardcode last modified timestamp in Qt RCC
+
+This change allows the already built qt package to be reused even with
+the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds.
+
+
+--- old/qtbase/src/tools/rcc/rcc.cpp
++++ new/qtbase/src/tools/rcc/rcc.cpp
+@@ -227,14 +227,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
+
+ if (lib.formatVersion() >= 2) {
+ // last modified time stamp
+- const QDateTime lastModified = m_fileInfo.lastModified();
+- quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
+- static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
+- if (sourceDate != 0)
+- lastmod = sourceDate;
+- static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong();
+- if (sourceDate2 != 0)
+- lastmod = sourceDate2;
++ quint64 lastmod = quint64(1);
+ lib.writeNumber8(lastmod);
+ if (text || pass1)
+ lib.writeChar('\n');