freebsd-ports/multimedia/avidemux/Makefile.common
Tobias C. Berner 60f6f7f6a9 multimedia/avidemux: update to 2.7.6
2020-07-07: 2.7.6: Another nice release, completely done by Euma
* New Feature:Detect and warn when cut points in HEVC video streams may result in grave playback issues despite being on keyframes
* New Video Decoder:Add libaom-based AV1 decoder
* New Video Encoder:Add libvpx-based VP9 encoder
* New Video Filter:Add hardware accelerated deinterlacer and resizer based on VA-API (Linux only)
* FFmpeg:Update to the 4.2.3 release
* Core:Increase maximum supported resolution to 4096x4096
* Core:Fix crash on macOS with HW accel. decoding enabled and H.264 video streams containing both frame- and field-encoded slices
* Encoder:Extend configuration options for NVENC-based H.264 and HEVC encoders, add 2-pass mode
* Demuxer:Support MPEG-TS files with duration in excess of 13:15:36
* Demuxer:Use DTS core from DTS XLL audio in MPEG-TS files instead of rejecting the track
* Demuxer:Fix mono MP3 audio tracks in MP4 files misdetected as stereo
* Demuxer:Try to correct timestamp jitter in MP4 files produced by older Avidemux versions
* Muxer:Fix timestamp rounding which caused pseudo-VFR output from CFR sources
* Muxer:Fix saving to network shares on Windows using the Mp4 muxer when index should be moved to the start of the file
* Muxer:Support LPCM audio in the Mp4 muxer by silently switching to the MOV muxing mode
* Muxer:Add support for Vorbis audio to the Mp4 muxer
* Filter:Fix "Fade" and "Fade to black", broken on macOS
* Filter:Allow to toggle rubber band visibility in "Crop" and "Blacken Borders" video filters
* Filter:Fix keyboard input in "Resize" video filter by recalculating values only on moving focus to another field or on accepting dialog
* Audio:Add HE-AAC and HE-AACv2 profiles to the FDK AAC encoder plugin
* Audio:Support external audio tracks in DTS format
* UI:Fix navigation slider with RTL locales
* UI:Restore the shutdown option in encoding dialog on Windows
* Scripting:Add PTS query and keyframe seek methods to Python interface
* Miscellaneous:Allow user-defined fragment size for auto-append of chunked MPEG-TS files
* Miscellaneous:Improve handling of field-encoded video streams throughout the chain
* Miscellaneous:Improve handling of H.264 video streams with parameter sets changing on the fly
* Miscellaneous:Try to keep track of video time base throughout the chain
* Miscellaneous:Numerous other fixes and polish

PR:		249241
Submitted by:	Lars Herschke <lhersch@dssgmbh.de>, VVD <vvd@unislabs.com>
2020-09-27 17:49:35 +00:00

302 lines
7 KiB
Text

