## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 # Test data is stored in a separate git repository. We should always use the # latest commit at the time of the release we are packaging. %global stf_commit 97a0b2e638feb479387554cf253e346500541e7e %global stf_url https://github.com/fastfloat/supplemental_test_files # Build and run exhaustive tests? # # These really do take a long time—at least an hour on the fastest machines, # and over ten hours on s390x (affected also by limited parallelism). Some # tests cover the entire single-precision domain, about four billion inputs. # Still, we can finish before we hit any timeouts, and running the exhaustive # tests brings peace of mind. %bcond_without exhaustive Name: fast_float Summary: Fast & exact implementation of C++ from_chars for float/double Version: 3.9.0 Release: %autorelease URL: https://github.com/fastfloat/fast_float # README.md: # Licensed under either of Apache License, Version 2.0 or MIT license at your # option. License: Apache-2.0 OR MIT Source0: %{url}/archive/v%{version}/fast_float-%{version}.tar.gz Source1: %{stf_url}/archive/%{stf_commit}/supplemental_test_files-%{stf_commit}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake # Our choice; the default make backend should work just as well BuildRequires: ninja-build BuildRequires: doctest-devel # Doctest is header-only, so we must BR: BuildRequires: doctest-static # No compiled binaries are installed, so this would be empty. %global debug_package %{nil} %global common_description %{expand: The fast_float library provides fast header-only implementations for the C++ from_chars functions for float and double types. These functions convert ASCII strings representing decimal values (e.g., 1.3e10) into binary types. We provide exact rounding (including round to even). In our experience, these fast_float functions many times faster than comparable number-parsing functions from existing C++ standard libraries.} %description %{common_description} %package devel Summary: %{summary} BuildArch: noarch # Header-only library Provides: fast_float-static = %{version}-%{release} Requires: cmake-filesystem %description devel %{common_description} %prep %autosetup %setup -q -T -D -b 1 # Compiling with -Werror makes sense for upstream CI, but is excessively strict # for downstream builds across a variety of compiler versions. sed -r -i 's/-Werror//' tests/CMakeLists.txt %build # Partially emulate the activity of FetchContent_Declare() in # tests/CMakeLists.txt so that we can run the tests offline. mkdir -p '%{_vpath_builddir}/_deps' ln -s "${PWD}/../supplemental_test_files-%{stf_commit}/" \ '%{_vpath_builddir}/_deps/supplemental_test_files-src' %cmake \ -GNinja \ -DFETCHCONTENT_FULLY_DISCONNECTED:BOOL=ON \ -DSYSTEM_DOCTEST:BOOL=ON \ -DFASTFLOAT_TEST:BOOL=ON \ -DFASTFLOAT_EXHAUSTIVE:BOOL=%{?with_exhaustive:ON}%{?!with_exhaustive:OFF} %cmake_build %install %cmake_install %check %ctest %files devel %license LICENSE-APACHE %license LICENSE-MIT %doc AUTHORS %doc CONTRIBUTORS %doc README.md %{_includedir}/fast_float/ %{_datadir}/cmake/FastFloat/ %changelog * Sat Jan 21 2023 Benjamin A. Beasley 3.9.0-1 - Update to 3.9.0 (close RHBZ#2162158) * Thu Jan 19 2023 Fedora Release Engineering 3.8.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Dec 20 2022 Benjamin A. Beasley 3.8.1-2 - Indicate dirs. in files list with trailing slashes * Sun Nov 27 2022 Benjamin A. Beasley 3.8.1-1 - Update to 3.8.1 (close RHBZ#2148670) * Fri Nov 25 2022 Benjamin A. Beasley 3.8.0-1 - Update to 3.8.0 (close RHBZ#2148328) * Thu Nov 17 2022 Benjamin A. Beasley 3.7.0-1 - Update to 3.7.0 (close RHBZ#2143469) * Mon Nov 14 2022 Benjamin A. Beasley 3.6.0-1 - Update to 3.6.0 (close RHBZ#2140130) * Sat Aug 06 2022 Benjamin A. Beasley 3.5.1-1 - Update to 3.5.1 (close RHBZ#2115912) * Mon Aug 01 2022 Benjamin A. Beasley 3.4.0-9 - Update License field to SPDX * Thu Jul 21 2022 Fedora Release Engineering 3.4.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Apr 20 2022 Benjamin A. Beasley 3.4.0-7 - Drop “forge” macros, which are not doing much here * Sat Mar 05 2022 Vitaly Zaitsev 3.4.0-6 - Export CMake targets as architecture independent. * Tue Mar 01 2022 Vitaly Zaitsev 3.4.0-5 - Fixed CMake configs installation. Fixes RHBZ#2059643. * Thu Jan 20 2022 Fedora Release Engineering 3.4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Dec 16 2021 Benjamin A. Beasley 3.4.0-3 - Let the -devel package be noarch * Thu Dec 09 2021 Benjamin A. Beasley 3.4.0-2 - Stop meddling with install path for .cmake files * Wed Dec 01 2021 Benjamin A. Beasley 3.4.0-1 - Update to 3.4.0 (close RHBZ#2027907) * Tue Sep 21 2021 Benjamin A. Beasley 3.2.0-1 - Update to 3.2.0 (close RHBZ#2006183) * Thu Sep 16 2021 Benjamin A. Beasley 3.1.0-1 - Update to 3.1.0 (close RHBZ#2004552) * Tue Sep 14 2021 Benjamin A. Beasley 3.0.0-1 - Update to 3.0.0 * Wed Aug 04 2021 Benjamin A. Beasley 2.0.0-1 - Fix version number * Wed Jul 21 2021 Fedora Release Engineering 1.1.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Sun Jul 11 2021 Benjamin A. Beasley - 1.1.2-3 - Drop EPEL8 support from Fedora branch * Sat Jul 10 2021 Benjamin A. Beasley - 1.1.2-2 - BR: doctest-static now that it is available * Mon Jun 21 2021 Benjamin A. Beasley - 1.1.2-1 - Update to 1.1.2 - Drop fast_float-1.1.1-system-doctest.patch; now merged upstream - Add EPEL8 support - Do not compile tests with -Werror * Mon Jun 21 2021 Benjamin A. Beasley - 1.1.1-1 - Initial package