commit:     d4b8bb1ea03d10afbcaef6a13896d328a1dd5336
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sun Apr 13 18:22:11 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Apr 14 01:22:09 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4b8bb1e

media-tv/kodi: fix build against pipewire-1.4.0

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../kodi/files/kodi-21.2-pipewire-1.4.0-fix.patch  | 27 ++++++++++++++++++++++
 media-tv/kodi/kodi-21.2-r2.ebuild                  |  1 +
 2 files changed, 28 insertions(+)

diff --git a/media-tv/kodi/files/kodi-21.2-pipewire-1.4.0-fix.patch 
b/media-tv/kodi/files/kodi-21.2-pipewire-1.4.0-fix.patch
new file mode 100644
index 000000000000..4b82d11e1532
--- /dev/null
+++ b/media-tv/kodi/files/kodi-21.2-pipewire-1.4.0-fix.patch
@@ -0,0 +1,27 @@
+https://github.com/xbmc/xbmc/issues/26526
+https://github.com/xbmc/xbmc/commit/269053ebbfd3cc4a3156a511f54ab7f08a09a730
+https://github.com/xbmc/xbmc/pull/26502
+https://github.com/xbmc/xbmc/pull/26527
+
+From e23a105b8988aba9b8401493bf6031a6878bd435 Mon Sep 17 00:00:00 2001
+From: Timo Gurr <[email protected]>
+Date: Fri, 7 Mar 2025 13:30:47 +0100
+Subject: [PATCH] [AudioEngine] PipeWire: Fix build with PipeWire 1.4.0
+
+PipeWire >= 1.4.0 requires the correct struct type to be used, otherwise
+it will fail to compile.
+
+Reference: 
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/188d920733f0791413d3386e5536ee7377f71b2f
+(cherry picked from commit 269053ebbfd3cc4a3156a511f54ab7f08a09a730)
+--- a/xbmc/cores/AudioEngine/Sinks/pipewire/PipewireNode.cpp
++++ b/xbmc/cores/AudioEngine/Sinks/pipewire/PipewireNode.cpp
+@@ -40,7 +40,8 @@ void CPipewireNode::EnumerateFormats()
+   for (uint32_t param = 0; param < m_info->n_params; param++)
+   {
+     if (m_info->params[param].id == SPA_PARAM_EnumFormat)
+-      pw_node_enum_params(m_proxy.get(), 0, m_info->params[param].id, 0, 0, 
NULL);
++      pw_node_enum_params(reinterpret_cast<struct pw_node*>(m_proxy.get()), 0,
++                          m_info->params[param].id, 0, 0, NULL);
+   }
+ }
+ 

diff --git a/media-tv/kodi/kodi-21.2-r2.ebuild 
b/media-tv/kodi/kodi-21.2-r2.ebuild
index 25537ab93fa6..f48e181c5ed4 100644
--- a/media-tv/kodi/kodi-21.2-r2.ebuild
+++ b/media-tv/kodi/kodi-21.2-r2.ebuild
@@ -272,6 +272,7 @@ BDEPEND="
 PATCHES=(
        "${FILESDIR}"/kodi-21-optional-ffmpeg-libx11.patch
        "${FILESDIR}"/kodi-21.1-silence-libdvdread-git.patch
+       "${FILESDIR}"/kodi-21.2-pipewire-1.4.0-fix.patch
 )
 
 # bug #544020

Reply via email to