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 |