git: 7780472b9bac - main - emulators/dolphin-emu: Fix build after fmt update

From: Ganael LAPLANCHE <martymac_at_FreeBSD.org>
Date: Wed, 04 Jan 2023 11:36:59 UTC
The branch main has been updated by martymac:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7780472b9bace927812a288f875550d13e90c34e

commit 7780472b9bace927812a288f875550d13e90c34e
Author:     Ganael LAPLANCHE <martymac@FreeBSD.org>
AuthorDate: 2023-01-04 11:32:28 +0000
Commit:     Ganael LAPLANCHE <martymac@FreeBSD.org>
CommitDate: 2023-01-04 11:32:28 +0000

    emulators/dolphin-emu: Fix build after fmt update
    
    Import patch from upstream to follow changes introduced with fmt 9.0.0.
---
 .../files/patch-Source-Core-Common-MsgHandler.h    | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/emulators/dolphin-emu/files/patch-Source-Core-Common-MsgHandler.h b/emulators/dolphin-emu/files/patch-Source-Core-Common-MsgHandler.h
new file mode 100644
index 000000000000..0e2673dbdece
--- /dev/null
+++ b/emulators/dolphin-emu/files/patch-Source-Core-Common-MsgHandler.h
@@ -0,0 +1,32 @@
+commit 66f330e57316257fe81b46f57dad22ea6dee7bae
+Author: Christopher Rudolph <rudolchr@b-tu.de>
+Date:   Sat Jul 9 17:02:09 2022 +0200
+
+    Add a check for libfmt version so that in case libfmt-9 is used the function is_compile_string is called under it's new namespace
+
+--- Source/Core/Common/MsgHandler.h.orig	2022-07-06 07:23:55 UTC
++++ Source/Core/Common/MsgHandler.h
+@@ -41,7 +41,11 @@ bool MsgAlertFmt(bool yes_no, MsgType style, Common::L
+   static_assert(NumFields == sizeof...(args),
+                 "Unexpected number of replacement fields in format string; did you pass too few or "
+                 "too many arguments?");
++#if FMT_VERSION >= 90000
++  static_assert(fmt::detail::is_compile_string<S>::value);
++#else
+   static_assert(fmt::is_compile_string<S>::value);
++#endif
+   return MsgAlertFmtImpl(yes_no, style, log_type, file, line, format,
+                          fmt::make_format_args(args...));
+ }
+@@ -56,7 +60,11 @@ bool MsgAlertFmtT(bool yes_no, MsgType style, Common::
+   static_assert(NumFields == sizeof...(args),
+                 "Unexpected number of replacement fields in format string; did you pass too few or "
+                 "too many arguments?");
++#if FMT_VERSION >= 90000
++  static_assert(fmt::detail::is_compile_string<S>::value);
++#else
+   static_assert(fmt::is_compile_string<S>::value);
++#endif
+   auto arg_list = fmt::make_format_args(args...);
+   return MsgAlertFmtImpl(yes_no, style, log_type, file, line, translated_format, arg_list);
+ }