astc-encoder: patch files to use a fixed build year

The build year is included in the help output.
See the discussion in #162133.
This commit is contained in:
Maximilian Wende 2022-03-09 12:33:10 +01:00
parent 158c26ff77
commit 80f8c65283
No known key found for this signature in database
GPG Key ID: 02BA0D4480CA6C44

View File

@ -46,6 +46,12 @@ gccStdenv.mkDerivation rec {
"-DCMAKE_BUILD_TYPE=Release"
];
# Set a fixed build year to display within help output (otherwise, it would be 1980)
postPatch = ''
substituteInPlace Source/cmake_core.cmake \
--replace 'string(TIMESTAMP astcencoder_YEAR "%Y")' 'set(astcencoder_YEAR "2022")'
'';
# Link binaries into environment and provide 'astcenc' link
postInstall = ''
mv $out/astcenc $out/bin