4d9f08
%undefine __cmake_in_source_build
4d9f08
0bb384
%bcond_with doc
0bb384
Name:           fmt
4d9f08
Version:        7.1.3
4d9f08
Release:        2%{?dist}
0bb384
Summary:        Small, safe and fast formatting library for C++
0bb384
0bb384
License:        BSD
0bb384
URL:            https://github.com/fmtlib/%{name}
0bb384
Source0:        %{url}/archive/%{version}.tar.gz
0bb384
# See https://github.com/fmtlib/fmt/issues/443 and https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/LVKYLDLJVWAVJE4MQVKDO6PYZRD5MCP6/
0bb384
Patch1:         doc-build-removed-all-pip-internet-stuff.patch
4d9f08
Patch2:         doc-build-do-not-create-virtual-environment.patch
4d9f08
Patch3:         doc-_templates-layout-stripped-Google-Analytics.patch
4d9f08
Patch4:         doc-_templates-layout-stripped-download-links.patch
4d9f08
Patch5:         doc-index-removed-GitHub-iframe.patch
4d9f08
Patch6:         doc-build-use-sphinx-build-3.patch
0bb384
0bb384
BuildRequires:  gcc
0bb384
BuildRequires:  gcc-c++
0bb384
%if 0%{?rhel} && 0%{?rhel} <= 7
0bb384
BuildRequires:  cmake3
0bb384
%else
0bb384
BuildRequires:  cmake
0bb384
%endif
0bb384
%if %{with doc}
0bb384
BuildRequires:  doxygen
0bb384
BuildRequires:  nodejs-less
0bb384
%if 0%{?rhel} && 0%{?rhel} <= 7
0bb384
BuildRequires:  python%{python3_version_nodots}-sphinx
0bb384
BuildRequires:  python%{python3_version_nodots}-breathe
0bb384
%else
0bb384
BuildRequires:  python3-sphinx
0bb384
BuildRequires:  python3-breathe
0bb384
%endif
4d9f08
%else
4d9f08
Provides:       %{name}-doc = %{?epoch:%{epoch}:}%{version}-%{release}
4d9f08
Obsoletes:      %{name}-doc < %{?epoch:%{epoch}:}%{version}-%{release}
0bb384
%endif
0bb384
0bb384
# This package replaces the old name of cppformat
4d9f08
Provides:       cppformat = %{?epoch:%{epoch}:}%{version}-%{release}
4d9f08
Obsoletes:      cppformat < %{?epoch:%{epoch}:}%{version}-%{release}
0bb384
0bb384
%description
0bb384
C++ Format is an open-source formatting library for C++. It can be used as a
0bb384
safe alternative to printf or as a fast alternative to IOStreams.
0bb384
0bb384
%package        devel
0bb384
Summary:        Development files for %{name}
4d9f08
Requires:       %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
0bb384
0bb384
# This package replaces the old name of cppformat
4d9f08
Provides:       cppformat-devel = %{?epoch:%{epoch}:}%{version}-%{release}
4d9f08
Obsoletes:      cppformat-devel < %{?epoch:%{epoch}:}%{version}-%{release}
0bb384
0bb384
%description    devel
0bb384
This package contains the header file for using %{name}.
0bb384
0bb384
%if %{with doc}
0bb384
%package        doc
0bb384
Summary:        Documentation files for %{name}
0bb384
License:        Python
0bb384
BuildArch:      noarch
0bb384
0bb384
# This package replaces the old name of cppformat
4d9f08
Provides:       cppformat-doc = %{?epoch:%{epoch}:}%{version}-%{release}
4d9f08
Obsoletes:      cppformat-doc < %{?epoch:%{epoch}:}%{version}-%{release}
0bb384
0bb384
%description    doc
0bb384
This package contains documentation for developer documentation for %{name}.
0bb384
%endif
0bb384
0bb384
%prep
0bb384
%autosetup -p1
0bb384
mkdir build
0bb384
4d9f08
%if %{with doc}
4d9f08
# Remove --clean-css since that plugin isn't available
4d9f08
sed -i "s/'--clean-css',//" doc/build.py
4d9f08
%endif
4d9f08
0bb384
%build
0bb384
pushd build
0bb384
%cmake ..                                     \
0bb384
    -DCMAKE_BUILD_TYPE=RelWithDebInfo         \
0bb384
    -DCMAKE_POSITION_INDEPENDENT_CODE=ON      \
0bb384
    -DFMT_CMAKE_DIR=%{_datadir}/cmake/%{name} \
0bb384
    -DFMT_LIB_DIR=%{_libdir}
