dev-cpp/benchmark: add 1.9.0 and adoption

Signed-off-by: Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37993
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
Mattéo Rossillol‑‑Laruelle
2024-08-19 09:24:49 +02:00
committed by Joonas Niilola
parent 70148fcb08
commit 6f8ef24af3
8 changed files with 167 additions and 6 deletions

View File

@@ -1,2 +1,3 @@
DIST benchmark-1.8.3.tar.gz 250206 BLAKE2B 14b4af17184a88378314d11623b73c27368999fcff6e50986407a08739fdf388cdcbd140471b629cd2a9948f81073796f8a6c38d015be8413b7e4d4759715f97 SHA512 4e12114251c79a426873cfba6e27270b69fc980cef9a68e9cb3170f8e2e203f77dee19ab1e65cad51cd67e60991d3bbfdd52553f22522ce5e6c611b5aa07602c
DIST benchmark-1.8.4.tar.gz 253916 BLAKE2B 78a290a5013d8371e87b7c918e518e3ec0e8247e25e211d160ab8dea51d8871d8dac54ee91ee0c512af86a60d1f4e9baedadc20d4a7fa28ef790411fda0399c8 SHA512 835d12b88fe52309ce6b2ffbc8b3c178ac594be7d249b5daca0373d1d03ec83ea3c7b94224f67f22d21919376985867eeff0d1c0721501cfd8a9e9b8a9c48882
DIST benchmark-1.9.0.tar.gz 253961 BLAKE2B fdac0018435622e3ee2c1cde02c8140a15f2579b9059d1592b588033e6935bd8d54c874f4ea912696e8e1d5f7eebae30ba849f77cc3f74f006b4b03c712685ed SHA512 0e91e0e5a2222d7650fd8bd9cafb2f0e7c1689cd1b87b2cc529c738db12bfef31162aa5a4da78f7b0aa7f0101dc08b626802c58d39862458f82f9fea9316ca25

View File

@@ -0,0 +1,74 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_12 )
inherit cmake-multilib 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 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86"
IUSE="doc +exceptions libcxx libpfm lto test +tools"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="
libcxx? ( sys-libs/libcxx[${MULTILIB_USEDEP}] )
libpfm? ( dev-libs/libpfm:= )
"
BDEPEND="
>=dev-build/cmake-3.10
doc? ( app-text/doxygen )
test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )
"
RDEPEND="
tools? (
$(python_gen_cond_dep '
dev-python/numpy[${PYTHON_USEDEP}]
>=dev-python/scipy-1.10.0[${PYTHON_USEDEP}]
')
${PYTHON_DEPS}
)
"
PATCHES=( "${FILESDIR}/${P}-fix-documentation-installation.patch" )
pkg_setup() {
use tools && python-single-r1_pkg_setup
}
multilib_src_configure() {
local mycmakeargs=(
-DBENCHMARK_ENABLE_DOXYGEN="$(usex doc)"
-DBENCHMARK_ENABLE_EXCEPTIONS="$(usex exceptions)"
-DBENCHMARK_ENABLE_GTEST_TESTS="$(usex test)"
-DBENCHMARK_ENABLE_LTO="$(usex lto)"
-DBENCHMARK_ENABLE_LIBPFM="$(usex libpfm)"
-DBENCHMARK_ENABLE_TESTING="$(usex test)"
-DBENCHMARK_ENABLE_WERROR=OFF
-DBENCHMARK_INSTALL_DOCS="$(usex doc)"
-DBENCHMARK_USE_BUNDLED_GTEST=OFF
-DBENCHMARK_USE_LIBCXX="$(usex libcxx)"
)
cmake_src_configure
}
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
}

View File

@@ -0,0 +1,47 @@
From 009874342ddcf6446bec308686c54bd387a212a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matt=C3=A9o=20Rossillol=E2=80=91=E2=80=91Laruelle?=
<beatussum@protonmail.com>
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 RossillolLaruelle <beatussum@protonmail.com>
---
src/CMakeLists.txt | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 32126c0..40e75e0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -169,12 +169,12 @@ 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()
--
2.44.2

View File

@@ -1,10 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<maintainer type="person">
<email>beatussum@protonmail.com</email>
<name>Mattéo RossillolLaruelle</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="exceptions">Enable the use of exceptions in the benchmark library</flag>
<flag name="libcxx">Use <pkg>sys-libs/libcxx</pkg> instead of libstdc++ as the default stdlib</flag>
<flag name="libpfm">Enable <pkg>dev-libs/libpfm</pkg> support</flag>
<flag name="tools">Install some additional Python tools</flag>
</use>
<use lang="fr">
<flag name="exceptions">Utiliser les exceptions inclues dans la bibliothèque</flag>
<flag name="libcxx">Utiliser <pkg>sys-libs/libcxx</pkg> à la place de libstdc++ comme bibliothèque standard</flag>
<flag name="libpfm">Activer le support de <pkg>dev-libs/libpfm</pkg></flag>
<flag name="tools">Installer des outils Python additionnels</flag>
</use>
<upstream>
<bugs-to>https://github.com/google/benchmark/issues</bugs-to>
<doc lang="en">https://github.com/google/benchmark/tree/master/docs/</doc>
<maintainer status="active">
<name>Google</name>
<email>opensource@google.com</email>
</maintainer>
<bugs-to>https://github.com/google/benchmark/issues/</bugs-to>
<doc>https://github.com/google/benchmark/tree/master/docs/</doc>
<remote-id type="github">google/benchmark</remote-id>
</upstream>
</pkgmetadata>