summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-08-20 21:48:10 -0400
committerPatrice Clement <monsieurp@gentoo.org>2017-08-29 22:30:15 +0200
commitfb37bc926a630ca175bc424843d57fe9d21a8f0a (patch)
treec0bf6309c147eda74ea20627db683837cb300b9e /dev-cpp/gtest
parentdev-cpp/gtest: update PYTHON_COMPAT. (diff)
downloadgentoo-fb37bc926a630ca175bc424843d57fe9d21a8f0a.tar.gz
gentoo-fb37bc926a630ca175bc424843d57fe9d21a8f0a.tar.bz2
gentoo-fb37bc926a630ca175bc424843d57fe9d21a8f0a.zip
dev-cpp/gtest: version bump to 1.8.0.
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=602218 Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-cpp/gtest')
-rw-r--r--dev-cpp/gtest/Manifest1
-rw-r--r--dev-cpp/gtest/files/gtest-1.8.0-multilib-strict.patch40
-rw-r--r--dev-cpp/gtest/gtest-1.8.0.ebuild59
3 files changed, 100 insertions, 0 deletions
diff --git a/dev-cpp/gtest/Manifest b/dev-cpp/gtest/Manifest
index df31d40d6a7..0bc58c544eb 100644
--- a/dev-cpp/gtest/Manifest
+++ b/dev-cpp/gtest/Manifest
@@ -1 +1,2 @@
DIST gtest-1.7.0.tar.gz 1001582 SHA256 c0f860eee47c86e0aeb462fd0bdfd70e3975297e0b8b178e0e03a95e1f6c9bc4 SHA512 a9f5c047b39efb2d11b55ee9913662ca402ac6837b3ad2d278ecfbd1caf32ed4546f169e3e92503d57bf3b62ccf89cd062da1c7ea3638aae98e868d2766363c3 WHIRLPOOL 36edbdf8be7c3793a89918a3c43d74e75a6281a37c394f7d2f20506130a76aab04a3beddba01bf7f0e9b6901c7e834ca014c31c913c0ea846d3f6be9c93599d2
+DIST gtest-1.8.0.tar.gz 1281617 SHA256 58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8 SHA512 1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d WHIRLPOOL 7d95c06818332f9596dbda03d21416012c00e05c78be0814279ab9e7059b9d836060bab83ad46d013ccf1ba40973680c0793d78ac22f6016773fd93aa97b779b
diff --git a/dev-cpp/gtest/files/gtest-1.8.0-multilib-strict.patch b/dev-cpp/gtest/files/gtest-1.8.0-multilib-strict.patch
new file mode 100644
index 00000000000..c18b58e16fb
--- /dev/null
+++ b/dev-cpp/gtest/files/gtest-1.8.0-multilib-strict.patch
@@ -0,0 +1,40 @@
+--- a/googlemock/CMakeLists.txt
++++ b/googlemock/CMakeLists.txt
+@@ -11,6 +11,8 @@
+
+ option(gmock_build_tests "Build all of Google Mock's own tests." OFF)
+
++set(LIB_INSTALL_DIR lib CACHE STRING "Library install directory")
++
+ # A directory to find Google Test sources.
+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt")
+ set(gtest_dir gtest)
+@@ -104,7 +106,7 @@
+ #
+ # Install rules
+ install(TARGETS gmock gmock_main
+- DESTINATION lib)
++ DESTINATION ${LIB_INSTALL_DIR})
+ install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock
+ DESTINATION include)
+
+--- a/googletest/CMakeLists.txt
++++ b/googletest/CMakeLists.txt
+@@ -27,6 +27,8 @@
+ "Build gtest with internal symbols hidden in shared libraries."
+ OFF)
+
++set(LIB_INSTALL_DIR lib CACHE STRING "Library install directory")
++
+ # Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
+ include(cmake/hermetic_build.cmake OPTIONAL)
+
+@@ -103,7 +105,7 @@
+ #
+ # Install rules
+ install(TARGETS gtest gtest_main
+- DESTINATION lib)
++ DESTINATION ${LIB_INSTALL_DIR})
+ install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest
+ DESTINATION include)
+
diff --git a/dev-cpp/gtest/gtest-1.8.0.ebuild b/dev-cpp/gtest/gtest-1.8.0.ebuild
new file mode 100644
index 00000000000..308a12ff6fd
--- /dev/null
+++ b/dev-cpp/gtest/gtest-1.8.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Python is required for tests and some build tasks.
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
+
+inherit python-any-r1 cmake-multilib
+
+DESCRIPTION="Google C++ Testing Framework"
+HOMEPAGE="https://github.com/google/googletest"
+SRC_URI="https://github.com/google/googletest/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="examples test"
+
+DEPEND="test? ( ${PYTHON_DEPS} )"
+RDEPEND="!dev-cpp/gmock"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-fix-py-tests.patch
+ "${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch
+ "${FILESDIR}"/${PN}-1.8.0-multilib-strict.patch
+)
+
+S="${WORKDIR}"/googletest-release-${PV}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DBUILD_GMOCK=ON
+ -DBUILD_GTEST=ON
+ -DLIB_INSTALL_DIR=$(get_libdir)
+ -Dgtest_build_samples=OFF
+ -Dgtest_disable_pthreads=OFF
+ -DBUILD_SHARED_LIBS=ON
+
+ # tests
+ -Dgmock_build_tests=$(usex test)
+ -Dgtest_build_tests=$(usex test)
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ )
+ cmake-utils_src_configure mycmakeargs
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use examples; then
+ docinto examples
+ dodoc googletest/samples/*.{cc,h}
+ fi
+}