- Release notes 1.15.0: * Update bundled fmt to 11.0.2 by @gabime in #3236 * Add wide character formatting and output support to console in wincolor_sink. by @DominikGrabiec in #3092 * Allow customization of syslog_sink by @Silex in #3124 * make example compatible with fmt 11 by @ziyao233 in #3130 * Fix building with FMT_ENFORCE_COMPILE_STRING by @AJIOB in #3137 * fix: set /Zc:__cplusplus and /MP to MSVC only by @zjyhjqs in #3139 * V1.x : fixed "suggest override" errors for gcc 8.5 and gcc 9.1 by @esmirno in #3158 * Add info about max_files in the docstrings of hourly/daily file sinks by @themightyoarfish in #3170 * use std::lock_guard instead of std::unique_lock by @wsehjk in #3179 * fix/issue-3101: fix the issue where mdc ignores SPDLOG_NO_TLS by @Allen-20180115 in #3184 * Update mdc.h error message by @gabime in #3185 * [docs] Update conan install command in README by @uilianries in #3172 * Update CMakeLists.txt, Fix spelling errors by @zgzhengSEU in #3193 * Fix warning - extra ';' for -Wextra-semi by @hydai in #3198 * Improve Cross-Platform Build Instructions in Documentation by @Mq-b in #3229 * Exchange promise for condition_variable when flushing (fixes #3221) by @Oipo in #3228 * Ensure flush callback gets called in move-assign operator by @Oipo in #3232 * Make flush async again in async logger to prevent crashes and hangs by @gabime in #3235 * Update README.md by @gabime in #3240 * utf8_to_wstrbuf now handles invalid utf8 sequences by @captainurist in #3244 and #3245 * Added tsan option to CMake and CI by @gabime in #3237 and #3247 /pull/3244 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/spdlog?expand=0&rev=110
120 lines
3.2 KiB
RPMSpec
120 lines
3.2 KiB
RPMSpec
#
|
|
# spec file for package spdlog
|
|
#
|
|
# Copyright (c) 2024 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/
|
|
#
|
|
|
|
|
|
Name: spdlog
|
|
%define lname libspdlog1_15
|
|
%define sover 1.15
|
|
Version: 1.15.0
|
|
Release: 0
|
|
Summary: C++ logging library
|
|
License: MIT
|
|
Group: Development/Libraries/C and C++
|
|
URL: https://github.com/gabime/spdlog
|
|
Source0: https://github.com/gabime/%{name}/archive/refs/tags/v%{version}.tar.gz
|
|
Source99: baselibs.conf
|
|
BuildRequires: cmake >= 3.10
|
|
%if 0%{?suse_version} > 1500
|
|
BuildRequires: gcc-c++ >= 13
|
|
%else
|
|
BuildRequires: gcc13-c++
|
|
%endif
|
|
BuildRequires: ninja
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: (pkgconfig(catch2) >= 3)
|
|
BuildRequires: (pkgconfig(fmt) >= 11)
|
|
BuildRequires: pkgconfig(libsystemd)
|
|
|
|
%description
|
|
A header-only/compiled, C++ logging library.
|
|
|
|
* Asynchronous mode (optional)
|
|
* Multi/Single threaded loggers.
|
|
* Various log targets (rotating/daily files, console, with colors,
|
|
syslog, custom target)
|
|
|
|
%package devel
|
|
Summary: Header files for spdlog
|
|
Requires: %{lname} = %{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 %{lname}
|
|
Summary: C++ logging library
|
|
|
|
%description -n %{lname}
|
|
A header-only/compiled, C++ logging library.
|
|
|
|
* Asynchronous mode (optional)
|
|
* Multi/Single threaded loggers.
|
|
* Various log targets (rotating/daily files, console, with colors,
|
|
syslog, custom target)
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
find . -name .gitignore -delete
|
|
sed -i -e "s,\r,," README.md LICENSE
|
|
|
|
%build
|
|
export CXX=g++
|
|
test -x "$(type -p g++-13)" && export CXX=g++-13
|
|
|
|
# spdlog embodies fmt ABI; add some symvers so both ld.so and rpm notice the change.
|
|
v=v$(rpm -q --qf="%%{VERSION}" --whatprovides "pkgconfig(fmt)" | sed -e 's/\..*//')
|
|
echo "FMT_$v { global: _ZN6spdlog*N3fmt${#v}${v}*; };" >spdlog.sym
|
|
v="$PWD/spdlog.sym"
|
|
|
|
%cmake -G Ninja \
|
|
-DSPDLOG_BUILD_TESTS=ON \
|
|
-DSPDLOG_BUILD_BENCH=OFF \
|
|
-DSPDLOG_FMT_EXTERNAL=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DSPDLOG_BUILD_EXAMPLE=OFF \
|
|
-DSPDLOG_BUILD_SHARED=ON \
|
|
-DCMAKE_SHARED_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,-z,now -Wl,--version-script=$v" \
|
|
..
|
|
%ninja_build
|
|
|
|
%install
|
|
%ninja_install -C build
|
|
|
|
%check
|
|
export LD_LIBRARY_PATH="$PWD/build"
|
|
%ctest
|
|
|
|
%post -n %{lname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lname} -p /sbin/ldconfig
|
|
|
|
%files devel
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{_includedir}/spdlog/
|
|
%{_libdir}/libspdlog.so
|
|
%{_libdir}/cmake/spdlog/
|
|
%{_libdir}/pkgconfig/spdlog.pc
|
|
%{_libdir}/cmake
|
|
|
|
%files -n %{lname}
|
|
%{_libdir}/libspdlog.so.*
|
|
|
|
%changelog
|