From df5bbc79eef2471f2091f49e622c64580e86cec16dad202e31b339b8c9a72b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 4 Nov 2016 08:53:03 +0000 Subject: [PATCH] - Add patch to not require equal libav soname version we were built with OBS rebuilds packages as needed and it is over the head * mpv-make-ffmpeg-version-check-non-fatal.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/mpv?expand=0&rev=63 --- mpv-make-ffmpeg-version-check-non-fatal.patch | 28 +++++++++++++++++++ mpv.changes | 7 +++++ mpv.spec | 13 +++------ 3 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 mpv-make-ffmpeg-version-check-non-fatal.patch diff --git a/mpv-make-ffmpeg-version-check-non-fatal.patch b/mpv-make-ffmpeg-version-check-non-fatal.patch new file mode 100644 index 0000000..c324467 --- /dev/null +++ b/mpv-make-ffmpeg-version-check-non-fatal.patch @@ -0,0 +1,28 @@ +player: make ffmpeg/libav version check non-fatal + +We already enforce mpv rebuilds when ffmpeg/libav SONAME changes. + +Index: mpv-0.21.0/player/main.c +=================================================================== +--- mpv-0.21.0.orig/player/main.c ++++ mpv-0.21.0/player/main.c +@@ -432,13 +432,12 @@ int mp_initialize(struct MPContext *mpct + 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 (!mpctx->playlist->first && !opts->player_idle_mode) diff --git a/mpv.changes b/mpv.changes index b3b2669..0c57201 100644 --- a/mpv.changes +++ b/mpv.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 4 08:48:25 UTC 2016 - tchvatal@suse.com + +- Add patch to not require equal libav soname version we were built with + OBS rebuilds packages as needed and it is over the head + * mpv-make-ffmpeg-version-check-non-fatal.patch + ------------------------------------------------------------------- Wed Oct 19 21:45:08 UTC 2016 - aloisio@gmx.com diff --git a/mpv.spec b/mpv.spec index 02971f2..c77de1f 100644 --- a/mpv.spec +++ b/mpv.spec @@ -25,14 +25,16 @@ Name: mpv Version: 0.21.0 Release: 0 Summary: Advanced general-purpose multimedia player +# waf is licensed with BSD-3-Clause License: GPL-2.0+ and BSD-3-Clause Group: Productivity/Multimedia/Video/Players -# waf is licensed with BSD-3-Clause Url: http://mpv.io/ Source: http://github.com/mpv-player/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # Can't use system one as it breaks quite often with updates Source1: http://waf.io/waf-%{_waf_ver} Source2: %{name}.changes +# PATCH-FIX-OPENSUSE do not require equal libav versions, obs rebuilds as needed +Patch0: mpv-make-ffmpeg-version-check-non-fatal.patch BuildRequires: hicolor-icon-theme Requires: hicolor-icon-theme Requires(post): hicolor-icon-theme @@ -92,14 +94,6 @@ BuildRequires: pkgconfig(xscrnsaver) BuildRequires: pkgconfig(xv) BuildRequires: pkgconfig(xxf86vm) BuildRequires: pkgconfig(zlib) -# we need to rebuild with every new minor version of ffmpeg -# update soname once it changes -Requires: %(rpm -qf $(readlink -f %{_libdir}/libavcodec.so) --qf "%%{name} = %%{version}") -Requires: %(rpm -qf $(readlink -f %{_libdir}/libavfilter.so) --qf "%%{name} = %%{version}") -Requires: %(rpm -qf $(readlink -f %{_libdir}/libavformat.so) --qf "%%{name} = %%{version}") -Requires: %(rpm -qf $(readlink -f %{_libdir}/libavutil.so) --qf "%%{name} = %%{version}") -Requires: %(rpm -qf $(readlink -f %{_libdir}/libswresample.so) --qf "%%{name} = %%{version}") -Requires: %(rpm -qf $(readlink -f %{_libdir}/libswscale.so) --qf "%%{name} = %%{version}") # Used via LUA scripts Recommends: youtube-dl # Obsoletion of mplayer2 that is dead for 2 years now @@ -158,6 +152,7 @@ features. %prep %setup -q +%patch0 -p1 # As we downloaded specific waf version we need to put and prepare it in place. cp -f %{SOURCE1} waf