Drop fmt-devel

Resolves: rhbz#1961080
This commit is contained in:
Boris Ranto 2021-07-27 11:33:29 +02:00
parent 8adc9880ff
commit 1f93e41efb
2 changed files with 37 additions and 3 deletions

View File

@ -0,0 +1,32 @@
From 1207906fcf005812f1d861e7bf577a1dc2d1e053 Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Thu, 5 Aug 2021 15:59:39 +0200
Subject: [PATCH] cmake: link bundled fmt statically
instead of building the bundled fmt library as shared library, built
static library. otherwise we'd have to link against libfmt.so.
Signed-off-by: Kefu Chai <kchai@redhat.com>
---
src/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c4d73633ed8..b1a9001e744 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -310,7 +310,11 @@ if(fmt_FOUND)
include_directories(SYSTEM "${fmt_INCLUDE_DIR}")
else()
message(STATUS "Could not find fmt, will build it")
+ set(old_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ set(BUILD_SHARED_LIBS FALSE)
add_subdirectory(fmt)
+ set(BUILD_SHARED_LIBS ${old_BUILD_SHARED_LIBS})
+ unset(old_BUILD_SHARED_LIBS)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/fmt/include")
endif()
--
2.31.1

View File

@ -64,7 +64,7 @@
#################################################################################
Name: ceph
Version: 16.2.4
Release: 3%{?dist}
Release: 4%{?dist}
%if 0%{?fedora} || 0%{?rhel}
Epoch: 2
%endif
@ -94,6 +94,7 @@ Patch0012: 0012-src-compressor-snappy-SnappyCompressor.h.patch
Patch0013: 0013-osdc-Objecter-move-LingerOp-s-ctor-to-.cc.patch
Patch0014: 0014-cmake-add-an-option-WITH_FMT_HEADER_ONLY.patch
Patch0015: 0015-ceph.spec.in-build-with-header-only-fmt-on-RHEL.patch
Patch0016: 0016-cmake-link-bundled-fmt-statically.patch
# ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787
ExcludeArch: i686 armv7hl
%if 0%{?suse_version}
@ -112,7 +113,6 @@ BuildRequires: gperf
BuildRequires: cmake > 3.5
BuildRequires: cryptsetup
BuildRequires: fuse3-devel
BuildRequires: fmt-devel
BuildRequires: doxygen
%if 0%{?rhel} == 7
# devtoolset offers newer make and valgrind-devel, but the old ones are good
@ -135,7 +135,6 @@ BuildRequires: libblkid-devel >= 2.17
BuildRequires: cryptsetup-devel
BuildRequires: libcurl-devel
BuildRequires: libcap-ng-devel
BuildRequires: fmt-devel >= 5.2.1
BuildRequires: pkgconfig(libudev)
BuildRequires: libnl3-devel
BuildRequires: libtool
@ -1143,6 +1142,9 @@ fi
%{_includedir}/rados/objclass.h
%changelog
* Thu Aug 05 2021 Boris Ranto <branto@redhat.com> - 2:16.2.4-4
- Drop fmt-devel from build requires
* Tue Jul 27 2021 Boris Ranto <branto@redhat.com> - 2:16.2.4-3
- Apply fmt-header-only patches
- Update licence field