commit de82b31f59279a0db281d787f2325651780e4784
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sat Jul 8 20:05:55 2023 +0100
Fix build with fmt-10
fmt10_buildfix.patch | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++
kodi.spec | 5 +++
2 files changed, 113 insertions(+)
---
diff --git a/fmt10_buildfix.patch b/fmt10_buildfix.patch
new file mode 100644
index 0000000..ff00c1d
--- /dev/null
+++ b/fmt10_buildfix.patch
@@ -0,0 +1,108 @@
+From 3a20f5b67ff32cc3663e0ccd72941e666e8756a4 Mon Sep 17 00:00:00 2001
+From: Lukas Rusak <lorusak(a)gmail.com>
+Date: Tue, 27 Jun 2023 11:21:50 -0700
+Subject: [PATCH 1/4] CGUIWindowHome: use AnnouncementFlagToString when logging
+
+Signed-off-by: Lukas Rusak <lorusak(a)gmail.com>
+---
+ xbmc/windows/GUIWindowHome.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/xbmc/windows/GUIWindowHome.cpp b/xbmc/windows/GUIWindowHome.cpp
+index c42e073c48ced..abc6cfc94d5a0 100644
+--- a/xbmc/windows/GUIWindowHome.cpp
++++ b/xbmc/windows/GUIWindowHome.cpp
+@@ -78,7 +78,8 @@ void CGUIWindowHome::Announce(ANNOUNCEMENT::AnnouncementFlag flag,
+ {
+ int ra_flag = 0;
+
+- CLog::Log(LOGDEBUG, LOGANNOUNCE, "GOT ANNOUNCEMENT, type: {}, from {}, message
{}", flag, sender, message);
++ CLog::Log(LOGDEBUG, LOGANNOUNCE, "GOT ANNOUNCEMENT, type: {}, from {}, message
{}",
++ AnnouncementFlagToString(flag), sender, message);
+
+ // we are only interested in library changes
+ if ((flag & (ANNOUNCEMENT::VideoLibrary | ANNOUNCEMENT::AudioLibrary)) == 0)
+
+From c82006b575b78efbb3f5aff40a159b90f245ea9d Mon Sep 17 00:00:00 2001
+From: Lukas Rusak <lorusak(a)gmail.com>
+Date: Tue, 27 Jun 2023 11:22:32 -0700
+Subject: [PATCH 2/4] CGUIColorButtonControl: use explicit cast to
+ UTILS::COLOR::Color when formatting
+
+Signed-off-by: Lukas Rusak <lorusak(a)gmail.com>
+---
+ xbmc/guilib/GUIColorButtonControl.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/xbmc/guilib/GUIColorButtonControl.cpp
b/xbmc/guilib/GUIColorButtonControl.cpp
+index 940834cb68852..67597d7ab504b 100644
+--- a/xbmc/guilib/GUIColorButtonControl.cpp
++++ b/xbmc/guilib/GUIColorButtonControl.cpp
+@@ -188,7 +188,8 @@ void CGUIColorButtonControl::RenderInfoText()
+ void CGUIColorButtonControl::ProcessInfoText(unsigned int currentTime)
+ {
+ CRect labelRenderRect = m_labelInfo.GetRenderRect();
+- bool changed = m_labelInfo.SetText(StringUtils::Format("#{:08X}",
m_imgBoxColor));
++ bool changed = m_labelInfo.SetText(
++ StringUtils::Format("#{:08X}",
static_cast<UTILS::COLOR::Color>(m_imgBoxColor)));
+ // Set Label X position based on image mask control position
+ float textWidth = m_labelInfo.GetTextWidth() + 2 *
m_labelInfo.GetLabelInfo().offsetX;
+ float textPosX = m_imgColorMask->GetXPosition() - textWidth;
+
+From e4b1aa8450fabfb41379953c8ccec0a512421531 Mon Sep 17 00:00:00 2001
+From: Lukas Rusak <lorusak(a)gmail.com>
+Date: Tue, 27 Jun 2023 11:24:02 -0700
+Subject: [PATCH 3/4] CLog: allow using fmt::enums::format_as for explicit enum
+ conversion when using libfmt>=10
+
+Signed-off-by: Lukas Rusak <lorusak(a)gmail.com>
+---
+ xbmc/utils/log.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/xbmc/utils/log.h b/xbmc/utils/log.h
+index 9fc4aae36813e..adf46905a86c6 100644
+--- a/xbmc/utils/log.h
++++ b/xbmc/utils/log.h
+@@ -46,6 +46,10 @@ class dist_sink;
+ } // namespace sinks
+ } // namespace spdlog
+
++#if FMT_VERSION >= 100000
++using fmt::enums::format_as;
++#endif
++
+ class CLog : public ISettingsHandler, public ISettingCallback
+ {
+ public:
+
+From 26c164a28cfd18ceef7a1f2bbba5bf8a4a5a750c Mon Sep 17 00:00:00 2001
+From: Lukas Rusak <lorusak(a)gmail.com>
+Date: Tue, 27 Jun 2023 11:24:34 -0700
+Subject: [PATCH 4/4] CLog: add formatter for std::atomic for explicit atomic
+ conversion when using libfmt>=10
+
+Signed-off-by: Lukas Rusak <lorusak(a)gmail.com>
+---
+ xbmc/utils/log.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/xbmc/utils/log.h b/xbmc/utils/log.h
+index adf46905a86c6..1c42c888cb655 100644
+--- a/xbmc/utils/log.h
++++ b/xbmc/utils/log.h
+@@ -48,6 +48,14 @@ class dist_sink;
+
+ #if FMT_VERSION >= 100000
+ using fmt::enums::format_as;
++
++namespace fmt
++{
++template<typename T, typename Char>
++struct formatter<std::atomic<T>, Char> : formatter<T, Char>
++{
++};
++} // namespace fmt
+ #endif
+
+ class CLog : public ISettingsHandler, public ISettingCallback
diff --git a/kodi.spec b/kodi.spec
index c3ca390..9f6f6cb 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -76,6 +76,8 @@ Patch1: kodi-20-versioning.patch
# Fix an annobin issue, required for ARM arch
Patch2: kodi-20-annobin-workaround.patch
+Patch3:
https://github.com/xbmc/xbmc/pull/23453.patch#/fmt10_buildfix.patch
+
%ifarch x86_64
%global _with_crystalhd 1
%endif
@@ -298,6 +300,9 @@ This package contains FirewallD files for Kodi.
%setup -q -n %{name}-%{DIRVERSION}
%patch -P 1 -p1 -b.versioning
%patch -P 2 -p1 -b.innobinfix
+%if 0%{?fedora} && 0%{?fedora} > 38
+%patch -P 3 -p1 -b.fmt
+%endif
# Fix up Python shebangs
%py3_shebang_fix \