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" "-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 # Link binaries into environment and provide 'astcenc' link
postInstall = '' postInstall = ''
mv $out/astcenc $out/bin mv $out/astcenc $out/bin