summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2022-05-25 17:39:58 +0200
committerJoonas Niilola <juippis@gentoo.org>2022-06-12 10:18:43 +0300
commit70fc26d37bf73f9a8d1730c1637009b20efc13ad (patch)
tree117e315dcd9623e21c46c8b632489e5fe664a036 /dev-cpp/doctest
parentdev-cpp/doctest: drop 2.4.7 (diff)
downloadgentoo-70fc26d37bf73f9a8d1730c1637009b20efc13ad.tar.gz
gentoo-70fc26d37bf73f9a8d1730c1637009b20efc13ad.tar.bz2
gentoo-70fc26d37bf73f9a8d1730c1637009b20efc13ad.zip
dev-cpp/doctest: fix tests with move-only types
This is a fix of a bug which affects mail-filter/rspamd-3.{1,2}. The patch is derived from upstream commit ce13bc44b99c ("Fix move-only types failing to decompose correctly (#634)"). Upstream-PR: https://github.com/doctest/doctest/pull/634 Bug: https://bugs.gentoo.org/830624 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-cpp/doctest')
-rw-r--r--dev-cpp/doctest/doctest-2.4.8-r1.ebuild (renamed from dev-cpp/doctest/doctest-2.4.8.ebuild)4
-rw-r--r--dev-cpp/doctest/files/doctest-2.4.8-move-only-types-fix.patch56
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-cpp/doctest/doctest-2.4.8.ebuild b/dev-cpp/doctest/doctest-2.4.8-r1.ebuild
index fa60bdec8854..e611f524f5fa 100644
--- a/dev-cpp/doctest/doctest-2.4.8.ebuild
+++ b/dev-cpp/doctest/doctest-2.4.8-r1.ebuild
@@ -15,6 +15,10 @@ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}/${P}-move-only-types-fix.patch" # bug 830624
+)
+
src_configure() {
local mycmakeargs=(
-DDOCTEST_WITH_TESTS=$(usex test)
diff --git a/dev-cpp/doctest/files/doctest-2.4.8-move-only-types-fix.patch b/dev-cpp/doctest/files/doctest-2.4.8-move-only-types-fix.patch
new file mode 100644
index 000000000000..1a0343282685
--- /dev/null
+++ b/dev-cpp/doctest/files/doctest-2.4.8-move-only-types-fix.patch
@@ -0,0 +1,56 @@
+This patch is derived from upstream commit ce13bc44b99c ("Fix move-only
+types failing to decompose correctly (#634)").
+
+Upstream-PR: https://github.com/doctest/doctest/pull/634
+
+diff --git a/doctest/doctest.h b/doctest/doctest.h
+index d25f526..31096ff 100644
+--- a/doctest/doctest.h
++++ b/doctest/doctest.h
+@@ -1320,7 +1320,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-comparison")
+ assertType::Enum m_at;
+
+ explicit Expression_lhs(L&& in, assertType::Enum at)
+- : lhs(doctest::detail::forward<L>(in))
++ : lhs(static_cast<L&&>(in))
+ , m_at(at) {}
+
+ DOCTEST_NOINLINE operator Result() {
+@@ -1394,8 +1394,8 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP
+ // https://github.com/catchorg/Catch2/issues/870
+ // https://github.com/catchorg/Catch2/issues/565
+ template <typename L>
+- Expression_lhs<const L> operator<<(const L &&operand) {
+- return Expression_lhs<const L>(doctest::detail::forward<const L>(operand), m_at);
++ Expression_lhs<L> operator<<(L&& operand) {
++ return Expression_lhs<L>(static_cast<L&&>(operand), m_at);
+ }
+
+ template <typename L,typename enable_if<!doctest::detail::is_rvalue_reference<L>::value,void >::type* = nullptr>
+diff --git a/doctest/parts/doctest_fwd.h b/doctest/parts/doctest_fwd.h
+index b0d786f..ff9fed0 100644
+--- a/doctest/parts/doctest_fwd.h
++++ b/doctest/parts/doctest_fwd.h
+@@ -1317,7 +1317,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-comparison")
+ assertType::Enum m_at;
+
+ explicit Expression_lhs(L&& in, assertType::Enum at)
+- : lhs(doctest::detail::forward<L>(in))
++ : lhs(static_cast<L&&>(in))
+ , m_at(at) {}
+
+ DOCTEST_NOINLINE operator Result() {
+@@ -1391,8 +1391,8 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP
+ // https://github.com/catchorg/Catch2/issues/870
+ // https://github.com/catchorg/Catch2/issues/565
+ template <typename L>
+- Expression_lhs<const L> operator<<(const L &&operand) {
+- return Expression_lhs<const L>(doctest::detail::forward<const L>(operand), m_at);
++ Expression_lhs<L> operator<<(L&& operand) {
++ return Expression_lhs<L>(static_cast<L&&>(operand), m_at);
+ }
+
+ template <typename L,typename enable_if<!doctest::detail::is_rvalue_reference<L>::value,void >::type* = nullptr>
+--
+2.35.1
+