summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2021-09-20 12:01:07 +0200
committerMarek Szuba <marecki@gentoo.org>2021-09-20 12:02:05 +0200
commitfa495d33063e04a705c9a4b7e8daa0c076e62d4c (patch)
tree99dd95c2c186ae7185e0cd29d575c635f76d6c84 /dev-cpp/benchmark
parentx11-misc/xdotool: drop 3.20210804.2 (diff)
downloadgentoo-fa495d33063e04a705c9a4b7e8daa0c076e62d4c.tar.gz
gentoo-fa495d33063e04a705c9a4b7e8daa0c076e62d4c.tar.bz2
gentoo-fa495d33063e04a705c9a4b7e8daa0c076e62d4c.zip
dev-cpp/benchmark: add 1.6.0
WARNING: This version features a breaking API change. See https://github.com/google/benchmark/releases/tag/v1.6.0 for details. Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-cpp/benchmark')
-rw-r--r--dev-cpp/benchmark/Manifest3
-rw-r--r--dev-cpp/benchmark/benchmark-1.6.0.ebuild38
-rw-r--r--dev-cpp/benchmark/files/benchmark-1.6.0-disable_Werror.patch12
-rw-r--r--dev-cpp/benchmark/files/benchmark-1.6.0-versioned_docdir.patch9
4 files changed, 60 insertions, 2 deletions
diff --git a/dev-cpp/benchmark/Manifest b/dev-cpp/benchmark/Manifest
index 6b5cf54159c1..fcd377803e12 100644
--- a/dev-cpp/benchmark/Manifest
+++ b/dev-cpp/benchmark/Manifest
@@ -1,3 +1,2 @@
-DIST benchmark-1.5.3.tar.gz 163465 BLAKE2B cea8929c5595be55e74e6232eb147a00c656cc5afe6f5b9d3d788de002c51c40c46012461a7c6840aff9e590ed4304f24a31249402bbbeae28ec443a433a2e53 SHA512 11f726686ad8b36870fc2a3542fad4c52a58df2eb580564dcfdfb154fe6ac00dbbf69c514395148d7ab11a45e40e869549cf971462c384f59cbae5fa60160e3b
-DIST benchmark-1.5.5.tar.gz 176710 BLAKE2B 394f8b34873ccd45100e3b1f58dd7819d443733d9224ff003a9410ca30d8bacc6c7736b74dd50623144767e840dbc3cd9ff819a60de6e22a00b1edaf802f0992 SHA512 91a2cdf0245625c657b9bb8d76c7d616a99eaed333e42b34ceff4e996b8fa6027b1c7313a815e7b441d2f6e2e1244c139a0911d585bf0d2e767ac3cea23a67d1
DIST benchmark-1.5.6.tar.gz 177911 BLAKE2B ea4e98cb98471b2b8e2371109b96017bc483459dc924deaa1d9770b065de946ea2d69ca36098c27283f15370699f2475448af1e205cfca3d9c64408f08c202a9 SHA512 b3c1fd4407d660456ae51abd7c427460a2c7b029ab6344e21bb61d3ec84e3b60638b7a719655aa04fb9ca639b6371e553e9de18539aca8dd38c361b4c6522538
+DIST benchmark-1.6.0.tar.gz 178527 BLAKE2B b31fdd2a00d80c63102ea81ed9d1392f243e0d6d67ebf7d1e1a3d20cf7702acc68a3ddd3edd6ccbcfe76c01438c492c15f4d0146689587ccf8a3dccd6043ed11 SHA512 83788f64322067cedca4e459dd2b4117a80d3dc480e1ce0a4d9c323827e13cb1969889a6049cd487dc28ecb0ff52c868a73492c738283ee1236e527b0ca8b11d
diff --git a/dev-cpp/benchmark/benchmark-1.6.0.ebuild b/dev-cpp/benchmark/benchmark-1.6.0.ebuild
new file mode 100644
index 000000000000..1356d6aa2270
--- /dev/null
+++ b/dev-cpp/benchmark/benchmark-1.6.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="A microbenchmark support library"
+HOMEPAGE="https://github.com/google/benchmark"
+SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86"
+IUSE="debug test"
+
+RESTRICT="!test? ( test )"
+
+# Version not in the tree yet
+#BDEPEND="test? ( >=dev-cpp/gtest-1.11.0 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.6-system_testdeps.patch
+ "${FILESDIR}"/${PN}-1.6.0-disable_Werror.patch
+ "${FILESDIR}"/${PN}-1.6.0-versioned_docdir.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBENCHMARK_ENABLE_TESTING=$(usex test)
+ -DBENCHMARK_ENABLE_GTEST_TESTS=OFF
+ -DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF
+ )
+
+ use debug || append-cppflags -DNDEBUG
+
+ cmake_src_configure
+}
diff --git a/dev-cpp/benchmark/files/benchmark-1.6.0-disable_Werror.patch b/dev-cpp/benchmark/files/benchmark-1.6.0-disable_Werror.patch
new file mode 100644
index 000000000000..8a3de98008ea
--- /dev/null
+++ b/dev-cpp/benchmark/files/benchmark-1.6.0-disable_Werror.patch
@@ -0,0 +1,12 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -160,9 +160,6 @@
+ add_cxx_compiler_flag(-Wall)
+ add_cxx_compiler_flag(-Wextra)
+ add_cxx_compiler_flag(-Wshadow)
+- add_cxx_compiler_flag(-Werror RELEASE)
+- add_cxx_compiler_flag(-Werror RELWITHDEBINFO)
+- add_cxx_compiler_flag(-Werror MINSIZEREL)
+ if (NOT BENCHMARK_ENABLE_TESTING)
+ # Disable warning when compiling tests as gtest does not use 'override'.
+ add_cxx_compiler_flag(-Wsuggest-override)
diff --git a/dev-cpp/benchmark/files/benchmark-1.6.0-versioned_docdir.patch b/dev-cpp/benchmark/files/benchmark-1.6.0-versioned_docdir.patch
new file mode 100644
index 000000000000..156e8b0c2a67
--- /dev/null
+++ b/dev-cpp/benchmark/files/benchmark-1.6.0-versioned_docdir.patch
@@ -0,0 +1,9 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -120,5 +120,5 @@
+
+ install(
+ DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}-${CMAKE_PROJECT_VERSION}")
+ endif()