aboutsummaryrefslogtreecommitdiff
path: root/multimedia/x265/Makefile
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2020-09-20 22:17:52 +0000
committerMikhail Teterin <mi@FreeBSD.org>2020-09-20 22:17:52 +0000
commitb4d25ce406311b74b9dc0c48549013f8e59db3f5 (patch)
treedd60a4be196f1158b44ae383bde1b2c8fe79f78b /multimedia/x265/Makefile
parent688fff4c4ace2204dc9bd3b5a655e5e297c29405 (diff)
downloadports-b4d25ce406311b74b9dc0c48549013f8e59db3f5.tar.gz
ports-b4d25ce406311b74b9dc0c48549013f8e59db3f5.zip
Upgrade from 3.2 to 3.4. Resolve incompatibilities with newer
SVTHEVC. PR: 247035, 248479 Sponsored by: United Marsupials
Notes
Notes: svn path=/head/; revision=549401
Diffstat (limited to 'multimedia/x265/Makefile')
-rw-r--r--multimedia/x265/Makefile43
1 files changed, 25 insertions, 18 deletions
diff --git a/multimedia/x265/Makefile b/multimedia/x265/Makefile
index 0ab718148c05..1ad0be68be0e 100644
--- a/multimedia/x265/Makefile
+++ b/multimedia/x265/Makefile
@@ -2,14 +2,9 @@
# $FreeBSD$
PORTNAME= x265
-PORTVERSION= 3.2.1
-PORTREVISION= 4
+PORTVERSION= 3.4
CATEGORIES= multimedia
-MASTER_SITES= https://bitbucket.org/multicoreware/x265/downloads/ \
- https://downloads.videolan.org/pub/videolan/x265/ \
- https://mirror.leaseweb.com/videolan/x265/ \
- http://downloads.videolan.org/pub/videolan/x265/ \
- http://mirror.leaseweb.com/videolan/x265/
+MASTER_SITES= https://bitbucket.org/multicoreware/x265/downloads/
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= mi@aldan.algebra.com
@@ -18,19 +13,19 @@ COMMENT= H.265/High Efficiency Video Coding (HEVC) format
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC:H}/COPYING
-BUILD_DEPENDS= ${BUILD_DEPENDS_${ARCH}}
-BUILD_DEPENDS_amd64= nasm:devel/nasm
-BUILD_DEPENDS_i386= nasm:devel/nasm
-
-USES= cmake compiler:c++14-lang pathfix
+USES= cmake compiler:c++14-lang pathfix dos2unix
OPTIONS_DEFINE= DEBUG OPTIMIZED_FLAGS VMAF
OPTIONS_DEFAULT= OPTIMIZED_FLAGS HI8P HI10P HI12P
-OPTIONS_DEFINE_amd64= SVTHEVC
+OPTIONS_DEFINE_aarch64= ASM
+OPTIONS_DEFINE_amd64= ASM SVTHEVC
+OPTIONS_DEFINE_i386= ASM
+OPTIONS_DEFAULT_amd64= ASM
OPTIONS_MULTI= PixelWidth
OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P
+DOS2UNIX_FILES= abrEncApp.cpp
DEBUG_PREVENTS= OPTIMIZED_FLAGS
DEBUG_PREVENTS_MSG= Optimizations are incompatible with debugging code
DEBUG_VARS_OFF= CFLAGS+=-DNDEBUG
@@ -42,6 +37,7 @@ SVTHEVC_CMAKE_ON= -DSVT_HEVC_INCLUDE_DIR:PATH="${LOCALBASE}/include/svt-hevc"
VMAF_LIB_DEPENDS= libvmaf.so:multimedia/vmaf
VMAF_USES= localbase:ldflags
VMAF_CMAKE_BOOL= ENABLE_LIBVMAF
+VMAF_CMAKE_ON= -DVMAF_INCLUDE_DIR:PATH="${LOCALBASE}/include/libvmaf"
DEBUG_DESC= Enable debugging
HI8P_DESC= Enable 8-bit pixel-width (you, probably, want this)
@@ -51,7 +47,6 @@ OPTIMIZED_FLAGS_DESC= Enable O3 optimization
SVTHEVC_DESC= HEVC encoding via SVT-HEVC
VMAF_DESC= Per frame and aggregate VMAF score
-OPTIONS_SUB= yes
USE_LDCONFIG= yes
CMAKE_ARGS= -DENABLE_TESTS=on -DENABLE_HDR10_PLUS:BOOL=true
LDFLAGS_i386= -Wl,-znotext
@@ -61,6 +56,17 @@ WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION}/source
.include <bsd.port.options.mk>
+.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}
+BUILD_DEPENDS= nasm:devel/nasm
+.endif
+
DEFAULT_DEPTH= ${PORT_OPTIONS:MHI*P:O:ts/:T}
OTHER_DEPTHS= ${PORT_OPTIONS:MHI*P:N${DEFAULT_DEPTH}}
@@ -69,7 +75,7 @@ CMAKE_ARGS+= -DMAIN12:BOOL=true
.endif
.if "${DEFAULT_DEPTH}" != "HI8P"
-CMAKE_ARGS+= -DHIGH_BIT_DEPTH:BOOL=true
+CMAKE_ARGS+= -DHIGH_BIT_DEPTH:BOOL=true
.endif
CMAKE_OTHER_ARGS=${CMAKE_ARGS:C/.*-D_END_CUSTOM_OPTIONS=1 +//W}
@@ -81,7 +87,7 @@ 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} == i386 && $b != 8 || ! ${BUILD_DEPENDS:Mnasm*}
+.if ${ARCH} == i386 && $b != 8 || ! ${PORT_OPTIONS:MASM}
ASSEMBLY=false
.else
ASSEMBLY=true
@@ -95,7 +101,7 @@ pre-build::
-DMAIN$b:BOOL=true -DENABLE_ASSEMBLY:BOOL=${ASSEMBLY} \
-DEXPORT_C_API:BOOL=false -DENABLE_CLI=false
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS}
- ${LN} ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
+ ${LN} -f ${WRKSRC:H}/$bbit/libx265.a ${WRKSRC:H}/$bbit/libx265_$bbit.a
${ECHO_MSG} "---> Built the $b-bit library ---"
.endfor
@@ -107,10 +113,11 @@ CMAKE_ARGS+= ${OTHER_DEPTHS:C/HI([0-9]+)P/-DLINKED_\1BIT:BOOL=true/}
CMAKE_ARGS+= -DENABLE_SHARED:BOOL=true
-.if ${ARCH} == i386 && ${DEFAULT_DEPTH} != "HI8P" || ! ${BUILD_DEPENDS:Mnasm*}
+.if ${ARCH} == i386 && ${DEFAULT_DEPTH} != "HI8P" || ! ${PORT_OPTIONS:MASM}
CMAKE_ARGS+= -DENABLE_ASSEMBLY:BOOL=false
.else
CMAKE_ARGS+= -DENABLE_ASSEMBLY:BOOL=true
+
do-test:
${WRKDIR}/.build/test/TestBench
.endif