## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 12; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond ctest 1 # Build with libpfm for hardware performance counter support? %bcond libpfm 1 Name: google-benchmark Version: 1.9.5 %global so_version 1 Release: %autorelease License: Apache-2.0 Summary: A microbenchmark support library URL: https://github.com/google/benchmark Source: %{url}/archive/v%{version}/benchmark-%{version}.tar.gz # In PerfCountersTest.MultiThreaded, serialize worker threads # https://github.com/google/benchmark/pull/2175 # # Fixes: # # [BUG] Flaky failure of PerfCountersTest.MultiThreaded # https://github.com/google/benchmark/issues/2173 Patch: 0001-In-PerfCountersTest.MultiThreaded-serialize-worker-t.patch BuildSystem: cmake # Do not enable BENCHMARK_ENABLE_ASSEMBLY_TESTS, since it is for a very # specific OS and compiler: # https://github.com/google/benchmark/issues/1326#issuecomment-1015221235 BuildOption(conf): %{shrink: -DCMAKE_BUILD_TYPE=Release -DGIT_VERSION='%{version}' -DBENCHMARK_DOWNLOAD_DEPENDENCIES:BOOL=OFF -DBENCHMARK_ENABLE_DOXYGEN:BOOL=OFF -DBENCHMARK_ENABLE_GTEST_TESTS:BOOL=%{?with_ctest:ON}%{?!with_ctest:OFF} -DBENCHMARK_ENABLE_ASSEMBLY_TESTS:BOOL=OFF -DBENCHMARK_ENABLE_LIBPFM:BOOL=%{?with_libfpm:ON}%{?!with_libfpm:OFF} -DBENCHMARK_ENABLE_INSTALL:BOOL=ON -DBENCHMARK_ENABLE_TESTING:BOOL=%{?with_ctest:ON}%{?!with_ctest:OFF} -DBENCHMARK_INSTALL_DOCS:BOOL=OFF -DBENCHMARK_INSTALL_TOOLS:BOOL=OFF -DBENCHMARK_USE_BUNDLED_GTEST:BOOL=OFF } %ifarch s390x # [BUG] Multiple PerfCountersTest failures with counter.num_counters() zero on # some s390x systems # https://github.com/google/benchmark/issues/2174 # # Five of the nine tests in perf_counters_gtest fail with: # # Expected equality of these values: # counter.num_counters() # Which is: 0 # 1 # # Tests in perf_counters_test also fail for similar reasons: # # […]/test/output_test.h:146: GetAs: Check `sv != nullptr && !sv->empty()' # failed. # # It’s likely that these are a “correct failures,” in that the library is # compiled with libpfm support (so performance counters are supported in # general) but even basic performance counters are not necessarily supported on # more recent s390x hardware versions (i.e., probably z14 and later). # # We don’t bother attempting to run the four tests that do succeed in # perf_counters_gtest; it’s much more straightforward to just skip these two # executables at the ctest level entirely, and little is lost by doing so. # # This is fixed upstream by https://github.com/google/benchmark/pull/2204, but # it is not trivial to backport, so we keep this workaround until the next # upstream release. BuildOption(check): --exclude-regex '^perf_counters_g?test$' %endif BuildRequires: gcc BuildRequires: gcc-c++ %if %{with libpfm} BuildRequires: libpfm-devel %endif %if %{with ctest} BuildRequires: cmake(GTest) BuildRequires: gmock-devel # Required for locale_impermeablity_test so the en_US.UTF-8 locale is valid. BuildRequires: glibc-langpack-en %endif %description A library to support the benchmarking of functions, similar to unit-tests. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %if %{with libpfm} Requires: libpfm-devel%{?_isa} %endif # Removed for Fedora 43; we can drop the Obsoletes after Fedora 45. Obsoletes: %{name}-doc < 1.9.4-9 %description devel %{summary}. %prep -a sed --in-place \ --expression='/get_git_version/d' \ --expression='/-Werror/d' \ CMakeLists.txt %files %license AUTHORS %license CONTRIBUTORS %license LICENSE %doc README.md %{_libdir}/libbenchmark*.so.%{so_version}{,.*} %files devel %{_libdir}/libbenchmark*.so %{_includedir}/benchmark/ %{_libdir}/cmake/benchmark/ %{_libdir}/pkgconfig/benchmark*.pc %changelog ## START: Generated by rpmautospec * Thu Aug 06 2026 Benjamin A. Beasley - 1.9.5-12 - Make the new libpfm-devel dep. arch-specific * Thu Aug 06 2026 Matthew Krupcale - 1.9.5-11 - Add Requires: libpfm-devel on google-benchmark-devel * Thu Jul 16 2026 Fedora Release Engineering - 1.9.5-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Mon May 18 2026 Benjamin A. Beasley - 1.9.5-8 - Use various long options * Sun May 17 2026 Benjamin A. Beasley - 1.9.5-6 - Use the cmake declarative buildsystem * Mon Apr 20 2026 Benjamin A. Beasley - 1.9.5-5 - Handle test issues related to libfpm / perf counters - Skip perf counter tests on s390x - Serialize the multi-threaded perf counter test * Sat Apr 18 2026 Matthew Krupcale - 1.9.5-3 - Build with libpfm for perf counter support * Sat Mar 14 2026 Benjamin A. Beasley - 1.9.5-2 - The ninja backend is the default now; don’t bother specifying it * Wed Jan 21 2026 Benjamin A. Beasley - 1.9.5-1 - Update to 1.9.5 (close RHBZ#2431596) * Fri Jan 16 2026 Fedora Release Engineering - 1.9.4-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Thu Jul 24 2025 Fedora Release Engineering - 1.9.4-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Mon Jun 16 2025 Benjamin A. Beasley - 1.9.4-12 - Explicitly disable assembly tests * Mon Jun 16 2025 Benjamin A. Beasley - 1.9.4-10 - Stop building and installing Doxygen-generated HTML docs * Mon Jun 16 2025 Benjamin A. Beasley - 1.9.4-9 - Attempt to handle license/bundling in Doxygen-generated HTML * Mon Jun 16 2025 Benjamin A. Beasley - 1.9.4-5 - Do not package CONTRIBUTING.md, which is about working with upstream * Tue May 20 2025 Vitaly - 1.9.4-1 - Updated to version 1.9.4. * Thu May 08 2025 Vitaly - 1.9.3-1 - Updated to version 1.9.3. * Tue Mar 25 2025 Vitaly - 1.9.2-1 - Updated to version 1.9.2. * Fri Jan 17 2025 Fedora Release Engineering - 1.9.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Fri Nov 29 2024 Vitaly - 1.9.1-1 - Updated to version 1.9.1. * Sat Aug 17 2024 Vitaly - 1.9.0-1 - Updated to version 1.9.0. * Tue Jul 23 2024 Vitaly - 1.8.5-1 - Updated to version 1.8.5. * Thu Jul 18 2024 Fedora Release Engineering - 1.8.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu May 23 2024 Vitaly - 1.8.4-1 - Updated to version 1.8.4. * Mon Mar 25 2024 Vitaly - 1.8.3-1 - Updated to version 1.8.3. * Wed Jan 24 2024 Fedora Release Engineering - 1.8.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild ## END: Generated by rpmautospec