From 29ee51f8ec2cf03cedafcbc6771c78ea016425c4136ecba0260d1cd414c0c596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=98=D0=BD=D0=B4=D0=B8=D0=B3?= =?UTF-8?q?=D0=BE?= Date: Mon, 8 Aug 2022 09:04:18 +0000 Subject: [PATCH] Accepting request 993711 from home:cornelisbb:branches:multimedia:apps - Add fix-build-ffmpeg5.patch to fix build with ffmpeg 5.1 OBS-URL: https://build.opensuse.org/request/show/993711 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/mpd?expand=0&rev=96 --- fix-build-ffmpeg5.patch | 30 ++++++++++++++++++++++++++++++ mpd.changes | 5 +++++ mpd.spec | 4 +++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 fix-build-ffmpeg5.patch diff --git a/fix-build-ffmpeg5.patch b/fix-build-ffmpeg5.patch new file mode 100644 index 0000000..c4c63cd --- /dev/null +++ b/fix-build-ffmpeg5.patch @@ -0,0 +1,30 @@ +From 59792cb0b801854ee41be72d33db9542735df754 Mon Sep 17 00:00:00 2001 +From: Max Kellermann +Date: Wed, 27 Jul 2022 10:59:48 +0200 +Subject: [PATCH] decoder/ffmpeg: wrap FFmpeg include in "extern C" + +Commit ebae25d175eb31 added that #include, but forgot to wrap it in +"extern C", so the linker tried to look up C++ symbols, causing linker +failure. + +Closes https://github.com/MusicPlayerDaemon/MPD/issues/1582 +--- +diff --git a/src/decoder/plugins/FfmpegIo.cxx b/src/decoder/plugins/FfmpegIo.cxx +index 2e22d95991..5b5c8b40e3 100644 +--- a/src/decoder/plugins/FfmpegIo.cxx ++++ b/src/decoder/plugins/FfmpegIo.cxx +@@ -21,10 +21,13 @@ + #define __STDC_CONSTANT_MACROS + + #include "FfmpegIo.hxx" +-#include "libavutil/mem.h" + #include "../DecoderAPI.hxx" + #include "input/InputStream.hxx" + ++extern "C" { ++#include ++} ++ + AvioStream::~AvioStream() + { + if (io != nullptr) { diff --git a/mpd.changes b/mpd.changes index 75bbd3e..0373143 100644 --- a/mpd.changes +++ b/mpd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 8 08:19:19 UTC 2022 - Cor Blom + +- Add fix-build-ffmpeg5.patch to fix build with ffmpeg 5.1 + ------------------------------------------------------------------- Mon Aug 1 16:04:57 UTC 2022 - Илья Индиго diff --git a/mpd.spec b/mpd.spec index 2b1697d..c84ceee 100644 --- a/mpd.spec +++ b/mpd.spec @@ -33,13 +33,15 @@ Source4: %{name}.firewalld Source5: %{name}.tmpfiles.d Patch0: %{name}-conf.patch Patch1: %{name}-sndfile.patch +# PATCH-FIX-UPSTREAM - support ffmpeg 5.1 +Patch2: fix-build-ffmpeg5.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: group(audio) BuildRequires: hicolor-icon-theme BuildRequires: libboost_headers-devel BuildRequires: libcue-devel +BuildRequires: group(audio) # MPD_ENABLE_AUTO_LIB BuildRequires: libgcrypt-devel BuildRequires: libmikmod-devel