1 |
commit: 7740aaf860fb686e087e174158dacf4f7c8051b2 |
2 |
Author: Peter Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Jul 24 06:25:27 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 30 09:09:56 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7740aaf8 |
7 |
|
8 |
dev-cpp/yaml-cpp: Fix test failure with GCC-6 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=609176 |
11 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/5191 |
13 |
|
14 |
dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch | 44 ++++++++++++++++++++++++ |
15 |
dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild | 2 ++ |
16 |
2 files changed, 46 insertions(+) |
17 |
|
18 |
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..88ee25fa0ac |
21 |
--- /dev/null |
22 |
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch |
23 |
@@ -0,0 +1,44 @@ |
24 |
+Bug: https://bugs.gentoo.org/609176 |
25 |
+Upstream PR: https://github.com/jbeder/yaml-cpp/pull/514 |
26 |
+ |
27 |
+From a83a1b3a7bd0a5a4eb458d898b057f6a8d409b7e Mon Sep 17 00:00:00 2001 |
28 |
+From: Peter-Levine <plevine457@×××××.com> |
29 |
+Date: Mon, 24 Jul 2017 02:00:24 -0400 |
30 |
+Subject: [PATCH] Fix segfault in gmock when running tests |
31 |
+ |
32 |
+Taken from https://github.com/google/googletest/issues/705#issuecomment-235067917 |
33 |
+--- |
34 |
+ test/gmock-1.7.0/include/gmock/gmock-spec-builders.h | 6 ++++-- |
35 |
+ 1 file changed, 4 insertions(+), 2 deletions(-) |
36 |
+ |
37 |
+diff --git a/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h b/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h |
38 |
+index 312fbe87..2dd733b6 100644 |
39 |
+--- a/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h |
40 |
++++ b/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h |
41 |
+@@ -1370,6 +1370,8 @@ class ActionResultHolder : public UntypedActionResultHolderBase { |
42 |
+ template <> |
43 |
+ class ActionResultHolder<void> : public UntypedActionResultHolderBase { |
44 |
+ public: |
45 |
++ explicit ActionResultHolder() {} |
46 |
++ |
47 |
+ void GetValueAndDelete() const { delete this; } |
48 |
+ |
49 |
+ virtual void PrintAsActionResult(::std::ostream* /* os */) const {} |
50 |
+@@ -1381,7 +1383,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase { |
51 |
+ const typename Function<F>::ArgumentTuple& args, |
52 |
+ const string& call_description) { |
53 |
+ func_mocker->PerformDefaultAction(args, call_description); |
54 |
+- return NULL; |
55 |
++ return new ActionResultHolder(); |
56 |
+ } |
57 |
+ |
58 |
+ // Performs the given action and returns NULL. |
59 |
+@@ -1390,7 +1392,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase { |
60 |
+ const Action<F>& action, |
61 |
+ const typename Function<F>::ArgumentTuple& args) { |
62 |
+ action.Perform(args); |
63 |
+- return NULL; |
64 |
++ return new ActionResultHolder(); |
65 |
+ } |
66 |
+ }; |
67 |
+ |
68 |
|
69 |
diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild |
70 |
index a857f75d61b..503d7e2b9ff 100644 |
71 |
--- a/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild |
72 |
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild |
73 |
@@ -19,6 +19,8 @@ RDEPEND="${DEPEND}" |
74 |
|
75 |
S="${WORKDIR}/${PN}-release-${PV}" |
76 |
|
77 |
+PATCHES=( "${FILESDIR}"/${P}-gcc6.patch ) |
78 |
+ |
79 |
src_prepare() { |
80 |
sed -i \ |
81 |
-e 's:INCLUDE_INSTALL_ROOT_DIR:INCLUDE_INSTALL_DIR:g' \ |