<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/3cd3ac59e45710e36c0183de54b993ce6f628fde">https://github.com/macports/macports-ports/commit/3cd3ac59e45710e36c0183de54b993ce6f628fde</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 3cd3ac59e45710e36c0183de54b993ce6f628fde
</span>Author: Christopher Nielsen <mascguy@github.com>
AuthorDate: Fri May 26 13:28:39 2023 -0400
<span style='display:block; white-space:pre;color:#404040;'> ffmpeg6: new port, replacing ffmpeg-upstream
</span>---
multimedia/ffmpeg6/Portfile | 520 +++++++++++++++++++++
.../files/patch-avutil-builtin-available.diff | 135 ++++++
...h-configure-no-error-on-missing-prototypes.diff | 10 +
.../files/patch-libavcodec-audiotoolboxenc.c.diff | 13 +
.../files/patch-libavcodec-profvidworkflow.diff | 46 ++
5 files changed, 724 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg6/Portfile b/multimedia/ffmpeg6/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7201bf01942
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg6/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,520 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup xcodeversion 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup muniversal 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compiler_blacklist_versions 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup active_variants 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# For 'TARGET_OS_OSX', 'TARGET_CPU_ARM64' macros
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup legacysupport 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://trac.macports.org/ticket/59246
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://trac.macports.org/ticket/59308
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup xcode_workaround 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name ffmpeg6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set my_name ffmpeg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 6.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+epoch 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license LGPL-2.1+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories multimedia
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {mascguy @mascguy} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description FFmpeg is a complete solution to play, record, convert and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stream audio and video.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description FFmpeg is a complete solution to record, convert and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stream audio and video. It includes libavcodec, the \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ leading audio/video codec library. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The project is made of several components: \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffmpeg is a command line tool to convert one video \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file format to another. It also supports grabbing and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ encoding in real time from a TV card. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffserver is an HTTP (RTSP is being developed) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ multimedia streaming server for live broadcasts. Time \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ shifting of live broadcast is also supported. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffplay is a simple media player based on SDL and on \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the ffmpeg libraries. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffprobe gathers information from multimedia streams and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ prints it in human- and machine-readable fashion. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavcodec is a library containing all the ffmpeg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ audio/video encoders and decoders. Most codecs were \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ developed from scratch to ensure best performance \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and high code reusability. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavformat is a library containing parsers and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ generators for all common audio/video formats.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://ffmpeg.org/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites ${homepage}releases/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distname ${my_name}-${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+dist_subdir ${my_name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_xz yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 591511f1b96534dcd007875394913ba63e82a4a4 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 10234012
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:cctools \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:gmake \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:pkgconfig \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:texinfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:bzip2 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:dav1d \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:fontconfig \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:freetype \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:fribidi \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/pkgconfig/gnutls.pc:gnutls \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/pkgconfig/harfbuzz.pc:harfbuzz \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:lame \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libass \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libbluray \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libiconv \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libmodplug \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libogg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libopus \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/pkgconfig/librsvg-2.0.pc:librsvg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libtheora \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libvorbis \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/pkgconfig/vpx.pc:libvpx \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:lzo2 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:openjpeg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:soxr \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/libspeex.dylib:speex \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:xz \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:zimg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:zlib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:zvbi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-libavcodec-audiotoolboxenc.c.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-avutil-builtin-available.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Additional fixes related to use of '__builtin_available'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# TODO: Submit patches to upstream
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-libavcodec-profvidworkflow.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# enable auto configure of asm optimizations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# requires Xcode 3.1 or better on Leopard
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+minimum_xcodeversions {9 3.1}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# requires a C11 compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.c_standard 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# clang-3.1 hits https://trac.macports.org/ticket/30137 (<rdar://problem/11542429>)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# clang-139 hits https://trac.macports.org/ticket/38141
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# warning: unknown warning option '-Werror=partial-availability'; did you mean '-Werror=availability'? [-Wunknown-warning-option]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# warning: unknown warning option '-Wno-bool-operation'; did you mean '-Wno-bool-conversion'? [-Wunknown-warning-option]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist-append {clang < 800}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The old ffmpeg port was GPL-2+ as base and had a no_gpl variant, so this keeps us consistent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Also, -gpl2 causes other ports to fail to build due to the missing libpostproc (#35473)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default_variants-append +gpl2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[tbool configure.ccache]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ccache_path ${prefix}/bin/ccache
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cc-prepend \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${ccache_path}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cxx-prepend \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${ccache_path}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.cflags-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DHAVE_LRINTF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -Wno-deprecated-declarations \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${configure.cppflags}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set port_ver_major [lindex [split ${version} .] 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set port_alias ${my_name}${port_ver_major}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set port_prefix ${prefix}/libexec/${port_alias}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set port_bindir ${port_prefix}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set port_sharedir ${port_prefix}/share
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set port_docdir ${port_sharedir}/doc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set port_datadir ${port_sharedir}/data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.pre_args-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --prefix=${prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.pre_args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --prefix=${port_prefix} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --datadir=${port_datadir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --docdir=${port_docdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --cc="${configure.cc}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-audiotoolbox \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-indev=jack \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libjack \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libopencore-amrnb \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libopencore-amrwb \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libxcb \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libxcb-shm \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libxcb-xfixes \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-metal \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-outdev=xv \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-opencl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-sdl2 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-securetransport \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-videotoolbox \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-xlib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-avfilter \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-fontconfig \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-gnutls \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libass \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libbluray \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libdav1d \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libfreetype \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libfribidi \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libmodplug \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libmp3lame \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libopenjpeg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libopus \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-librsvg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libsoxr \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libspeex \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libtheora \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libvorbis \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libvpx \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libzimg \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libzvbi \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-lzma \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-shared \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-pthreads \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-swscale \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-zlib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-extract {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # fix file perms; tarball contents deny group and world read
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "find ${worksrcpath} -type d -print0 | xargs -0 chmod a+rx"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "find ${worksrcpath} -type f -print0 | xargs -0 chmod a+r"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin 8 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s:,-compatibility_version,$\(LIBMAJOR\)::" ${worksrcpath}/configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # disable asm on Tiger
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # libblueray doesn't build on Tiger so disable for now (#39442)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 9} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libbluray
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libbluray \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libbluray
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-asm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # as of 1.6.0 libvpx only supports darwin 10 or later
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 10} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/pkgconfig/vpx.pc:libvpx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libvpx \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libvpx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # filters coreimage and coreimagesrc don't build on 10.6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # and earlier due to use of bridged casts in Objective C (#51823)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-filter=coreimage \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-filter=coreimagesrc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # AudioToolbox support requires CoreMedia Framework available on 10.7+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} > 10} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-audiotoolbox \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-audiotoolbox
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} > 9 && ${build_arch} ni [list ppc ppc64]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # libsdl2 requires minimum Xcode 10.7 SDK to build successfully
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # but builds on Snow Leopard x86. Exclude ppc until fixed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-sdl2 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-sdl2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libsdl2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # VideoToolbox, a new hardware acceleration framework, is supported on 10.8+ and "here to stay".
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # It provides support for H265, H264, H263, MPEG1, MPEG2 and MPEG4.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} > 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-videotoolbox \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-videotoolbox
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # OpenCL support requires version 1.2 available 10.8+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} > 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-opencl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-opencl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Apple GCC has problems with SIMD intrinsics and -Werror=no-missing-prototypes.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-configure-no-error-on-missing-prototypes.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # avfoundation is only available on 10.7+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # as of ffmpeg 3.4.1 build fails on 10.7 as well
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # libavdevice/avfoundation.m:207:14: error: expected method to read dictionary element not found on object of type 'NSDictionary *'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 12} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-indev=avfoundation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # av1 codecs, available on 10.5+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 9} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libaom \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libsvtav1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:aom \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:svt-av1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Available on 10.7+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-librav1e
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:rav1e
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform powerpc {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # absence of altivec is not automatically detected
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {sysctl hw.vectorunit} result] || $result == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-altivec
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # as this machine is a G3, force a local build so we don't download a buildbot-built
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # version possibly built on a G4+ or cross-compiled from an Intel system
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ archive_sites
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # might be needed for any gcc build...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #Undefined symbols:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # "___atomic_fetch_sub_8", referenced from:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # _fifo_thread_dispatch_message.part.4 in fifo.o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.ldflags-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -latomic
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# configure isn't autoconf and they do use a dep cache
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.universal_args-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-dependency-tracking
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${universal_possible} && [variant_isset universal]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach arch ${configure.universal_archs} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set merger_host($arch) ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend merger_configure_args($arch) --arch=${arch}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend merger_configure_env($arch) "ASFLAGS=-arch ${arch}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[string match "*86*" ${configure.universal_archs}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:nasm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend merger_configure_args(i386) --enable-x86asm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend merger_configure_args(x86_64) --enable-x86asm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append --arch=${configure.build_arch}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.env-append ASFLAGS=[get_canonical_archflags]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${build_arch} eq "i386" || ${build_arch} eq "x86_64"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:nasm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append --enable-x86asm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.cmd ${prefix}/bin/gmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.env-append V=1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot.env-append V=1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Copy docs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${destroot}${port_docdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file copy ${worksrcpath}/doc/APIchanges ${destroot}${port_docdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f [glob ${worksrcpath}/doc/*.txt] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file copy $f ${destroot}${port_docdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Create bin symlinks
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set port_bin_list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [glob -type f -directory ${destroot}${port_bindir} *]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f ${port_bin_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fsrc [file tail ${f}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ftgt [file tail ${f}]${port_ver_major}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "Symlinking bin: ${prefix}/bin/${ftgt} -> ${port_bindir}/${fsrc}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s ${port_bindir}/${fsrc} ${destroot}${prefix}/bin/${ftgt}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant x11 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # enable x11grab_xcb input device
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:xorg-libxcb \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:xorg-libXext \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:xorg-libXfixes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-xlib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libxcb \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libxcb-shm \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libxcb-xfixes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[variant_isset x11]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ require_active_variants libsdl2 x11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ require_active_variants libsdl2 "" x11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant libdc1394 description {Enable IIDC-1394 frame grabbing using libdc1394 (experimental)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libdc1394
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libdc1394
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Allow use of librtmp instead of ffmpeg's internal rtmp implementation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# May address interoperability issues with CRtmpServer and others
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://trac.macports.org/ticket/32219
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://groups.google.com/forum/#!topic/c-rtmp-server/ywQPjvciPgc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://trac.ffmpeg.org/ticket/1700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant librtmp description {Use librtmp (from rtmpdump) as rtmp[t][es]:// protocol handler} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-librtmp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:rtmpdump
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant jack description {Enable jack library and indev support} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # jack will autoconfigure if not disabled
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:jack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-libjack \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libjack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-indev=jack \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-indev=jack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant darwinssl description {Enable https support using Apple built-in TLS library instead of GNU TLS} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --disable-securetransport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-gnutls
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/pkgconfig/gnutls.pc:gnutls
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant gpl2 description {Enable GPL code, license will be GPL-2+} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ license GPL-2+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-gpl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libvidstab \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libx264 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libx265 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libxvid \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-postproc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libvidstab \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:x264 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:x265 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:XviD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant gpl3 requires gpl2 description {Enable GPL code, license will be GPL-3+} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ license GPL-3+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libaribb24 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libsmbclient \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-version3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libaribb24 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/pkgconfig/smbclient.pc:samba3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# the build server uses the default variants, and we want distributable binaries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# nonfree code is disabled by default but can be enabled using the +nonfree variant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant nonfree description {enable nonfree code, libraries and binaries will not be redistributable} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ license Restrictive
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-libfdk-aac \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-nonfree
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libfdk-aac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[variant_isset nonfree]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This build of ${name} includes nonfree code as follows:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libfdk-aac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The following libraries and binaries may not be redistributed:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffmpeg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavcodec
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavdevice
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavfilter
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavformat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavutil
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+To remove this restriction remove the variant +nonfree
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} elseif {[variant_isset gpl3]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This build of ${name} includes GPLed code and is therefore licensed under GPL v3 or later.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The following modules are GPLed:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ postproc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libsambaclient
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libvidstab
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libx264
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libx265
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libxvid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+To include all nonfree, GPLed and LGPL code use variant +nonfree.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+To remove nonfree and GPLed code leaving only LGPL code remove the +gpl2 and +gpl3 variants.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} elseif {[variant_isset gpl2]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This build of ${name} includes GPLed code and is therefore licensed under GPL v2 or later.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The following modules are GPLed:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ postproc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libvidstab
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libx264
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libx265
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libxvid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+To include all nonfree, GPLed and LGPL code use variant +nonfree.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+To remove nonfree and GPLed code leaving only LGPL code remove the +gpl2 variant.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This build of ${name} includes no GPLed or nonfree code\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+and is therefore licensed under LGPL v2.1 or later.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.type regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.url ${master_sites}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg6/files/patch-avutil-builtin-available.diff b/multimedia/ffmpeg6/files/patch-avutil-builtin-available.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..864972edffd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg6/files/patch-avutil-builtin-available.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,135 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# =============================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Source: https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg127034.html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -----------------------------------------------------------------------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# From: Limin Wang <lance.lmw...@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# OSX version: 10.11.6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Apple LLVM version 8.0.0 (clang-800.0.42.1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Target: x86_64-apple-darwin15.6.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# =============================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libavutil/hwcontext_videotoolbox.c.old 2022-01-14 13:45:40.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libavutil/hwcontext_videotoolbox.c 2022-03-27 12:26:48.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -415,12 +415,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch (space) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_SPC_BT2020_CL:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_SPC_BT2020_NCL:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERYCBCRMATRIX_ITU_R_2020
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.11, iOS 9, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return kCVImageBufferYCbCrMatrix_ITU_R_2020;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferYCbCrMatrix_ITU_R_2020;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return CFSTR("ITU_R_2020");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return CFSTR("ITU_R_2020");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_SPC_BT470BG:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_SPC_SMPTE170M:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferYCbCrMatrix_ITU_R_601_4;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -428,12 +429,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferYCbCrMatrix_ITU_R_709_2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_SPC_SMPTE240M:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferYCbCrMatrix_SMPTE_240M_1995;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, watchOS 4, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return CVYCbCrMatrixGetStringForIntegerCodePoint(space);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferTransferFunction_ITU_R_2100_HLG;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return CFSTR("ITU_R_2100_HLG");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_SPC_UNSPECIFIED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -441,24 +443,25 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFStringRef av_map_videotoolbox_color_primaries_from_av(enum AVColorPrimaries pri)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch (pri) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_PRI_BT2020:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERCOLORPRIMARIES_ITU_R_2020
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.11, iOS 9, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return kCVImageBufferColorPrimaries_ITU_R_2020;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferColorPrimaries_ITU_R_2020;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return CFSTR("ITU_R_2020");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_PRI_BT709:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferColorPrimaries_ITU_R_709_2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_PRI_SMPTE170M:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferColorPrimaries_SMPTE_C;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_PRI_BT470BG:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferColorPrimaries_EBU_3213;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, watchOS 4, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return CVColorPrimariesGetStringForIntegerCodePoint(pri);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferTransferFunction_ITU_R_2100_HLG;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return CFSTR("ITU_R_2100_HLG");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_PRI_UNSPECIFIED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -467,45 +470,46 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch (trc) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_SMPTE2084:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_SMPTE_ST_2084_PQ
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.13, iOS 11, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return CFSTR("SMPTE_ST_2084_PQ");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_BT2020_10:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_BT2020_12:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2020
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.11, iOS 9, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return kCVImageBufferTransferFunction_ITU_R_2020;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferTransferFunction_ITU_R_2020;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return CFSTR("ITU_R_2020");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_BT709:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferTransferFunction_ITU_R_709_2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_SMPTE240M:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferTransferFunction_SMPTE_240M_1995;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_SMPTE428:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_SMPTE_ST_428_1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.12, iOS 10, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return kCVImageBufferTransferFunction_SMPTE_ST_428_1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferTransferFunction_SMPTE_ST_428_1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return CFSTR("SMPTE_ST_428_1");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_ARIB_STD_B67:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.13, iOS 11, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return kCVImageBufferTransferFunction_ITU_R_2100_HLG;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferTransferFunction_ITU_R_2100_HLG;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return CFSTR("ITU_R_2100_HLG");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_GAMMA22:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferTransferFunction_UseGamma;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_GAMMA28:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kCVImageBufferTransferFunction_UseGamma;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.13, iOS 11, tvOS 11, watchOS 4, *))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return CVTransferFunctionGetStringForIntegerCodePoint(trc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return kCVImageBufferTransferFunction_ITU_R_2100_HLG;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return CFSTR("ITU_R_2100_HLG");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AVCOL_TRC_UNSPECIFIED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg6/files/patch-configure-no-error-on-missing-prototypes.diff b/multimedia/ffmpeg6/files/patch-configure-no-error-on-missing-prototypes.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..473b2207fe2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg6/files/patch-configure-no-error-on-missing-prototypes.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- configure.old 2015-09-27 18:43:30.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ configure 2015-09-27 18:44:18.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -6788,7 +6788,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_optflags -fno-tree-vectorize
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_cflags -Werror=format-security
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_cflags -Werror=implicit-function-declaration
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- check_cflags -Werror=missing-prototypes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_cflags -Werror=return-type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_cflags -Werror=vla
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ check_cflags -Wformat
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg6/files/patch-libavcodec-audiotoolboxenc.c.diff b/multimedia/ffmpeg6/files/patch-libavcodec-audiotoolboxenc.c.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..a592a07edc3
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg6/files/patch-libavcodec-audiotoolboxenc.c.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libavcodec/audiotoolboxenc.c.orig 2016-05-18 05:07:43.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libavcodec/audiotoolboxenc.c 2016-05-18 05:09:16.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -66,8 +66,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kAudioFormatMPEG4AAC_HE_V2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case FF_PROFILE_AAC_LD:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kAudioFormatMPEG4AAC_LD;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case FF_PROFILE_AAC_ELD:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kAudioFormatMPEG4AAC_ELD;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case AV_CODEC_ID_ADPCM_IMA_QT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return kAudioFormatAppleIMA4;
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg6/files/patch-libavcodec-profvidworkflow.diff b/multimedia/ffmpeg6/files/patch-libavcodec-profvidworkflow.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..0afce56c40f
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg6/files/patch-libavcodec-profvidworkflow.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,46 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libavcodec/videotoolbox.c.orig 2022-07-21 13:09:43.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libavcodec/videotoolbox.c 2022-07-21 13:24:45.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -36,6 +36,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <Availability.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <TargetConditionals.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <VideoToolbox/VTProfessionalVideoWorkflow.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder CFSTR("RequireHardwareAcceleratedVideoDecoder")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libavcodec/videotoolboxenc.c.orig 2022-01-14 13:45:40.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libavcodec/videotoolboxenc.c 2022-07-21 14:14:29.000000000 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -23,6 +23,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <CoreMedia/CoreMedia.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <TargetConditionals.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <Availability.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "avcodec.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "libavutil/opt.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "libavutil/avassert.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -37,6 +38,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "h264.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "h264_sei.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <dlfcn.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <VideoToolbox/VTProfessionalVideoWorkflow.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if !HAVE_KCMVIDEOCODECTYPE_HEVC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ enum { kCMVideoCodecType_HEVC = 'hvc1' };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1424,11 +1428,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return AVERROR(EINVAL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(MAC_OS_X_VERSION_10_10) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (avctx->codec_id == AV_CODEC_ID_PRORES) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (__builtin_available(macOS 10.10, *)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- VTRegisterProfessionalVideoWorkflowVideoEncoders();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ VTRegisterProfessionalVideoWorkflowVideoEncoders();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>