[packages/libfaketime] Up to 0.9.12

arekm arekm at pld-linux.org
Sat Mar 14 19:40:48 CET 2026


commit 6a6a322af23b3570afa508b2f651e55a95506710
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Mar 14 19:40:41 2026 +0100

    Up to 0.9.12

 libfaketime-gcc16-const.patch | 20 ++++++++++++++++++++
 libfaketime.spec              | 16 +++++++++++-----
 2 files changed, 31 insertions(+), 5 deletions(-)
---
diff --git a/libfaketime.spec b/libfaketime.spec
index b066dab..ea7d2e6 100644
--- a/libfaketime.spec
+++ b/libfaketime.spec
@@ -1,12 +1,13 @@
 Summary:	Report faked system time
 Name:		libfaketime
-Version:	0.9.6
-Release:	3
+Version:	0.9.12
+Release:	1
 License:	GPL v2
 Group:		Libraries
-Source0:	http://www.code-wizards.com/projects/libfaketime/%{name}-%{version}.tar.gz
-# Source0-md5:	f522f899d65a057ad69cff9896c75f78
-URL:		http://www.code-wizards.com/projects/libfaketime/
+Source0:	https://github.com/wolfcw/libfaketime/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# Source0-md5:	ad359ea78db3d28ba2520c34800306ba
+Patch0:		%{name}-gcc16-const.patch
+URL:		https://github.com/wolfcw/libfaketime
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -15,9 +16,12 @@ to change the system-wide time.
 
 %prep
 %setup -q
+%patch -P0 -p1
 
 %build
 %{__make} \
+	FAKETIME_COMPILE_CFLAGS="%{rpmcflags}" \
+	FAKETIME_LINK_FLAGS="%{rpmldflags}" \
 	PREFIX=%{_prefix} \
 	LIBDIRNAME=/%{_lib}/faketime \
 
@@ -29,6 +33,8 @@ rm -rf $RPM_BUILD_ROOT
 	LIBDIRNAME=/%{_lib}/faketime \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/faketime
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
diff --git a/libfaketime-gcc16-const.patch b/libfaketime-gcc16-const.patch
new file mode 100644
index 0000000..8ba84f3
--- /dev/null
+++ b/libfaketime-gcc16-const.patch
@@ -0,0 +1,20 @@
+--- libfaketime-0.9.12/src/libfaketime.c.orig
++++ libfaketime-0.9.12/src/libfaketime.c
+@@ -2485,7 +2485,7 @@
+ static void parse_ft_string(const char *user_faked_time)
+ {
+   struct tm user_faked_time_tm;
+-  char * tmp_time_fmt;
++  const char *tmp_time_fmt;
+   char * nstime_str;
+ 
+   if (!strncmp(user_faked_time, user_faked_time_saved, BUFFERLEN))
+@@ -3156,7 +3156,7 @@
+ bool str_array_contains(const char *haystack, const char *needle)
+ {
+   size_t needle_len = strlen(needle);
+-  char *pos = strstr(haystack, needle);
++  const char *pos = strstr(haystack, needle);
+   while (pos) {
+     if (pos == haystack || *(pos - 1) == ',') {
+       char nextc = *(pos + needle_len);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libfaketime.git/commitdiff/6a6a322af23b3570afa508b2f651e55a95506710



More information about the pld-cvs-commit mailing list