git: e1619d358442 - main - multimedia/x265: add ASM option on powerpc64le and enable by default
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 16 Nov 2021 17:28:07 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=e1619d3584420c014ef8a2c8f76cde671756d8b4 commit e1619d3584420c014ef8a2c8f76cde671756d8b4 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2021-11-16 17:25:41 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2021-11-16 17:25:41 +0000 multimedia/x265: add ASM option on powerpc64le and enable by default While here, also add the previously uncommitted patch. --- multimedia/x265/Makefile | 10 ++++++---- .../files/patch-source_common_ppc_intrapred__altivec.cpp | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/multimedia/x265/Makefile b/multimedia/x265/Makefile index 712a954ff091..967ee47695cb 100644 --- a/multimedia/x265/Makefile +++ b/multimedia/x265/Makefile @@ -24,7 +24,9 @@ OPTIONS_DEFINE_aarch64= ASM OPTIONS_DEFINE_amd64= ASM SVTHEVC OPTIONS_DEFINE_i386= ASM OPTIONS_DEFINE_powerpc64= ASM +OPTIONS_DEFINE_powerpc64le= ASM OPTIONS_DEFAULT_amd64= ASM +OPTIONS_DEFAULT_powerpc64le= ASM OPTIONS_MULTI= PixelWidth OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P @@ -65,12 +67,12 @@ BUILD_DEPENDS= as:devel/binutils USE_GCC= yes .endif -.if ${ARCH} == powerpc64 && ${PORT_OPTIONS:MASM} +.if ${ARCH:Mpowerpc64*} && ${PORT_OPTIONS:MASM} CMAKE_ARGS+= -DCPU_POWER8=ON \ -DENABLE_ALTIVEC=ON .endif -.if ${ARCH} != aarch64 && ${ARCH} != powerpc64 && ${PORT_OPTIONS:MASM} +.if ${ARCH} != aarch64 && !${ARCH:Mpowerpc64*} && ${PORT_OPTIONS:MASM} BUILD_DEPENDS= nasm:devel/nasm .endif @@ -94,7 +96,7 @@ CFLAGS:= ${CFLAGS:N-O*} -O0 -g .for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/} EXTRA_LINK_FLAGS+=-L${WRKSRC:H}/$bbit -.if ${ARCH} == powerpc64 +.if ${ARCH:Mpowerpc64*} .if $b != 8 || ! ${PORT_OPTIONS:MASM} ASSEMBLY=false @@ -150,7 +152,7 @@ CMAKE_ARGS+= -DENABLE_SHARED:BOOL=true .if ${ARCH} == i386 && ${DEFAULT_DEPTH} != "HI8P" || ! ${PORT_OPTIONS:MASM} CMAKE_ARGS+= -DENABLE_ASSEMBLY:BOOL=false .else -.if ${ARCH} != powerpc64 +.if !${ARCH:Mpowerpc64*} CMAKE_ARGS+= -DENABLE_ASSEMBLY:BOOL=true .else CMAKE_ARGS+= -DCPU_POWER8=ON \ diff --git a/multimedia/x265/files/patch-source_common_ppc_intrapred__altivec.cpp b/multimedia/x265/files/patch-source_common_ppc_intrapred__altivec.cpp new file mode 100644 index 000000000000..b7b6cbcbcaf4 --- /dev/null +++ b/multimedia/x265/files/patch-source_common_ppc_intrapred__altivec.cpp @@ -0,0 +1,14 @@ +--- source/common/ppc/intrapred_altivec.cpp.orig 2021-11-16 17:20:04 UTC ++++ source/common/ppc/intrapred_altivec.cpp +@@ -27,7 +27,11 @@ + #include <assert.h> + #include <math.h> + #include <cmath> ++#ifdef __linux__ + #include <linux/types.h> ++#else ++#include <sys/types.h> ++#endif + #include <stdlib.h> + #include <stdio.h> + #include <stdint.h>