diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2020-02-05 04:40:24 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2020-02-05 04:40:24 +0000 |
commit | a1c41ffbc3dbbfe01afa5bcf309dd5119480cda1 (patch) | |
tree | 87328e47aeb6697554780d3270f4450940be5fe9 /multimedia | |
parent | 419e8be9374501e19fc84cfdd9be666a775c46d2 (diff) | |
download | ports-a1c41ffbc3dbbfe01afa5bcf309dd5119480cda1.tar.gz ports-a1c41ffbc3dbbfe01afa5bcf309dd5119480cda1.zip |
Reintroduce the recent upgrade after fixing the generation of the
shared libraries.
Actually list the PR properly.
PR: 238773
Not reported by: antoine
Notes
Notes:
svn path=/head/; revision=525259
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/x265/Makefile | 70 | ||||
-rw-r--r-- | multimedia/x265/pkg-plist | 3 |
2 files changed, 62 insertions, 11 deletions
diff --git a/multimedia/x265/Makefile b/multimedia/x265/Makefile index 57515c94d0ca..02cd11ddf4a6 100644 --- a/multimedia/x265/Makefile +++ b/multimedia/x265/Makefile @@ -3,6 +3,7 @@ PORTNAME= x265 PORTVERSION= 3.2.1 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= https://bitbucket.org/multicoreware/x265/downloads/ \ https://downloads.videolan.org/pub/videolan/x265/ \ @@ -17,20 +18,24 @@ COMMENT= H.265/High Efficiency Video Coding (HEVC) format LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC:H}/COPYING -BUILD_DEPENDS= nasm:devel/nasm +BUILD_DEPENDS= ${BUILD_DEPENDS_${ARCH}} +BUILD_DEPENDS_amd64= nasm:devel/nasm +BUILD_DEPENDS_i386= nasm:devel/nasm USES= cmake compiler:c++14-lang pathfix OPTIONS_DEFINE= DEBUG OPTIMIZED_FLAGS VMAF -OPTIONS_DEFINE_amd64= HI10P HI12P SVTHEVC +OPTIONS_DEFAULT= OPTIMIZED_FLAGS HI8P HI10P HI12P +OPTIONS_DEFINE_amd64= SVTHEVC + +OPTIONS_MULTI= PixelWidth +OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P DEBUG_PREVENTS= OPTIMIZED_FLAGS DEBUG_PREVENTS_MSG= Optimizations are incompatible with debugging code -DEBUG_VARS_OFF= CFLAGS+=-DNDEBUG CPPFLAGS+=-DNDEBUG -HI10P_CMAKE_BOOL= HIGH_BIT_DEPTH -HI12P_CMAKE_BOOL= MAIN12 -HI12P_IMPLIES= HI10P -OPTIMIZED_FLAGS_VARS= CFLAGS+=-O3 CXXFLAGS+=-O3 +DEBUG_VARS_OFF= CFLAGS+=-DNDEBUG +DEBUG_CMAKE_ON= -DCMAKE_ASM_NASM_FLAGS:STRING="-g -O0" +OPTIMIZED_FLAGS_VARS= CFLAGS+=-O3 SVTHEVC_LIB_DEPENDS= libSvtHevcEnc.so:multimedia/svt-hevc SVTHEVC_CMAKE_BOOL= ENABLE_SVT_HEVC SVTHEVC_CMAKE_ON= -DSVT_HEVC_INCLUDE_DIR:PATH="${LOCALBASE}/include/svt-hevc" @@ -39,20 +44,63 @@ VMAF_USES= localbase:ldflags VMAF_CMAKE_BOOL= ENABLE_LIBVMAF DEBUG_DESC= Enable debugging -HI10P_DESC= Enable HI10P Support (64-bit only) -HI12P_DESC= Enable HI12P Support (64-bit only) +HI8P_DESC= Enable 8-bit pixel-width (you, probably, want this) +HI10P_DESC= Enable 10-bit pixels (may break on i386) +HI12P_DESC= Enable 12-bit pixels (may break on i386) 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_PIC=on -DENABLE_TESTS=on +CMAKE_ARGS= -DENABLE_PIC=on -DENABLE_TESTS=on \ + -DENABLE_HDR10_PLUS:BOOL=true LDFLAGS_i386= -Wl,-znotext EXTRACT_AFTER_ARGS+= --exclude compat PATCH_WRKSRC= ${WRKSRC:H} WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION}/source +.include <bsd.port.options.mk> + +DEFAULT_DEPTH= ${PORT_OPTIONS:MHI*P:O:ts/:T} +OTHER_DEPTHS= ${PORT_OPTIONS:MHI*P:N${DEFAULT_DEPTH}} + +.if "${DEFAULT_DEPTH}" == "HI12P" +CMAKE_ARGS+= -DMAIN12:BOOL=true +.endif + +.if "${DEFAULT_DEPTH}" != "HI8P" +CMAKE_ARGS+= -DHIGH_BIT_DEPTH:BOOL=true +.endif + +CFLAGS+= ${OTHER_DEPTHS:C/HI([0-9]+)P/-DLINKED_\1BIT/} +CMAKE_OTHER_ARGS=${CMAKE_ARGS:C/.*-D_END_CUSTOM_OPTIONS=1 +//W} + +.if ${PORT_OPTIONS:MDEBUG} +CFLAGS:= ${CFLAGS:N-O*} -O0 -g +.endif + +.for b in ${OTHER_DEPTHS:C/HI([0-9]+)P/\1/} +EXTRA_LINK_FLAGS+=${WRKSRC:H}/$bbit/libx265.a +pre-build:: + @${ECHO_MSG} "---> Building the $b-bit library ---" + ${MKDIR} ${WRKSRC:H}/$bbit + ${CMAKE_BIN} -S ${WRKSRC} -B ${WRKSRC:H}/$bbit \ + ${CMAKE_OTHER_ARGS} ${b:C/1./-DHIGH_BIT_DEPTH:BOOL=true/} \ + -DMAIN$b:BOOL=true \ + -DEXPORT_C_API:BOOL=false -DENABLE_CLI=false + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC:H}/$bbit ${MAKE_ARGS} + ${ECHO_MSG} "---> Built the $b-bit library ---" +.endfor + +.if "${EXTRA_LINK_FLAGS}" +CMAKE_ARGS+= -DEXTRA_LINK_FLAGS=${EXTRA_LINK_FLAGS:Q} +.endif + +CMAKE_ARGS+= -D_END_CUSTOM_OPTIONS=1 +CMAKE_ARGS+= -DENABLE_SHARED:BOOL=true + do-test: - ${WRKSRC}/test/TestBench + ${WRKDIR}/.build/test/TestBench .include <bsd.port.mk> diff --git a/multimedia/x265/pkg-plist b/multimedia/x265/pkg-plist index f5b5b18ced6b..91f3565ff4ca 100644 --- a/multimedia/x265/pkg-plist +++ b/multimedia/x265/pkg-plist @@ -1,6 +1,9 @@ bin/x265 +include/hdr10plus.h include/x265.h include/x265_config.h +lib/libhdr10plus.a +lib/libhdr10plus.so lib/libx265.a lib/libx265.so lib/libx265.so.179 |