From 0faa0ebcc333dc0fcaee717b6dbf591415037a25 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 30 May 2012 16:05:04 -0400 Subject: [PATCH] gmock: pull gcc-4.7 fix from upstream BUG=None TEST=`emerge-amd64-generic gmock` worked TEST=`emerge-arm-generic gmock` worked TEST=`emerge-x86-generic gmock` worked Change-Id: Iccc6379d5e814ad959d077d78efbf2c6aa4ca364 Reviewed-on: https://gerrit.chromium.org/gerrit/24063 Reviewed-by: Han Shen Reviewed-by: Han Shen Tested-by: Mike Frysinger Commit-Ready: Mike Frysinger --- .../gmock/files/gmock-1.4.0-gcc-4.7.patch | 189 ++++++++++++++++++ .../dev-cpp/gmock/gmock-1.4.0.ebuild | 9 +- 2 files changed, 194 insertions(+), 4 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-cpp/gmock/files/gmock-1.4.0-gcc-4.7.patch diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gmock/files/gmock-1.4.0-gcc-4.7.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/gmock/files/gmock-1.4.0-gcc-4.7.patch new file mode 100644 index 0000000000..fa678220f2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gmock/files/gmock-1.4.0-gcc-4.7.patch @@ -0,0 +1,189 @@ +taken from upstream repo + +Index: include/gmock/gmock-generated-function-mockers.h.pump +=================================================================== +--- include/gmock/gmock-generated-function-mockers.h.pump (revision 227) ++++ include/gmock/gmock-generated-function-mockers.h.pump (revision 228) +@@ -45,10 +45,6 @@ $var n = 10 $$ The maximum arity we sup + #include + + namespace testing { +- +-template +-class MockSpec; +- + namespace internal { + + template +@@ -89,7 +85,11 @@ $if i >= 1 [[ + } + + R Invoke($Aas) { +- return InvokeWith(ArgumentTuple($as)); ++ // Even though gcc and MSVC don't enforce it, 'this->' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple($as)); + } + }; + +Index: include/gmock/gmock-generated-function-mockers.h +=================================================================== +--- include/gmock/gmock-generated-function-mockers.h (revision 227) ++++ include/gmock/gmock-generated-function-mockers.h (revision 228) +@@ -42,10 +42,6 @@ + #include + + namespace testing { +- +-template +-class MockSpec; +- + namespace internal { + + template +@@ -71,7 +67,11 @@ class FunctionMocker : public + } + + R Invoke() { +- return InvokeWith(ArgumentTuple()); ++ // Even though gcc and MSVC don't enforce it, 'this->' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple()); + } + }; + +@@ -88,7 +88,11 @@ class FunctionMocker : public + } + + R Invoke(A1 a1) { +- return InvokeWith(ArgumentTuple(a1)); ++ // Even though gcc and MSVC don't enforce it, 'this->' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1)); + } + }; + +@@ -105,7 +109,11 @@ class FunctionMocker : public + } + + R Invoke(A1 a1, A2 a2) { +- return InvokeWith(ArgumentTuple(a1, a2)); ++ // Even though gcc and MSVC don't enforce it, 'this->' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2)); + } + }; + +@@ -123,7 +131,11 @@ class FunctionMocker : pu + } + + R Invoke(A1 a1, A2 a2, A3 a3) { +- return InvokeWith(ArgumentTuple(a1, a2, a3)); ++ // Even though gcc and MSVC don't enforce it, 'this->' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2, a3)); + } + }; + +@@ -141,7 +153,11 @@ class FunctionMocker + } + + R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) { +- return InvokeWith(ArgumentTuple(a1, a2, a3, a4)); ++ // Even though gcc and MSVC don't enforce it, 'this->' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4)); + } + }; + +@@ -161,7 +177,11 @@ class FunctionMocker' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5)); + } + }; + +@@ -182,7 +202,11 @@ class FunctionMocker' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6)); + } + }; + +@@ -203,7 +227,11 @@ class FunctionMocker' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7)); + } + }; + +@@ -224,7 +252,11 @@ class FunctionMocker' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8)); + } + }; + +@@ -246,7 +278,11 @@ class FunctionMocker' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9)); + } + }; + +@@ -270,7 +306,12 @@ class FunctionMocker' is required ++ // by the C++ standard [14.6.4] here, as the base class type is ++ // dependent on the template argument (and thus shouldn't be ++ // looked into when resolving InvokeWith). ++ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9, ++ a10)); + } + }; + diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gmock/gmock-1.4.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/gmock/gmock-1.4.0.ebuild index e68412d585..8f8d65d114 100644 --- a/sdk_container/src/third_party/portage-stable/dev-cpp/gmock/gmock-1.4.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gmock/gmock-1.4.0.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-cpp/gmock/gmock-1.5.0.ebuild,v 1.2 2011/11/11 20:12:12 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-cpp/gmock/gmock-1.4.0.ebuild,v 1.3 2012/05/30 20:03:47 vapier Exp $ EAPI="4" -inherit libtool +inherit libtool eutils DESCRIPTION="Google's C++ mocking framework" HOMEPAGE="http://code.google.com/p/googlemock/" @@ -25,6 +25,7 @@ src_unpack() { } src_prepare() { + epatch "${FILESDIR}"/${P}-gcc-4.7.patch elibtoolize } @@ -34,5 +35,5 @@ src_configure() { src_install() { default - use static-libs || find "${D}" -name '*.la' -delete + use static-libs || find "${ED}"/usr -name '*.la' -delete }