aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2021-07-22 00:55:24 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2021-07-22 00:55:24 +0000
commitefd1774d3aae5206f74d0277df73ba89579643a7 (patch)
treea5b06e1637f114b7e7cd86ccbf21e3d402f73f3c
parent99ce47580ebfe20cff7aba2be01d5f78b338525e (diff)
downloadports-efd1774d3aae5206f74d0277df73ba89579643a7.tar.gz
ports-efd1774d3aae5206f74d0277df73ba89579643a7.zip
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).
-rw-r--r--multimedia/handbrake/Makefile3
-rw-r--r--multimedia/handbrake/files/P02-freebsd-ppc-libswscale.patch15
2 files changed, 18 insertions, 0 deletions
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);