mjpegtools: Fix build on POWER targets with AltiVec-free baseline

I'll leave fixing of the AltiVec code to ppc64le users.
This commit is contained in:
OPNA2608
2025-10-31 21:58:52 +01:00
parent 92661251e0
commit 96f3c0bbca
+7
View File
@@ -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;