diff --git a/package/gerbera/0002-Build-against-fmt-11.0.0.patch b/package/gerbera/0002-Build-against-fmt-11.0.0.patch new file mode 100644 index 0000000000..27dc05e5cb --- /dev/null +++ b/package/gerbera/0002-Build-against-fmt-11.0.0.patch @@ -0,0 +1,136 @@ +From bb9e80f4225d4ecb0d75d80c16b0ba3ddb12b1dc Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Mon, 2 Sep 2024 23:30:19 +0200 +Subject: [PATCH] Build against fmt 11.0.0 + +Signed-off-by: Dario Binacchi +Upstream: backport from upstream https://github.com/gerbera/gerbera/commit/f1f266efbb0a6adac160e428cd14c20f6ecd3e5d +--- + README.md | 2 +- + scripts/install-spdlog.sh | 4 +++- + scripts/versions.sh | 2 +- + src/database/sql_format.h | 3 +++ + src/util/logger.h | 5 ++++- + src/util/url_utils.cc | 7 ++++++- + test/scripting/mock/duk_helper.cc | 4 +++- + 7 files changed, 21 insertions(+), 6 deletions(-) + +diff --git a/README.md b/README.md +index a1992738f009..990a9af8855f 100644 +--- a/README.md ++++ b/README.md +@@ -53,7 +53,7 @@ sudo make install + | libiconv | | | | Required | Charset conversion | | + | sqlite3 | 3.7.0 | 3.35.5 | 3.36.0 | Required | Database storage | | + | zlib | | | | Required | Data compression | | +-| [fmtlib] | 7.1.3 | 7.1.3 | 9.1.0 | Required | Fast string formatting | | ++| [fmtlib] | 7.1.3 | 9.1.0 | 11.0.0 | Required | Fast string formatting | | + | [spdlog] | 1.8.1 | 1.8.5 | 1.11.0 | Required | Runtime logging | | + | [duktape] | 2.1.0 | 2.6.0 | 2.7.0 | Optional | Scripting Support | Enabled | + | mysql | | | | Optional | Alternate database storage | Disabled | +diff --git a/scripts/install-spdlog.sh b/scripts/install-spdlog.sh +index 8a758e35b579..5c1426e3d44f 100755 +--- a/scripts/install-spdlog.sh ++++ b/scripts/install-spdlog.sh +@@ -39,7 +39,9 @@ fi + mkdir build + cd build + +-cmake .. -DSPDLOG_FMT_EXTERNAL=ON -DBUILD_SHARED_LIBS=${BUILD_SHARED} ++cmake .. -DSPDLOG_FMT_EXTERNAL=ON \ ++ -DBUILD_SHARED_LIBS=${BUILD_SHARED} \ ++ -DSPDLOG_BUILD_EXAMPLE=OFF + + if command -v nproc >/dev/null 2>&1; then + make "-j$(nproc)" +diff --git a/scripts/versions.sh b/scripts/versions.sh +index 19a0f80f79ac..8c1ffe7d590d 100644 +--- a/scripts/versions.sh ++++ b/scripts/versions.sh +@@ -36,7 +36,7 @@ else + EBML="1.4.4" + EXIV2="v0.27.5" + FFMPEGTHUMBNAILER="2.2.2" +- FMT="9.1.0" ++ FMT="11.0.0" + GOOGLETEST="1.12.1" + LASTFM="0.4.0" + MATROSKA="1.7.1" +diff --git a/src/database/sql_format.h b/src/database/sql_format.h +index 551122eb7cf7..d64edae69372 100644 +--- a/src/database/sql_format.h ++++ b/src/database/sql_format.h +@@ -26,6 +26,9 @@ + #define __SQL_FORMAT_H__ + + #include ++#if FMT_VERSION >= 100202 ++#include ++#endif + + struct SQLIdentifier { + constexpr SQLIdentifier(std::string_view name, char quote_begin, char quote_end) +diff --git a/src/util/logger.h b/src/util/logger.h +index a121ead31e95..d51e60430ed9 100644 +--- a/src/util/logger.h ++++ b/src/util/logger.h +@@ -36,6 +36,9 @@ + + #include + #include ++#if FMT_VERSION >= 100202 ++#include ++#endif + #include + #include + #include +@@ -135,7 +138,7 @@ template + struct fmt::formatter, char>> + : formatter> { + template +- auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) ++ auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) + { + return fmt::formatter>::format( + static_cast>(value), ctx); +diff --git a/src/util/url_utils.cc b/src/util/url_utils.cc +index b1c9fecef863..84f6f3be43d4 100644 +--- a/src/util/url_utils.cc ++++ b/src/util/url_utils.cc +@@ -23,11 +23,16 @@ Gerbera - https://gerbera.io/ + + #include "url_utils.h" // API + ++#include "exceptions.h" ++ ++ + #include ++#if FMT_VERSION >= 100202 ++#include ++#endif + #include + + #include "common.h" +-#include "exceptions.h" + + namespace URLUtils { + +diff --git a/test/scripting/mock/duk_helper.cc b/test/scripting/mock/duk_helper.cc +index 71bdc5d025f7..f1ab1cfef8a7 100644 +--- a/test/scripting/mock/duk_helper.cc ++++ b/test/scripting/mock/duk_helper.cc +@@ -24,8 +24,10 @@ + #include "duk_helper.h" + #include + #include +-#include + #include ++#if FMT_VERSION >= 100202 ++#include ++#endif + #include + + std::vector DukTestHelper::arrayToVector(duk_context* ctx, duk_idx_t idx) +-- +2.43.0 +