commit: 7c40769db39b28f53b178c7ebed87e45df2b10e0 Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com> AuthorDate: Mon Feb 16 12:11:56 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Mar 6 00:44:11 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c40769d
dev-cpp/benchmark: add 1.9.5 Closes: https://bugs.gentoo.org/970167 Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45826 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-cpp/benchmark/Manifest | 1 + dev-cpp/benchmark/benchmark-1.9.5.ebuild | 93 ++++++++++++++++++++++ ...mark-1.9.5-fix-documentation-installation.patch | 42 ++++++++++ 3 files changed, 136 insertions(+) diff --git a/dev-cpp/benchmark/Manifest b/dev-cpp/benchmark/Manifest index c0db3029d07f..b9c8ff454017 100644 --- a/dev-cpp/benchmark/Manifest +++ b/dev-cpp/benchmark/Manifest @@ -3,3 +3,4 @@ DIST benchmark-1.9.1.tar.gz 255148 BLAKE2B 39b78afcb333c750960f476476b625d7f72b7 DIST benchmark-1.9.2.tar.gz 258938 BLAKE2B fed5a3d2447ac32c6e717a936c662d7ef7464978e6ff2d1e625576eee3a225e33d9125d7be5cd287fc069399ddaf76c0c2904caeec467f3f89755e59d3fe75e6 SHA512 64e964f02c118935305ca3e7d3f732f2e093f927371bd1729467f6cb75dc0c42492f9f02c3191e3d8affdc9bab2e66becf10bd4250b768854074bf69efa7e4f2 DIST benchmark-1.9.3.tar.gz 262114 BLAKE2B 978baf8380d81d98e7d465458953503881a12d4bc66f4bb3daf66b94c1bb1c268d4cc2733cd806af6e262faea1a7db2d71bdd86216a1c5f08b132b27fb0bff11 SHA512 bd1bc103c89ec74a7dfdb09aa4b308496f79ccfe0a728e31eed2814b9ff0f19aa930c58827d044dac07e2e776f990f74ebc4c7cd9c86b37871f8868e1581d4e1 DIST benchmark-1.9.4.tar.gz 262499 BLAKE2B 93efe09a72c61639bbbd1fc97f851f77a742eb356ac2470377643eff327861c0ffdf45a043295db8f317baff709f89b56b27fe8cbbca9a6afd64081cf047672b SHA512 f9031f144a7deeed151d22676b50384c03e5bbd19b68dac9471e91e49c408b770158c5c325f58e6ac07437955fdab3f08aeee76ba7ca5f97d2b51f14f6782416 +DIST benchmark-1.9.5.tar.gz 267155 BLAKE2B 18a7df6f5145160818c55478f5b28d1e69d8ad59e812c1b77cd32c88ac823f122d8df40dab06497d91945458bf4ca9b456729a44989448ece8f7d9b80fc8e138 SHA512 f207a63868e0c52f31a66ff9fd0ee75183ce3aaaa0946b00a49b77836507363bac8574feef8d9da82810a3167847303d6edf939e74802ad17e5a615bbf61e372 diff --git a/dev-cpp/benchmark/benchmark-1.9.5.ebuild b/dev-cpp/benchmark/benchmark-1.9.5.ebuild new file mode 100644 index 000000000000..953549c0a067 --- /dev/null +++ b/dev-cpp/benchmark/benchmark-1.9.5.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..14} ) + +inherit cmake-multilib flag-o-matic python-single-r1 + +DESCRIPTION="A microbenchmark support library" +HOMEPAGE="https://github.com/google/benchmark/" +SRC_URI="https://github.com/google/benchmark/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +IUSE="doc debug libpfm test +tools" +RESTRICT="!test? ( test )" +REQUIRED_USE="tools? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="libpfm? ( dev-libs/libpfm:= )" + +RDEPEND=" + ${DEPEND} + + tools? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + >=dev-python/scipy-1.10.0[${PYTHON_USEDEP}] + ') + + ${PYTHON_DEPS} + ) +" + +BDEPEND=" + doc? ( app-text/doxygen ) + test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] ) +" + +PATCHES=( "${FILESDIR}/${PN}-1.9.5-fix-documentation-installation.patch" ) + +pkg_setup() { + use tools && python-single-r1_pkg_setup +} + +multilib_src_configure() { + # bug #943629 + use debug || append-cppflags -DNDEBUG + + local mycmakeargs=( + -DBENCHMARK_ENABLE_DOXYGEN="$(usex doc)" + -DBENCHMARK_ENABLE_GTEST_TESTS="$(usex test)" + + # Users should control this via *FLAGS + -DBENCHMARK_ENABLE_LTO=OFF + + -DBENCHMARK_ENABLE_LIBPFM="$(multilib_native_usex libpfm)" + -DBENCHMARK_ENABLE_TESTING="$(usex test)" + -DBENCHMARK_ENABLE_WERROR=OFF + -DBENCHMARK_INSTALL_DOCS="$(usex doc)" + -DBENCHMARK_USE_BUNDLED_GTEST=OFF + + # This is determined by profile + -DBENCHMARK_USE_LIBCXX=OFF + ) + + cmake_src_configure +} + +multilib_src_test() { + CMAKE_SKIP_TESTS=( + # CMake already warns on these being brittle w/ diff + # compiler versions. Could do with investigation if bored + # but not critical. See bug #941538. + + run_donotoptimize_assembly_test_CHECK + run_state_assembly_test_CHECK + run_clobber_memory_assembly_test_CHECK + ) + + cmake_src_test +} + +multilib_src_install_all() { + dodoc CONTRIBUTING.md + dodoc CONTRIBUTORS + + if use tools; then + python_domodule tools/gbench + python_doscript tools/compare.py + python_doscript tools/strip_asm.py + fi +} diff --git a/dev-cpp/benchmark/files/benchmark-1.9.5-fix-documentation-installation.patch b/dev-cpp/benchmark/files/benchmark-1.9.5-fix-documentation-installation.patch new file mode 100644 index 000000000000..5704b7e54658 --- /dev/null +++ b/dev-cpp/benchmark/files/benchmark-1.9.5-fix-documentation-installation.patch @@ -0,0 +1,42 @@ +From 009874342ddcf6446bec308686c54bd387a212a4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Matt=C3=A9o=20Rossillol=E2=80=91=E2=80=91Laruelle?= + <[email protected]> +Date: Mon, 19 Aug 2024 09:12:57 +0200 +Subject: [PATCH] fix documentation installation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +HTML pages generated by Doxygen are now installed into +/usr/share/doc/${PF}/html. + +The content of the docs directory is always installed even if HTML pages are +installed. + +Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]> +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -185,16 +185,16 @@ if (BENCHMARK_ENABLE_DOXYGEN) + if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_DOCS) + install( + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" +- DESTINATION ${CMAKE_INSTALL_DOCDIR}) +- endif() +-else() +- if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_DOCS) +- install( +- DIRECTORY "${PROJECT_SOURCE_DIR}/docs/" +- DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++ DESTINATION "${CMAKE_INSTALL_DOCDIR}/html/") + endif() + endif() + ++if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_DOCS) ++ install( ++ DIRECTORY "${PROJECT_SOURCE_DIR}/docs/" ++ DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++endif() ++ + set(CMAKE_INSTALL_PYTOOLSDIR "${CMAKE_INSTALL_DATADIR}/googlebenchmark/tools" CACHE PATH "") + + if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_TOOLS)