# $FreeBSD$
AVIDEMUX_VERSION= 2.7.6
MASTER_SITES= \
SF/avidemux/avidemux/${PORTVERSION}
DISTNAME= avidemux_${PORTVERSION}
BUILD_DEPENDS+= yasm:devel/yasm \
bash:shells/bash
LIB_DEPENDS+= libmad.so:audio/libmad \
libpng.so:graphics/png
LICENSE= GPLv2
USE_GNOME= libxml2
OPTIONS_FILE= ${PORT_DBDIR}/${OPTIONS_NAME:C/-.*//}/options
USES= cmake:noninja pkgconfig iconv gmake compiler:features sqlite
USES+= dos2unix
DOS2UNIX_FILES= cmake/admCheckMiscLibs.cmake \
avidemux_core/ADM_coreVideoCodec/include/ADM_coreVideoCodec6_export.h \
avidemux_core/ADM_coreVideoCodec/include/ADM_ffmp43.h
CMAKE_ARGS+= -DGNUMAKE_EXECUTABLE=gmake
CMAKE_ARGS+= -DAVIDEMUX_PACKAGER=none
CMAKE_ARGS+= -DGTK:BOOL=OFF
CMAKE_ARGS+= -DESD:BOOL=OFF
CXXFLAGS+= -I${LOCALBASE}/include
MAKE_JOBS_UNSAFE= yes
NOPRECIOUSMAKEVARS= yes # ARCH
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils
CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
OPTIONS_DEFINE= CLI FREETYPE FONTCONFIG OSS JACK PULSEAUDIO \
XVIDEO FAAC FRIBIDI OPUS TWOLAME \
FAAD X264 X265 VPX AOM XVID AMR VORBIS NLS LAME VAAPI VDPAU \
DCA FDK QT5 TINYPY VAPOURSYNTH
OPTIONS_DEFAULT= FREETYPE FONTCONFIG OSS XVIDEO VPX XVID \
FAAD VDPAU VORBIS DCA FDK QT5 TINYPY VAPOURSYNTH \
PULSEAUDIO
OPTIONS_SUB= yes
AOM_DESC= AOM AV1 decoder support
CLI_DESC= Build CLI tool
FDK_DESC= FDK AAC codec support
TINYPY_DESC= Python scripting support via TinyPy
VAPOURSYNTH_DESC= VapourSynth video manipulation support
FRIBIDI_CMAKE_OFF= -DFRIBIDI:BOOL=OFF
FRIBIDI_LIB_DEPENDS= libfribidi.so:converters/fribidi
OPUS_CMAKE_OFF= -DOPUS:BOOL=OFF -DOPUS_ENCODER:BOOL=OFF
OPUS_LIB_DEPENDS= libopus.so:audio/opus
TWOLAME_CMAKE_OFF= -DTWOLAME:BOOL=OFF
TWOLAME_LIB_DEPENDS= libtwolame.so:audio/twolame
.if !defined(PACKAGE_BUILDING)
OPTIONS_DEFAULT+= LAME FAAC AMR X264
.endif
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MNLS}
USES+= gettext
.else
CMAKE_ARGS+= -DNO_NLS:BOOL=ON
.endif
# for libexecinfo: (so that __builtin_frame_address() finds the top
# of the stack)
.if ${ARCH} == amd64
CFLAGS+= -fno-omit-frame-pointer
#MAKE_ENV+= ARCH=x86_64
#CONFIGURE_ENV+= ARCH=x86_64
.endif
CMAKE_ARGS+= -DLIBEXECINFO_INCLUDE_DIR=/usr/include
CMAKE_ARGS+= -DLIBEXECINFO_LIBRARY_DIR=-lexecinfo
# We haven't ALSA(Never) & Aften(Yet) on FreeBSD
CMAKE_ARGS+= -DARTS:BOOL=OFF -DALSA:BOOL=OFF -DAFTEN:BOOL=OFF
.if empty(PORT_OPTIONS:MQT5)
CMAKE_ARGS+= -DX11:BOOL=OFF
.else
USE_GNOME+= libxslt
.endif
.if ${PORT_OPTIONS:MQT5}
USES+= desktop-file-utils gl qt:5 xorg
USE_GL= gl glu
USE_QT= core gui network widgets \
qmake_build buildtools_build linguist_build
USE_XORG= x11
CMAKE_ARGS+= -DENABLE_QT5:BOOL=ON
PLIST_SUB+= QT5=""
.else
CMAKE_ARGS+= -DQT4:BOOL=OFF
PLIST_SUB+= QT5="@comment "
.endif
.if ${PORT_OPTIONS:MCLI}
PLIST_SUB+= CLI=""
.else
PLIST_SUB+= CLI="@comment "
.endif
.if ${PORT_OPTIONS:MOSS}
CMAKE_ARGS+= -DOSS:BOOL=ON -DOSS_SUPPORT:BOOL=ON
.else
CMAKE_ARGS+= -DOSS:BOOL=OFF -DOSS_SUPPORT:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MJACK}
LIB_DEPENDS+= libjack.so:audio/jack
PLIST_SUB+= JACK=""
.else
CMAKE_ARGS+= -DJACK:BOOL=OFF
PLIST_SUB+= JACK="@comment "
.endif
.if ${PORT_OPTIONS:MPULSEAUDIO}
LIB_DEPENDS+= libpulse.so:audio/pulseaudio
PLIST_SUB+= PULSEAUDIO=""
.else
CMAKE_ARGS+= -DPULSEAUDIOSIMPLE:BOOL=OFF
PLIST_SUB+= PULSEAUDIO="@comment "
.endif
.if ${PORT_OPTIONS:MFDK}
LIB_DEPENDS+= libfdk-aac.so:audio/fdk-aac
PLIST_SUB+= FDK=""
.else
CMAKE_ARGS+= -DFDK_AAC:BOOL=OFF
PLIST_SUB+= FDK="@comment "
.endif
.if ${PORT_OPTIONS:MFREETYPE}
LIB_DEPENDS+= libfreetype.so:print/freetype2
.else
CMAKE_ARGS+= -DFREETYPE2:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MFONTCONFIG}
LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig
.else
CMAKE_ARGS+= -DFONTCONFIG:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MXVIDEO}
#LIB_DEPENDS+= Xv:x11/libXv
USES+= xorg
USE_XORG+= xv
.else
CMAKE_ARGS+= -DXVIDEO:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MFAAC}
LIB_DEPENDS+= libfaac.so:audio/faac
PLIST_SUB+= FAAC=""
.else
CMAKE_ARGS+= -DFAAC:BOOL=OFF
PLIST_SUB+= FAAC="@comment "
.endif
.if ${PORT_OPTIONS:MLAME}
LIB_DEPENDS+= libmp3lame.so:audio/lame
PLIST_SUB+= LAME=""
.else
CMAKE_ARGS+= -DLAME:BOOL=OFF
PLIST_SUB+= LAME="@comment "
.endif
.if ${PORT_OPTIONS:MFAAD}
LIB_DEPENDS+= libfaad.so:audio/faad
PLIST_SUB+= FAAD=""
.else
CMAKE_ARGS+= -DFAAD:BOOL=OFF -DNeAAC:BOOL=OFF
PLIST_SUB+= FAAD="@comment "
.endif
.if ${PORT_OPTIONS:MX264}
LIB_DEPENDS+= libx264.so:multimedia/libx264
PLIST_SUB+= X264=""
.else
CMAKE_ARGS+= -DX264:BOOL=OFF
PLIST_SUB+= X264="@comment "
.endif
.if ${PORT_OPTIONS:MX265}
LIB_DEPENDS+= libx265.so:multimedia/x265
PLIST_SUB+= X265=""
.else
CMAKE_ARGS+= -DX265:BOOL=OFF
PLIST_SUB+= X265="@comment "
.endif
.if ${PORT_OPTIONS:MVPX}
LIB_DEPENDS+= libvpx.so:multimedia/libvpx
PLIST_SUB+= VPX=""
.else
CMAKE_ARGS+= -DVPXDEC:BOOL=OFF -DVPXENC:BOOL=OFF
PLIST_SUB+= VPX="@comment "
.endif
.if ${PORT_OPTIONS:MAOM}
LIB_DEPENDS+= libaom.so:multimedia/aom
PLIST_SUB+= AOM=""
.else
CMAKE_ARGS+= -DAOMDEC:BOOL=OFF
PLIST_SUB+= AOM="@comment "
.endif
.if ${PORT_OPTIONS:MXVID}
LIB_DEPENDS+= libxvidcore.so:multimedia/xvid
PLIST_SUB+= XVID=""
.else
CMAKE_ARGS+= -DXVID:BOOL=OFF
PLIST_SUB+= XVID="@comment "
.endif
.if ${PORT_OPTIONS:MTINYPY}
PLIST_SUB+= TINYPY=""
.else
CMAKE_ARGS+= -DTINYPY:BOOL=OFF
PLIST_SUB+= TINYPY="@comment "
.endif
.if ${PORT_OPTIONS:MDCA}
LIB_DEPENDS+= libdca.so:multimedia/libdca
PLIST_SUB+= DCA=""
.else
CMAKE_ARGS+= -DLIBDCA:BOOL=OFF
PLIST_SUB+= DCA="@comment "
.endif
.if ${PORT_OPTIONS:MVAPOURSYNTH}
LIB_DEPENDS+= libvapoursynth.so:multimedia/vapoursynth
PLIST_SUB+= VAPOURSYNTH=""
.else
CMAKE_ARGS+= -DVAPOURSYNTH:BOOL=OFF
PLIST_SUB+= VAPOURSYNTH="@comment "
.endif
.if ${PORT_OPTIONS:MVAAPI}
LIB_DEPENDS+= libva.so:multimedia/libva
PLIST_SUB+= VAAPI=""
.else
CMAKE_ARGS+= -DVAAPI:BOOL=OFF -DLIBVA:BOOL=OFF
PLIST_SUB+= VAAPI="@comment "
.endif
.if ${PORT_OPTIONS:MVDPAU}
LIB_DEPENDS+= libvdpau.so:multimedia/libvdpau
PLIST_SUB+= VDPAU=""
.else
CMAKE_ARGS+= -DVDPAU:BOOL=OFF
PLIST_SUB+= VDPAU="@comment "
.endif
.if ${PORT_OPTIONS:MVORBIS}
LIB_DEPENDS+= libvorbis.so:audio/libvorbis
PLIST_SUB+= VORBIS=""
.else
CMAKE_ARGS+= -DLIBVORBIS:BOOL=OFF -DVORBIS:BOOL=OFF
PLIST_SUB+= VORBIS="@comment "
.endif
.if ${PORT_OPTIONS:MAMR}
LIB_DEPENDS+= libopencore-amrnb.so:audio/opencore-amr
PLIST_SUB+= AMRNB=""
PLIST_SUB+= AMRWB=""
.else
CMAKE_ARGS+= -DOPENCORE_AMRNB:BOOL=OFF
PLIST_SUB+= AMRNB="@comment "
CMAKE_ARGS+= -DOPENCORE_AMRWB:BOOL=OFF
PLIST_SUB+= AMRWB="@comment "
.endif
.include <bsd.port.pre.mk>
# is this kosher? the result seems to run tho... (see ports/185997)
.if $(COMPILER_FEATURES:Mlibc++)
LDFLAGS+= -lc++
.endif
#.if ${COMPILER_TYPE} == clang
USE_GCC= yes
#.endif
NOT_FOR_ARCHS= aarch64 powerpc powerpc64 powerpcspe sparc64
NOT_FOR_ARCHS_REASON= cmake/admDetermineSystem.cmake:78: CPU not supported
post-patch:
@${MKDIR} ${CONFIGURE_WRKSRC}/config
@${LN} -s ${LOCALBASE}/include/iconv.h ${CONFIGURE_WRKSRC}/config
@${REINPLACE_CMD} 's|-ldl||' ${WRKSRC}/avidemux_core/CMakeLists.txt
@${FIND} ${WRKSRC}/cmake -name '*.cmake.orig' -delete
post-configure-common:
@${FIND} ${CONFIGURE_WRKSRC} -name link.txt -print0 | \
${XARGS} -0 ${REINPLACE_CMD} 's|-ldl||g'