gerbera: upgrade 1.9.2 -> 1.11.0

Signed-off-by: William A. Kennington III <wak@google.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
William A. Kennington III
2022-09-29 12:01:09 -07:00
committed by Khem Raj
parent 8480f29d18
commit 3efcb4c5f8
3 changed files with 38 additions and 49 deletions

View File

@@ -0,0 +1,35 @@
From d7b8fafbc94405c20753fed569abd8878cccde89 Mon Sep 17 00:00:00 2001
From: Felix Yan <felixonmars@archlinux.org>
Date: Fri, 19 Aug 2022 15:22:10 +0300
Subject: [PATCH] Fix build with fmt 9.0
Fixes #2681
---
src/database/sql_format.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/database/sql_format.h b/src/database/sql_format.h
index 32dc00ef..e4e1909a 100644
--- a/src/database/sql_format.h
+++ b/src/database/sql_format.h
@@ -42,7 +42,7 @@ struct SQLIdentifier {
template <>
struct fmt::formatter<SQLIdentifier> : formatter<std::string_view> {
template <typename FormatContext>
- auto format(const SQLIdentifier& tn, FormatContext& ctx) -> decltype(ctx.out())
+ auto format(const SQLIdentifier& tn, FormatContext& ctx) const -> decltype(ctx.out())
{
return format_to(ctx.out(), "{}{}{}", tn.quote_begin, tn.name, tn.quote_end);
}
@@ -61,7 +61,7 @@ struct ColumnUpdate {
template <>
struct fmt::formatter<ColumnUpdate> : formatter<std::string_view> {
template <typename FormatContext>
- auto format(const ColumnUpdate& a, FormatContext& ctx) -> decltype(ctx.out())
+ auto format(const ColumnUpdate& a, FormatContext& ctx) const -> decltype(ctx.out())
{
return format_to(ctx.out(), "{} = {}", a.column, a.value);
}
--
2.38.0.rc1.362.ged0d419d3c-goog

View File

@@ -1,46 +0,0 @@
From 22b3a91473d548456a0823f9f170db0d7db5a444 Mon Sep 17 00:00:00 2001
From: kyak <bas@bmail.ru>
Date: Wed, 12 Jan 2022 19:41:37 +0300
Subject: [PATCH] Fix for fmt > 8.0
Upstream-Status: Backport [https://github.com/gerbera/gerbera/commit/82d84ac5e62c23e717198fc7b2ef190ff95e70d1]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/util/logger.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/util/logger.h b/src/util/logger.h
index 8a8f0b1f..0a512bff 100644
--- a/src/util/logger.h
+++ b/src/util/logger.h
@@ -32,7 +32,9 @@
#ifndef __LOGGER_H__
#define __LOGGER_H__
+#include <fmt/format.h>
#include <spdlog/spdlog.h>
+#include <type_traits>
#define log_debug SPDLOG_DEBUG
#define log_info SPDLOG_INFO
@@ -40,4 +42,17 @@
#define log_error SPDLOG_ERROR
#define log_js SPDLOG_INFO
+#if FMT_VERSION >= 80100
+template <typename T>
+struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>>
+ : formatter<std::underlying_type_t<T>> {
+ template <typename FormatContext>
+ auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out())
+ {
+ return fmt::formatter<std::underlying_type_t<T>>::format(
+ static_cast<std::underlying_type_t<T>>(value), ctx);
+ }
+};
+#endif
+
#endif // __LOGGER_H__
--
2.35.0

View File

@@ -3,11 +3,11 @@ Description = "Gerbera - An UPnP media server"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=25cdec9afe3f1f26212ead6bd2f7fac8"
SRC_URI = "git://github.com/v00d00/gerbera.git;protocol=https;branch=master \
file://0001-Fix-for-fmt-8.0.patch \
SRC_URI = "git://github.com/gerbera/gerbera.git;protocol=https;branch=master \
file://0001-Fix-build-with-fmt-9.0.patch \
"
SRCREV = "3b93d362ec33f738868a4e896a2c9ee8e9d7a92a"
SRCREV = "d73d8c1346213d784753c02ea771970500e0df2a"
S = "${WORKDIR}/git"