From 3e4fead0a3cc45351ae706ba66ade6e4c30ad460 Mon Sep 17 00:00:00 2001 From: krishjainx Date: Wed, 5 Jul 2023 14:05:58 +0200 Subject: [PATCH] dev-cpp/gtest: Sync with Gentoo It's from Gentoo commit e59bcda0257406a0510c5a4c94e9479078b864b3. --- .../portage-stable/dev-cpp/gtest/Manifest | 2 +- ..._p20200702-increase-clone-stack-size.patch | 3 +- .../dev-cpp/gtest/gtest-1.11.0.ebuild | 7 ++-- ...0_p20200702.ebuild => gtest-1.13.0.ebuild} | 40 +++++++++---------- .../dev-cpp/gtest/gtest-9999.ebuild | 20 +++++----- .../portage-stable/dev-cpp/gtest/metadata.xml | 2 +- 6 files changed, 36 insertions(+), 38 deletions(-) rename sdk_container/src/third_party/portage-stable/dev-cpp/gtest/{gtest-1.10.0_p20200702.ebuild => gtest-1.13.0.ebuild} (58%) diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/Manifest b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/Manifest index 3b3e722caa..69d7577bf6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/Manifest @@ -1,2 +1,2 @@ -DIST gtest-1.10.0_p20200702.tar.gz 866900 BLAKE2B c162d47868583ba270675abe5df935b8f4b9a9c00dbdc80dd88afa7f2b98266640b32b2ea5e8f9f6d6227196b5d2f79dbfda4e9585106224e814cc1503cf777d SHA512 715d887b59b47d4691c7c90ef0cf0ffc3d1e758e500263c76b50fd506e90a9d1c390af745933cfe3f55e1edac5d72dccedef3cb9a50b71a5b796424471a3017b DIST gtest-1.11.0.tar.gz 886330 BLAKE2B d11fdd485f292d96508cbc27a9a444ab69b86571cc594298fd3f0e6d4bd8d6ec20dea848fe11be165d34054b2251ad377f0930f852914feaa1416ff156986a9c SHA512 6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28 +DIST gtest-1.13.0.tar.gz 862871 BLAKE2B d2768332c233d62f7a5f5332b63dc587c96c24765b2eeaa4f4caf5d421b175aa850d81cec4f50eeef9e06d4b86cb959555b4c2862a197ce3cb86d61fcb51f5d1 SHA512 70c0cfb1b4147bdecb467ecb22ae5b5529eec0abc085763213a796b7cdbd81d1761d12b342060539b936fa54f345d33f060601544874d6213fdde79111fa813e diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.10.0_p20200702-increase-clone-stack-size.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.10.0_p20200702-increase-clone-stack-size.patch index 3e06777ac9..0c47681ba3 100644 --- a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.10.0_p20200702-increase-clone-stack-size.patch +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/files/gtest-1.10.0_p20200702-increase-clone-stack-size.patch @@ -1,4 +1,5 @@ Bug: https://bugs.gentoo.org/692464 + https://bugs.gentoo.org/834068 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -7,7 +8,7 @@ Bug: https://bugs.gentoo.org/692464 if (!use_fork) { static const bool stack_grows_down = StackGrowsDown(); - const auto stack_size = static_cast(getpagesize() * 2); -+ const auto stack_size = static_cast(getpagesize() * 10); ++ const auto stack_size = static_cast(getpagesize() * 12); // 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/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.11.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.11.0.ebuild index 89518bffd1..0881eaf88c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.11.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.11.0.ebuild @@ -1,12 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # Python is required for tests and some build tasks. -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{9..10} ) -CMAKE_ECLASS=cmake inherit cmake-multilib python-any-r1 if [[ ${PV} == "9999" ]]; then @@ -22,7 +21,7 @@ else -> ${P}.tar.gz" S="${WORKDIR}"/googletest-${GOOGLETEST_COMMIT} fi - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" fi DESCRIPTION="Google C++ Testing Framework" diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.10.0_p20200702.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.13.0.ebuild similarity index 58% rename from sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.10.0_p20200702.ebuild rename to sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.13.0.ebuild index 58067c7a09..6ed984c015 100644 --- a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.10.0_p20200702.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-1.13.0.ebuild @@ -1,28 +1,27 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 # Python is required for tests and some build tasks. -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{9..11} ) -CMAKE_ECLASS=cmake inherit cmake-multilib python-any-r1 -GOOGLETEST_COMMIT=aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e - if [[ ${PV} == "9999" ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/google/googletest" else if [[ -z ${GOOGLETEST_COMMIT} ]]; then - URI_PV=v${MY_PV:-${PV}} + SRC_URI="https://github.com/google/googletest/archive/refs/tags/v${PV}.tar.gz + -> ${P}.tar.gz" + S="${WORKDIR}"/googletest-${PV} else - URI_PV=${MY_PV:=${GOOGLETEST_COMMIT}} + SRC_URI="https://github.com/google/googletest/archive/${GOOGLETEST_COMMIT}.tar.gz + -> ${P}.tar.gz" + S="${WORKDIR}"/googletest-${GOOGLETEST_COMMIT} fi - SRC_URI="https://github.com/google/googletest/archive/${URI_PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - S="${WORKDIR}"/googletest-${MY_PV} + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" fi DESCRIPTION="Google C++ Testing Framework" @@ -35,10 +34,6 @@ RESTRICT="!test? ( test )" BDEPEND="test? ( ${PYTHON_DEPS} )" -PATCHES=( - "${FILESDIR}"/${PN}-1.10.0_p20200702-increase-clone-stack-size.patch -) - pkg_setup() { use test && python-any-r1_pkg_setup } @@ -63,15 +58,18 @@ multilib_src_configure() { cmake_src_configure } +multilib_src_test() { + # Exclude tests that fail with FEATURES="usersandbox" + cmake_src_test -E "googletest-(death-test|port)-test" +} + multilib_src_install_all() { einstalldocs - if use doc; then - docinto googletest - dodoc -r googletest/docs/. - docinto googlemock - dodoc -r googlemock/docs/. - fi + newdoc googletest/README.md README.googletest.md + newdoc googlemock/README.md README.googlemock.md + + use doc && dodoc -r docs/. if use examples; then docinto examples diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-9999.ebuild index 89518bffd1..1e958926fa 100644 --- a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/gtest-9999.ebuild @@ -1,12 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # Python is required for tests and some build tasks. -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{9..11} ) -CMAKE_ECLASS=cmake inherit cmake-multilib python-any-r1 if [[ ${PV} == "9999" ]]; then @@ -14,15 +13,15 @@ if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/google/googletest" else if [[ -z ${GOOGLETEST_COMMIT} ]]; then - SRC_URI="https://github.com/google/googletest/archive/refs/tags/release-${PV}.tar.gz + SRC_URI="https://github.com/google/googletest/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}"/googletest-release-${PV} + S="${WORKDIR}"/googletest-${PV} else SRC_URI="https://github.com/google/googletest/archive/${GOOGLETEST_COMMIT}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}"/googletest-${GOOGLETEST_COMMIT} fi - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" fi DESCRIPTION="Google C++ Testing Framework" @@ -35,10 +34,6 @@ RESTRICT="!test? ( test )" BDEPEND="test? ( ${PYTHON_DEPS} )" -PATCHES=( - "${FILESDIR}"/${PN}-1.10.0_p20200702-increase-clone-stack-size.patch -) - pkg_setup() { use test && python-any-r1_pkg_setup } @@ -63,6 +58,11 @@ multilib_src_configure() { cmake_src_configure } +multilib_src_test() { + # Exclude tests that fail with FEATURES="usersandbox" + cmake_src_test -E "googletest-(death-test|port)-test" +} + multilib_src_install_all() { einstalldocs diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/metadata.xml index c870874aad..2a73b6d650 100644 --- a/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/gtest/metadata.xml @@ -10,7 +10,7 @@ Proxy Maintainers - https://github.com/google/googletest/tree/master/googletest/docs + https://github.com/google/googletest/tree/HEAD/docs google/googletest