Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| de44671aa2 | |||
| 36f4e785ae | |||
| 813e90c70f | |||
| 055fc5880b |
29
paps-0.8.0-localtime.patch
Normal file
29
paps-0.8.0-localtime.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From 2a37bffcaddd93002bea9fb49122167274a0cbbd Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
|
||||
Date: Fri, 11 Jul 2025 07:23:51 +0200
|
||||
Subject: [PATCH] Replace deprecated fmt::localtime with std::localtime
|
||||
|
||||
fmt::localtime is deprecated since fmt 11.2.0
|
||||
|
||||
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
|
||||
---
|
||||
src/format_from_dict.cc | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/format_from_dict.cc b/src/format_from_dict.cc
|
||||
index bcad60e..ce72e99 100644
|
||||
--- a/src/format_from_dict.cc
|
||||
+++ b/src/format_from_dict.cc
|
||||
@@ -54,7 +54,11 @@ static string scalar_to_string(scalar_t scalar,
|
||||
time_t val = get<time_t>(scalar);
|
||||
if (!spec.length())
|
||||
return to_string(val);
|
||||
- return format(runtime(format("{{:{}}}", spec)), fmt::localtime(val));
|
||||
+ const auto *tm = std::localtime(&val);
|
||||
+ if (tm == nullptr)
|
||||
+ return {};
|
||||
+
|
||||
+ return format(runtime(format("{{:{}}}", spec)), *tm);
|
||||
}
|
||||
throw runtime_error("Unrecognized type!"); // I shouldn't be here!
|
||||
}
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 29 06:18:47 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch paps-0.8.0-localtime.patch
|
||||
* Fix missing localtime in (lib)fmt
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 23 18:28:21 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package paps
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -29,6 +29,7 @@ Patch1: 71.patch
|
||||
# PATCH-FIX-UPSTREAM no-python2.patch gh#dov/paps!75 mcepl@suse.com
|
||||
# Remove dependency on python 2
|
||||
Patch2: no-python2.patch
|
||||
Patch3: paps-0.8.0-localtime.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: intltool
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -52,6 +53,7 @@ paps is a command line program for converting Unicode text encoded in UTF-8 to p
|
||||
|
||||
%build
|
||||
%add_optflags -D_XOPEN_SOURCE
|
||||
%add_optflags -std=c++17
|
||||
%meson
|
||||
%meson_build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user