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

Collapse All | Expand All

(-)b/multimedia/x265/Makefile (-52 / +49 lines)
Lines 4-11 PORTREVISION= 3 Link Here
4
CATEGORIES=	multimedia
4
CATEGORIES=	multimedia
5
MASTER_SITES=	https://bitbucket.org/multicoreware/x265_git/get/${BB_TAG}.tar.gz?meow=/
5
MASTER_SITES=	https://bitbucket.org/multicoreware/x265_git/get/${BB_TAG}.tar.gz?meow=/
6
6
7
PATCH_SITES=   https://bitbucket.org/multicoreware/x265_git/commits/8f18e3ad32684eee95e885e718655f93951128c3/raw/
7
PATCH_SITES=	https://bitbucket.org/multicoreware/x265_git/commits/8f18e3ad32684eee95e885e718655f93951128c3/raw/
8
PATCHFILES+=   x265-asm-warnings.patch:-p1
8
PATCHFILES+=	x265-asm-warnings.patch:-p1
9
9
10
MAINTAINER=	ports@virtual-estates.net
10
MAINTAINER=	ports@virtual-estates.net
11
COMMENT=	H.265/High Efficiency Video Coding (HEVC) format
11
COMMENT=	H.265/High Efficiency Video Coding (HEVC) format
Lines 15-43 LICENSE= GPLv2+ Link Here
15
LICENSE_FILE=	${WRKSRC:H}/COPYING
15
LICENSE_FILE=	${WRKSRC:H}/COPYING
16
16
17
USES=		cmake compiler:c++14-lang cpe pathfix dos2unix
17
USES=		cmake compiler:c++14-lang cpe pathfix dos2unix
18
19
CPE_VENDOR=	multicorewareinc
18
CPE_VENDOR=	multicorewareinc
20
19
DOS2UNIX_FILES=	common/scaler.cpp
20
USE_LDCONFIG=	yes
21
CMAKE_ARGS=	-DENABLE_TESTS=on -DGIT_ARCHETYPE=1
22
CMAKE_ON=	ENABLE_HDR10_PLUS
23
LDFLAGS_i386=	-Wl,-znotext
24
EXTRACT_AFTER_ARGS+=	--exclude compat --exclude md5\.* --strip-components=1
25
PATCH_WRKSRC=	${WRKSRC:H}
26
WRKSRC=		${WRKDIR}/source
21
BB_TAG=		Release_${DISTVERSION}
27
BB_TAG=		Release_${DISTVERSION}
22
28
23
OPTIONS_DEFINE=		DEBUG OPTIMIZED_FLAGS VMAF
29
OPTIONS_DEFINE=			DEBUG OPTIMIZED_FLAGS VMAF
24
OPTIONS_DEFAULT=	OPTIMIZED_FLAGS HI8P HI10P HI12P
30
OPTIONS_DEFINE_aarch64=		ASM
25
OPTIONS_DEFINE_aarch64=	ASM
31
OPTIONS_DEFINE_amd64=		ASM SVTHEVC
26
OPTIONS_DEFINE_amd64=	ASM SVTHEVC
32
OPTIONS_DEFINE_i386=		ASM
27
OPTIONS_DEFINE_i386=	ASM
28
OPTIONS_DEFINE_powerpc64=	ASM
33
OPTIONS_DEFINE_powerpc64=	ASM
29
OPTIONS_DEFINE_powerpc64le=	ASM
34
OPTIONS_DEFINE_powerpc64le=	ASM
30
OPTIONS_DEFAULT_amd64=	ASM
35
OPTIONS_DEFAULT=		HI10P HI12P HI8P OPTIMIZED_FLAGS
36
OPTIONS_DEFAULT_amd64=		ASM
31
OPTIONS_DEFAULT_powerpc64le=	ASM
37
OPTIONS_DEFAULT_powerpc64le=	ASM
32
38
33
OPTIONS_MULTI=		PixelWidth
39
OPTIONS_MULTI=			PIXELWIDTH
34
OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P
40
OPTIONS_MULTI_PIXELWIDTH=	HI10P HI12P HI8P
41
42
DEBUG_DESC=		Enable debugging
43
HI10P_DESC=		Enable 10-bit pixels (may break on i386)
44
HI12P_DESC=		Enable 12-bit pixels (may break on i386)
45
HI8P_DESC=		Enable 8-bit pixel-width (you, probably, want this)
46
OPTIMIZED_FLAGS_DESC=	Enable O3 optimization
47
SVTHEVC_DESC=		HEVC encoding via SVT-HEVC
48
VMAF_DESC=		Per frame and aggregate VMAF score
35
49
36
DOS2UNIX_FILES=		common/scaler.cpp
37
DEBUG_PREVENTS=		OPTIMIZED_FLAGS
50
DEBUG_PREVENTS=		OPTIMIZED_FLAGS
38
DEBUG_PREVENTS_MSG=	Optimizations are incompatible with debugging code
51
DEBUG_PREVENTS_MSG=	Optimizations are incompatible with debugging code
39
DEBUG_CMAKE_ON=		-DCMAKE_ASM_NASM_FLAGS:STRING="-g -O0"
52
DEBUG_CMAKE_ON=		-DCMAKE_ASM_NASM_FLAGS:STRING="-g -O0"
40
OPTIMIZED_FLAGS_VARS=	CFLAGS+=-O3
53
OPTIMIZED_FLAGS_CFLAGS=	-O3
41
SVTHEVC_LIB_DEPENDS=	libSvtHevcEnc.so:multimedia/svt-hevc
54
SVTHEVC_LIB_DEPENDS=	libSvtHevcEnc.so:multimedia/svt-hevc
42
SVTHEVC_CMAKE_BOOL=	ENABLE_SVT_HEVC
55
SVTHEVC_CMAKE_BOOL=	ENABLE_SVT_HEVC
43
SVTHEVC_CMAKE_ON=	-DSVT_HEVC_INCLUDE_DIR:PATH="${LOCALBASE}/include/svt-hevc"
56
SVTHEVC_CMAKE_ON=	-DSVT_HEVC_INCLUDE_DIR:PATH="${LOCALBASE}/include/svt-hevc"
Lines 46-67 VMAF_USES= localbase:ldflags Link Here
46
VMAF_CMAKE_BOOL=	ENABLE_LIBVMAF
59
VMAF_CMAKE_BOOL=	ENABLE_LIBVMAF
47
VMAF_CMAKE_ON=		-DVMAF_INCLUDE_DIR:PATH="${LOCALBASE}/include/libvmaf"
60
VMAF_CMAKE_ON=		-DVMAF_INCLUDE_DIR:PATH="${LOCALBASE}/include/libvmaf"
48
61
49
DEBUG_DESC=	Enable debugging
50
HI8P_DESC=	Enable 8-bit pixel-width (you, probably, want this)
51
HI10P_DESC=	Enable 10-bit pixels (may break on i386)
52
HI12P_DESC=	Enable 12-bit pixels (may break on i386)
53
OPTIMIZED_FLAGS_DESC=	Enable O3 optimization
54
SVTHEVC_DESC=	HEVC encoding via SVT-HEVC
55
VMAF_DESC=	Per frame and aggregate VMAF score
56
57
USE_LDCONFIG=	yes
58
CMAKE_ARGS=	-DENABLE_TESTS=on -DGIT_ARCHETYPE=1
59
CMAKE_ON=	ENABLE_HDR10_PLUS
60
LDFLAGS_i386=	-Wl,-znotext
61
EXTRACT_AFTER_ARGS+=	--exclude compat --exclude md5\.* --strip-components=1
62
PATCH_WRKSRC=	${WRKSRC:H}
63
WRKSRC=		${WRKDIR}/source
64
65
.include <bsd.port.options.mk>
62
.include <bsd.port.options.mk>
66
63
67
.if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM}
64
.if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM}
Lines 89-109 CMAKE_ARGS+= -DMAIN12:BOOL=true Link Here
89
CMAKE_ARGS+=	-DHIGH_BIT_DEPTH:BOOL=true
86
CMAKE_ARGS+=	-DHIGH_BIT_DEPTH:BOOL=true
90
.endif
87
.endif
91
88
92
CMAKE_OTHER_ARGS=${CMAKE_ARGS:C/.*-D_END_CUSTOM_OPTIONS=1 +//W}
89
CMAKE_OTHER_ARGS=	${CMAKE_ARGS:C/.*-D_END_CUSTOM_OPTIONS=1 +//W}
93
90
94
.if ${PORT_OPTIONS:MDEBUG}
91
.if ${PORT_OPTIONS:MDEBUG}
95
CFLAGS:=	${CFLAGS:N-O*} -O0 -g
92
CFLAGS:=	${CFLAGS:N-O*} -O0 -g
96
.endif
93
.endif
97
94
98
.for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/}
95
.for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/}
99
EXTRA_LINK_FLAGS+=-L${WRKSRC:H}/$bbit
96
EXTRA_LINK_FLAGS+=	-L${WRKSRC:H}/${b}bit
100
97
101
.if ${ARCH:Mpowerpc64*}
98
.if ${ARCH:Mpowerpc64*}
102
99
103
.if $b != 8 || ! ${PORT_OPTIONS:MASM}
100
.if ${b} != 8 || ! ${PORT_OPTIONS:MASM}
104
ASSEMBLY=false
101
ASSEMBLY=	false
105
.else
102
.else
106
ASSEMBLY=true
103
ASSEMBLY=	true
107
.endif
104
.endif
108
105
109
.if ${PORT_OPTIONS:MASM}
106
.if ${PORT_OPTIONS:MASM}
Lines 113-145 POWER8= false Link Here
113
.endif
110
.endif
114
111
115
pre-build::
112
pre-build::
116
	@${ECHO_MSG} "---> Building the $b-bit library ---"
