diff options
-rw-r--r-- | multimedia/x265/Makefile | 43 | ||||
-rw-r--r-- | multimedia/x265/distinfo | 6 | ||||
-rw-r--r-- | multimedia/x265/files/patch-source_CMakeLists.txt | 34 | ||||
-rw-r--r-- | multimedia/x265/files/patch-source_abrEncApp.cpp | 9 | ||||
-rw-r--r-- | multimedia/x265/files/patch-source_cmake_Findsvthevc.cmake | 13 | ||||
-rw-r--r-- | multimedia/x265/files/patch-source_common_version.cpp | 20 | ||||
-rw-r--r-- | multimedia/x265/files/patch-source_dynamicHDR10_CMakeLists.txt | 28 | ||||
-rw-r--r-- | multimedia/x265/files/patch-source_encoder_api.cpp | 17 | ||||
-rw-r--r-- | multimedia/x265/files/patch-source_encoder_svt.h | 18 | ||||
-rw-r--r-- | multimedia/x265/pkg-plist | 2 |
10 files changed, 115 insertions, 75 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 diff --git a/multimedia/x265/distinfo b/multimedia/x265/distinfo index 7a88d6100cc5..e39956095aa8 100644 --- a/multimedia/x265/distinfo +++ b/multimedia/x265/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1572350105 -SHA256 (x265_3.2.1.tar.gz) = fb9badcf92364fd3567f8b5aa0e5e952aeea7a39a2b864387cec31e3b58cbbcc -SIZE (x265_3.2.1.tar.gz) = 1426255 +TIMESTAMP = 1591425294 +SHA256 (x265_3.4.tar.gz) = c2047f23a6b729e5c70280d23223cb61b57bfe4ad4e8f1471eeee2a61d148672 +SIZE (x265_3.4.tar.gz) = 1469365 diff --git a/multimedia/x265/files/patch-source_CMakeLists.txt b/multimedia/x265/files/patch-source_CMakeLists.txt index 99fba15fb7b6..8758bc33e723 100644 --- a/multimedia/x265/files/patch-source_CMakeLists.txt +++ b/multimedia/x265/files/patch-source_CMakeLists.txt @@ -1,34 +1,32 @@ -===> Checking for items in STAGEDIR missing from pkg-plist -Error: Orphaned: bin/libSvtHevcEnc.so -Error: Orphaned: include/EbApi.h -Error: Orphaned: include/EbErrorCodes.h -Error: Orphaned: include/EbTime.h - -libx265.so.179: undefined reference to `compute_vmaf' - ---- source/CMakeLists.txt.orig 2019-01-23 09:47:18 UTC +--- source/CMakeLists.txt.orig 2020-06-06 08:18:40 UTC +++ source/CMakeLists.txt -@@ -570,13 +570,6 @@ if(ENABLE_HDR10_PLUS) +@@ -122,3 +122,4 @@ + if(ENABLE_LIBVMAF) + add_definitions(-DENABLE_LIBVMAF) ++ include_directories(${VMAF_INCLUDE_DIR}) + endif() +@@ -592,12 +592,6 @@ if(ENABLE_HDR10_PLUS) ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) endif() -if(SVTHEVC_FOUND) - install(FILES "${SVT_HEVC_INCLUDE_DIR}/EbApi.h" DESTINATION include) - install(FILES "${SVT_HEVC_INCLUDE_DIR}/EbErrorCodes.h" DESTINATION include) -- install(FILES "${SVT_HEVC_INCLUDE_DIR}/EbTime.h" DESTINATION include) -- install(FILES "${SVT_HEVC_LIBRARY}" DESTINATION ${BIN_INSTALL_DIR}) +- install(FILES "${SVT_HEVC_LIBRARY}" DESTINATION ${LIB_INSTALL_DIR}) -endif() - install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED)) if(MSVC_IDE) -@@ -627,6 +620,9 @@ if(ENABLE_SHARED) - endif() +@@ -649,7 +643,10 @@ if(ENABLE_SHARED) if(EXTRA_LIB) target_link_libraries(x265-shared ${EXTRA_LIB}) -+ endif() -+ if(ENABLE_LIBVMAF) -+ target_link_libraries(x265-shared ${VMAF}) endif() - target_link_libraries(x265-shared ${PLATFORM_LIBS}) +- target_link_libraries(x265-shared ${PLATFORM_LIBS}) ++ if(ENABLE_LIBVMAF) ++ target_link_libraries(x265-shared ${VMAF}) ++ endif() ++ target_link_libraries(x265-shared ${PLATFORM_LIBS}) if(SVTHEVC_FOUND) + target_link_libraries(x265-shared ${SVT_HEVC_LIBRARY}) + endif(SVTHEVC_FOUND) diff --git a/multimedia/x265/files/patch-source_abrEncApp.cpp b/multimedia/x265/files/patch-source_abrEncApp.cpp new file mode 100644 index 000000000000..c9a38bdcfabe --- /dev/null +++ b/multimedia/x265/files/patch-source_abrEncApp.cpp @@ -0,0 +1,9 @@ +--- source/abrEncApp.cpp 2020-05-29 13:39:35.000000000 -0400 ++++ source/abrEncApp.cpp 2020-07-19 17:37:32.365958000 -0400 +@@ -815,5 +815,5 @@ + if (m_param->csvfn && !b_ctrl_c) + #if ENABLE_LIBVMAF +- api->vmaf_encoder_log(m_encoder, m_cliopt.argCount, m_cliopt.argString, m_cliopt.param, vmafdata); ++ api->vmaf_encoder_log(m_encoder, m_cliopt.argCnt, m_cliopt.argString, m_cliopt.param, vmafdata); + #else + api->encoder_log(m_encoder, m_cliopt.argCnt, m_cliopt.argString); diff --git a/multimedia/x265/files/patch-source_cmake_Findsvthevc.cmake b/multimedia/x265/files/patch-source_cmake_Findsvthevc.cmake new file mode 100644 index 000000000000..4c6029d4213e --- /dev/null +++ b/multimedia/x265/files/patch-source_cmake_Findsvthevc.cmake @@ -0,0 +1,13 @@ +--- source/cmake/Findsvthevc.cmake 2020-05-29 17:39:35.000000000 +0000 ++++ source/cmake/Findsvthevc.cmake 2020-08-07 02:26:55.307048000 +0000 +@@ -39,9 +39,5 @@ + set(SVT_VERSION_PATCHLEVEL ${CMAKE_MATCH_1}) + +- if(NOT ${SVT_VERSION_MAJOR} EQUAL "1" OR NOT ${SVT_VERSION_MINOR} EQUAL "4" OR NOT ${SVT_VERSION_PATCHLEVEL} EQUAL "1") +- message (SEND_ERROR "-- Found SVT-HEVC Lib Version: ${SVT_VERSION_MAJOR}.${SVT_VERSION_MINOR}.${SVT_VERSION_PATCHLEVEL} which doesn't match the required version: ${SVT_VERSION_MAJOR_REQUIRED}.${SVT_VERSION_MINOR_REQUIRED}.${SVT_VERSION_PATCHLEVEL_REQUIRED}; Aborting configure ") +- else() +- message(STATUS "-- Found SVT-HEVC Lib Version: ${SVT_VERSION_MAJOR}.${SVT_VERSION_MINOR}.${SVT_VERSION_PATCHLEVEL}") +- endif() ++ message(STATUS "-- Found SVT-HEVC Lib Version: ${SVT_VERSION_MAJOR}.${SVT_VERSION_MINOR}.${SVT_VERSION_PATCHLEVEL}") + else() + message (SEND_ERROR "-- Required version of SVT-HEVC Lib: ${SVT_VERSION_MAJOR_REQUIRED}.${SVT_VERSION_MINOR_REQUIRED}.${SVT_VERSION_PATCHLEVEL_REQUIRED}; Aborting configure ") diff --git a/multimedia/x265/files/patch-source_common_version.cpp b/multimedia/x265/files/patch-source_common_version.cpp new file mode 100644 index 000000000000..ef813a02d684 --- /dev/null +++ b/multimedia/x265/files/patch-source_common_version.cpp @@ -0,0 +1,20 @@ +--- source/common/version.cpp.orig 2020-05-29 17:39:35 UTC ++++ source/common/version.cpp +@@ -63,6 +63,8 @@ + #define ONOS "[Linux]" + #elif __OpenBSD__ + #define ONOS "[OpenBSD]" ++#elif __FreeBSD__ ++#define ONOS "[FreeBSD]" + #elif __CYGWIN__ + #define ONOS "[Cygwin]" + #elif __APPLE__ +@@ -71,7 +73,7 @@ + #define ONOS "[Unk-OS]" + #endif + +-#if X86_64 ++#if defined(X86_64) || X265_ARCH_ARM64 + #define BITS "[64 bit]" + #else + #define BITS "[32 bit]" diff --git a/multimedia/x265/files/patch-source_dynamicHDR10_CMakeLists.txt b/multimedia/x265/files/patch-source_dynamicHDR10_CMakeLists.txt new file mode 100644 index 000000000000..ae7ccd3b40bb --- /dev/null +++ b/multimedia/x265/files/patch-source_dynamicHDR10_CMakeLists.txt @@ -0,0 +1,28 @@ +--- source/dynamicHDR10/CMakeLists.txt.orig 2020-06-06 13:37:44 UTC ++++ source/dynamicHDR10/CMakeLists.txt +@@ -42,18 +42,6 @@ if(GCC) + endif() + endif() + endif() +- if(ARM AND CROSS_COMPILE_ARM) +- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC) +- elseif(ARM) +- find_package(Neon) +- if(CPU_HAS_NEON) +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC) +- add_definitions(-DHAVE_NEON) +- else() +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm) +- endif() +- endif() +- add_definitions(${ARM_ARGS}) + if(FPROFILE_GENERATE) + if(INTEL_CXX) + add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}") +@@ -150,4 +138,4 @@ set(BIN_INSTALL_DIR bin CACHE STRING "Install location + option(ENABLE_SHARED "Build shared library" OFF) + + install(FILES hdr10plus.h DESTINATION include) +-endif() +\ No newline at end of file ++endif() diff --git a/multimedia/x265/files/patch-source_encoder_api.cpp b/multimedia/x265/files/patch-source_encoder_api.cpp deleted file mode 100644 index c28fc32b6445..000000000000 --- a/multimedia/x265/files/patch-source_encoder_api.cpp +++ /dev/null @@ -1,17 +0,0 @@ -Chase https://github.com/Netflix/vmaf/commit/82a86e040371 - -source/encoder/api.cpp:36:10: fatal error: 'libvmaf.h' file not found -#include "libvmaf.h" - ^~~~~~~~~~~ - ---- source/encoder/api.cpp.orig 2019-10-29 11:55:05 UTC -+++ source/encoder/api.cpp -@@ -33,7 +33,7 @@ - #include "svt.h" - - #if ENABLE_LIBVMAF --#include "libvmaf.h" -+#include "libvmaf/libvmaf.h" - #endif - - /* multilib namespace reflectors */ diff --git a/multimedia/x265/files/patch-source_encoder_svt.h b/multimedia/x265/files/patch-source_encoder_svt.h deleted file mode 100644 index b510797af0bf..000000000000 --- a/multimedia/x265/files/patch-source_encoder_svt.h +++ /dev/null @@ -1,18 +0,0 @@ -https://bitbucket.org/multicoreware/x265/issues/509/x265-fails-to-build-with-current-svt-hevc - -In file included from source/encoder/analysis.cpp:35: -In file included from source/encoder/encoder.h:34: -source/encoder/svt.h:32:10: fatal error: 'EbTime.h' file not found -#include "EbTime.h" - ^~~~~~~~~~ - ---- source/encoder/svt.h.orig 2019-07-31 04:59:54 UTC -+++ source/encoder/svt.h -@@ -29,7 +29,6 @@ - - #include "EbApi.h" - #include "EbErrorCodes.h" --#include "EbTime.h" - - namespace X265_NS { - diff --git a/multimedia/x265/pkg-plist b/multimedia/x265/pkg-plist index 91f3565ff4ca..36d6f89c2fd5 100644 --- a/multimedia/x265/pkg-plist +++ b/multimedia/x265/pkg-plist @@ -6,5 +6,5 @@ lib/libhdr10plus.a lib/libhdr10plus.so lib/libx265.a lib/libx265.so -lib/libx265.so.179 +lib/libx265.so.192 libdata/pkgconfig/x265.pc |