FreeBSD Bugzilla – Attachment 229158 Details for
Bug 259564
multimedia/x265: add option to use altivec on powerpc64
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
x265.patch (text/plain), 4.06 KB, created by
Piotr Kubaj
on 2021-10-31 02:41:00 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Piotr Kubaj
Created:
2021-10-31 02:41:00 UTC
Size:
4.06 KB
patch
obsolete
>diff 33ac0d14cab438330f9bf46c41465a8c28714380 /usr/ports >blob - c72fb5b28052f0e5a6272b2c28b2f97e75d51dac >file + multimedia/x265/Makefile >--- multimedia/x265/Makefile >+++ multimedia/x265/Makefile >@@ -23,7 +23,9 @@ OPTIONS_DEFAULT= OPTIMIZED_FLAGS HI8P HI10P HI12P > OPTIONS_DEFINE_aarch64= ASM > OPTIONS_DEFINE_amd64= ASM SVTHEVC > OPTIONS_DEFINE_i386= ASM >+OPTIONS_DEFINE_powerpc64= ASM > OPTIONS_DEFAULT_amd64= ASM >+OPTIONS_DEFAULT_powerpc64= ASM > > OPTIONS_MULTI= PixelWidth > OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P >@@ -62,11 +64,14 @@ WRKSRC= ${WRKDIR}/source > .if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM} > BUILD_DEPENDS= as:devel/binutils > USE_GCC= yes >-ASM_PREVENTS= HI10P HI12P >-ASM_PREVENTS_MSG= Currently HI10P and HI12P doesn't build with assembly > .endif > >-.if ${ARCH} != aarch64 && ${PORT_OPTIONS:MASM} >+.if ${ARCH} == powerpc64 && ${PORT_OPTIONS:MASM} >+CMAKE_ARGS+= -DCPU_POWER8=ON \ >+ -DENABLE_ALTIVEC=ON >+.endif >+ >+.if ${ARCH} != aarch64 && ${ARCH} != powerpc64 && ${PORT_OPTIONS:MASM} > BUILD_DEPENDS= nasm:devel/nasm > .endif > >@@ -90,6 +95,32 @@ 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 $b != 8 || ! ${PORT_OPTIONS:MASM} >+ASSEMBLY=false >+.else >+ASSEMBLY=true >+.endif >+ >+.if ${PORT_OPTIONS:MASM} >+POWER8= true >+.else >+POWER8= false >+.endif >+ >+pre-build:: >+ @${ECHO_MSG} "---> Building the $b-bit library ---" >+ ${MKDIR} ${WRKSRC:H}/$bbit >+ ${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/$bbit \ >+ ${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \ >+ -DMAIN$b:BOOL=true -DENABLE_ALTIVEC=${ASSEMBLY} -DCPU_POWER8=${POWER8} \ >+ -DEXPORT_C_API:BOOL=false -DENABLE_CLI=false >+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS} >+ ${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a >+ ${ECHO_MSG} "---> Built the $b-bit library ---" >+ >+.else > .if ${ARCH} == i386 && $b != 8 || ! ${PORT_OPTIONS:MASM} > ASSEMBLY=false > .else >@@ -106,6 +137,7 @@ pre-build:: > ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS} > ${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a > ${ECHO_MSG} "---> Built the $b-bit library ---" >+.endif > .endfor > > .if "${EXTRA_LINK_FLAGS}" >@@ -119,7 +151,12 @@ 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 > CMAKE_ARGS+= -DENABLE_ASSEMBLY:BOOL=true >+.else >+CMAKE_ARGS+= -DCPU_POWER8=ON \ >+ -DENABLE_ALTIVEC=ON >+.endif > > do-test: > ${WRKDIR}/.build/test/TestBench >blob - 8758bc33e7233d2bf6900b34d6a2d53fbff87a46 >file + multimedia/x265/files/patch-source_CMakeLists.txt >--- multimedia/x265/files/patch-source_CMakeLists.txt >+++ multimedia/x265/files/patch-source_CMakeLists.txt >@@ -1,11 +1,23 @@ >---- source/CMakeLists.txt.orig 2020-06-06 08:18:40 UTC >+--- source/CMakeLists.txt.orig 2021-10-31 01:46:10 UTC > +++ source/CMakeLists.txt >-@@ -122,3 +122,4 @@ >+@@ -43,7 +43,7 @@ set(X86_ALIASES x86 i386 i686 x86_64 amd64) >+ set(ARM_ALIASES armv6l armv7l aarch64) >+ list(FIND X86_ALIASES "${SYSPROC}" X86MATCH) >+ list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH) >+-set(POWER_ALIASES ppc64 ppc64le) >++set(POWER_ALIASES powerpc64 powerpc64le ppc64 ppc64le) >+ list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH) >+ if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1") >+ set(X86 1) >+@@ -121,6 +121,7 @@ if(UNIX) >+ option(ENABLE_LIBVMAF "Enable VMAF" OFF) > if(ENABLE_LIBVMAF) > add_definitions(-DENABLE_LIBVMAF) > + include_directories(${VMAF_INCLUDE_DIR}) > endif() >-@@ -592,12 +592,6 @@ if(ENABLE_HDR10_PLUS) >+ endif(UNIX) >+ >+@@ -592,12 +593,6 @@ if(ENABLE_HDR10_PLUS) > ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) > endif() > >@@ -18,7 +30,7 @@ > install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) > if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED)) > if(MSVC_IDE) >-@@ -649,7 +643,10 @@ if(ENABLE_SHARED) >+@@ -649,7 +644,10 @@ if(ENABLE_SHARED) > if(EXTRA_LIB) > target_link_libraries(x265-shared ${EXTRA_LIB}) > endif()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 259564
:
229158
|
229159