git: 7c696d31ec73 - main - multimedia/libmpeg2: fix build on powerpc

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 16 Nov 2021 12:11:01 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7c696d31ec73f1e18d79d3f1a532a989e15abb80

commit 7c696d31ec73f1e18d79d3f1a532a989e15abb80
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-11-16 12:03:41 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-11-16 12:03:41 +0000

    multimedia/libmpeg2: fix build on powerpc
    
    AltiVec code is broken on powerpc:
    motion_comp_altivec.c:48:12: warning: implicit declaration of function 'vec_ld' is invalid in C99 [-Wimplicit-function-declaration]
        return vec_ld (A, (uint8_t *)B);
               ^
    motion_comp_altivec.c:48:34: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
        return vec_ld (A, (uint8_t *)B);
                                     ^
    motion_comp_altivec.c:48:12: error: returning 'int' from a function with incompatible result type 'vector_u8_t' (vector of 16 'unsigned char' values)
        return vec_ld (A, (uint8_t *)B);
---
 multimedia/libmpeg2/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/multimedia/libmpeg2/Makefile b/multimedia/libmpeg2/Makefile
index 00e69336412b..313f05814412 100644
--- a/multimedia/libmpeg2/Makefile
+++ b/multimedia/libmpeg2/Makefile
@@ -14,6 +14,7 @@ GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
 
 CONFIGURE_ARGS=	--enable-shared
+CFLAGS_powerpc=	-mno-altivec
 LDFLAGS_armv6=	-Wl,-z,notext
 LDFLAGS_armv7=	-Wl,-z,notext