* [Buildroot] [PATCH 3/5] package/kodi: Fix building with fmt >= 10
2023-07-30 17:12 [Buildroot] [PATCH 1/5] package/gerbera: bump version to 1.12.1 Bernd Kuhls
2023-07-30 17:12 ` [Buildroot] [PATCH 2/5] package/spdlog: bump version to 1.12.0 Bernd Kuhls
@ 2023-07-30 17:12 ` Bernd Kuhls
2023-07-30 17:12 ` [Buildroot] [PATCH 4/5] package/gerbera: " Bernd Kuhls
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2023-07-30 17:12 UTC (permalink / raw)
To: buildroot; +Cc: Semyon Kolganov, Fabrice Fontaine, Asaf Kahlon
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
...se-AnnouncementFlagToString-when-log.patch | 31 ++++++++++++++++
...ontrol-use-explicit-cast-to-UTILS-CO.patch | 32 ++++++++++++++++
...-fmt-enums-format_as-for-explicit-en.patch | 33 +++++++++++++++++
...er-for-std-atomic-for-explicit-atomi.patch | 37 +++++++++++++++++++
4 files changed, 133 insertions(+)
create mode 100644 package/kodi/0002-CGUIWindowHome-use-AnnouncementFlagToString-when-log.patch
create mode 100644 package/kodi/0003-CGUIColorButtonControl-use-explicit-cast-to-UTILS-CO.patch
create mode 100644 package/kodi/0004-CLog-allow-using-fmt-enums-format_as-for-explicit-en.patch
create mode 100644 package/kodi/0005-CLog-add-formatter-for-std-atomic-for-explicit-atomi.patch
diff --git a/package/kodi/0002-CGUIWindowHome-use-AnnouncementFlagToString-when-log.patch b/package/kodi/0002-CGUIWindowHome-use-AnnouncementFlagToString-when-log.patch
new file mode 100644
index 0000000000..3aa41adc86
--- /dev/null
+++ b/package/kodi/0002-CGUIWindowHome-use-AnnouncementFlagToString-when-log.patch
@@ -0,0 +1,31 @@
+From cfbc0ec1b2cf2952fa4a279cf5fc71c15bf56f23 Mon Sep 17 00:00:00 2001
+From: Lukas Rusak <lorusak@gmail.com>
+Date: Tue, 27 Jun 2023 11:21:50 -0700
+Subject: [PATCH] CGUIWindowHome: use AnnouncementFlagToString when logging
+
+Upstream: https://github.com/xbmc/xbmc/commit/3a20f5b67ff32cc3663e0ccd72941e666e8756a4
+Upstream: https://github.com/xbmc/xbmc/pull/23571
+
+Signed-off-by: Lukas Rusak <lorusak@gmail.com>
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ 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 c42e073c48..abc6cfc94d 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)
+--
+2.39.2
+
diff --git a/package/kodi/0003-CGUIColorButtonControl-use-explicit-cast-to-UTILS-CO.patch b/package/kodi/0003-CGUIColorButtonControl-use-explicit-cast-to-UTILS-CO.patch
new file mode 100644
index 0000000000..8ac29dcd20
--- /dev/null
+++ b/package/kodi/0003-CGUIColorButtonControl-use-explicit-cast-to-UTILS-CO.patch
@@ -0,0 +1,32 @@
+From 8b1673044971cae84de7d34015230b9503f292f4 Mon Sep 17 00:00:00 2001
+From: Lukas Rusak <lorusak@gmail.com>
+Date: Tue, 27 Jun 2023 11:22:32 -0700
+Subject: [PATCH] CGUIColorButtonControl: use explicit cast to
+ UTILS::COLOR::Color when formatting
+
+Upstream: https://github.com/xbmc/xbmc/commit/c82006b575b78efbb3f5aff40a159b90f245ea9d
+Upstream: https://github.com/xbmc/xbmc/pull/23571
+
+Signed-off-by: Lukas Rusak <lorusak@gmail.com>
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ 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 940834cb68..67597d7ab5 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;
+--
+2.39.2
+
diff --git a/package/kodi/0004-CLog-allow-using-fmt-enums-format_as-for-explicit-en.patch b/package/kodi/0004-CLog-allow-using-fmt-enums-format_as-for-explicit-en.patch
new file mode 100644
index 0000000000..4e09218361
--- /dev/null
+++ b/package/kodi/0004-CLog-allow-using-fmt-enums-format_as-for-explicit-en.patch
@@ -0,0 +1,33 @@
+From ec1fd134e31b8c667ff06e02e21a75c4c3e87dfd Mon Sep 17 00:00:00 2001
+From: Lukas Rusak <lorusak@gmail.com>
+Date: Tue, 27 Jun 2023 11:24:02 -0700
+Subject: [PATCH] CLog: allow using fmt::enums::format_as for explicit enum
+ conversion when using libfmt>=10
+
+Upstream: https://github.com/xbmc/xbmc/commit/e4b1aa8450fabfb41379953c8ccec0a512421531
+Upstream: https://github.com/xbmc/xbmc/pull/23571
+
+Signed-off-by: Lukas Rusak <lorusak@gmail.com>
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ xbmc/utils/log.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/xbmc/utils/log.h b/xbmc/utils/log.h
+index 9fc4aae368..adf46905a8 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:
+--
+2.39.2
+
diff --git a/package/kodi/0005-CLog-add-formatter-for-std-atomic-for-explicit-atomi.patch b/package/kodi/0005-CLog-add-formatter-for-std-atomic-for-explicit-atomi.patch
new file mode 100644
index 0000000000..b87a60f809
--- /dev/null
+++ b/package/kodi/0005-CLog-add-formatter-for-std-atomic-for-explicit-atomi.patch
@@ -0,0 +1,37 @@
+From 46f6d97f46254600bd34f77f335a475178d7aaa5 Mon Sep 17 00:00:00 2001
+From: Lukas Rusak <lorusak@gmail.com>
+Date: Tue, 27 Jun 2023 11:24:34 -0700
+Subject: [PATCH] CLog: add formatter for std::atomic for explicit atomic
+ conversion when using libfmt>=10
+
+Upstream: https://github.com/xbmc/xbmc/commit/26c164a28cfd18ceef7a1f2bbba5bf8a4a5a750c
+Upstream: https://github.com/xbmc/xbmc/pull/23571
+
+Signed-off-by: Lukas Rusak <lorusak@gmail.com>
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ xbmc/utils/log.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/xbmc/utils/log.h b/xbmc/utils/log.h
+index adf46905a8..1c42c888cb 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
+--
+2.39.2
+
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 4/5] package/gerbera: Fix building with fmt >= 10
2023-07-30 17:12 [Buildroot] [PATCH 1/5] package/gerbera: bump version to 1.12.1 Bernd Kuhls
2023-07-30 17:12 ` [Buildroot] [PATCH 2/5] package/spdlog: bump version to 1.12.0 Bernd Kuhls
2023-07-30 17:12 ` [Buildroot] [PATCH 3/5] package/kodi: Fix building with fmt >= 10 Bernd Kuhls
@ 2023-07-30 17:12 ` Bernd Kuhls
2023-07-30 17:12 ` [Buildroot] [PATCH 5/5] package/fmt: bump version to 10.0.0 Bernd Kuhls
2023-07-30 20:45 ` [Buildroot] [PATCH 1/5] package/gerbera: bump version to 1.12.1 Thomas Petazzoni via buildroot
4 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2023-07-30 17:12 UTC (permalink / raw)
To: buildroot; +Cc: Semyon Kolganov, Fabrice Fontaine, Asaf Kahlon
This patch depends on bumping gerbera to version 1.12.1.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
.../0001-buildfix-support-fmtlib-10.patch | 166 ++++++++++++++++++
1 file changed, 166 insertions(+)
create mode 100644 package/gerbera/0001-buildfix-support-fmtlib-10.patch
diff --git a/package/gerbera/0001-buildfix-support-fmtlib-10.patch b/package/gerbera/0001-buildfix-support-fmtlib-10.patch
new file mode 100644
index 0000000000..b274aab75b
--- /dev/null
+++ b/package/gerbera/0001-buildfix-support-fmtlib-10.patch
@@ -0,0 +1,166 @@
+From 37957aac0aea776e6f843af2358916f81056a405 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Thu, 29 Jun 2023 22:09:15 +0900
+Subject: [PATCH] buildfix: support fmtlib 10
+
+With fmtlib10, fmt::format does not accept pugi::xml_node as it is.
+Use name() member function, as this usage appear on other places of
+gerbera source code.
+
+Closes #2839 .
+
+Upstream: https://github.com/gerbera/gerbera/commit/37957aac0aea776e6f843af2358916f81056a405
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/config/setup/config_setup_array.cc | 6 +++---
+ src/config/setup/config_setup_autoscan.cc | 2 +-
+ src/config/setup/config_setup_client.cc | 2 +-
+ src/config/setup/config_setup_dictionary.cc | 6 +++---
+ src/config/setup/config_setup_dynamic.cc | 2 +-
+ src/config/setup/config_setup_transcoding.cc | 2 +-
+ src/config/setup/config_setup_tweak.cc | 2 +-
+ src/config/setup/config_setup_vector.cc | 4 ++--
+ 8 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/config/setup/config_setup_array.cc b/src/config/setup/config_setup_array.cc
+index 62dd5c9a7..a5f8958ce 100644
+--- a/src/config/setup/config_setup_array.cc
++++ b/src/config/setup/config_setup_array.cc
+@@ -137,11 +137,11 @@ std::vector<std::string> ConfigArraySetup::getXmlContent(const pugi::xml_node& o
+ std::vector<std::string> result;
+ if (initArray) {
+ if (!initArray(optValue, result, ConfigDefinition::mapConfigOption(nodeOption))) {
+- throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue);
++ throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue.name());
+ }
+ } else {
+ if (!createOptionFromNode(optValue, result)) {
+- throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue);
++ throw_std_runtime_error("Invalid {} array value '{}'", xpath, optValue.name());
+ }
+ }
+ if (result.empty()) {
+@@ -150,7 +150,7 @@ std::vector<std::string> ConfigArraySetup::getXmlContent(const pugi::xml_node& o
+ result = defaultEntries;
+ }
+ if (notEmpty && result.empty()) {
+- throw_std_runtime_error("Invalid array {} empty '{}'", xpath, optValue);
++ throw_std_runtime_error("Invalid array {} empty '{}'", xpath, optValue.name());
+ }
+ return result;
+ }
+diff --git a/src/config/setup/config_setup_autoscan.cc b/src/config/setup/config_setup_autoscan.cc
+index 9ae4e61f8..5e1394585 100644
+--- a/src/config/setup/config_setup_autoscan.cc
++++ b/src/config/setup/config_setup_autoscan.cc
+@@ -245,7 +245,7 @@ std::shared_ptr<ConfigOption> ConfigAutoscanSetup::newOption(const pugi::xml_nod
+ {
+ auto result = std::vector<AutoscanDirectory>();
+ if (!createOptionFromNode(optValue, result)) {
+- throw_std_runtime_error("Init {} autoscan failed '{}'", xpath, optValue);
++ throw_std_runtime_error("Init {} autoscan failed '{}'", xpath, optValue.name());
+ }
+ optionValue = std::make_shared<AutoscanListOption>(result);
+ return optionValue;
+diff --git a/src/config/setup/config_setup_client.cc b/src/config/setup/config_setup_client.cc
+index ffd12fc01..857db3c3e 100644
+--- a/src/config/setup/config_setup_client.cc
++++ b/src/config/setup/config_setup_client.cc
+@@ -183,7 +183,7 @@ std::shared_ptr<ConfigOption> ConfigClientSetup::newOption(const pugi::xml_node&
+ auto result = std::make_shared<ClientConfigList>();
+
+ if (!createOptionFromNode(isEnabled ? optValue : pugi::xml_node(nullptr), result)) {
+- throw_std_runtime_error("Init {} client config failed '{}'", xpath, optValue);
++ throw_std_runtime_error("Init {} client config failed '{}'", xpath, optValue.name());
+ }
+ optionValue = std::make_shared<ClientConfigListOption>(result);
+ return optionValue;
+diff --git a/src/config/setup/config_setup_dictionary.cc b/src/config/setup/config_setup_dictionary.cc
+index 003b4cc59..69d1a7255 100644
+--- a/src/config/setup/config_setup_dictionary.cc
++++ b/src/config/setup/config_setup_dictionary.cc
+@@ -163,11 +163,11 @@ std::map<std::string, std::string> ConfigDictionarySetup::getXmlContent(const pu
+ std::map<std::string, std::string> result;
+ if (initDict) {
+ if (!initDict(optValue, result)) {
+- throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue);
++ throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue.name());
+ }
+ } else {
+ if (!createOptionFromNode(optValue, result) && required) {
+- throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue);
++ throw_std_runtime_error("Init {} dictionary failed '{}'", xpath, optValue.name());
+ }
+ }
+ if (result.empty()) {
+@@ -176,7 +176,7 @@ std::map<std::string, std::string> ConfigDictionarySetup::getXmlContent(const pu
+ result = defaultEntries;
+ }
+ if (notEmpty && result.empty()) {
+- throw_std_runtime_error("Invalid dictionary {} empty '{}'", xpath, optValue);
++ throw_std_runtime_error("Invalid dictionary {} empty '{}'", xpath, optValue.name());
+ }
+ return result;
+ }
+diff --git a/src/config/setup/config_setup_dynamic.cc b/src/config/setup/config_setup_dynamic.cc
+index 0074cb6d3..d6962afe6 100644
+--- a/src/config/setup/config_setup_dynamic.cc
++++ b/src/config/setup/config_setup_dynamic.cc
+@@ -192,7 +192,7 @@ std::shared_ptr<ConfigOption> ConfigDynamicContentSetup::newOption(const pugi::x
+ auto result = std::make_shared<DynamicContentList>();
+
+ if (!createOptionFromNode(optValue, result)) {
+- throw_std_runtime_error("Init {} DynamicContentList failed '{}'", xpath, optValue);
++ throw_std_runtime_error("Init {} DynamicContentList failed '{}'", xpath, optValue.name());
+ }
+ optionValue = std::make_shared<DynamicContentListOption>(result);
+ return optionValue;
+diff --git a/src/config/setup/config_setup_transcoding.cc b/src/config/setup/config_setup_transcoding.cc
+index 17d1780dc..1f6fb0604 100644
+--- a/src/config/setup/config_setup_transcoding.cc
++++ b/src/config/setup/config_setup_transcoding.cc
+@@ -501,7 +501,7 @@ std::shared_ptr<ConfigOption> ConfigTranscodingSetup::newOption(const pugi::xml_
+ auto result = std::make_shared<TranscodingProfileList>();
+
+ if (!createOptionFromNode(isEnabled ? optValue : pugi::xml_node(nullptr), result)) {
+- throw_std_runtime_error("Init {} transcoding failed '{}'", xpath, optValue);
++ throw_std_runtime_error("Init {} transcoding failed '{}'", xpath, optValue.name());
+ }
+ optionValue = std::make_shared<TranscodingProfileListOption>(result);
+ return optionValue;
+diff --git a/src/config/setup/config_setup_tweak.cc b/src/config/setup/config_setup_tweak.cc
+index 65dae2759..4da9fca1b 100644
+--- a/src/config/setup/config_setup_tweak.cc
++++ b/src/config/setup/config_setup_tweak.cc
+@@ -257,7 +257,7 @@ std::shared_ptr<ConfigOption> ConfigDirectorySetup::newOption(const pugi::xml_no
+ auto result = std::make_shared<DirectoryConfigList>();
+
+ if (!createOptionFromNode(optValue, result)) {
+- throw_std_runtime_error("Init {} DirectoryConfigList failed '{}'", xpath, optValue);
++ throw_std_runtime_error("Init {} DirectoryConfigList failed '{}'", xpath, optValue.name());
+ }
+ optionValue = std::make_shared<DirectoryTweakOption>(result);
+ return optionValue;
+diff --git a/src/config/setup/config_setup_vector.cc b/src/config/setup/config_setup_vector.cc
+index e5efe2767..9a9670569 100644
+--- a/src/config/setup/config_setup_vector.cc
++++ b/src/config/setup/config_setup_vector.cc
+@@ -181,7 +181,7 @@ std::vector<std::vector<std::pair<std::string, std::string>>> ConfigVectorSetup:
+ {
+ std::vector<std::vector<std::pair<std::string, std::string>>> result;
+ if (!createOptionFromNode(optValue, result) && required) {
+- throw_std_runtime_error("Init {} vector failed '{}'", xpath, optValue);
++ throw_std_runtime_error("Init {} vector failed '{}'", xpath, optValue.name());
+ }
+ if (result.empty()) {
+ log_debug("{} assigning {} default values", xpath, defaultEntries.size());
+@@ -189,7 +189,7 @@ std::vector<std::vector<std::pair<std::string, std::string>>> ConfigVectorSetup:
+ result = defaultEntries;
+ }
+ if (notEmpty && result.empty()) {
+- throw_std_runtime_error("Invalid vector {} empty '{}'", xpath, optValue);
++ throw_std_runtime_error("Invalid vector {} empty '{}'", xpath, optValue.name());
+ }
+ return result;
+ }
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread