astc-encoder: 4.4.0 -> 4.5.0

This commit is contained in:
Maximilian Wende 2023-07-04 09:58:48 +02:00
parent 03afc9d850
commit 39762cefc6
No known key found for this signature in database
GPG key ID: 1F11B1F4401BED27

View file

@ -16,11 +16,9 @@ with rec {
else if isAarch64 then [ "NEON" ] else if isAarch64 then [ "NEON" ]
else [ "NONE" ]; else [ "NONE" ];
archFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "-DARCH=aarch64" ];
# CMake Build flags for the selected ISAs. For a list of flags, see # CMake Build flags for the selected ISAs. For a list of flags, see
# https://github.com/ARM-software/astc-encoder/blob/main/Docs/Building.md # https://github.com/ARM-software/astc-encoder/blob/main/Docs/Building.md
isaFlags = map ( isa: "-DISA_${isa}=ON" ) isas; isaFlags = map ( isa: "-DASTCENC_ISA_${isa}=ON" ) isas;
# The suffix of the binary to link as 'astcenc' # The suffix of the binary to link as 'astcenc'
mainBinary = builtins.replaceStrings mainBinary = builtins.replaceStrings
@ -31,25 +29,26 @@ with rec {
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "astc-encoder"; pname = "astc-encoder";
version = "4.4.0"; version = "4.5.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ARM-software"; owner = "ARM-software";
repo = "astc-encoder"; repo = "astc-encoder";
rev = version; rev = version;
sha256 = "sha256-pJmMquORG+vN2uLPywAZY1iZTuHB4SdMP/eriAjnyUU="; sha256 = "sha256-pNoBOp//xa5F6/T1cwtdHsAWLZeIHgxZ7UKaB60fg4M=";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
cmakeFlags = isaFlags ++ archFlags ++ [ cmakeFlags = isaFlags ++ [
"-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
"-DASTCENC_UNIVERSAL_BUILD=OFF"
]; ];
# Set a fixed build year to display within help output (otherwise, it would be 1980) # Set a fixed build year to display within help output (otherwise, it would be 1980)
postPatch = '' postPatch = ''
substituteInPlace Source/cmake_core.cmake \ substituteInPlace Source/cmake_core.cmake \
--replace 'string(TIMESTAMP astcencoder_YEAR "%Y")' 'set(astcencoder_YEAR "2022")' --replace 'string(TIMESTAMP astcencoder_YEAR "%Y")' 'set(astcencoder_YEAR "2023")'
''; '';
# Provide 'astcenc' link to main executable # Provide 'astcenc' link to main executable