0bb384
4d9f08
make all
4d9f08
0bb384
%if %{with doc}
0bb384
# Remove temporary build products
4d9f08
rm -rf %{_vpath_builddir}/doc/html/{.buildinfo,.doctrees,objects.inv}
0bb384
%endif
0bb384
0bb384
%install
0bb384
%make_install -C build
0bb384
0bb384
%check
0bb384
0bb384
%files
0bb384
%license LICENSE.rst
0bb384
%doc ChangeLog.rst README.rst
4d9f08
%{_libdir}/lib%{name}.so.7*
0bb384
0bb384
%files devel
0bb384
%{_includedir}/%{name}
0bb384
%{_libdir}/lib%{name}.so
0bb384
%{_datadir}/cmake/%{name}
0bb384
%{_libdir}/pkgconfig/%{name}.pc
0bb384
0bb384
%if %{with doc}
0bb384
%files doc
0bb384
%doc %{_datadir}/doc/%{name}
0bb384
%license doc/python-license.txt
0bb384
%endif
0bb384
0bb384
%changelog
4d9f08
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.3-2
4d9f08
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
4d9f08
4d9f08
* Sun Nov 29 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 7.1.3-1
4d9f08
- Updated to version 7.1.3.
4d9f08
4d9f08
* Tue Nov 10 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 7.1.2-1
4d9f08
- Updated to version 7.1.2.
4d9f08
4d9f08
* Sat Aug 08 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 7.0.3-1
4d9f08
- Updated to version 7.0.3.
4d9f08
4d9f08
* Wed Jul 29 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 7.0.2-1
4d9f08
- Updated to version 7.0.2.
4d9f08
4d9f08
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-2
4d9f08
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
4d9f08
4d9f08
* Wed Jul 08 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 7.0.1-1
4d9f08
- Updated to version 7.0.1.
4d9f08
0bb384
* Sat May 09 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 6.2.1-1
0bb384
- Updated to version 6.2.1.
0bb384
0bb384
* Thu Apr 30 2020 Kefu Chai <tchaikov@gmail.com> - 6.2.0-2
0bb384
- Incorporate patch from upstream to address https://github.com/fmtlib/fmt/issues/1631
0bb384
0bb384
* Mon Apr 06 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 6.2.0-1
0bb384
- Updated to version 6.2.0.
0bb384
0bb384
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.2-2
0bb384
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0bb384
0bb384
* Wed Dec 18 2019 Vitaly Zaitsev <vitaly@easycoding.org> - 6.1.2-1
0bb384
- Updated to version 6.1.2.
0bb384
- Recreated all documentation patches.
0bb384
- SPEC file cleanup.
0bb384
0bb384
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-2
0bb384
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
0bb384
0bb384
* Mon Jun 10 2019 Jan Staněk <jstanek@redhat.com> - 5.3.0-1
0bb384
- Update to 5.3.0
0bb384
- Recreate documentation build patches
0bb384
- Package new pkg-config files
0bb384
0bb384
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-2
0bb384
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
0bb384
0bb384
* Thu Oct 11 2018 Kefu Chai <tchaikov@gmail.com> - 5.2.1-1
0bb384
- Update to 5.2.1
0bb384
- Build using python3 packages on fedora
0bb384
- Remove links in document accessing network
0bb384
- Package ChangeLog.rst and README.rst
0bb384
- Drop fmt-static package
0bb384
0bb384
* Fri Aug 31 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.0.2-7
0bb384
- Fix python2 issue for doc
0bb384
0bb384
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-6
0bb384
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0bb384
0bb384
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-5
0bb384
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0bb384
0bb384
* Wed Aug 09 2017 Dave Johansen <davejohansen@gmail.com> - 3.0.2-4
0bb384
- Patch for Test 8 segfault
0bb384
0bb384
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
0bb384
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
0bb384
0bb384
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
0bb384
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0bb384
0bb384
* Sat Jun 24 2017 Dave Johansen <davejohansen@gmail.com> - 3.0.2-1
0bb384
- Upstream release
0bb384
0bb384
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1-3
0bb384
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
0bb384
0bb384
* Tue Dec 27 2016 Dave Johansen <davejohansen@gmail.com> - 3.0.1-2
0bb384
- Build documentation
0bb384
0bb384
* Fri Nov 25 2016 Dave Johansen <davejohansen@gmail.com> - 3.0.1-1
0bb384
- Upstream release
0bb384
0bb384
* Tue Nov 15 2016 Dave Johansen <davejohansen@gmail.com> - 3.0.0-2
0bb384
- Fix expected unqualified-id before numeric constant error
0bb384
0bb384
* Wed Aug 24 2016 Dave Johansen <davejohansen@gmail.com> - 3.0.0-1
0bb384
- Initial RPM release