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

Collapse All | Expand All

(-)multimedia/x265/Makefile (-3 / +40 lines)
Lines 23-29 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
28
OPTIONS_DEFAULT_powerpc64=	ASM
27
29
28
OPTIONS_MULTI=		PixelWidth
30
OPTIONS_MULTI=		PixelWidth
29
OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P
31
OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P
Lines 62-72 WRKSRC= ${WRKDIR}/source Link Here
62
.if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM}
64
.if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM}
63
BUILD_DEPENDS=	as:devel/binutils
65
BUILD_DEPENDS=	as:devel/binutils
64
USE_GCC=	yes
66
USE_GCC=	yes
65
ASM_PREVENTS=	HI10P HI12P
66
ASM_PREVENTS_MSG=	Currently HI10P and HI12P doesn't build with assembly
67
.endif
67
.endif
68
68
69
.if ${ARCH} != aarch64 && ${PORT_OPTIONS:MASM}
69
.if ${ARCH} == powerpc64 && ${PORT_OPTIONS:MASM}
70
CMAKE_ARGS+=	-DCPU_POWER8=ON \
71
		-DENABLE_ALTIVEC=ON
72
.endif
73
74
.if ${ARCH} != aarch64 && ${ARCH} != powerpc64 && ${PORT_OPTIONS:MASM}
70
BUILD_DEPENDS=	nasm:devel/nasm
75
BUILD_DEPENDS=	nasm:devel/nasm
71
.endif
76
.endif
72
77
Lines 90-95 CFLAGS:= ${CFLAGS:N-O*} -O0 -g Link Here
90
.for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/}
95
.for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/}
91
EXTRA_LINK_FLAGS+=-L${WRKSRC:H}/$bbit
96
EXTRA_LINK_FLAGS+=-L${WRKSRC:H}/$bbit
92
97
98
.if ${ARCH} == powerpc64
99
100
.if $b != 8 || ! ${PORT_OPTIONS:MASM}
101
ASSEMBLY=false
102
.else
103
ASSEMBLY=true
104
.endif
105
106
.if ${PORT_OPTIONS:MASM}
107
POWER8=	true
108
.else
109
POWER8=	false
110
.endif
111
112
pre-build::
113
	@${ECHO_MSG} "---> Building the $b-bit library ---"
114
	${MKDIR} ${WRKSRC:H}/$bbit
115
	${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/$bbit \
116
		${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \
117
		-DMAIN$b:BOOL=true -DENABLE_ALTIVEC=${ASSEMBLY} -DCPU_POWER8=${POWER8} \
118
		-DEXPORT_C_API:BOOL=false -DENABLE_CLI=false
119
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS}
120
	${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
121
	${ECHO_MSG} "---> Built the $b-bit library ---"
122
123
.else
93
.if ${ARCH} == i386 && $b != 8 || ! ${PORT_OPTIONS:MASM}
124
.if ${ARCH} == i386 && $b != 8 || ! ${PORT_OPTIONS:MASM}
94
ASSEMBLY=false
125
ASSEMBLY=false
95
.else
126
.else
Lines 106-111 pre-build:: Link Here
106
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS}
137
	${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
138
	${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
108
	${ECHO_MSG} "---> Built the $b-bit library ---"
139
	${ECHO_MSG} "---> Built the $b-bit library ---"
140
.endif
109
.endfor
141
.endfor
110
142
111
.if "${EXTRA_LINK_FLAGS}"
143
.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}
151
.if ${ARCH} == i386 && ${DEFAULT_DEPTH} != "HI8P" || ! ${PORT_OPTIONS:MASM}
120
CMAKE_ARGS+=	-DENABLE_ASSEMBLY:BOOL=false
152
CMAKE_ARGS+=	-DENABLE_ASSEMBLY:BOOL=false
121
.else
153
.else
154
.if ${ARCH} != powerpc64
122
CMAKE_ARGS+=	-DENABLE_ASSEMBLY:BOOL=true
155
CMAKE_ARGS+=	-DENABLE_ASSEMBLY:BOOL=true
156
.else
157
CMAKE_ARGS+=	-DCPU_POWER8=ON \
158
		-DENABLE_ALTIVEC=ON
159
.endif
123
160
124
do-test:
161
do-test:
125
	${WRKDIR}/.build/test/TestBench
162
	${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