113
	@${ECHO_MSG} "---> Building the ${b}-bit library ---"
117
	${MKDIR} ${WRKSRC:H}/$bbit
114
	${MKDIR} ${WRKSRC:H}/${b}bit
118
	${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/$bbit \
115
	${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/${b}bit \
119
		${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \
116
		${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \
120
		-DMAIN$b:BOOL=true -DENABLE_ALTIVEC=${ASSEMBLY} -DCPU_POWER8=${POWER8} \
117
		-DMAIN${b}:BOOL=true -DENABLE_ALTIVEC=${ASSEMBLY} -DCPU_POWER8=${POWER8} \
121
		-DEXPORT_C_API:BOOL=false -DENABLE_CLI=false
118
		-DEXPORT_C_API:BOOL=false -DENABLE_CLI=false
122
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS}
119
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/${b}bit ${MAKE_ARGS}
123
	${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
120
	${LN} -f ${WRKSRC:H}/${b}bit/libx265.a ${WRKSRC:H}/${b}bit/libx265_${b}bit.a
124
	${ECHO_MSG} "---> Built the $b-bit library ---"
121
	${ECHO_MSG} "---> Built the ${b}-bit library ---"
125
122
126
.else
123
.else
127
.if ${ARCH} == i386 && $b != 8 || ! ${PORT_OPTIONS:MASM}
124
.if ${ARCH} == i386 && ${b} != 8 || ! ${PORT_OPTIONS:MASM}
128
ASSEMBLY=false
125
ASSEMBLY=	false
129
.else
126
.else
130
ASSEMBLY=true
127
ASSEMBLY=	true
131
.endif
128
.endif
132
129
133
pre-build::
130
pre-build::
134
	@${ECHO_MSG} "---> Building the $b-bit library ---"
131
	@${ECHO_MSG} "---> Building the ${b}-bit library ---"
135
	${MKDIR} ${WRKSRC:H}/$bbit
132
	${MKDIR} ${WRKSRC:H}/${b}bit
136
	${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/$bbit \
133
	${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/${b}bit \
137
		${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \
134
		${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \
138
		-DMAIN$b:BOOL=true -DENABLE_ASSEMBLY:BOOL=${ASSEMBLY} \
135
		-DMAIN${b}:BOOL=true -DENABLE_ASSEMBLY:BOOL=${ASSEMBLY} \
139
		-DEXPORT_C_API:BOOL=false -DENABLE_CLI=false
136
		-DEXPORT_C_API:BOOL=false -DENABLE_CLI=false
140
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS}
137
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/${b}bit ${MAKE_ARGS}
141
	${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
138
	${LN} -f ${WRKSRC:H}/${b}bit/libx265.a ${WRKSRC:H}/${b}bit/libx265_${b}bit.a
142
	${ECHO_MSG} "---> Built the $b-bit library ---"
139
	${ECHO_MSG} "---> Built the ${b}-bit library ---"
143
.endif
140
.endif
144
.endfor
141
.endfor
145
142

Return to bug 280208