diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2022-04-20 18:39:04 -0400 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2022-04-20 18:39:04 -0400 |
commit | 8bdedd53492defd454b357cb55b7e36422e1c47a (patch) | |
tree | c3677c30864753970d01852e2db559ba8989a76b /media-video/ffmpeg | |
parent | 49d37f735e7d5db1c61087095cdf803c63cc19a3 (diff) | |
download | gentoo-overlay-8bdedd53492defd454b357cb55b7e36422e1c47a.tar.xz gentoo-overlay-8bdedd53492defd454b357cb55b7e36422e1c47a.zip |
media-video/ffmpeg: upgrade to 9999
patchset not compatible with 5.0 anymore
Diffstat (limited to 'media-video/ffmpeg')
-rw-r--r-- | media-video/ffmpeg/Manifest | 6 | ||||
-rw-r--r-- | media-video/ffmpeg/ffmpeg-9999.ebuild (renamed from media-video/ffmpeg/ffmpeg-5.0-r5.ebuild) | 56 | ||||
-rw-r--r-- | media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch | 59 | ||||
-rw-r--r-- | media-video/ffmpeg/files/vmaf-models-default-path.patch | 13 |
4 files changed, 44 insertions, 90 deletions
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest index 7ceecd6..b5a7c05 100644 --- a/media-video/ffmpeg/Manifest +++ b/media-video/ffmpeg/Manifest @@ -1,2 +1,4 @@ -DIST ffmpeg-5.0-r4-libjxl.patch.xz 16652 BLAKE2B 60e3268a03c97636a7a0b301ec900d36437d58099ca7095e9f52aa27168e6cf7c8b91729b2e032528bc91ea9130fbfe6de186a91b32d6ffe29cad52d09c84b2e SHA512 154addc554bcbb2e8024b1c82e318102fc1a54d068cea176ec8c2fe434d1b8affed3fd7bcf606969282e81fa7b5ec37e4aaaf1bb4ad220ea2815ed341edaffb5 -DIST ffmpeg-5.0.tar.bz2 11821587 BLAKE2B 76abc243707712b7974552cfbd703b5059487ac05b76744dcaacab45924598bffe173b41354a41718a7b5bd0933e71e95a11f9e715b9127b49cc19a88124a3d6 SHA512 2e7f05d3218201869602a32fc473ae55f9b8bc22d2710ebe7523953c27d39cf459e91e34d3b940d8ffe90677b028cea04c5b189775b1718a83b2b73943ba3f61 +DIST 4f4dc78d2870ddd4d5e321e65b5de289a31258cf.patch 16861 BLAKE2B fef83d99407faf3b0ead101fc053dcd8d713749a374bf4542627bcaf8fc25cefa674f0a048b00a6647121ffd4d17eec2eeeab583c44174c4181dccb346752809 SHA512 dbd6cdf8e1766f83c1db26ae6218e8caae2801816a3c07b64965060ed2047c837717ea13c8baa37e9193983bb5a829a9852bc41e155ce542712797da2ed164f0 +DIST 667b1a36939a69619b58d413ebf9d12d987d1d0d.patch 2431 BLAKE2B b92e55b8eced4faad83468e2c1067c9733d47d41fba8549631f0e2ff57d26db25d203f5e7c3b0921df4a97e900c189a7761ae2506132cde77618e252374ebbcf SHA512 d389d2c19cbe741668bcbb18996d2c513fe4b05ad77f810848d4fd9541d95ac8cb4d579a9650fe6df4ff47b97eeb5955c3a5edee700ae7f4020898946fa02744 +DIST 79658a2e9d821783a951a5d08ae6abac7bf24a40.patch 20933 BLAKE2B d098c801f4177904679470ed47208bd815e96d5d69499f58945316d237264d6ea17d1d7ec44786027431e0b2de66eed4bd5b1a70275393b31507e93c271e0d7b SHA512 287fd653cd6ef669de12c13a9e0fe4f04b7b5271e56783d30b7143c0d8ed89033e7bad71aa908a077aa01283f3d5f25543e91b99be6d3f56694cf5c4d04dcab6 +DIST eadde927756bda5d0bcd5b198d020d5f78ddb132.patch 18901 BLAKE2B ef8a4fba40eb79e299ffdac5633b37fbdf2d0bccbe369f8c12a5987f58b525c16e11760f245b3a5da96fa780aedfb1ecd01c77403c31bf582dcdcef714ae6049 SHA512 cdbbd9ef7be54fbadb05fb893c9f5c04bb424045f704dedee7450c679f5f5776ac3587740c60b404da6982a56713f56cc03d472ea0f6d1b09af518d7eec435a4 diff --git a/media-video/ffmpeg/ffmpeg-5.0-r5.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild index d0467bc..d967cf2 100644 --- a/media-video/ffmpeg/ffmpeg-5.0-r5.ebuild +++ b/media-video/ffmpeg/ffmpeg-9999.ebuild @@ -28,11 +28,26 @@ HOMEPAGE="https://ffmpeg.org/" if [ "${PV#9999}" != "${PV}" ] ; then SRC_URI="" elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot - SRC_URI="mirror://gentoo/${P}.tar.bz2" + SRC_URI="mirror://gentoo/${P}.tar.xz" else # Release - SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.bz2" + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/ffmpeg.asc + inherit verify-sig + SRC_URI="https://ffmpeg.org/releases/${P/_/-}.tar.xz" + SRC_URI+=" verify-sig? ( https://ffmpeg.org/releases/${P/_/-}.tar.xz.asc )" + + BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-ffmpeg )" fi -SRC_URI+=" https://www.alxu.ca/ffmpeg-5.0-r4-libjxl.patch.xz" +JPEGXL_PATCHES=( +667b1a36939a69619b58d413ebf9d12d987d1d0d.patch +79658a2e9d821783a951a5d08ae6abac7bf24a40.patch +4f4dc78d2870ddd4d5e321e65b5de289a31258cf.patch +eadde927756bda5d0bcd5b198d020d5f78ddb132.patch +) +SRC_URI+=" + jpegxl? ( + ${JPEGXL_PATCHES[@]/#/https://github.com/thebombzen/FFmpeg/commit/} + ) +" FFMPEG_REVISION="${PV#*_p}" SLOT="0/${FFMPEG_SUBSLOT}" @@ -96,10 +111,10 @@ FFMPEG_FLAG_MAP=( # Same as above but for encoders, i.e. they do something only with USE=encode. FFMPEG_ENCODER_FLAG_MAP=( - amrenc:libvo-amrwbenc mp3:libmp3lame - kvazaar:libkvazaar libaom - openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 theora:libtheora twolame:libtwolame - webp:libwebp x264:libx264 x265:libx265 xvid:libxvid + amf amrenc:libvo-amrwbenc kvazaar:libkvazaar libaom mp3:libmp3lame + openh264:libopenh264 rav1e:librav1e snappy:libsnappy svt-av1:libsvtav1 + theora:libtheora twolame:libtwolame webp:libwebp x264:libx264 + x265:libx265 xvid:libxvid ) IUSE=" @@ -173,6 +188,7 @@ IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" RDEPEND=" alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) + amf? ( media-video/amdgpu-pro-amf ) amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) @@ -189,8 +205,8 @@ RDEPEND=" rav1e? ( >=media-video/rav1e-0.4:=[capi] ) snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) theora? ( - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] ) twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) @@ -246,15 +262,15 @@ RDEPEND=" sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) srt? ( >=net-libs/srt-1.3.0:=[${MULTILIB_USEDEP}] ) - ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] ) + ssh? ( >=net-libs/libssh-0.5.5:=[sftp,${MULTILIB_USEDEP}] ) svg? ( gnome-base/librsvg:2=[${MULTILIB_USEDEP}] x11-libs/cairo[${MULTILIB_USEDEP}] ) + nvenc? ( >=media-libs/nv-codec-headers-9.1.23.1 ) svt-av1? ( >=media-libs/svt-av1-0.8.4[${MULTILIB_USEDEP}] ) truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] ) vaapi? ( >=x11-libs/libva-1.2.1-r1:0=[${MULTILIB_USEDEP}] ) - nvenc? ( >=media-libs/nv-codec-headers-9.1.23.1[${MULTILIB_USEDEP}] ) vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) vidstab? ( >=media-libs/vidstab-1.1.0[${MULTILIB_USEDEP}] ) vmaf? ( media-libs/libvmaf[${MULTILIB_USEDEP}] ) @@ -270,11 +286,11 @@ RDEPEND=" >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] >=x11-libs/libxcb-1.4:=[${MULTILIB_USEDEP}] ) + postproc? ( !media-libs/libpostproc ) zeromq? ( >=net-libs/zeromq-4.1.6 ) zimg? ( >=media-libs/zimg-2.7.4:=[${MULTILIB_USEDEP}] ) zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) - postproc? ( !media-libs/libpostproc ) " RDEPEND="${RDEPEND} @@ -286,9 +302,12 @@ DEPEND="${RDEPEND} ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) v4l? ( sys-kernel/linux-headers ) " -BDEPEND=" + +# += for verify-sig above +BDEPEND+=" >=sys-devel/make-3.81 virtual/pkgconfig + amf? ( media-libs/amf-headers ) cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) cuda? ( >=sys-devel/clang-7[llvm_targets_NVPTX] ) doc? ( sys-apps/texinfo ) @@ -325,8 +344,7 @@ S=${WORKDIR}/${P/_/-} PATCHES=( "${FILESDIR}"/chromium-r1.patch - "${FILESDIR}"/ffmpeg-5.0-backport-ranlib-build-fix.patch - "${WORKDIR}"/ffmpeg-5.0-r4-libjxl.patch + "${JPEGXL_PATCHES[@]/#/${DISTDIR}/}" ) MULTILIB_WRAPPED_HEADERS=( @@ -342,9 +360,12 @@ src_prepare() { export revision=git-N-${FFMPEG_REVISION} fi - eapply "${FILESDIR}/vmaf-models-default-path.patch" - default + + # -fdiagnostics-color=auto gets appended after user flags which + # will ignore user's preference. + sed -i -e '/check_cflags -fdiagnostics-color=auto/d' configure || die + echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die } @@ -463,6 +484,7 @@ multilib_src_configure() { $(multilib_native_enable manpages) ) + # Fixed in 5.0.1? Waiting for verification from someone who hit the issue. local extra_libs if use arm || use ppc || use mips || [[ ${CHOST} == *i486* ]] ; then # bug #782811 @@ -565,4 +587,6 @@ multilib_src_install() { multilib_src_install_all() { dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" + + use amf && doenvd "${FILESDIR}"/amf-env-vulkan-override } diff --git a/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch b/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch deleted file mode 100644 index 1c264f7..0000000 --- a/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch +++ /dev/null @@ -1,59 +0,0 @@ -From bc5ccea3b9d2c71929af6271bd8afe9b6cfab436 Mon Sep 17 00:00:00 2001 -From: Adrian Ratiu <adrian.ratiu@collabora.com> -Date: Mon, 14 Feb 2022 15:00:07 +0200 -Subject: [PATCH] configure: move ranlib -D test after setting defaults -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Backport [from master bc5ccea3b9d2c7] - -In Gentoo and ChromeOS we want to allow pure LLVM builds without -using GNU tools, so we block any unwanted mixed GNU/LLVM usages -(GNU tools are still kept around in our chroots for projects -like glibc which cannot yet be built otherwise). - -The default ${cross_prefix}${ranlib_default} points to GNU and -fails, so move the test a bit later - after the defaults are -set and the proper values get overriden - such that ffmpeg -configure calls the llvm-ranlib we desire. [1] - -[1] https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/ffmpeg/ffmpeg-4.4.1-r1.ebuild?id=7a34377e3277a6a0e2eedd40e90452a44c55f1e6#n477 - -Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> -Signed-off-by: Martin Storsjö <martin@martin.st> ---- - configure | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/configure b/configure -index 7d22c2a345..82642deabe 100755 ---- a/configure -+++ b/configure -@@ -4403,11 +4403,7 @@ cc_default="${cross_prefix}${cc_default}" - cxx_default="${cross_prefix}${cxx_default}" - nm_default="${cross_prefix}${nm_default}" - pkg_config_default="${cross_prefix}${pkg_config_default}" --if ${cross_prefix}${ranlib_default} 2>&1 | grep -q "\-D "; then -- ranlib_default="${cross_prefix}${ranlib_default} -D" --else -- ranlib_default="${cross_prefix}${ranlib_default}" --fi -+ranlib_default="${cross_prefix}${ranlib_default}" - strip_default="${cross_prefix}${strip_default}" - windres_default="${cross_prefix}${windres_default}" - -@@ -4440,6 +4436,10 @@ set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \ - enabled cross_compile || host_cc_default=$cc - set_default host_cc - -+if ${ranlib} 2>&1 | grep -q "\-D "; then -+ ranlib="${ranlib} -D" -+fi -+ - pkg_config_fail_message="" - if ! $pkg_config --version >/dev/null 2>&1; then - warn "$pkg_config not found, library detection may fail." --- -2.35.1 - diff --git a/media-video/ffmpeg/files/vmaf-models-default-path.patch b/media-video/ffmpeg/files/vmaf-models-default-path.patch deleted file mode 100644 index a9777e9..0000000 --- a/media-video/ffmpeg/files/vmaf-models-default-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -Put default path of models to /usr/share/vmaf/model - ---- a/libavfilter/vf_libvmaf.c -+++ b/libavfilter/vf_libvmaf.c -@@ -72,7 +72,7 @@ typedef struct LIBVMAFContext { - #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM - - static const AVOption libvmaf_options[] = { -- {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, -+ {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/share/vmaf/model/vmaf_v0.6.1.json"}, 0, 1, FLAGS}, - {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"log_fmt", "Set the format of the log (xml or json).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, |