From aaef5bfc29b49cf34c8f47712b96fb79eb72364f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 23 May 2012 12:06:40 -0400 Subject: [PATCH] gtest: sync with upstream Gentoo This includes a fix for building with gcc-4.7. BUG=None TEST=`emerge gtest` works TEST=`emerge-amd64-generic gtest` works TEST=`emerge-arm-generic gtest` works TEST=`emerge-x86-generic gtest` works Change-Id: I65984c3b362be2ae3fbc3ec0f7d4fdfd939f361d Reviewed-on: https://gerrit.chromium.org/gerrit/23357 Reviewed-by: Yunlian Jiang Reviewed-by: Han Shen Commit-Ready: Mike Frysinger Tested-by: Mike Frysinger --- .../gtest/files/gtest-1.4.0-gcc-4.7.patch | 32 +++++++++++++++++++ .../dev-cpp/gtest/gtest-1.4.0.ebuild | 7 ++-- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.4.0-gcc-4.7.patch diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.4.0-gcc-4.7.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.4.0-gcc-4.7.patch new file mode 100644 index 0000000000..05c2700048 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.4.0-gcc-4.7.patch @@ -0,0 +1,32 @@ +fix for upstream for building with newer gcc versions + +r339 | zhanyong.wan | 2009-11-12 21:54:23 -0500 (Thu, 12 Nov 2009) | 2 lines + +...; makes gtest-param-util-generated.h conform to the C++ standard (by Zhanyong Wan). + +Index: include/gtest/internal/gtest-param-util-generated.h +=================================================================== +--- include/gtest/internal/gtest-param-util-generated.h (revision 338) ++++ include/gtest/internal/gtest-param-util-generated.h (revision 339) +@@ -53,6 +53,21 @@ + #if GTEST_HAS_PARAM_TEST + + namespace testing { ++ ++// Forward declarations of ValuesIn(), which is implemented in ++// include/gtest/gtest-param-test.h. ++template ++internal::ParamGenerator< ++ typename ::std::iterator_traits::value_type> ValuesIn( ++ ForwardIterator begin, ForwardIterator end); ++ ++template ++internal::ParamGenerator ValuesIn(const T (&array)[N]); ++ ++template ++internal::ParamGenerator ValuesIn( ++ const Container& container); ++ + namespace internal { + + // Used in the Values() function to provide polymorphic capabilities. diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.4.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.4.0.ebuild index 16f7da2415..057f590fc4 100644 --- a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.4.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.4.0.ebuild @@ -1,6 +1,6 @@ -# 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/gtest/gtest-1.4.0.ebuild,v 1.1 2011/11/11 20:09:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-cpp/gtest/gtest-1.4.0.ebuild,v 1.2 2012/04/20 18:18:06 vapier Exp $ EAPI="2" inherit autotools eutils @@ -20,7 +20,8 @@ RDEPEND="" src_prepare() { sed -i -e "s|/tmp|${T}|g" test/gtest-filepath_test.cc || die "sed failed" - epatch "${FILESDIR}/${P}-asneeded.patch" + epatch "${FILESDIR}"/${P}-asneeded.patch + epatch "${FILESDIR}"/${P}-gcc-4.7.patch eautoreconf }