Accepting request 655370 from home:alois:branches:devel:libraries:c_c++
- initial package for version 5.2.1 OBS-URL: https://build.opensuse.org/request/show/655370 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=1
This commit is contained in:
commit
f52c0e470d
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
1
baselibs.conf
Normal file
1
baselibs.conf
Normal file
@ -0,0 +1 @@
|
||||
libfmt5
|
77
fix-fmt_pc.patch
Normal file
77
fix-fmt_pc.patch
Normal file
@ -0,0 +1,77 @@
|
||||
From 9d0c9c4bb145a286f725cd38c90331eee7addc7f Mon Sep 17 00:00:00 2001
|
||||
From: Cole Mickens <cole.mickens@gmail.com>
|
||||
Date: Wed, 24 Oct 2018 01:33:22 -0700
|
||||
Subject: [PATCH] cmake: output share/fmt.pc
|
||||
|
||||
---
|
||||
.gitignore | 1 +
|
||||
CMakeLists.txt | 9 +++++++++
|
||||
support/cmake/fmt.pc.in | 11 +++++++++++
|
||||
3 files changed, 21 insertions(+)
|
||||
create mode 100644 support/cmake/fmt.pc.in
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 1e6172fe..694f8f8f 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -31,3 +31,4 @@ CMakeFiles
|
||||
FMT.build
|
||||
Makefile
|
||||
run-msbuild.bat
|
||||
+fmt.pc
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7cf74829..d1bc9558 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -202,6 +202,7 @@ if (FMT_INSTALL)
|
||||
"Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.")
|
||||
set(version_config ${PROJECT_BINARY_DIR}/fmt-config-version.cmake)
|
||||
set(project_config ${PROJECT_BINARY_DIR}/fmt-config.cmake)
|
||||
+ set(pkgconfig ${PROJECT_BINARY_DIR}/fmt.pc)
|
||||
set(targets_export_name fmt-targets)
|
||||
|
||||
set (INSTALL_TARGETS fmt)
|
||||
@@ -215,11 +216,18 @@ if (FMT_INSTALL)
|
||||
set(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING
|
||||
"Installation directory for include files, relative to ${CMAKE_INSTALL_PREFIX}.")
|
||||
|
||||
+ set(FMT_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH
|
||||
+ "Installation directory for pkgconfig (.pc) files, relative to ${CMAKE_INSTALL_PREFIX}.")
|
||||
+
|
||||
# Generate the version, config and target files into the build directory.
|
||||
write_basic_package_version_file(
|
||||
${version_config}
|
||||
VERSION ${FMT_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion)
|
||||
+ configure_file(
|
||||
+ "${PROJECT_SOURCE_DIR}/support/cmake/fmt.pc.in"
|
||||
+ "${pkgconfig}"
|
||||
+ @ONLY)
|
||||
configure_package_config_file(
|
||||
${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
|
||||
${project_config}
|
||||
@@ -240,6 +248,7 @@ if (FMT_INSTALL)
|
||||
install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}
|
||||
DESTINATION ${FMT_LIB_DIR})
|
||||
install(FILES ${FMT_HEADERS} DESTINATION ${FMT_INC_DIR})
|
||||
+ install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")
|
||||
endif ()
|
||||
|
||||
if (FMT_DOC)
|
||||
diff --git a/support/cmake/fmt.pc.in b/support/cmake/fmt.pc.in
|
||||
new file mode 100644
|
||||
index 00000000..4b82ddb0
|
||||
--- /dev/null
|
||||
+++ b/support/cmake/fmt.pc.in
|
||||
@@ -0,0 +1,11 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+libdir=@CMAKE_INSTALL_LIBDIR@
|
||||
+includedir=@CMAKE_INSTALL_INCLUDEDIR@
|
||||
+
|
||||
+Name: fmt
|
||||
+Description: A modern formatting library
|
||||
+Version: @FMT_VERSION@
|
||||
+Libs: -L${libdir} -lfmt
|
||||
+Cflags: -I${includedir}
|
||||
+
|
3
fmt-5.2.1.tar.gz
Normal file
3
fmt-5.2.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3c812a18e9f72a88631ab4732a97ce9ef5bcbefb3235e9fd465f059ba204359b
|
||||
size 648668
|
5
fmt.changes
Normal file
5
fmt.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 9 11:51:14 UTC 2018 - munix9@googlemail.com
|
||||
|
||||
- initial package for version 5.2.1
|
||||
|
88
fmt.spec
Normal file
88
fmt.spec
Normal file
@ -0,0 +1,88 @@
|
||||
#
|
||||
# spec file for package fmt
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# 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 5
|
||||
Name: fmt
|
||||
Version: 5.2.1
|
||||
Release: 0
|
||||
Summary: A formatting library for C++
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: http://fmtlib.net/
|
||||
Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM fix-fmt_pc.patch
|
||||
Patch0: fix-fmt_pc.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkgconfig
|
||||
|
||||
%description
|
||||
Fmt is an open-source formatting library for C++. It can be used as an
|
||||
alternative to (s)printf and IOStreams.
|
||||
|
||||
%package -n libfmt%{sover}
|
||||
Summary: Shared library for fmt
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libfmt%{sover}
|
||||
Shared library for fmt - a formatting library for C++.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for fmt
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libfmt%{sover} = %{version}
|
||||
|
||||
%description devel
|
||||
Development files for fmt - a formatting library for C++.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%cmake -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir}
|
||||
|
||||
%make_jobs
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
%check
|
||||
# path needs to be exported otherwise unit tests will fail
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir}
|
||||
%ctest
|
||||
|
||||
%post -n libfmt%{sover} -p /sbin/ldconfig
|
||||
%postun -n libfmt%{sover} -p /sbin/ldconfig
|
||||
|
||||
%files -n libfmt%{sover}
|
||||
%if 0%{?sle_version} > 120200
|
||||
%license LICENSE.rst
|
||||
%else
|
||||
%doc LICENSE.rst
|
||||
%endif
|
||||
%{_libdir}/libfmt.so.%{sover}*
|
||||
|
||||
%files devel
|
||||
%doc ChangeLog.rst README.rst
|
||||
%{_includedir}/%{name}
|
||||
%{_libdir}/cmake/%{name}
|
||||
%{_libdir}/libfmt.so
|
||||
%{_datadir}/pkgconfig/%{name}.pc
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user