Backport fixes for building with newer fmt.
Index: Makefile =================================================================== RCS file: /cvs/ports/audio/mpd/Makefile,v retrieving revision 1.150 diff -u -p -u -p -r1.150 Makefile --- Makefile 22 Dec 2023 19:24:34 -0000 1.150 +++ Makefile 7 Jul 2024 08:36:45 -0000 @@ -2,6 +2,7 @@ BROKEN-hppa = no atomic ops COMMENT = Music Player Daemon VER = 0.23.15 DISTNAME = mpd-${VER} +REVISION = 0 EXTRACT_SUFX = .tar.xz CATEGORIES = audio HOMEPAGE = https://www.musicpd.org/ Index: patches/patch-src_Log_cxx =================================================================== RCS file: patches/patch-src_Log_cxx diff -N patches/patch-src_Log_cxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_Log_cxx 7 Jul 2024 08:36:45 -0000 @@ -0,0 +1,15 @@ +Log: add missing include for std::back_inserter() +e380ae90ebb6325d1820b6f34e10bf3474710899 + +Index: src/Log.cxx +--- src/Log.cxx.orig ++++ src/Log.cxx +@@ -23,6 +23,8 @@ + + #include <fmt/format.h> + ++#include <iterator> // for std::back_inserter() ++ + static constexpr Domain exception_domain("exception"); + + void Index: patches/patch-src_lib_ffmpeg_LibFmt_hxx =================================================================== RCS file: patches/patch-src_lib_ffmpeg_LibFmt_hxx diff -N patches/patch-src_lib_ffmpeg_LibFmt_hxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_lib_ffmpeg_LibFmt_hxx 7 Jul 2024 08:36:45 -0000 @@ -0,0 +1,15 @@ +lib/fmt: support build with libfmt-11.0.0 +1402869715e3efca87942d79c3173a6b21a6925d + +Index: src/lib/ffmpeg/LibFmt.hxx +--- src/lib/ffmpeg/LibFmt.hxx.orig ++++ src/lib/ffmpeg/LibFmt.hxx +@@ -29,7 +29,7 @@ template<> + struct fmt::formatter<AVSampleFormat> : formatter<string_view> + { + template<typename FormatContext> +- auto format(const AVSampleFormat format, FormatContext &ctx) { ++ auto format(const AVSampleFormat format, FormatContext &ctx) const { + const char *name = av_get_sample_fmt_name(format); + if (name == nullptr) + name = "?"; Index: patches/patch-src_lib_fmt_AudioFormatFormatter_hxx =================================================================== RCS file: patches/patch-src_lib_fmt_AudioFormatFormatter_hxx diff -N patches/patch-src_lib_fmt_AudioFormatFormatter_hxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_lib_fmt_AudioFormatFormatter_hxx 7 Jul 2024 08:36:45 -0000 @@ -0,0 +1,24 @@ +lib/fmt: support build with libfmt-11.0.0 +3648475f871c33daa9e598c102a16e5a1a4d4dfc + +Index: src/lib/fmt/AudioFormatFormatter.hxx +--- src/lib/fmt/AudioFormatFormatter.hxx.orig ++++ src/lib/fmt/AudioFormatFormatter.hxx +@@ -39,7 +39,7 @@ template<> + struct fmt::formatter<SampleFormat> : formatter<string_view> + { + template<typename FormatContext> +- auto format(const SampleFormat format, FormatContext &ctx) { ++ auto format(const SampleFormat format, FormatContext &ctx) const { + return formatter<string_view>::format(sample_format_to_string(format), + ctx); + } +@@ -49,7 +49,7 @@ template<> + struct fmt::formatter<AudioFormat> : formatter<string_view> + { + template<typename FormatContext> +- auto format(const AudioFormat &af, FormatContext &ctx) { ++ auto format(const AudioFormat &af, FormatContext &ctx) const { + return formatter<string_view>::format(ToString(af).c_str(), + ctx); + } Index: patches/patch-src_lib_fmt_ExceptionFormatter_hxx =================================================================== RCS file: patches/patch-src_lib_fmt_ExceptionFormatter_hxx diff -N patches/patch-src_lib_fmt_ExceptionFormatter_hxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_lib_fmt_ExceptionFormatter_hxx 7 Jul 2024 08:36:45 -0000 @@ -0,0 +1,15 @@ +lib/fmt: support build with libfmt-11.0.0 +1402869715e3efca87942d79c3173a6b21a6925d + +Index: src/lib/fmt/ExceptionFormatter.hxx +--- src/lib/fmt/ExceptionFormatter.hxx.orig ++++ src/lib/fmt/ExceptionFormatter.hxx +@@ -38,7 +38,7 @@ template<> + struct fmt::formatter<std::exception_ptr> : formatter<string_view> + { + template<typename FormatContext> +- auto format(std::exception_ptr e, FormatContext &ctx) { ++ auto format(std::exception_ptr e, FormatContext &ctx) const { + return formatter<string_view>::format(GetFullMessage(e), ctx); + } + }; Index: patches/patch-src_lib_fmt_PathFormatter_hxx =================================================================== RCS file: patches/patch-src_lib_fmt_PathFormatter_hxx diff -N patches/patch-src_lib_fmt_PathFormatter_hxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_lib_fmt_PathFormatter_hxx 7 Jul 2024 08:36:45 -0000 @@ -0,0 +1,15 @@ +lib/fmt: support build with libfmt-11.0.0 +1402869715e3efca87942d79c3173a6b21a6925d + +Index: src/lib/fmt/PathFormatter.hxx +--- src/lib/fmt/PathFormatter.hxx.orig ++++ src/lib/fmt/PathFormatter.hxx +@@ -29,7 +29,7 @@ template<> + struct fmt::formatter<Path> : formatter<string_view> + { + template<typename FormatContext> +- auto format(Path path, FormatContext &ctx) { ++ auto format(Path path, FormatContext &ctx) const { + return formatter<string_view>::format(path.ToUTF8(), ctx); + } + };