Skip to contentSkip to conversation

gerbera: Fix build with fmt 8.1+

PATCH Superseded Khem Raj 1 participant 1 message Jan 25, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 gerbera: Fix build with fmt 8.1+

The APIs have changes and we use external fmt library in spdlog which is used here

---
 ...Explicitly-cast-scanmode-enum-to-int.patch | 35 +++++++++++++++++++
 .../gerbera/gerbera_1.9.2.bb                  |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/gerbera/gerbera/0001-Explicitly-cast-scanmode-enum-to-int.patch
meta-multimedia/recipes-multimedia/gerbera/gerbera/0001-Explicitly-cast-scanmode-enum-to-int.patch new file +35 -0
new file mode 100644
index 0000000000..bff0b2418d
@@ -0,0 +1,35 @@
+From 9eaf38dd6e4f7d24d7eaa1c6572495f3b4f2e969 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 25 Jan 2022 12:51:45 -0800
+Subject: [PATCH] Explicitly cast scanmode enum to int
+
+Newer fmt library needs this now, fmt::format does not accept
+the enum as part of va_list
+
+Fixes
+/usr/include/fmt/core.h:1727:3: error: static_assert failed due to requ
+irement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt"
+  static_assert(
+
+Upstream-Status: Submitted [https://github.com/gerbera/gerbera/pull/2391]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/content/autoscan.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/content/autoscan.cc b/src/content/autoscan.cc
+index fa5702cf..3c4a9020 100644
+--- a/src/content/autoscan.cc
++++ b/src/content/autoscan.cc
+@@ -121,7 +121,7 @@ std::string_view AutoscanDirectory::mapScanmode(ScanMode scanmode)
+     case ScanMode::INotify:
+         return "inotify";
+     }
+-    throw_std_runtime_error("Illegal scanmode ({}) given to mapScanmode()", scanmode);
++    throw_std_runtime_error("Illegal scanmode ({}) given to mapScanmode()", static_cast<int>(scanmode));
+ }
+ 
+ ScanMode AutoscanDirectory::remapScanmode(const std::string& scanmode)
+-- 
+2.35.0
+
meta-multimedia/recipes-multimedia/gerbera/gerbera_1.9.2.bb +1 -0
index 94657ba534..0424ce89c7 100644
@@ -4,6 +4,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=25cdec9afe3f1f26212ead6bd2f7fac8"
 
 SRC_URI = "git://github.com/v00d00/gerbera.git;protocol=https;branch=master \
+           file://0001-Explicitly-cast-scanmode-enum-to-int.patch \
           "
 
 SRCREV = "3b93d362ec33f738868a4e896a2c9ee8e9d7a92a"
Signature · 1 line
2.35.0