[packages/spdlog] switched to gabime/spdlog and updated to 1.8.1 (bump epoch)

atler atler at pld-linux.org
Mon Nov 2 11:13:38 CET 2020


commit 2b9fd69fd5f9519a4f9c8425b28cb0e24aabd3ec
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Nov 2 10:34:08 2020 +0100

    switched to gabime/spdlog and updated to 1.8.1 (bump epoch)
    
    - COMBINE-lab/spdlog was forked from gabime/spdlog
    - COMBINE-lab/spdlog has not seen any development for 3 years
    - all major distributions ship gabime/spdlog

 libdir.patch         | 14 --------------
 spdlog.spec          | 38 ++++++++++++++++++++++++--------------
 var-name-clash.patch | 40 ----------------------------------------
 3 files changed, 24 insertions(+), 68 deletions(-)
---
diff --git a/spdlog.spec b/spdlog.spec
index 715f7dc..59b6138 100644
--- a/spdlog.spec
+++ b/spdlog.spec
@@ -1,21 +1,22 @@
 Summary:	Very fast C++ logging library
 Summary(pl.UTF-8):	Bardzo szybka biblioteka C++ do logowania
 Name:		spdlog
-Version:	1.12
-Release:	2
+Version:	1.8.1
+Release:	1
+Epoch:		1
 License:	MIT
 Group:		Development/Libraries
-#Source0Download: https://github.com/COMBINE-lab/spdlog/releases
-Source0:	https://github.com/COMBINE-lab/spdlog/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	e05894aef7494567b417328cee683a55
-Patch0:		libdir.patch
-Patch1:		var-name-clash.patch
+#Source0Download: https://github.com/gabime/spdlog/releases
+Source0:	https://github.com/gabime/spdlog/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	765838829ada66a35002dbb3ba3fed30
 URL:		https://github.com/COMBINE-lab/spdlog
-BuildRequires:	cmake >= 3.1
+BuildRequires:	cmake >= 3.10
+BuildRequires:	libfmt-devel >= 5.3.0
+BuildRequires:	pkgconfig
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Very fast, header only, C++ logging library. 
+Very fast C++ logging library.
 
 %description -l pl.UTF-8
 Bardzo szybka, składająca się z samych nagłówków biblioteka C++ do
@@ -25,10 +26,11 @@ logowania.
 Summary:	Very fast C++ logging library
 Summary(pl.UTF-8):	Bardzo szybka biblioteka C++ do logowania
 Group:		Development/Libraries
+Requires:	%{name} = %{epoch}:%{version}-%{release}
 Requires:	libstdc++-devel >= 6:4.7
 
 %description devel
-Very fast, header only, C++ logging library. 
+Very fast C++ logging library.
 
 %description devel -l pl.UTF-8
 Bardzo szybka, składająca się z samych nagłówków biblioteka C++ do
@@ -36,14 +38,13 @@ logowania.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
 
 %build
 install -d build
 cd build
 %cmake .. \
-	-DBUILD_TESTING=OFF
+	-DSPDLOG_BUILD_SHARED=ON \
+	-DSPDLOG_FMT_EXTERNAL=ON
 
 %{__make}
 
@@ -56,9 +57,18 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files devel
+%post    -p /sbin/ldconfig
+%postun    -p /sbin/ldconfig
+
+%files
 %defattr(644,root,root,755)
 %doc LICENSE README.md
+%attr(755,root,root) %{_libdir}/libspdlog.so.*.*.*
+%ghost %{_libdir}/libspdlog.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libspdlog.so
 %{_includedir}/spdlog
 %{_pkgconfigdir}/spdlog.pc
 %{_libdir}/cmake/spdlog
diff --git a/libdir.patch b/libdir.patch
deleted file mode 100644
index fe012da..0000000
--- a/libdir.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- spdlog-1.12/CMakeLists.txt~	2016-08-26 14:39:00.000000000 +0200
-+++ spdlog-1.12/CMakeLists.txt	2020-06-09 21:34:36.160954731 +0200
-@@ -36,9 +36,9 @@
- # * https://github.com/forexample/package-example
- set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
- 
--set(config_install_dir "lib/cmake/${PROJECT_NAME}")
-+set(config_install_dir "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
- set(include_install_dir "include")
--set(pkgconfig_install_dir "lib/pkgconfig")
-+set(pkgconfig_install_dir "lib${LIB_SUFFIX}/pkgconfig")
- 
- set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
- set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
diff --git a/var-name-clash.patch b/var-name-clash.patch
deleted file mode 100644
index edc6b32..0000000
--- a/var-name-clash.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- spdlog-1.12/include/spdlog/fmt/bundled/format.h~	2016-08-26 14:39:00.000000000 +0200
-+++ spdlog-1.12/include/spdlog/fmt/bundled/format.h	2020-06-09 22:31:27.877890734 +0200
-@@ -2195,29 +2195,29 @@
-         typedef typename BasicWriter<Char>::CharPtr CharPtr;
-         Char fill = internal::CharTraits<Char>::cast(spec_.fill());
-         CharPtr out = CharPtr();
--        const unsigned CHAR_WIDTH = 1;
--        if (spec_.width_ > CHAR_WIDTH)
-+        const unsigned _SPD_CHAR_WIDTH = 1;
-+        if (spec_.width_ > _SPD_CHAR_WIDTH)
-         {
-             out = writer_.grow_buffer(spec_.width_);
-             if (spec_.align_ == ALIGN_RIGHT)
-             {
--                std::uninitialized_fill_n(out, spec_.width_ - CHAR_WIDTH, fill);
--                out += spec_.width_ - CHAR_WIDTH;
-+                std::uninitialized_fill_n(out, spec_.width_ - _SPD_CHAR_WIDTH, fill);
-+                out += spec_.width_ - _SPD_CHAR_WIDTH;
-             }
-             else if (spec_.align_ == ALIGN_CENTER)
-             {
-                 out = writer_.fill_padding(out, spec_.width_,
--                                           internal::const_check(CHAR_WIDTH), fill);
-+                                           internal::const_check(_SPD_CHAR_WIDTH), fill);
-             }
-             else
-             {
--                std::uninitialized_fill_n(out + CHAR_WIDTH,
--                                          spec_.width_ - CHAR_WIDTH, fill);
-+                std::uninitialized_fill_n(out + _SPD_CHAR_WIDTH,
-+                                          spec_.width_ - _SPD_CHAR_WIDTH, fill);
-             }
-         }
-         else
-         {
--            out = writer_.grow_buffer(CHAR_WIDTH);
-+            out = writer_.grow_buffer(_SPD_CHAR_WIDTH);
-         }
-         *out = internal::CharTraits<Char>::cast(value);
-     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/spdlog.git/commitdiff/2b9fd69fd5f9519a4f9c8425b28cb0e24aabd3ec



More information about the pld-cvs-commit mailing list