git: efd1774d3aae - main - multimedia/handbrake: fix build on powerpc(64)

Piotr Kubaj pkubaj at FreeBSD.org
Thu Jul 22 00:55:33 UTC 2021


The branch main has been updated by pkubaj:

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

commit efd1774d3aae5206f74d0277df73ba89579643a7
Author:     Piotr Kubaj <pkubaj at FreeBSD.org>
AuthorDate: 2021-07-22 00:55:24 +0000
Commit:     Piotr Kubaj <pkubaj at FreeBSD.org>
CommitDate: 2021-07-22 00:55:24 +0000

    multimedia/handbrake: fix build on powerpc(64)
    
    For some reason, while there's no issue with building on powerpc64le, there's a problem on powerpc and powerpc64 (same as with multimedia/ffmpeg).
---
 multimedia/handbrake/Makefile                             |  3 +++
 .../handbrake/files/P02-freebsd-ppc-libswscale.patch      | 15 +++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/multimedia/handbrake/Makefile b/multimedia/handbrake/Makefile
index 12fae398fed2..6c47659f710e 100644
--- a/multimedia/handbrake/Makefile
+++ b/multimedia/handbrake/Makefile
@@ -128,6 +128,9 @@ pre-configure:
 # Following patches reduces warnings with clang.
 	${CP} ${FILESDIR}/P00-freebsd-libavutil-x86-asm-h.patch ${WRKSRC}/contrib/ffmpeg
 	${CP} ${FILESDIR}/P01-freebsd-ifo_types.h.patch ${WRKSRC}/contrib/libdvdread
+# for powerpc64
+# picked from multimedia/ffmpeg/files/patch-libswscale_ppc_yuv2rgb__altivec.c
+	${CP} ${FILESDIR}/P02-freebsd-ppc-libswscale.patch ${WRKSRC}/contrib/ffmpeg
 
 post-install-X11-on:
 	${LN} -sf ghb ${STAGEDIR}${PREFIX}/bin/HandBrake
diff --git a/multimedia/handbrake/files/P02-freebsd-ppc-libswscale.patch b/multimedia/handbrake/files/P02-freebsd-ppc-libswscale.patch
new file mode 100644
index 000000000000..1b6b9966f066
--- /dev/null
+++ b/multimedia/handbrake/files/P02-freebsd-ppc-libswscale.patch
@@ -0,0 +1,15 @@
+Error:
+libswscale/ppc/yuv2rgb_altivec.c:288:36: error: redeclaration of 'vec_xl' must have the 'overloadable' attribute
+static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr)
+
+--- a/libswscale/ppc/yuv2rgb_altivec.c.orig	2021-04-08 21:28:40 UTC
++++ b/libswscale/ppc/yuv2rgb_altivec.c
+@@ -284,7 +284,7 @@ static inline void cvtyuvtoRGB(SwsContext *c, vector s
+  * ------------------------------------------------------------------------------
+  */
+ 
+-#if !HAVE_VSX
++#if !HAVE_VSX && !defined(__clang__)
+ static inline vector unsigned char vec_xl(signed long long offset, const ubyte *addr)
+ {
+     const vector unsigned char *v_addr = (const vector unsigned char *) (addr + offset);


More information about the dev-commits-ports-main mailing list