SHA256
1
0
forked from pool/spdlog
spdlog/spdlog.spec
Luigi Baldoni f992846733 Accepting request 805860 from home:alois:branches:devel:libraries:c_c++
- Update to version 1.6.0
  What's new:
  * Load log levels from environment variable SPDLOG_LEVEL
  * New windows eventlog sink.
  * New tcp sink that sends log messages in tcp to a remote
    server.
  * Extend spdlog with your own flags in the log pattern. See
    wiki for details.
  * Bump the bundled fmt version to 6.2.0 .
  Fixes and improvements:
  * Prevent race condition when SPDLOG_PREVENT_CHILD_FD is
    defined.
  * Fix race condition in the filename() function in the file
    sinks.
  * Fix ansicolor_sink::set_color(..) - can cause memory
    violation if user provides a custom color code that points to
    stack memory.
  * Optimize cases when string_view is passed to the logger to
    avoid unnecessary fmt::format.
  * Support for max files in daily logger.
  * Fix deprecated warning with C++14 and external fmt lib.
  * Optimize colos sinks to use std::array instead of map to
    find color codes.
  * Fix potential buffer overflow in color_sinks when one of
    them has a pattern without colors.
  * Don't include windows.h in common.h.
  * Resolve erroneous clang-tidy warning about using a moved
    from pointer.
  * Fixed numerous clang-tidy warnings.
  * Added options to to_hex to output hex like hexdump.
  * Removed the 'SPDLOG_NO_NAME` macro in tweakme.h and cmake.
  * Added a forward declaration header spdlog\fwd.h .
  * Moved throw to dedicated function to optimize compile-time
    and runtime-performance.
  * Fix a build issue when SPDLOG_PREVENT_CHILD_FD is defined.
  * Fix issue with using external fmt.
  * Minor performance optimizations in pattern formatter.
  * Add log function to the logger API to allow logging with
    custom timepoint.
  * Removed meson support.
  * Fix typos and tabs in the code.
  * CMake: Fix GNUInstallDirs include location.
  * CMake: workaround for Unknown extension ".c" for file issue.
  * CMake: Disabled extra warnings generation by default. Use
    SPDLOG_BUILD_WARNINGS=ON to enable again.
  * CMake: Support for precompiled headers with
    SPDLOG_ENABLE_PCH flag.
  * CMake: Set minimum version of fmt to 5.3.0.
  * CMake: Fix tabs, whitespaces and eol.
  * Tests: removed duplicate entry for count_lines().
  * Tests: don't run spdlog-utests and spdlog-utests-ho in
    parallel.
  * Tests: Enable running the tests against an installed copy of
    spdlog.
  * Tests: Support empty SPDLOG_EOL.

OBS-URL: https://build.opensuse.org/request/show/805860
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/spdlog?expand=0&rev=30
2020-05-15 14:17:17 +00:00

102 lines
2.7 KiB
RPMSpec

#
# spec file for package spdlog
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _sover 1
Name: spdlog
Version: 1.6.0
Release: 0
Summary: C++ logging library
License: MIT
URL: https://github.com/gabime/spdlog
Source0: https://github.com/gabime/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: benchmark-devel >= 1.4.0
BuildRequires: cmake
BuildRequires: gcc
%if 0%{?suse_version} > 1500
BuildRequires: gcc-c++ >= 8
%else
BuildRequires: gcc8-c++
%endif
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: pkgconfig(fmt)
BuildRequires: pkgconfig(libsystemd)
%description
This is a packaged version of the gabime/spdlog header-only C++
logging library available at Github.
%package devel
Summary: Development files for %{name}
Requires: lib%{name}%{_sover} = %{version}
Requires: libstdc++-devel
Requires: pkgconfig(fmt)
%description devel
The %{name}-devel package contains C++ header files for developing
applications that use %{name}.
%package -n lib%{name}%{_sover}
Summary: C++ logging library
%description -n lib%{name}%{_sover}
This is a packaged version of the gabime/spdlog C++ logging library
available at Github.
%prep
%autosetup -p1
find . -name '.gitignore' -exec rm {} \;
sed -i -e "s,\r,," README.md LICENSE
%build
export CXX=g++
test -x "$(type -p g++-8)" && export CXX=g++-8
%cmake -G Ninja \
-DSPDLOG_BUILD_TESTS=ON \
-DSPDLOG_BUILD_BENCH=OFF \
-DSPDLOG_FMT_EXTERNAL=ON \
-DCMAKE_BUILD_TYPE=Release \
-DSPDLOG_BUILD_EXAMPLES=OFF \
-DSPDLOG_BUILD_SHARED=ON \
..
%ninja_build
%install
%ninja_install -C build
%check
export LD_LIBRARY_PATH="%{_builddir}/%{name}-%{version}/build"
%ctest
%post -n lib%{name}%{_sover} -p /sbin/ldconfig
%postun -n lib%{name}%{_sover} -p /sbin/ldconfig
%files devel
%license LICENSE
%doc README.md
%{_includedir}/%{name}
%{_libdir}/lib%{name}.so
%{_libdir}/cmake/%{name}
%{_libdir}/pkgconfig/%{name}.pc
%files -n lib%{name}%{_sover}
%{_libdir}/lib%{name}.so.%{_sover}*
%changelog