# Contributor: Sergei Lukin # Contributor: Ɓukasz Jendrysik # Contributor: Jakub Skrzypnik # Maintainer: Natanael Copa pkgname=ffmpeg pkgver=6.0 pkgrel=24 pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix" url="https://ffmpeg.org/" arch="all" license="GPL-2.0-or-later AND LGPL-2.1-or-later" makedepends=" alsa-lib-dev aom-dev bzip2-dev coreutils dav1d-dev fontconfig-dev freetype-dev fribidi-dev imlib2-dev ladspa-dev lame-dev libass-dev libbluray-dev libdrm-dev libopenmpt-dev libplacebo-dev librist-dev libsrt-dev libssh-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libvpx-dev libwebp-dev libxfixes-dev libxml2-dev lilv-dev nasm openssl-dev opus-dev perl-dev pulseaudio-dev sdl2-dev soxr-dev v4l-utils-dev vidstab-dev vulkan-loader-dev x264-dev x265-dev xvidcore-dev zeromq-dev zimg-dev zlib-dev " checkdepends="rsync" subpackages=" ffplay $pkgname-dev $pkgname-doc $pkgname-libavcodec $pkgname-libavdevice $pkgname-libavfilter $pkgname-libavformat $pkgname-libavutil $pkgname-libpostproc $pkgname-libswresample $pkgname-libswscale $pkgname-libs " source="https://ffmpeg.org/releases/ffmpeg-$pkgver.tar.xz 0001-ffbuild-libversion.sh-add-shebang.patch add-av_stream_get_first_dts-for-chromium.patch flto-auto.patch libswrescale-5.patch v4l-ioctl.patch $pkgname-lavu-vulkan-32bit.patch::https://github.com/FFmpeg/FFmpeg/commit/cc76e8340d28438c1ac56ee7dfd774d25e944264.patch $pkgname-libplacebo-x1.patch::https://github.com/FFmpeg/FFmpeg/commit/11eca6018c40f5ebe6af93cbc4b4dce447d8b3bc.diff $pkgname-libplacebo-x2.patch::https://github.com/FFmpeg/FFmpeg/commit/1231003c3c6d4839a9e838d06f8e16ee7690958f.diff $pkgname-binutils-2.41.patch::https://git.videolan.org/?p=ffmpeg.git;a=patch;h=effadce6c756247ea8bae32dc13bb3e6f464f0eb " options="!check" # tests/data/hls-lists.append.m3u8 fails # secfixes: # 6.0-r0: # - CVE-2022-3965 # 5.1-r1: # - ALPINE-14094 # 4.4.1-r0: # - CVE-2020-20446 # - CVE-2020-20453 # - CVE-2020-22015 # - CVE-2020-22019 # - CVE-2020-22021 # - CVE-2020-22037 # - CVE-2021-38114 # - CVE-2021-38171 # - CVE-2021-38291 # 4.4-r1: # - CVE-2021-33815 # 4.4-r0: # - CVE-2020-20450 # - CVE-2020-21041 # - CVE-2020-22038 # - CVE-2020-22042 # - CVE-2020-24020 # - CVE-2021-30123 # 4.3.2-r0: # - CVE-2020-35964 # - CVE-2020-35965 # 4.3.1-r0: # - CVE-2020-14212 # 4.3-r0: # - CVE-2020-13904 # - CVE-2020-12284 # 4.2.1-r0: # - CVE-2019-15942 # 4.2-r0: # - CVE-2019-17539 # - CVE-2019-17542 # 4.1.4-r0: # - CVE-2019-12730 # 4.1.3-r0: # - CVE-2019-9718 # - CVE-2019-9721 # - CVE-2019-11338 # - CVE-2019-11339 # 4.1.1-r0: # - CVE-2019-1000016 # 4.1-r0: # - CVE-2018-13305 # - CVE-2018-15822 # 4.0.2-r0: # - CVE-2018-13301 # - CVE-2018-13303 # - CVE-2018-13304 # - CVE-2018-1999010 # - CVE-2018-1999011 # - CVE-2018-1999012 # - CVE-2018-1999013 # - CVE-2018-1999014 # - CVE-2018-1999015 # 4.0.1-r0: # - CVE-2018-12459 # - CVE-2018-12460 # 4.0.0-r0: # - CVE-2018-6912 # - CVE-2018-7757 # - CVE-2018-9841 # 3.4.4-r0: # - CVE-2018-14395 # 3.4.3-r0: # - CVE-2018-7557 # - CVE-2018-7751 # - CVE-2018-10001 # - CVE-2018-12458 # - CVE-2018-13300 # - CVE-2018-13302 # - CVE-2018-14394 # 3.3.4-r0: # - CVE-2017-14054 # - CVE-2017-14055 # - CVE-2017-14056 # - CVE-2017-14057 # - CVE-2017-14058 # - CVE-2017-14059 # - CVE-2017-14169 # - CVE-2017-14170 # - CVE-2017-14171 # - CVE-2017-14222 # - CVE-2017-14223 # - CVE-2017-14225 case "$CARCH" in x86|armhf|armv7) ;; *) makedepends="$makedepends svt-av1-dev" _svt_av1="--enable-libsvtav1" ;; esac case "$CARCH" in s390x) ;; *) makedepends="$makedepends libjxl-dev" _jxl="--enable-libjxl" ;; esac case "$CARCH" in x86_64) makedepends="$makedepends onevpl-dev" _onevpl="--enable-libvpl" ;; esac build() { case "$CARCH" in x86) local asm="--disable-asm" ;; esac ./configure \ --prefix=/usr \ --disable-librtmp \ --disable-lzma \ --disable-static \ --disable-stripping \ --enable-avfilter \ --enable-gpl \ --enable-ladspa \ --enable-libaom \ --enable-libass \ --enable-libbluray \ --enable-libdav1d \ --enable-libdrm \ --enable-libfontconfig \ --enable-libfreetype \ --enable-libfribidi \ --enable-libmp3lame \ --enable-libopenmpt \ --enable-libopus \ --enable-libplacebo \ --enable-libpulse \ --enable-librist \ --enable-libsoxr \ --enable-libsrt \ --enable-libssh \ --enable-libtheora \ --enable-libv4l2 \ --enable-libvidstab \ --enable-libvorbis \ --enable-libvpx \ --enable-libwebp \ --enable-libx264 \ --enable-libx265 \ --enable-libxcb \ --enable-libxml2 \ --enable-libxvid \ --enable-libzimg \ --enable-libzmq \ --enable-lto \ --enable-lv2 \ --enable-openssl \ --enable-pic \ --enable-postproc \ --enable-pthreads \ --enable-shared \ --enable-vaapi \ --enable-vdpau \ --enable-version3 \ --enable-vulkan \ --optflags="-O3" \ $_jxl \ $asm \ $_svt_av1 \ $_onevpl make ${CC:-gcc} -o tools/qt-faststart $CFLAGS $LDFLAGS tools/qt-faststart.c } # https://ffmpeg.org/fate.html check() { ./configure \ --samples=fate-suite/ make fate-rsync make fate-list make fate } package() { make DESTDIR="$pkgdir" install install-man install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart" } doc() { default_doc amove usr/share/ffmpeg/examples } libavcodec() { pkgdesc="$pkgdesc (libavcodec library)" amove usr/lib/libavcodec.so.* } libavdevice() { pkgdesc="$pkgdesc (libavdevice library)" amove usr/lib/libavdevice.so.* } libavfilter() { pkgdesc="$pkgdesc (libavfilter library)" amove usr/lib/libavfilter.so.* } libavformat() { pkgdesc="$pkgdesc (libavformat library)" amove usr/lib/libavformat.so.* } libavutil() { pkgdesc="$pkgdesc (libavutil library)" amove usr/lib/libavutil.so.* } libpostproc() { pkgdesc="$pkgdesc (libpostproc library)" amove usr/lib/libpostproc.so.* } libswresample() { pkgdesc="$pkgdesc (libswresample library)" amove usr/lib/libswresample.so.* } libswscale() { pkgdesc="$pkgdesc (libswscale library)" amove usr/lib/libswscale.so.* } libs() { pkgdesc="compat hack for all ffmpeg libs" mkdir -p "$subpkgdir" depends=" $pkgname-libavcodec=$pkgver-r$pkgrel $pkgname-libavdevice=$pkgver-r$pkgrel $pkgname-libavfilter=$pkgver-r$pkgrel $pkgname-libavformat=$pkgver-r$pkgrel $pkgname-libavutil=$pkgver-r$pkgrel $pkgname-libpostproc=$pkgver-r$pkgrel $pkgname-libswresample=$pkgver-r$pkgrel $pkgname-libswscale=$pkgver-r$pkgrel " } ffplay() { pkgdesc="$pkgdesc (example media player)" amove usr/bin/ffplay } sha512sums=" 4d0e8f635d5a1633710f30cb3e0a854b6ca3bf85e33a289d1ec7aca2ad55dc4910010bc9cf3f13eee9f6decb9d50a0df6d7aa5a342f308c3868d2730f3a6b980 ffmpeg-6.0.tar.xz 38443b570cf32b2ba8ffa9ecc5480425c7da9f93f9773fbb3f9ec5f603b369b6225f4329a1b1f34d0ef30b2c9730f25ff9cff31315ed0a89a600df8e53bd54bf 0001-ffbuild-libversion.sh-add-shebang.patch 2804a3317a9c5fbc793af1dc7b9c13113bf8fd232f14a580ad98f25d848edf93015fd08c0aad0316e3a5439aef88ef15be3520dcbfe844791a5f03490a4c7f0b add-av_stream_get_first_dts-for-chromium.patch 47dda03ef3fddac1f79998bd07044dd907f9ac311737071546cb5cf6b6c51e29dd39cc4458bb07cab049e8ed497358c1e03a4fab07c6c66d7cfeb782ab752e63 flto-auto.patch a86dab2df808de4693f7f4e276d5090fc5c7b34b85dad866de9ce154149050b3030b68bcbe6463c6954ea241ad38f1ed1fff1658f39e193e26284178867aea88 libswrescale-5.patch c73d751e5d2a8214f0beb1b48fac6829903d46ad7db0dddddf47013193efce487825de495a24408d9a8e3c7f78f15fe62a6c14b54efc80e63dde9903cf08e918 v4l-ioctl.patch 7b0ca00e8461cd9f89c55ac71606ee5cc86d6b37d2b33716ef04abec8c4b6b1f9623bfb72ba4744d3ea7dc35bd27d11d45215bddaa67d98e424ba01d2063adc6 ffmpeg-lavu-vulkan-32bit.patch 3d9e9eb57bc538d1093d2d9de59eccabfc9c6f1275d137fcbff93a576b3d863a11b24671bc6986f3fae086078c27d1ca1ffbbc3e384a3fcd11fb50662438b16b ffmpeg-libplacebo-x1.patch d7ae017f68d73ba26b1218e9ab178c41ad954823939dca2359dc0df9a6e106ea7ffd733bf734f0e7c38f8d28099425054cf9a214331a4a10c182e1a781effa9e ffmpeg-libplacebo-x2.patch c1141eb8b8d9d02f021fee2290d02b16d924d2fcca9ea971f9438db46c7d83775bc7ffeb87fba6561008c43359684329c7f7f8f82aea7999b252e3ab98617581 ffmpeg-binutils-2.41.patch "