media-video/mpv: warn re softvol, non-fatal ffmpeg version check in 9999

Package-Manager: portage-2.3.0

Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
This commit is contained in:
Ilya Tumaykin
2016-07-25 15:02:18 +02:00
committed by Patrice Clement
parent 8647810346
commit d4cc84d230
2 changed files with 51 additions and 1 deletions
@@ -0,0 +1,28 @@
player: make ffmpeg/libav version check non-fatal
We already enforce mpv rebuilds when ffmpeg/libav SONAME changes.
diff --git a/player/main.c b/player/main.c
index 88b60e1..1d12679 100644
--- a/player/main.c
+++ b/player/main.c
@@ -421,13 +421,12 @@ int mp_initialize(struct MPContext *mpctx, char **options)
if (!print_libav_versions(mp_null_log, 0)) {
// Using mismatched libraries can be legitimate, but even then it's
// a bad idea. We don't acknowledge its usefulness and stability.
- print_libav_versions(mpctx->log, MSGL_FATAL);
- MP_FATAL(mpctx, "\nmpv was compiled against a different version of "
- "FFmpeg/Libav than the shared\nlibrary it is linked against. "
- "This is most likely a broken build and could\nresult in "
- "misbehavior and crashes.\n\nmpv does not support this "
- "configuration and will not run - rebuild mpv instead.\n");
- return -1;
+ print_libav_versions(mpctx->log, MSGL_WARN);
+ MP_WARN(mpctx, "\nmpv was compiled against a different version of "
+ "FFmpeg/Libav than the shared\nlibrary it is linked against. "
+ "This is most likely a broken build and could\nresult in "
+ "misbehavior and crashes.\n\nUpstream does not support this "
+ "configuration.\nPlease rebuild mpv in case of any problems.\n");
}
if (opts->dump_stats && opts->dump_stats[0]) {
+23 -1
View File
@@ -9,7 +9,7 @@ PYTHON_REQ_USE='threads(+)'
WAF_PV=1.8.12
inherit fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs waf-utils
inherit fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs versionator waf-utils
DESCRIPTION="Media player based on MPlayer and mplayer2"
HOMEPAGE="https://mpv.io/"
@@ -126,6 +126,8 @@ RDEPEND="${COMMON_DEPEND}
selinux? ( sec-policy/selinux-mplayer )
"
PATCHES=( "${FILESDIR}/${PN}-0.18.1-make-ffmpeg-version-check-non-fatal.patch" )
pkg_pretend() {
if [[ ${MERGE_TYPE} != "binary" ]] && ! tc-has-tls && use vaapi && use egl; then
die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
@@ -269,6 +271,26 @@ pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
local softvol_0_18_1=0
for rv in ${REPLACING_VERSIONS}; do
version_compare ${rv} 0.18.1
[[ $? -eq 1 ]] && softvol_0_18_1=1
done
if [[ ${softvol_0_18_1} -eq 1 ]]; then
echo
elog "Starting from version 0.18.1 the software volume control is"
elog "enabled by default, see:"
elog "https://github.com/mpv-player/mpv/blob/v0.18.1/DOCS/interface-changes.rst"
elog "https://github.com/mpv-player/mpv/issues/3322"
elog
elog "This means that volume controls don't change the system volume,"
elog "e.g. per-application volume with PulseAudio."
elog "If you want to restore the old behaviour, please refer to"
elog "https://bugs.gentoo.org/show_bug.cgi?id=588492#c4"
echo
fi
# bash-completion < 2.3-r1 already installs (mostly broken) mpv completion.
if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \
! has_version 'app-shells/mpv-bash-completion'; then