This should fix build on ancient hosts Signed-off-by: Andreas Müller <schnitzelt...@gmail.com> --- ...uce-gcc-required-support-downto-c-11.patch | 34 ++++++++++++++ ...001-Revert-parser-glue-Use-std-clamp.patch | 44 +++++++++++++++++++ ...replace-std-clamp-by-std-min-std-max.patch | 33 ++++++++++++++ meta/recipes-support/vte/vte_0.56.1.bb | 7 +++ 4 files changed, 118 insertions(+) create mode 100644 meta/recipes-support/vte/vte/0001-Reduce-gcc-required-support-downto-c-11.patch create mode 100644 meta/recipes-support/vte/vte/0001-Revert-parser-glue-Use-std-clamp.patch create mode 100644 meta/recipes-support/vte/vte/0001-vte.cc-replace-std-clamp-by-std-min-std-max.patch
diff --git a/meta/recipes-support/vte/vte/0001-Reduce-gcc-required-support-downto-c-11.patch b/meta/recipes-support/vte/vte/0001-Reduce-gcc-required-support-downto-c-11.patch new file mode 100644 index 0000000000..9c839d6d26 --- /dev/null +++ b/meta/recipes-support/vte/vte/0001-Reduce-gcc-required-support-downto-c-11.patch @@ -0,0 +1,34 @@ +From 6d33f959f442f1338846f6f80e826f1345951b57 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzelt...@gmail.com> +Date: Sat, 27 Apr 2019 12:52:03 +0200 +Subject: [PATCH] Reduce gcc required support downto c++11 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Native builds require host gcc and they might not support full c++17 but enough +to build vte-native. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Andreas Müller <schnitzelt...@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 1c7a753b..698e795d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -97,7 +97,7 @@ AC_HEADER_STDC + AM_PROG_CC_C_O + AC_PROG_SED + +-AX_CXX_COMPILE_STDCXX([17]) ++AX_CXX_COMPILE_STDCXX([11]) + + AC_SYS_LARGEFILE + +-- +2.20.1 + diff --git a/meta/recipes-support/vte/vte/0001-Revert-parser-glue-Use-std-clamp.patch b/meta/recipes-support/vte/vte/0001-Revert-parser-glue-Use-std-clamp.patch new file mode 100644 index 0000000000..581996d3c4 --- /dev/null +++ b/meta/recipes-support/vte/vte/0001-Revert-parser-glue-Use-std-clamp.patch @@ -0,0 +1,44 @@ +From 9e562ebaf4c01f864cd5791ad759465cb32a9dc5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzelt...@gmail.com> +Date: Sat, 27 Apr 2019 13:03:33 +0200 +Subject: [PATCH] Revert "parser: glue: Use std::clamp" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +std::clamp requires c++17 + +Upstream-Status: Inappropriate [configuration] + +This reverts commit 1a84c427cd2ea05939b86eb47c21a437d0ce6d79. + +Signed-off-by: Andreas Müller <schnitzelt...@gmail.com> +--- + src/parser-glue.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/parser-glue.hh b/src/parser-glue.hh +index c12bb784..9c23a0a3 100644 +--- a/src/parser-glue.hh ++++ b/src/parser-glue.hh +@@ -281,7 +281,7 @@ public: + int max_v) const noexcept + { + auto v = param(idx, default_v); +- return std::clamp(v, min_v, max_v); ++ return std::min(std::max(v, min_v), max_v); + } + + /* param_nonfinal: +@@ -381,7 +381,7 @@ public: + int max_v) const noexcept + { + int v = __builtin_expect(idx < size(), 1) ? vte_seq_arg_value_final(m_seq->args[idx], default_v) : default_v; +- return std::clamp(v, min_v, max_v); ++ return std::min(std::max(v, min_v), max_v); + } + + /* collect_subparams: +-- +2.20.1 + diff --git a/meta/recipes-support/vte/vte/0001-vte.cc-replace-std-clamp-by-std-min-std-max.patch b/meta/recipes-support/vte/vte/0001-vte.cc-replace-std-clamp-by-std-min-std-max.patch new file mode 100644 index 0000000000..ef53458858 --- /dev/null +++ b/meta/recipes-support/vte/vte/0001-vte.cc-replace-std-clamp-by-std-min-std-max.patch @@ -0,0 +1,33 @@ +From db3b9cceb55130b0a4b3414be804530c368ececc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzelt...@gmail.com> +Date: Sat, 27 Apr 2019 13:22:52 +0200 +Subject: [PATCH] vte.cc: replace std:clamp by std:min(std:max(..)..) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +std::clamp requires c++17 + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Andreas Müller <schnitzelt...@gmail.com> +--- + src/vte.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vte.cc b/src/vte.cc +index 0aa9a3fc..c9faab49 100644 +--- a/src/vte.cc ++++ b/src/vte.cc +@@ -5125,7 +5125,7 @@ Terminal::resolve_selection_endpoint(vte::grid::halfcoords const& rowcolhalf, bo + /* Just find the nearest cell boundary within the line, not caring about CJKs, unused + * cells, or wrapping at EOL. The @after parameter is unused in this mode. */ + col += half; +- col = std::clamp (col, 0L, m_column_count); ++ col = std::min (std::max(col, 0L), m_column_count); + } else { + switch (m_selection_type) { + case selection_type_char: +-- +2.20.1 + diff --git a/meta/recipes-support/vte/vte_0.56.1.bb b/meta/recipes-support/vte/vte_0.56.1.bb index 3585e9ce57..bc49809521 100644 --- a/meta/recipes-support/vte/vte_0.56.1.bb +++ b/meta/recipes-support/vte/vte_0.56.1.bb @@ -19,6 +19,13 @@ SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch \ file://0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch \ file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \ " + +SRC_URI_append_class-native = " \ + file://0001-Reduce-gcc-required-support-downto-c-11.patch \ + file://0001-Revert-parser-glue-Use-std-clamp.patch \ + file://0001-vte.cc-replace-std-clamp-by-std-min-std-max.patch \ +" + SRC_URI[archive.md5sum] = "a8984cd5a101dbff0b0c875d1de3f692" SRC_URI[archive.sha256sum] = "02fa8ecc02a9332e47f486795494527b5687b3bd448e73e6b67285f2f326dc7c" -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core