commit:     65e79039b9cd3898cdb300f36357d5cc82c4f35c
Author:     Christopher Rudolph <rudolchr <AT> b-tu <DOT> de>
AuthorDate: Fri Jul  8 17:23:52 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 11 00:08:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65e79039

games-emulation/dolphin: fix build w/ libfmt-9

Apply patch to make games-emulation/dolphin-5.0_p20220520 build with
dev-libs/libfmt-9.

Signed-off-by: Christopher Rudolph <rudolchr <AT> b-tu.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...0520.ebuild => dolphin-5.0_p20220520-r1.ebuild} |  4 ++-
 ...phin-5.0_p20220520-libfmt-9.0.0-fix-build.patch | 32 ++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/games-emulation/dolphin/dolphin-5.0_p20220520.ebuild 
b/games-emulation/dolphin/dolphin-5.0_p20220520-r1.ebuild
similarity index 98%
rename from games-emulation/dolphin/dolphin-5.0_p20220520.ebuild
rename to games-emulation/dolphin/dolphin-5.0_p20220520-r1.ebuild
index 381435640b8f..abcdeec7c45b 100644
--- a/games-emulation/dolphin/dolphin-5.0_p20220520.ebuild
+++ b/games-emulation/dolphin/dolphin-5.0_p20220520-r1.ebuild
@@ -35,12 +35,14 @@ IUSE="
        profile pulseaudio systemd upnp vulkan
 "
 
+PATCHES=("${FILESDIR}/${P}-libfmt-9.0.0-fix-build.patch")
+
 RDEPEND="
        app-arch/bzip2:=
        app-arch/xz-utils:=
        app-arch/zstd:=
        dev-libs/hidapi:=
-       =dev-libs/libfmt-8*:=
+       >=dev-libs/libfmt-8:=
        dev-libs/lzo:=
        dev-libs/pugixml:=
        media-libs/cubeb:=

diff --git 
a/games-emulation/dolphin/files/dolphin-5.0_p20220520-libfmt-9.0.0-fix-build.patch
 
b/games-emulation/dolphin/files/dolphin-5.0_p20220520-libfmt-9.0.0-fix-build.patch
new file mode 100644
index 000000000000..5bc2ae3877f4
--- /dev/null
+++ 
b/games-emulation/dolphin/files/dolphin-5.0_p20220520-libfmt-9.0.0-fix-build.patch
@@ -0,0 +1,32 @@
+From: Christopher Rudolph
+Fix build with libfmt-9.0.0
+Upstream report: https://github.com/dolphin-emu/dolphin/pull/10825
+
+diff --git a/Source/Core/Common/MsgHandler.h b/Source/Core/Common/MsgHandler.h
+index 750da51..1d6a467 100644
+--- a/Source/Core/Common/MsgHandler.h
++++ b/Source/Core/Common/MsgHandler.h
+@@ -41,7 +41,11 @@ bool MsgAlertFmt(bool yes_no, MsgType style, 
Common::Log::LogType log_type, cons
+   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::Log::LogType log_type, con
+   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);
+ }

Reply via email to