summaryrefslogtreecommitdiff
path: root/media-video
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2022-03-16 22:38:24 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2022-03-16 22:38:37 -0400
commit5697b5e93fabb39d085b81cef252496695c04100 (patch)
treecd0b2275e86424f73e319e31f3fabeac7f8feb02 /media-video
parentfab7f2a741a21ad22760aa4942dafdd8610c7e31 (diff)
downloadgentoo-overlay-5697b5e93fabb39d085b81cef252496695c04100.tar.xz
gentoo-overlay-5697b5e93fabb39d085b81cef252496695c04100.zip
media-video/ffmpeg: sync
Diffstat (limited to 'media-video')
-rw-r--r--media-video/ffmpeg/ffmpeg-5.0-r5.ebuild (renamed from media-video/ffmpeg/ffmpeg-5.0-r4.ebuild)15
-rw-r--r--media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch59
2 files changed, 69 insertions, 5 deletions
diff --git a/media-video/ffmpeg/ffmpeg-5.0-r4.ebuild b/media-video/ffmpeg/ffmpeg-5.0-r5.ebuild
index e8a52b2..d0467bc 100644
--- a/media-video/ffmpeg/ffmpeg-5.0-r4.ebuild
+++ b/media-video/ffmpeg/ffmpeg-5.0-r5.ebuild
@@ -81,11 +81,11 @@ FFMPEG_FLAG_MAP=(
amr:libopencore-amrwb amr:libopencore-amrnb codec2:libcodec2 +dav1d:libdav1d fdk:libfdk-aac
jpeg2k:libopenjpeg jpegxl:libjxl bluray:libbluray gme:libgme gsm:libgsm
libaribb24 mmal modplug:libmodplug opus:libopus libilbc librtmp ssh:libssh
- speex:libspeex srt:libsrt svg:librsvg video_cards_nvidia:ffnvcodec
+ speex:libspeex srt:libsrt svg:librsvg nvenc:ffnvcodec
vorbis:libvorbis vpx:libvpx zvbi:libzvbi
# libavfilter options
appkit
- bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite frei0r
+ bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite frei0r vmaf:libvmaf
fribidi:libfribidi fontconfig ladspa libass libtesseract lv2 truetype:libfreetype vidstab:libvidstab
rubberband:librubberband zeromq:libzmq zimg:libzimg
# libswresample options
@@ -254,9 +254,10 @@ RDEPEND="
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}] )
- video_cards_nvidia? ( >=media-libs/nv-codec-headers-9.1.23.1[${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}] )
vorbis? (
>=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
>=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
@@ -309,7 +310,7 @@ GPL_REQUIRED_USE="
)
"
REQUIRED_USE="
- cuda? ( video_cards_nvidia )
+ cuda? ( nvenc )
libv4l? ( v4l )
fftools_cws2fws? ( zlib )
test? ( encode )
@@ -324,6 +325,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
)
@@ -339,6 +341,9 @@ src_prepare() {
if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
export revision=git-N-${FFMPEG_REVISION}
fi
+
+ eapply "${FILESDIR}/vmaf-models-default-path.patch"
+
default
echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
}
@@ -459,7 +464,7 @@ multilib_src_configure() {
)
local extra_libs
- if use arm || use ppc ; then
+ if use arm || use ppc || use mips || [[ ${CHOST} == *i486* ]] ; then
# bug #782811
# bug #790590
extra_libs+="$(test-flags-CCLD -latomic) "
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
new file mode 100644
index 0000000..1c264f7
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-5.0-backport-ranlib-build-fix.patch
@@ -0,0 +1,59 @@
+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
+