diff --git a/waybar-9.7-fmt-compat.patch b/waybar-9.7-fmt-compat.patch new file mode 100644 index 0000000..2329c39 --- /dev/null +++ b/waybar-9.7-fmt-compat.patch @@ -0,0 +1,40 @@ +From 368e4813de5356332d1167e8200cb5633e772ed6 Mon Sep 17 00:00:00 2001 +From: John Helmert III +Date: Tue, 29 Jun 2021 21:29:12 -0500 +Subject: [PATCH] libfmt >=8.0.0 compatibility + +--- + include/util/format.hpp | 4 ++++ + src/modules/clock.cpp | 3 +++ + 2 files changed, 7 insertions(+) + +diff --git a/include/util/format.hpp b/include/util/format.hpp +index 288d8f0cd..543a100fb 100644 +--- 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; + } +diff --git a/src/modules/clock.cpp b/src/modules/clock.cpp +index 22bedc783..82c570102 100644 +--- a/src/modules/clock.cpp ++++ b/src/modules/clock.cpp +@@ -196,6 +196,9 @@ template <> + struct fmt::formatter : fmt::formatter { + template + 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/waybar.changes b/waybar.changes index d5593f9..f0d00f0 100644 --- a/waybar.changes +++ b/waybar.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 13 09:50:00 UTC 2021 - Michael Vetter + +- bsc#1188200 - waybar undefined symbol: + Add waybar-9.7-fmt-compat.patch + ------------------------------------------------------------------- Mon Apr 19 12:01:41 UTC 2021 - Michael Vetter diff --git a/waybar.spec b/waybar.spec index 3b72921..e482f44 100644 --- a/waybar.spec +++ b/waybar.spec @@ -27,6 +27,7 @@ URL: https://github.com/Alexays/Waybar # to get the `date` dependency. and create own tarball #Source: https://github.com/Alexays/Waybar/archive/%{version}.tar.gz Source: %{version}.tar.xz +Patch0: waybar-9.7-fmt-compat.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gtk-layer-shell-devel