Skip to content

Commit

Permalink
feat: update fmtlib to 10.1.1+ds1-4
Browse files Browse the repository at this point in the history
  • Loading branch information
deepin-community-bot[bot] authored and Zeno-sole committed Nov 7, 2024
1 parent c3b6fdd commit 8a7ba96
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
13 changes: 13 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
fmtlib (10.1.1+ds1-4) unstable; urgency=medium

* Backport patch to fix handling FMT_STATIC_THOUSANDS_SEPARATOR
(Closes: #1086722)

-- Shengjing Zhu <[email protected]> Tue, 05 Nov 2024 02:46:03 +0800

fmtlib (10.1.1+ds1-3) unstable; urgency=medium

* Upload to unstable (Closes: #1072674)

-- Shengjing Zhu <[email protected]> Mon, 04 Nov 2024 17:39:56 +0800

fmtlib (10.1.1+ds1-2) experimental; urgency=medium

* Fix build with Sphinx 7 (Closes: #1042588)
Expand Down
34 changes: 34 additions & 0 deletions debian/patches/0007-Fix-handling-of-static-separator.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From: Victor Zverovich <[email protected]>
Date: Fri, 9 Feb 2024 15:58:56 -0800
Subject: Fix handling of static separator

Origin: backport, https://github.com/fmtlib/fmt/commit/44c3fe1e
---
include/fmt/format-inl.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h
index dac2d43..21772c1 100644
--- a/include/fmt/format-inl.h
+++ b/include/fmt/format-inl.h
@@ -114,7 +114,11 @@ template <typename Char> FMT_FUNC Char decimal_point_impl(locale_ref) {

FMT_FUNC auto write_loc(appender out, loc_value value,
const format_specs<>& specs, locale_ref loc) -> bool {
-#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
+#ifdef FMT_STATIC_THOUSANDS_SEPARATOR
+ value.visit(loc_writer<>{
+ out, specs, std::string(1, FMT_STATIC_THOUSANDS_SEPARATOR), "\3", "."});
+ return true;
+#else
auto locale = loc.get<std::locale>();
// We cannot use the num_put<char> facet because it may produce output in
// a wrong encoding.
@@ -123,7 +127,6 @@ FMT_FUNC auto write_loc(appender out, loc_value value,
return std::use_facet<facet>(locale).put(out, value, specs);
return facet(locale).put(out, value, specs);
#endif
- return false;
}
} // namespace detail

1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
0004-Doc-unwanted-download-links-in-doc-layout.html.patch
0005-Doc-unwanted-GitHub-iframe.patch
0006-Doc-build-with-Sphinx-7.patch
0007-Fix-handling-of-static-separator.patch

0 comments on commit 8a7ba96

Please sign in to comment.