From 1af8929e779b9ceb62200ca5ae24a0ca2958f0c1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 11 Nov 2011 15:16:18 -0500 Subject: [PATCH] gtest: import from upstream Gentoo The upstream Gentoo version of the gtest ebuild should cover all our existing needs, but it also includes some build fixes which make cross compiling work nicely (regenerating libtool to avoid relink failures). BUG=chromium-os:21276 TEST=`emerge-arm-generic gtest` works w/out -I/-L hacks TEST=`emerge-x86-generic gtest` still works TEST=`emerge gtest` still works Change-Id: Ib1de68d24523ef0f33fb1b25154d7daeb42c8ef3 Reviewed-on: https://gerrit.chromium.org/gerrit/11577 Reviewed-by: David James Reviewed-by: Raymes Khoury Reviewed-by: Matt Tennant Reviewed-by: Chris Wolfe Reviewed-by: Vince Laviano Commit-Ready: Mike Frysinger Tested-by: Mike Frysinger --- .../gtest/files/gtest-1.4.0-asneeded.patch | 12 ++++++ .../dev-cpp/gtest/gtest-1.4.0.ebuild | 43 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.4.0-asneeded.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.4.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.4.0-asneeded.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.4.0-asneeded.patch new file mode 100644 index 0000000000..f8e7d004d7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.4.0-asneeded.patch @@ -0,0 +1,12 @@ +diff -Naur gtest-1.4.0.orig/Makefile.am gtest-1.4.0/Makefile.am +--- gtest-1.4.0.orig/Makefile.am 2009-10-02 16:04:30.000000000 +0900 ++++ gtest-1.4.0/Makefile.am 2010-01-20 16:52:34.000000000 +0900 +@@ -305,7 +305,7 @@ + TESTS += test/gtest-unittest-api_test + check_PROGRAMS += test/gtest-unittest-api_test + test_gtest_unittest_api_test_SOURCES = test/gtest-unittest-api_test.cc +-test_gtest_unittest_api_test_LDADD = lib/libgtest_main.la ++test_gtest_unittest_api_test_LDADD = lib/libgtest.la + + TESTS += test/gtest-listener_test + check_PROGRAMS += test/gtest-listener_test 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 new file mode 100644 index 0000000000..16f7da2415 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.4.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2011 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 $ + +EAPI="2" +inherit autotools eutils + +DESCRIPTION="Google C++ Testing Framework" +HOMEPAGE="http://code.google.com/p/googletest/" +SRC_URI="http://googletest.googlecode.com/files/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="examples static-libs" + +DEPEND="dev-lang/python" +RDEPEND="" + +src_prepare() { + sed -i -e "s|/tmp|${T}|g" test/gtest-filepath_test.cc || die "sed failed" + + epatch "${FILESDIR}/${P}-asneeded.patch" + eautoreconf +} + +src_configure() { + econf \ + $(use_enable static-libs static) +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc CHANGES CONTRIBUTORS README + + use static-libs || rm "${D}"/usr/lib*/*.la + + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins samples/*.{cc,h} + fi +}