1 |
commit: 209673f3c76e5589ba6776a81eab44a01daa0cc6 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 12 10:21:02 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 12 14:59:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=209673f3 |
7 |
|
8 |
gui-apps/waybar: fix build with libfmt-8 |
9 |
|
10 |
Backport of the upstreamed fix. |
11 |
|
12 |
(no real credit goes to me, only adjusted PR with maintainer's ack) |
13 |
|
14 |
Closes: https://bugs.gentoo.org/797649 |
15 |
Closes: https://github.com/gentoo/gentoo/pull/21506 |
16 |
Signed-off-by: Jonas Toth <gentoo <AT> jonas-toth.eu> |
17 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
18 |
|
19 |
gui-apps/waybar/files/waybar-0.9.7-libfmt-8.patch | 32 +++++++++++++++++++++++ |
20 |
gui-apps/waybar/waybar-0.9.5-r1.ebuild | 4 +++ |
21 |
gui-apps/waybar/waybar-0.9.7-r1.ebuild | 4 +++ |
22 |
3 files changed, 40 insertions(+) |
23 |
|
24 |
diff --git a/gui-apps/waybar/files/waybar-0.9.7-libfmt-8.patch b/gui-apps/waybar/files/waybar-0.9.7-libfmt-8.patch |
25 |
new file mode 100644 |
26 |
index 00000000000..8ffc8a42a9f |
27 |
--- /dev/null |
28 |
+++ b/gui-apps/waybar/files/waybar-0.9.7-libfmt-8.patch |
29 |
@@ -0,0 +1,32 @@ |
30 |
+https://bugs.gentoo.org/797649 |
31 |
+https://github.com/Alexays/Waybar/pull/1144 |
32 |
+ |
33 |
+From: John Helmert III <jchelmert3@××××××.net> |
34 |
+Date: Tue, 29 Jun 2021 21:29:12 -0500 |
35 |
+Subject: [PATCH] libfmt >=8.0.0 compatibility |
36 |
+--- a/include/util/format.hpp |
37 |
++++ b/include/util/format.hpp |
38 |
+@@ -35,7 +35,11 @@ namespace fmt { |
39 |
+ // The rationale for ignoring it is that the only reason to specify |
40 |
+ // an alignment and a with is to get a fixed width bar, and ">" is |
41 |
+ // sufficient in this implementation. |
42 |
++#if FMT_VERSION < 80000 |
43 |
+ width = parse_nonnegative_int(it, end, ctx); |
44 |
++#else |
45 |
++ width = detail::parse_nonnegative_int(it, end, -1); |
46 |
++#endif |
47 |
+ } |
48 |
+ return it; |
49 |
+ } |
50 |
+--- a/src/modules/clock.cpp |
51 |
++++ b/src/modules/clock.cpp |
52 |
+@@ -196,6 +196,9 @@ template <> |
53 |
+ struct fmt::formatter<waybar_time> : fmt::formatter<std::tm> { |
54 |
+ template <typename FormatContext> |
55 |
+ auto format(const waybar_time& t, FormatContext& ctx) { |
56 |
++#if FMT_VERSION >= 80000 |
57 |
++ auto& tm_format = specs; |
58 |
++#endif |
59 |
+ return format_to(ctx.out(), "{}", date::format(t.locale, fmt::to_string(tm_format), t.ztime)); |
60 |
+ } |
61 |
+ }; |
62 |
|
63 |
diff --git a/gui-apps/waybar/waybar-0.9.5-r1.ebuild b/gui-apps/waybar/waybar-0.9.5-r1.ebuild |
64 |
index 3247d86629b..9bc5d7b989d 100644 |
65 |
--- a/gui-apps/waybar/waybar-0.9.5-r1.ebuild |
66 |
+++ b/gui-apps/waybar/waybar-0.9.5-r1.ebuild |
67 |
@@ -50,6 +50,10 @@ DEPEND=" |
68 |
" |
69 |
RDEPEND="${DEPEND}" |
70 |
|
71 |
+PATCHES=( |
72 |
+ "${FILESDIR}/${PN}-0.9.7-libfmt-8.patch" |
73 |
+) |
74 |
+ |
75 |
src_configure() { |
76 |
local emesonargs=( |
77 |
$(meson_feature mpd) |
78 |
|
79 |
diff --git a/gui-apps/waybar/waybar-0.9.7-r1.ebuild b/gui-apps/waybar/waybar-0.9.7-r1.ebuild |
80 |
index 3247d86629b..aeaa8117b73 100644 |
81 |
--- a/gui-apps/waybar/waybar-0.9.7-r1.ebuild |
82 |
+++ b/gui-apps/waybar/waybar-0.9.7-r1.ebuild |
83 |
@@ -50,6 +50,10 @@ DEPEND=" |
84 |
" |
85 |
RDEPEND="${DEPEND}" |
86 |
|
87 |
+PATCHES=( |
88 |
+ "${FILESDIR}/${P}-libfmt-8.patch" |
89 |
+) |
90 |
+ |
91 |
src_configure() { |
92 |
local emesonargs=( |
93 |
$(meson_feature mpd) |