View | Details | Raw Unified | Return to bug 259564 | Differences between
and this patch

Collapse All | Expand All

(-)multimedia/x265/Makefile (-3 / +39 lines)
Lines 23-28 OPTIONS_DEFAULT= OPTIMIZED_FLAGS HI8P HI10P HI12P Link Here
23
OPTIONS_DEFINE_aarch64=	ASM
23
OPTIONS_DEFINE_aarch64=	ASM
24
OPTIONS_DEFINE_amd64=	ASM SVTHEVC
24
OPTIONS_DEFINE_amd64=	ASM SVTHEVC
25
OPTIONS_DEFINE_i386=	ASM
25
OPTIONS_DEFINE_i386=	ASM
26
OPTIONS_DEFINE_powerpc64=	ASM
26
OPTIONS_DEFAULT_amd64=	ASM
27
OPTIONS_DEFAULT_amd64=	ASM
27
28
28
OPTIONS_MULTI=		PixelWidth
29
OPTIONS_MULTI=		PixelWidth
Lines 62-72 WRKSRC= ${WRKDIR}/source Link Here
62
.if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM}
63
.if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM}
63
BUILD_DEPENDS=	as:devel/binutils
64
BUILD_DEPENDS=	as:devel/binutils
64
USE_GCC=	yes
65
USE_GCC=	yes
65
ASM_PREVENTS=	HI10P HI12P
66
ASM_PREVENTS_MSG=	Currently HI10P and HI12P doesn't build with assembly
67
.endif
66
.endif
68
67
69
.if ${ARCH} != aarch64 && ${PORT_OPTIONS:MASM}
68
.if ${ARCH} == powerpc64 && ${PORT_OPTIONS:MASM}
69
CMAKE_ARGS+=	-DCPU_POWER8=ON \
70
		-DENABLE_ALTIVEC=ON
71
.endif
72
73
.if ${ARCH} != aarch64 && ${ARCH} != powerpc64 && ${PORT_OPTIONS:MASM}
70
BUILD_DEPENDS=	nasm:devel/nasm
74
BUILD_DEPENDS=	nasm:devel/nasm
71
.endif
75
.endif
72
76
Lines 90-95 CFLAGS:= ${CFLAGS:N-O*} -O0 -g Link Here
90
.for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/}
94
.for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/}
91
EXTRA_LINK_FLAGS+=-L${WRKSRC:H}/$bbit
95
EXTRA_LINK_FLAGS+=-L${WRKSRC:H}/$bbit
92
96
97
.if ${ARCH} == powerpc64
98
99
.if $b != 8 || ! ${PORT_OPTIONS:MASM}
100
ASSEMBLY=false
101
.else
102
ASSEMBLY=true
103
.endif
104
105
.if ${PORT_OPTIONS:MASM}
106
POWER8=	true
107
.else
108
POWER8=	false
109
.endif
110
111
pre-build::
112
	@${ECHO_MSG} "---> Building the $b-bit library ---"
113
	${MKDIR} ${WRKSRC:H}/$bbit
114
	${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/$bbit \
115
		${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \
116
		-DMAIN$b:BOOL=true -DENABLE_ALTIVEC=${ASSEMBLY} -DCPU_POWER8=${POWER8} \
117
		-DEXPORT_C_API:BOOL=false -DENABLE_CLI=false
118
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS}
119
	${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
120
	${ECHO_MSG} "---> Built the $b-bit library ---"
121
122
.else
93
.if ${ARCH} == i386 && $b != 8 || ! ${PORT_OPTIONS:MASM}
123
.if ${ARCH} == i386 && $b != 8 || ! ${PORT_OPTIONS:MASM}
94
ASSEMBLY=false
124
ASSEMBLY=false
95
.else
125
.else
Lines 106-111 pre-build:: Link Here
106
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS}
136
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS}
107
	${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
137
	${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
108
	${ECHO_MSG} "---> Built the $b-bit library ---"
138
	${ECHO_MSG} "---> Built the $b-bit library ---"
139
.endif
109
.endfor
140
.endfor
110
141
111
.if "${EXTRA_LINK_FLAGS}"
142
.if "${EXTRA_LINK_FLAGS}"
Lines 119-125 CMAKE_ARGS+= -DENABLE_SHARED:BOOL=true Link Here
119
.if ${ARCH} == i386 && ${DEFAULT_DEPTH} != "HI8P" || ! ${PORT_OPTIONS:MASM}
150
.if ${ARCH} == i386 && ${DEFAULT_DEPTH} != "HI8P" || ! ${PORT_OPTIONS:MASM}
120
CMAKE_ARGS+=	-DENABLE_ASSEMBLY:BOOL=false
151
CMAKE_ARGS+=	-DENABLE_ASSEMBLY:BOOL=false
121
.else
152
.else
153
.if ${ARCH} != powerpc64
122
CMAKE_ARGS+=	-DENABLE_ASSEMBLY:BOOL=true
154
CMAKE_ARGS+=	-DENABLE_ASSEMBLY:BOOL=true
155
.else
156
CMAKE_ARGS+=	-DCPU_POWER8=ON \
157
		-DENABLE_ALTIVEC=ON
158
.endif
123
159
124
do-test:
160
do-test:
125
	${WRKDIR}/.build/test/TestBench
161
	${WRKDIR}/.build/test/TestBench
(-)multimedia/x265/files/patch-source_CMakeLists.txt (-4 / +16 lines)
Lines 1-11 Link Here
1
--- source/CMakeLists.txt.orig	2020-06-06 08:18:40 UTC
1
--- source/CMakeLists.txt.orig	2021-10-31 01:46:10 UTC
2
+++ source/CMakeLists.txt
2
+++ source/CMakeLists.txt
3
@@ -122,3 +122,4 @@
3
@@ -43,7 +43,7 @@ set(X86_ALIASES x86 i386 i686 x86_64 amd64)
4
 set(ARM_ALIASES armv6l armv7l aarch64)
5
 list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
6
 list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
7
-set(POWER_ALIASES ppc64 ppc64le)
8
+set(POWER_ALIASES powerpc64 powerpc64le ppc64 ppc64le)
9
 list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
10
 if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
11
     set(X86 1)
12
@@ -121,6 +121,7 @@ if(UNIX)
13
     option(ENABLE_LIBVMAF "Enable VMAF" OFF)
4
     if(ENABLE_LIBVMAF)
14
     if(ENABLE_LIBVMAF)
5
         add_definitions(-DENABLE_LIBVMAF)
15
         add_definitions(-DENABLE_LIBVMAF)
6
+        include_directories(${VMAF_INCLUDE_DIR})
16
+        include_directories(${VMAF_INCLUDE_DIR})
7
     endif()
17
     endif()
8
@@ -592,12 +592,6 @@ if(ENABLE_HDR10_PLUS)
18
 endif(UNIX)
19
 
20
@@ -592,12 +593,6 @@ if(ENABLE_HDR10_PLUS)
9
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
21
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
10
 endif()
22
 endif()
11
 
23
 
Lines 18-24 Link Here
18
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
30
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
19
 if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
31
 if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
20
     if(MSVC_IDE)
32
     if(MSVC_IDE)
21
@@ -649,7 +643,10 @@ if(ENABLE_SHARED)
33
@@ -649,7 +644,10 @@ if(ENABLE_SHARED)
22
     if(EXTRA_LIB)
34
     if(EXTRA_LIB)
23
         target_link_libraries(x265-shared ${EXTRA_LIB})
35
         target_link_libraries(x265-shared ${EXTRA_LIB})
24
     endif()
36
     endif()

Return to bug 259564