2018-12-06 10:03:10 +01:00
|
|
|
#
|
|
|
|
# spec file for package fmt
|
|
|
|
#
|
2023-03-13 12:36:46 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2018-12-06 10:03:10 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-05-11 20:46:42 +02:00
|
|
|
%define sover 10
|
2018-12-06 10:03:10 +01:00
|
|
|
Name: fmt
|
2023-08-13 00:51:20 +02:00
|
|
|
Version: 10.1.0
|
2018-12-06 10:03:10 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A formatting library for C++
|
2019-11-29 11:25:23 +01:00
|
|
|
License: MIT
|
2018-12-06 10:03:10 +01:00
|
|
|
URL: http://fmtlib.net/
|
2022-08-28 08:39:29 +02:00
|
|
|
Source: https://github.com/fmtlib/fmt/archive/%version.tar.gz
|
2018-12-06 14:39:12 +01:00
|
|
|
Source1: baselibs.conf
|
2022-07-05 16:39:24 +02:00
|
|
|
BuildRequires: c++_compiler
|
2018-12-06 10:03:10 +01:00
|
|
|
BuildRequires: cmake
|
2022-07-05 16:39:24 +02:00
|
|
|
BuildRequires: pkg-config
|
2018-12-06 10:03:10 +01:00
|
|
|
|
|
|
|
%description
|
2018-12-06 22:57:59 +01:00
|
|
|
Fmt is a formatting library for C++. It can be used as an
|
2023-05-11 20:46:42 +02:00
|
|
|
alternative to (s)printf and iostreams.
|
2018-12-06 10:03:10 +01:00
|
|
|
|
2023-05-11 20:46:42 +02:00
|
|
|
%package -n libfmt%sover
|
2018-12-06 22:57:59 +01:00
|
|
|
Summary: A formatting library for C++
|
2018-12-06 10:03:10 +01:00
|
|
|
|
2023-05-11 20:46:42 +02:00
|
|
|
%description -n libfmt%sover
|
2018-12-06 22:57:59 +01:00
|
|
|
Shared library for fmt, a formatting library for C++.
|
2018-12-06 10:03:10 +01:00
|
|
|
|
|
|
|
%package devel
|
2018-12-06 22:57:59 +01:00
|
|
|
Summary: Development files for fmt, a formatting library
|
2023-05-11 20:46:42 +02:00
|
|
|
Requires: libfmt%sover = %version
|
2018-12-06 10:03:10 +01:00
|
|
|
|
|
|
|
%description devel
|
2018-12-06 22:57:59 +01:00
|
|
|
Development files for fmt, a formatting library for C++.
|
2018-12-06 10:03:10 +01:00
|
|
|
|
|
|
|
%prep
|
2019-03-26 09:29:23 +01:00
|
|
|
%autosetup -p1
|
2018-12-06 10:03:10 +01:00
|
|
|
|
|
|
|
%build
|
2023-03-13 12:36:46 +01:00
|
|
|
# X87 fix for excessive precision: https://github.com/fmtlib/fmt/issues/3337
|
2023-05-11 20:46:42 +02:00
|
|
|
export CFLAGS="%optflags -ffloat-store"
|
|
|
|
export CXXFLAGS="$CFLAGS"
|
|
|
|
%cmake -DCMAKE_INSTALL_INCLUDEDIR:PATH="%_includedir"
|
2022-04-30 14:08:19 +02:00
|
|
|
%cmake_build
|
2018-12-06 10:03:10 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
%check
|
|
|
|
# path needs to be exported otherwise unit tests will fail
|
2023-05-11 20:46:42 +02:00
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%buildroot/%_libdir"
|
2018-12-06 10:03:10 +01:00
|
|
|
%ctest
|
|
|
|
|
2023-05-11 20:46:42 +02:00
|
|
|
%post -n libfmt%sover -p /sbin/ldconfig
|
|
|
|
%postun -n libfmt%sover -p /sbin/ldconfig
|
2018-12-06 10:03:10 +01:00
|
|
|
|
2023-05-11 20:46:42 +02:00
|
|
|
%files -n libfmt%sover
|
2018-12-06 10:03:10 +01:00
|
|
|
%license LICENSE.rst
|
2023-05-11 20:46:42 +02:00
|
|
|
%_libdir/libfmt.so.%{sover}*
|
2018-12-06 10:03:10 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%doc ChangeLog.rst README.rst
|
2023-05-11 20:46:42 +02:00
|
|
|
%_includedir/%name
|
|
|
|
%_libdir/cmake/%name
|
|
|
|
%_libdir/libfmt.so
|
|
|
|
%_libdir/pkgconfig/%name.pc
|
2018-12-06 10:03:10 +01:00
|
|
|
|
|
|
|
%changelog
|