summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-08-29 09:58:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-30 21:59:38 +0100
commit9ec017b0fda465cde08a1098afa977e8c5006f5e (patch)
treedce725f8441b01c32b7386331c72ea2ba5822ba9 /meta/recipes-devtools
parent5a036fd74506eabefaad9227d171f5e8c3a1418c (diff)
downloadpoky-9ec017b0fda465cde08a1098afa977e8c5006f5e.tar.gz
fmt: Get rid of std::copy
(From OE-Core rev: 9549d4aeb3dc1abb81fd6d01a340a2f99b69fdba) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/fmt/fmt/0001-Get-rid-of-std-copy.patch52
-rw-r--r--meta/recipes-devtools/fmt/fmt_11.0.2.bb4
2 files changed, 55 insertions, 1 deletions
diff --git a/meta/recipes-devtools/fmt/fmt/0001-Get-rid-of-std-copy.patch b/meta/recipes-devtools/fmt/fmt/0001-Get-rid-of-std-copy.patch
new file mode 100644
index 0000000000..1b495ea075
--- /dev/null
+++ b/meta/recipes-devtools/fmt/fmt/0001-Get-rid-of-std-copy.patch
@@ -0,0 +1,52 @@
1From 6e462b89aa22fd5f737ed162d0150e145ccb1914 Mon Sep 17 00:00:00 2001
2From: Victor Zverovich <viz@meta.com>
3Date: Mon, 29 Jul 2024 15:58:05 -0700
4Subject: [PATCH] Get rid of std::copy
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Upstream-Status: Backport [https://github.com/fmtlib/fmt/commit/6e462b89aa22fd5f737ed162d0150e145ccb1914]
8---
9 include/fmt/color.h | 11 +++++------
10 1 file changed, 5 insertions(+), 6 deletions(-)
11
12diff --git a/include/fmt/color.h b/include/fmt/color.h
13index f0e9dd94..231d93c8 100644
14--- a/include/fmt/color.h
15+++ b/include/fmt/color.h
16@@ -560,31 +560,30 @@ struct formatter<detail::styled_arg<T>, Char> : formatter<T, Char> {
17 auto format(const detail::styled_arg<T>& arg, FormatContext& ctx) const
18 -> decltype(ctx.out()) {
19 const auto& ts = arg.style;
20- const auto& value = arg.value;
21 auto out = ctx.out();
22
23 bool has_style = false;
24 if (ts.has_emphasis()) {
25 has_style = true;
26 auto emphasis = detail::make_emphasis<Char>(ts.get_emphasis());
27- out = std::copy(emphasis.begin(), emphasis.end(), out);
28+ out = detail::copy<Char>(emphasis.begin(), emphasis.end(), out);
29 }
30 if (ts.has_foreground()) {
31 has_style = true;
32 auto foreground =
33 detail::make_foreground_color<Char>(ts.get_foreground());
34- out = std::copy(foreground.begin(), foreground.end(), out);
35+ out = detail::copy<Char>(foreground.begin(), foreground.end(), out);
36 }
37 if (ts.has_background()) {
38 has_style = true;
39 auto background =
40 detail::make_background_color<Char>(ts.get_background());
41- out = std::copy(background.begin(), background.end(), out);
42+ out = detail::copy<Char>(background.begin(), background.end(), out);
43 }
44- out = formatter<T, Char>::format(value, ctx);
45+ out = formatter<T, Char>::format(arg.value, ctx);
46 if (has_style) {
47 auto reset_color = string_view("\x1b[0m");
48- out = std::copy(reset_color.begin(), reset_color.end(), out);
49+ out = detail::copy<Char>(reset_color.begin(), reset_color.end(), out);
50 }
51 return out;
52 }
diff --git a/meta/recipes-devtools/fmt/fmt_11.0.2.bb b/meta/recipes-devtools/fmt/fmt_11.0.2.bb
index 5a7041088c..5c60921efa 100644
--- a/meta/recipes-devtools/fmt/fmt_11.0.2.bb
+++ b/meta/recipes-devtools/fmt/fmt_11.0.2.bb
@@ -4,7 +4,9 @@ HOMEPAGE = "https://fmt.dev"
4LICENSE = "MIT" 4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=b9257785fc4f3803a4b71b76c1412729" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=b9257785fc4f3803a4b71b76c1412729"
6 6
7SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https" 7SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https \
8 file://0001-Get-rid-of-std-copy.patch \
9 "
8SRCREV = "0c9fce2ffefecfdce794e1859584e25877b7b592" 10SRCREV = "0c9fce2ffefecfdce794e1859584e25877b7b592"
9 11
10S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"