diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2021-07-12 06:21:02 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2021-07-12 10:59:15 -0400 |
commit | 209673f3c76e5589ba6776a81eab44a01daa0cc6 (patch) | |
tree | f5cf7780340cbc5032f9272c4ecfa965a35fe262 /gui-apps | |
parent | app-editors/emacs: Bump to EAPI 8 (diff) | |
download | gentoo-209673f3c76e5589ba6776a81eab44a01daa0cc6.tar.gz gentoo-209673f3c76e5589ba6776a81eab44a01daa0cc6.tar.bz2 gentoo-209673f3c76e5589ba6776a81eab44a01daa0cc6.zip |
gui-apps/waybar: fix build with libfmt-8
Backport of the upstreamed fix.
(no real credit goes to me, only adjusted PR with maintainer's ack)
Closes: https://bugs.gentoo.org/797649
Closes: https://github.com/gentoo/gentoo/pull/21506
Signed-off-by: Jonas Toth <gentoo@jonas-toth.eu>
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'gui-apps')
-rw-r--r-- | gui-apps/waybar/files/waybar-0.9.7-libfmt-8.patch | 32 | ||||
-rw-r--r-- | gui-apps/waybar/waybar-0.9.5-r1.ebuild | 4 | ||||
-rw-r--r-- | gui-apps/waybar/waybar-0.9.7-r1.ebuild | 4 |
3 files changed, 40 insertions, 0 deletions
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 new file mode 100644 index 000000000000..8ffc8a42a9f1 --- /dev/null +++ b/gui-apps/waybar/files/waybar-0.9.7-libfmt-8.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/797649 +https://github.com/Alexays/Waybar/pull/1144 + +From: John Helmert III <jchelmert3@posteo.net> +Date: Tue, 29 Jun 2021 21:29:12 -0500 +Subject: [PATCH] libfmt >=8.0.0 compatibility +--- a/include/util/format.hpp ++++ b/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; + } +--- a/src/modules/clock.cpp ++++ b/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)); + } + }; diff --git a/gui-apps/waybar/waybar-0.9.5-r1.ebuild b/gui-apps/waybar/waybar-0.9.5-r1.ebuild index 3247d86629bc..9bc5d7b989d9 100644 --- a/gui-apps/waybar/waybar-0.9.5-r1.ebuild +++ b/gui-apps/waybar/waybar-0.9.5-r1.ebuild @@ -50,6 +50,10 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}/${PN}-0.9.7-libfmt-8.patch" +) + src_configure() { local emesonargs=( $(meson_feature mpd) diff --git a/gui-apps/waybar/waybar-0.9.7-r1.ebuild b/gui-apps/waybar/waybar-0.9.7-r1.ebuild index 3247d86629bc..aeaa8117b737 100644 --- a/gui-apps/waybar/waybar-0.9.7-r1.ebuild +++ b/gui-apps/waybar/waybar-0.9.7-r1.ebuild @@ -50,6 +50,10 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}/${P}-libfmt-8.patch" +) + src_configure() { local emesonargs=( $(meson_feature mpd) |