1 |
commit: ac45361a557b7bc4a540754e6582854712385df5 |
2 |
Author: Peter Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Aug 1 00:20:27 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 13 11:09:14 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac45361a |
7 |
|
8 |
dev-cpp/gmock: Fix test failure with GCC-6 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=602158 |
11 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/5262 |
13 |
|
14 |
dev-cpp/gmock/files/gmock-1.7.0-gcc6.patch | 32 ++++++++++++++++++++++++++++++ |
15 |
dev-cpp/gmock/gmock-1.7.0-r1.ebuild | 6 ++++-- |
16 |
2 files changed, 36 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/dev-cpp/gmock/files/gmock-1.7.0-gcc6.patch b/dev-cpp/gmock/files/gmock-1.7.0-gcc6.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..58a78462d60 |
21 |
--- /dev/null |
22 |
+++ b/dev-cpp/gmock/files/gmock-1.7.0-gcc6.patch |
23 |
@@ -0,0 +1,32 @@ |
24 |
+Bug: https://bugs.gentoo.org/602158 |
25 |
+Patch: https://github.com/google/googletest/issues/705#issuecomment-235067917 |
26 |
+ |
27 |
+--- a/include/gmock/gmock-spec-builders.h |
28 |
++++ b/include/gmock/gmock-spec-builders.h |
29 |
+@@ -1370,6 +1370,8 @@ |
30 |
+ template <> |
31 |
+ class ActionResultHolder<void> : public UntypedActionResultHolderBase { |
32 |
+ public: |
33 |
++ explicit ActionResultHolder() {} |
34 |
++ |
35 |
+ void GetValueAndDelete() const { delete this; } |
36 |
+ |
37 |
+ virtual void PrintAsActionResult(::std::ostream* /* os */) const {} |
38 |
+@@ -1381,7 +1383,7 @@ |
39 |
+ const typename Function<F>::ArgumentTuple& args, |
40 |
+ const string& call_description) { |
41 |
+ func_mocker->PerformDefaultAction(args, call_description); |
42 |
+- return NULL; |
43 |
++ return new ActionResultHolder(); |
44 |
+ } |
45 |
+ |
46 |
+ // Performs the given action and returns NULL. |
47 |
+@@ -1390,7 +1392,7 @@ |
48 |
+ const Action<F>& action, |
49 |
+ const typename Function<F>::ArgumentTuple& args) { |
50 |
+ action.Perform(args); |
51 |
+- return NULL; |
52 |
++ return new ActionResultHolder(); |
53 |
+ } |
54 |
+ }; |
55 |
+ |
56 |
|
57 |
diff --git a/dev-cpp/gmock/gmock-1.7.0-r1.ebuild b/dev-cpp/gmock/gmock-1.7.0-r1.ebuild |
58 |
index 2bc06efec1e..42e424f63b8 100644 |
59 |
--- a/dev-cpp/gmock/gmock-1.7.0-r1.ebuild |
60 |
+++ b/dev-cpp/gmock/gmock-1.7.0-r1.ebuild |
61 |
@@ -1,11 +1,11 @@ |
62 |
-# Copyright 1999-2015 Gentoo Foundation |
63 |
+# Copyright 1999-2017 Gentoo Foundation |
64 |
# Distributed under the terms of the GNU General Public License v2 |
65 |
|
66 |
EAPI="4" |
67 |
|
68 |
PYTHON_COMPAT=( python2_7 ) |
69 |
|
70 |
-inherit libtool multilib-minimal python-any-r1 |
71 |
+inherit epatch libtool multilib-minimal python-any-r1 |
72 |
|
73 |
DESCRIPTION="Google's C++ mocking framework" |
74 |
HOMEPAGE="https://github.com/google/googlemock" |
75 |
@@ -34,6 +34,8 @@ src_unpack() { |
76 |
} |
77 |
|
78 |
src_prepare() { |
79 |
+ epatch "${FILESDIR}"/${P}-gcc6.patch |
80 |
+ |
81 |
sed -i -r \ |
82 |
-e '/^install-(data|exec)-local:/s|^.*$|&\ndisabled-&|' \ |
83 |
Makefile.in |