## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; 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 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 BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake(GTest) BuildRequires: gmock-devel # Required for locale_impermeablity_test so the en_US.UTF-8 locale is valid. BuildRequires: glibc-langpack-en %if %{with libpfm} BuildRequires: libpfm-devel %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} # Removed for Fedora 43; we can drop the Obsoletes after Fedora 45. Obsoletes: %{name}-doc < 1.9.4-9 %description devel %{summary}. %prep %autosetup -n benchmark-%{version} -p1 sed -e '/get_git_version/d' -e '/-Werror/d' -i CMakeLists.txt %conf # 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 %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DGIT_VERSION='%{version}' \ -DBENCHMARK_DOWNLOAD_DEPENDENCIES:BOOL=OFF \ -DBENCHMARK_ENABLE_DOXYGEN:BOOL=OFF \ -DBENCHMARK_ENABLE_GTEST_TESTS:BOOL=ON \ -DBENCHMARK_ENABLE_ASSEMBLY_TESTS:BOOL=OFF \ %if %{with libpfm} -DBENCHMARK_ENABLE_LIBPFM:BOOL=ON \ %endif -DBENCHMARK_ENABLE_INSTALL:BOOL=ON \ -DBENCHMARK_ENABLE_TESTING:BOOL=ON \ -DBENCHMARK_INSTALL_DOCS:BOOL=OFF \ -DBENCHMARK_INSTALL_TOOLS:BOOL=OFF \ -DBENCHMARK_USE_BUNDLED_GTEST:BOOL=OFF %build %cmake_build %install %cmake_install %check %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. %ctest --exclude-regex '^perf_counters_g?test$' %else %ctest %endif %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 * 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