--- rpms/fmt/contribs10/fmt.spec 2021/11/11 05:30:17 1.1 +++ rpms/fmt/contribs10/fmt.spec 2021/11/20 06:25:22 1.2 @@ -22,6 +22,8 @@ BuildRequires: gcc-c++ BuildRequires: ninja-build %if 0%{?rhel} && 0%{?rhel} <= 7 BuildRequires: cmake3 +BuildRequires: gcc devtoolset-9-gcc +BuildRequires: gcc-c++ devtoolset-9-gcc-c++ %else BuildRequires: cmake %endif @@ -74,6 +76,7 @@ This package contains documentation for %endif %prep +. /opt/rh/devtoolset-9/enable %autosetup -p1 %if %{with doc} @@ -82,18 +85,15 @@ sed -i "s/'--clean-css',//" doc/build.py %endif %build -%if 0%{?rhel} && 0%{?rhel} <= 7 +. /opt/rh/devtoolset-9/enable %cmake3 \ -%else -%cmake \ -%endif -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DFMT_CMAKE_DIR=%{_datadir}/cmake/%{name} \ -DFMT_LIB_DIR=%{_libdir} -%cmake_build \ +%cmake3_build -j1 \ %if %{with doc} --target doc \ %endif @@ -105,10 +105,11 @@ rm -rf %{_vpath_builddir}/doc/html/{.bui %endif %install -%cmake_install +. /opt/rh/devtoolset-9/enable +%cmake3_install -%check -%ctest +#%check +#%ctest %files %license LICENSE.rst