diff options
Diffstat (limited to 'dev-cpp/gtest')
-rw-r--r-- | dev-cpp/gtest/Manifest | 11 | ||||
-rw-r--r-- | dev-cpp/gtest/files/gtest-1.8.0-fix-doublefree.patch | 98 | ||||
-rw-r--r-- | dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch | 14 | ||||
-rw-r--r-- | dev-cpp/gtest/gtest-1.7.0-r1.ebuild | 2 | ||||
-rw-r--r-- | dev-cpp/gtest/gtest-1.8.0-r1.ebuild | 68 | ||||
-rw-r--r-- | dev-cpp/gtest/gtest-1.8.0.ebuild | 12 | ||||
-rw-r--r-- | dev-cpp/gtest/gtest-9999.ebuild | 11 | ||||
-rw-r--r-- | dev-cpp/gtest/metadata.xml | 3 |
8 files changed, 209 insertions, 10 deletions
diff --git a/dev-cpp/gtest/Manifest b/dev-cpp/gtest/Manifest index c1e389735a44..0c43bf0c189f 100644 --- a/dev-cpp/gtest/Manifest +++ b/dev-cpp/gtest/Manifest @@ -1,10 +1,13 @@ AUX configure-fix-pthread-linking.patch 3142 BLAKE2B 8bf1e9b7845330138684068ea1ba98ef9941e4f9a8d8517598fc48fdae984d051745307ac6e74a1fc37a65fd7e473b7526e6dc25dc3334f5b13e8a1a60e7f776 SHA512 4347570606853c75e43d3d1abe449cd562538e531136658e6742f8e2dddcc1767932b427a063f711b868467ca85ff947f24c4ed3e328319bd0a739bb66093016 +AUX gtest-1.8.0-fix-doublefree.patch 4176 BLAKE2B 8488622dab43418cca28fe65b43ba4e022d06e31517748226a61e18c366f33a7b8fb50ba8f0ca7a175774c580e0b356684414856a75d74363c816c5ab9ba2ef3 SHA512 5dc0b987ea9516c4ef0c8e50c58091431606d3555c0f24b2ea5786e47f8497664ca3fb55bb400e07c502319dfbf2d0a09d5121985defd8e8b5e29062a4a51134 +AUX gtest-1.8.0-increase-clone-stack-size.patch 588 BLAKE2B a05c131193a4fa8e585c23b8c664e1e5065bd1c02424c763df64bd2b83c975b33d8a7e6a52a4a094d2304ff96edc4cc72d5bd0c54579546d7d3512164bc18d4a SHA512 ca1e97c48b1f3340ccda093c1bac9b5ddbb84db6e8dd9f6d9da95a0ef105125c9bea34bba359ee473c0b05d7db6a69c2bdde8f1cbb14aeab9d76f83a4cd4b9a4 AUX gtest-1.8.0-multilib-strict.patch 1126 BLAKE2B 9b7835108dec3c05025762e7161bbc993e77c0ea433ddec465746cc93cd231cbe654a756822d3a0c368497788bb5642b6a490f917736b763f18ed31b8a629558 SHA512 45bb44e3f0743ec0bd9f440585610ed04cbbd8befed398844300e21710b28f755f1775cc005efcdd0b4f6d2ec2200ad2abe98b2c6764400ffa04242fe7ce06fc AUX gtest-9999-fix-gcc6-undefined-behavior.patch 665 BLAKE2B 181253b829413cf41001236c4696fd35171345d9a933f62d0903d463e0bcf80004a0124e4c5b5846f40c8cfe70dfccc7488e1840ccf6418d34a461c482db373a SHA512 fc6f11a06f9aa7b1c31f5abbec208704dd0f461fed36d421802843234bb3d9fe3f2e35482629546c1a8585c84fb0850768dd8b63e0f88cfe0508b00278d800cc AUX gtest-9999-fix-py-tests.patch 820 BLAKE2B a6a860b6935bd5f0bbe720f5af741448dd29878ca16d4187b84a40df4ec3ca216951ab0dfb1a89bebe2da1ad89f975e22ef6cdaced488de72b06953e185fd0d1 SHA512 4a059704303fffe508bd099544caaab5e4c819c978d6c104dce302e82348dd41fd63390459828a5f6161624dfd47aed5dc9cb466d36796904d598e0b10427949 DIST gtest-1.7.0.tar.gz 1001582 BLAKE2B 3d10c1e502c2fac1500d07301031a9328b29027a3f9719137e09d2c47556cf52bbc978a8fb7b37330a94beafa27d24c3bfc247b2f0d51306b53f43e7ae2373b4 SHA512 a9f5c047b39efb2d11b55ee9913662ca402ac6837b3ad2d278ecfbd1caf32ed4546f169e3e92503d57bf3b62ccf89cd062da1c7ea3638aae98e868d2766363c3 DIST gtest-1.8.0.tar.gz 1281617 BLAKE2B ac052b4d0eb0d8ded03a8c7dff05177818627b8a51f2dbc2c162b2ee2a5d1323539e7d0d02236d9ebb799995e018f0171c2fdaeb4de3bb339548265e50de79e6 SHA512 1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d -EBUILD gtest-1.7.0-r1.ebuild 1249 BLAKE2B 67bd0dc17b6525938dbcf19158b7fbea0d5c0ec97f89f212d521a9bb8905e25a3a15a53c8fa95cf833f3cd265223af9aaeee2f5ad90a8091f5ba3e5cc46000fb SHA512 67a53dfcbc8c85f6e4e6aedc348a413b7fcc328130f5c83bb3963e607e96d735d9213d5b013ca40beb910accca5c69f36bfc9e9c5012c3be2663cb4cf93b6fb2 -EBUILD gtest-1.8.0.ebuild 1451 BLAKE2B 0419ee0c8af52245f762d84e46f4eaec593d6e3c687acc6d7f1d1c801e31199ff2e436091f7f23efd3a5878985dad711469931aca68c052a4b144563f546e804 SHA512 c883641e274747e567d0f1aa5d5c7a593b6f0d3f54dcc540e0900cf03c7129f480c96eb2b920a7b8cdd8c07243fd12420428c9c461faf1600a09727917061eaa -EBUILD gtest-9999.ebuild 1592 BLAKE2B 2dd521e94c698d42d3930eb2319261703724cc2e2a44f0da27ea295a5c6d20bf10af019aa64c6324a152476794e4559c7b4bc979d664e58609f0f3d9643cc15f SHA512 58ec8bd8f6f8dc5efe0d23a4a68fb22ab5d798d7248a2fab002d927220193a79405e211a5c9ba90f7c6c33cbcf439ded042aae8744b5b4450e3f3a37a15b7a16 -MISC metadata.xml 569 BLAKE2B e59ed2ce4fbd2ba88d3b5f3b6cac059d20007f4b9c1b71066f3ea79db48c1f160f6e15f58557f255c35af6eb37d902ec467d85ce879ce5be986e2ec968870490 SHA512 8e884231265f404e28bd9d1b3e05ab06d96e3e3c9fc036aacee2026d81161e60f3019260d9d3f55a5b057b68c37303e22b88bf51125336aa977e43b1c687a624 +EBUILD gtest-1.7.0-r1.ebuild 1249 BLAKE2B e3b607997c3a936ed65ffd668d543e512b3aaab230499d3a209950c0ec753c4778ede5c8c67dfb77ba7bba35550813830daa60e602e19ede1b5b95aa98ff8213 SHA512 8e82ff1bcd3e53edfd9823e90ae13484ace2a649a5ab775998e05b98d7fc7246af2bd11a8bbf74aab8e4cc6b9913c34f019befaeee34778262cf88aa7b9cd2ef +EBUILD gtest-1.8.0-r1.ebuild 1685 BLAKE2B 67e745fb854a8283d1d32f50f733e7bf1bfca9884d4a35e85b01a2901b6714a6dd39a040d60a85f914b56e0d551f679fbd991cb8bd928df68bd8073cb66aa118 SHA512 d61fc073692926111aa1369aada765af56b13dd88ccddaaef9957327706cbaf7fb90729eaa1168477661c2082bb11cde632c1c3bc4957d8533e12d445ddfa73c +EBUILD gtest-1.8.0.ebuild 1637 BLAKE2B 15153bf61b468799c48c25b300794eb3cf93d9751ead2d50d2dda59f09a4c5ea1c6a319083290cb3a93a983ee2552a3162a9c770e724907427533cfd8e7aafd9 SHA512 ac3680806d6e30e926ef29ab24042d419cd4c872b6a7d4d11b75bb50ccf64c6f029b8c59800dd92f3c5e2a8a72b4840277b4750eae8bc46021e44fc95845670b +EBUILD gtest-9999.ebuild 1826 BLAKE2B 8751e8332d63e36f30d1bc10782c2103e7a40b0f9a454bf29cb92ec92502221cb74aee2158f54b2fb634aa119c6fd1d7faf496fac4569e7ce461205f805123b7 SHA512 9a31a176bba34993a6bbc56dd0cbc0a3b78b293c4d850a0471968c8759fd58a3ebaa1922b2eb293810a697b85894c1daee5d125a42013b6356b9a04596d21114 +MISC metadata.xml 535 BLAKE2B 892f380ec413ae33de5821d911bf34fc9e3d0e76cdc833a38c66ed85dece1f6efeec56d8f78c655c9a083e7152f1d24c018184d1e679612de43690665d2c0518 SHA512 68daeade4eb4fec4a42ec039ff000a025c48708f2aed23ebf4495b653567611342893ce79d6163d5276638af9e9915abc2cc6c2d6d07db2e86681e4049b77f81 diff --git a/dev-cpp/gtest/files/gtest-1.8.0-fix-doublefree.patch b/dev-cpp/gtest/files/gtest-1.8.0-fix-doublefree.patch new file mode 100644 index 000000000000..40fa1f6668bc --- /dev/null +++ b/dev-cpp/gtest/files/gtest-1.8.0-fix-doublefree.patch @@ -0,0 +1,98 @@ +Bug: https://bugs.gentoo.org/631698 +Upstream PR: https://github.com/google/googletest/pull/1339 + +From 0663ce9024c9b78ddf6eb3fc1ceb45361ed91767 Mon Sep 17 00:00:00 2001 +From: Romain Geissler <romain.geissler@gmail.com> +Date: Sat, 2 Dec 2017 22:47:20 +0100 +Subject: [PATCH] Fix double free when building Gtest/GMock in shared libraries + and linking a test executable with both. + +--- + googlemock/CMakeLists.txt | 63 ++++++++++++++++++++++++++++++----------------- + 1 file changed, 40 insertions(+), 23 deletions(-) + +diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt +index 724fdd5f0..f7bad8afc 100644 +--- a/googlemock/CMakeLists.txt ++++ b/googlemock/CMakeLists.txt +@@ -86,16 +86,23 @@ endif() + # Google Mock libraries. We build them using more strict warnings than what + # are used for other targets, to ensure that Google Mock can be compiled by + # a user aggressive about warnings. +-cxx_library(gmock +- "${cxx_strict}" +- "${gtest_dir}/src/gtest-all.cc" +- src/gmock-all.cc) +- +-cxx_library(gmock_main +- "${cxx_strict}" +- "${gtest_dir}/src/gtest-all.cc" +- src/gmock-all.cc +- src/gmock_main.cc) ++if (MSVC) ++ cxx_library(gmock ++ "${cxx_strict}" ++ "${gtest_dir}/src/gtest-all.cc" ++ src/gmock-all.cc) ++ ++ cxx_library(gmock_main ++ "${cxx_strict}" ++ "${gtest_dir}/src/gtest-all.cc" ++ src/gmock-all.cc ++ src/gmock_main.cc) ++else() ++ cxx_library(gmock "${cxx_strict}" src/gmock-all.cc) ++ target_link_libraries(gmock gtest) ++ cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc) ++ target_link_libraries(gmock_main gmock) ++endif() + + # If the CMake version supports it, attach header directory information + # to the targets for when we are part of a parent build (ie being pulled +@@ -175,23 +182,33 @@ if (gmock_build_tests) + ############################################################ + # C++ tests built with non-standard compiler flags. + +- cxx_library(gmock_main_no_exception "${cxx_no_exception}" +- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) +- +- cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" +- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) ++ if (MSVC) ++ cxx_library(gmock_main_no_exception "${cxx_no_exception}" ++ "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) + +- if (NOT MSVC OR MSVC_VERSION LESS 1600) # 1600 is Visual Studio 2010. +- # Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that +- # conflict with our own definitions. Therefore using our own tuple does not +- # work on those compilers. +- cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" ++ cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" + "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) + +- cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}" +- gmock_main_use_own_tuple test/gmock-spec-builders_test.cc) ++ if (MSVC_VERSION LESS 1600) # 1600 is Visual Studio 2010. ++ # Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that ++ # conflict with our own definitions. Therefore using our own tuple does not ++ # work on those compilers. ++ cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" ++ "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) ++ ++ cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}" ++ gmock_main_use_own_tuple test/gmock-spec-builders_test.cc) ++ endif() ++ else() ++ cxx_library(gmock_main_no_exception "${cxx_no_exception}" src/gmock_main.cc) ++ target_link_libraries(gmock_main_no_exception gmock) ++ ++ cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" src/gmock_main.cc) ++ target_link_libraries(gmock_main_no_rtti gmock) ++ ++ cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" src/gmock_main.cc) ++ target_link_libraries(gmock_main_use_own_tuple gmock) + endif() +- + cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}" + gmock_main_no_exception test/gmock-more-actions_test.cc) + diff --git a/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch b/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch new file mode 100644 index 000000000000..22ac0b6d4a12 --- /dev/null +++ b/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch @@ -0,0 +1,14 @@ +Bug: https://bugs.gentoo.org/629620 +Upstream PR: https://github.com/google/googletest/pull/1274 + +--- a/googletest/src/gtest-death-test.cc ++++ b/googletest/src/gtest-death-test.cc +@@ -1070,7 +1070,7 @@ + + if (!use_fork) { + static const bool stack_grows_down = StackGrowsDown(); +- const size_t stack_size = getpagesize(); ++ const size_t stack_size = getpagesize() * 10; + // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. + void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); diff --git a/dev-cpp/gtest/gtest-1.7.0-r1.ebuild b/dev-cpp/gtest/gtest-1.7.0-r1.ebuild index ee90d10ca58f..f1185b2db0cc 100644 --- a/dev-cpp/gtest/gtest-1.7.0-r1.ebuild +++ b/dev-cpp/gtest/gtest-1.7.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="5" diff --git a/dev-cpp/gtest/gtest-1.8.0-r1.ebuild b/dev-cpp/gtest/gtest-1.8.0-r1.ebuild new file mode 100644 index 000000000000..e824453822ea --- /dev/null +++ b/dev-cpp/gtest/gtest-1.8.0-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2018 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="doc 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 + "${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch + "${FILESDIR}"/${PN}-1.8.0-fix-doublefree.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 doc; then + docinto googletest + dodoc -r googletest/docs/* + docinto googlemock + dodoc -r googlemock/docs/* + fi + + if use examples; then + docinto examples + dodoc googletest/samples/*.{cc,h} + fi +} diff --git a/dev-cpp/gtest/gtest-1.8.0.ebuild b/dev-cpp/gtest/gtest-1.8.0.ebuild index 308a12ff6fdb..3dbd8e1a06d4 100644 --- a/dev-cpp/gtest/gtest-1.8.0.ebuild +++ b/dev-cpp/gtest/gtest-1.8.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -15,7 +15,7 @@ SRC_URI="https://github.com/google/googletest/archive/release-${PV}.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" +IUSE="doc examples test" DEPEND="test? ( ${PYTHON_DEPS} )" RDEPEND="!dev-cpp/gmock" @@ -24,6 +24,7 @@ PATCHES=( "${FILESDIR}"/${PN}-9999-fix-py-tests.patch "${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch "${FILESDIR}"/${PN}-1.8.0-multilib-strict.patch + "${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch ) S="${WORKDIR}"/googletest-release-${PV} @@ -52,6 +53,13 @@ multilib_src_configure() { multilib_src_install_all() { einstalldocs + if use doc; then + docinto googletest + dodoc -r googletest/docs/* + docinto googlemock + dodoc -r googlemock/docs/* + fi + if use examples; then docinto examples dodoc googletest/samples/*.{cc,h} diff --git a/dev-cpp/gtest/gtest-9999.ebuild b/dev-cpp/gtest/gtest-9999.ebuild index a4ab55ca6f1e..06c94dbd49af 100644 --- a/dev-cpp/gtest/gtest-9999.ebuild +++ b/dev-cpp/gtest/gtest-9999.ebuild @@ -22,13 +22,15 @@ HOMEPAGE="https://github.com/google/googletest" LICENSE="BSD" SLOT="0" -IUSE="examples test" +IUSE="doc examples test" DEPEND="test? ( ${PYTHON_DEPS} )" RDEPEND="!dev-cpp/gmock" PATCHES=( "${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch + "${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch + "${FILESDIR}"/${PN}-1.8.0-fix-doublefree.patch ) pkg_setup() { @@ -60,6 +62,13 @@ multilib_src_configure() { multilib_src_install_all() { einstalldocs + if use doc; then + docinto googletest + dodoc -r googletest/docs/* + docinto googlemock + dodoc -r googlemock/docs/* + fi + if use examples; then docinto examples dodoc googletest/samples/*.{cc,h} diff --git a/dev-cpp/gtest/metadata.xml b/dev-cpp/gtest/metadata.xml index 624bb1a1df94..f40cfed12c28 100644 --- a/dev-cpp/gtest/metadata.xml +++ b/dev-cpp/gtest/metadata.xml @@ -10,8 +10,7 @@ <name>Proxy Maintainers</name> </maintainer> <upstream> - <doc lang="en">https://code.google.com/p/googletest/w/list</doc> - <remote-id type="google-code">googletest</remote-id> + <doc lang="en">https://github.com/google/googletest/tree/master/googletest/docs</doc> <remote-id type="github">google/googletest</remote-id> </upstream> </pkgmetadata> |