aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2021-07-21 17:59:55 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2021-07-21 18:12:13 +0000
commitfa3cd60121f67b7d15394eb616a123a827e50b46 (patch)
treecaead634740cb348072e21e3dd5105b858231214
parent746009aea64a174633d9e775ba66a3f4cadcf5e6 (diff)
downloadports-fa3cd60121f67b7d15394eb616a123a827e50b46.tar.gz
ports-fa3cd60121f67b7d15394eb616a123a827e50b46.zip
x11/waybar: Fix build with libfmt 8.0.0
-rw-r--r--x11/waybar/files/patch-libfmt28
1 files changed, 28 insertions, 0 deletions
diff --git a/x11/waybar/files/patch-libfmt b/x11/waybar/files/patch-libfmt
new file mode 100644
index 000000000000..f80a7cd6cf9a
--- /dev/null
+++ b/x11/waybar/files/patch-libfmt
@@ -0,0 +1,28 @@
+Obtained from: https://github.com/Alexays/Waybar/commit/1c2e0083ba5a80d0f22a14d2baa8df52024a7394
+
+--- include/util/format.hpp.orig 2021-04-15 19:17:54 UTC
++++ include/util/format.hpp
+@@ -35,7 +35,11 @@ namespace fmt {
+ // The rationale for ignoring it is that the only reason to specify
+ // an alignment and a with is to get a fixed width bar, and ">" is
+ // sufficient in this implementation.
++#if FMT_VERSION < 80000
+ width = parse_nonnegative_int(it, end, ctx);
++#else
++ width = detail::parse_nonnegative_int(it, end, -1);
++#endif
+ }
+ return it;
+ }
+--- src/modules/clock.cpp.orig 2021-04-15 19:17:54 UTC
++++ src/modules/clock.cpp
+@@ -196,6 +196,9 @@ template <>
+ struct fmt::formatter<waybar_time> : fmt::formatter<std::tm> {
+ template <typename FormatContext>
+ auto format(const waybar_time& t, FormatContext& ctx) {
++#if FMT_VERSION >= 80000
++ auto& tm_format = specs;
++#endif
+ return format_to(ctx.out(), "{}", date::format(t.locale, fmt::to_string(tm_format), t.ztime));
+ }
+ };