diff --git a/pkgs/by-name/mj/mjpegtools/package.nix b/pkgs/by-name/mj/mjpegtools/package.nix index ad5ad85e729c..bfd9320ed020 100644 --- a/pkgs/by-name/mj/mjpegtools/package.nix +++ b/pkgs/by-name/mj/mjpegtools/package.nix @@ -56,6 +56,13 @@ stdenv.mkDerivation rec { postPatch = '' sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure + '' + # Only ppc64le baseline guarantees AltiVec, no configure option to disable it so just make checks never signal success. + # AltiVec code also fails without disabling new compiler warnings: + # quant_non_intra.c:72:42: error: initialization of '__vector unsigned short *' {aka '__vector(8) short unsigned int *'} from incompatible pointer type 'uint16_t *' {aka 'short unsigned int *'} [-Wincompatible-pointer-types] + + lib.optionalString (!(stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian)) '' + substituteInPlace configure \ + --replace-fail 'have_altivec=true' 'have_altivec=false' ''; enableParallelBuilding = true;