mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
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.
This commit is contained in:
24
depends/patches/qt/rcc_hardcode_timestamp.patch
Normal file
24
depends/patches/qt/rcc_hardcode_timestamp.patch
Normal file
@@ -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');
|
||||
Reference in New Issue
Block a user