public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/catimg] epel10: Improve C99 compatibility
@ 2026-10-08 12:44 Florian Weimer
0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2026-10-08 12:44 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/catimg
Branch : epel10
Commit : 2b1fe7cf0a74e042272f56d37f916d3f7b781b25
Author : Florian Weimer <fweimer@redhat.com>
Date : 2022-12-22T08:49:57+01:00
Stats : +24/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/catimg/c/2b1fe7cf0a74e042272f56d37f916d3f7b781b25?branch=epel10
Log:
Improve C99 compatibility
Related to:
<https://fedoraproject.org/wiki/Changes/PortingToModernC>
<https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
---
diff --git a/catimg-c99.patch b/catimg-c99.patch
new file mode 100644
index 0000000..181bbdf
--- /dev/null
+++ b/catimg-c99.patch
@@ -0,0 +1,18 @@
+Build with -std=gnu99 instead of -std=c99, so that <unistd.h> declares
+the usleep function, as used in catimg.c.
+
+Submitted upstream: <https://github.com/posva/catimg/pull/71>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0a4edcbe9f1e0e93..d82568e2073a524a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,7 @@ endif()
+ # set some options
+ #set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -g -std=c99 -Wno-unused-result")
+ #set(CMAKE_BUILD_TYPE Debug)
+-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -Os -std=c99 -Wno-unused-result")
++set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -Os -std=gnu99 -Wno-unused-result")
+ set(CMAKE_BUILD_TYPE Release)
+
+ set(SRC ${PROJECT_SOURCE_DIR}/src)
diff --git a/catimg.spec b/catimg.spec
index 3ac39e2..32760b0 100644
--- a/catimg.spec
+++ b/catimg.spec
@@ -1,11 +1,12 @@
Name: catimg
Version: 2.7.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Print images in a terminal with 256 colors support
License: MIT
URL: https://github.com/posva/catimg
Source0: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
+Patch0: catimg-c99.patch
BuildRequires: cmake >= 2.8
BuildRequires: gcc-c++
@@ -15,7 +16,7 @@ BuildRequires: gcc-c++
JPEG, PNG, ICO and GIF formats.
%prep
-%autosetup
+%autosetup -p1
%build
%cmake
@@ -35,6 +36,9 @@ install -D --preserve-timestamps --mode 644 completion/_catimg %{buildroot}%{_da
%{_mandir}/man1/%{name}.1*
%changelog
+* Thu Dec 22 2022 Florian Weimer <fweimer@redhat.com> - 2.7.0-7
+- Improve C99 compatibility
+
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-08 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 12:44 [rpms/catimg] epel10: Improve C99 compatibility Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox