From fa3f32a8632b050005196ec0e9773ef5c8b0b5ed Mon Sep 17 00:00:00 2001 From: zhangxingrong Date: Mon, 8 Jul 2024 18:12:02 +0800 Subject: [PATCH] Round Upstream Patchs --- ...rmat-for-one-single-100-width-column.patch | 29 +++++++++++++++++++ ...date-__STDC_VERSION__-check-with-C23.patch | 26 +++++++++++++++++ htop.spec | 12 ++++++-- 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 0001-Add-HeaderLayout-format-for-one-single-100-width-column.patch create mode 100644 0002-Update-__STDC_VERSION__-check-with-C23.patch diff --git a/0001-Add-HeaderLayout-format-for-one-single-100-width-column.patch b/0001-Add-HeaderLayout-format-for-one-single-100-width-column.patch new file mode 100644 index 0000000..2d421c5 --- /dev/null +++ b/0001-Add-HeaderLayout-format-for-one-single-100-width-column.patch @@ -0,0 +1,29 @@ +From 13ca4e2b5feab9cbf149ed470d6021c8904867f3 Mon Sep 17 00:00:00 2001 +From: Peter Dey +Date: Tue, 16 Apr 2024 20:59:25 +0200 +Subject: [PATCH] Add HeaderLayout format for one single 100%-width column + +--- + HeaderLayout.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/HeaderLayout.h b/HeaderLayout.h +index 473936e20..c8d51c845 100644 +--- a/HeaderLayout.h ++++ b/HeaderLayout.h +@@ -17,6 +17,7 @@ in the source distribution for its full text. + + typedef enum HeaderLayout_ { + HF_INVALID = -1, ++ HF_ONE_100, + HF_TWO_50_50, + HF_TWO_33_67, + HF_TWO_67_33, +@@ -38,6 +39,7 @@ static const struct { + const char* name; + const char* description; + } HeaderLayout_layouts[LAST_HEADER_LAYOUT] = { ++ [HF_ONE_100] = { 1, { 100, 0, 0, 0 }, "one_100", "1 column - full width", }, + [HF_TWO_50_50] = { 2, { 50, 50, 0, 0 }, "two_50_50", "2 columns - 50/50 (default)", }, + [HF_TWO_33_67] = { 2, { 33, 67, 0, 0 }, "two_33_67", "2 columns - 33/67", }, + [HF_TWO_67_33] = { 2, { 67, 33, 0, 0 }, "two_67_33", "2 columns - 67/33", }, diff --git a/0002-Update-__STDC_VERSION__-check-with-C23.patch b/0002-Update-__STDC_VERSION__-check-with-C23.patch new file mode 100644 index 0000000..8ea510d --- /dev/null +++ b/0002-Update-__STDC_VERSION__-check-with-C23.patch @@ -0,0 +1,26 @@ +From 7a4be0c383194b26c8414c89ab9b7d23009d11e0 Mon Sep 17 00:00:00 2001 +From: Explorer09 +Date: Mon, 22 Apr 2024 18:32:23 +0800 +Subject: [PATCH] Update '__STDC_VERSION__' check with C23 + +`__STDC_VERSION__` will be defined as 202311L for C23. +--- + Compat.h | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Compat.h b/Compat.h +index 2bc12dc63..02b2fcb22 100644 +--- a/Compat.h ++++ b/Compat.h +@@ -74,9 +74,8 @@ ssize_t Compat_readlink(openat_arg_t dirfd, + # endif + #endif + +-/* C23 will guarantee static_assert is a keyword or a macro */ +-/* FIXME: replace 202300L with proper value once C23 is published */ +-#if (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202300L ++/* C23 guarantees static_assert is a keyword or a macro */ ++#if (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311L + # if !defined(static_assert) + # define static_assert(expr, msg) _Static_assert(expr, msg) + # endif diff --git a/htop.spec b/htop.spec index 7b7f9ae..b0c99d9 100644 --- a/htop.spec +++ b/htop.spec @@ -1,6 +1,6 @@ Name: htop Version: 3.3.0 -Release: 1 +Release: 2 Summary: htop - an interactive process viewer License: GPLv2 URL: https://htop.dev @@ -8,6 +8,9 @@ Source0: https://github.com/htop-dev/htop/archive/%{version}.tar.gz#/%{name}-%{v BuildRequires: perl perl-PathTools ncurses-devel autoconf automake gcc +Patch0001: 0001-Add-HeaderLayout-format-for-one-single-100-width-column.patch +Patch0002: 0002-Update-__STDC_VERSION__-check-with-C23.patch + %description htop is a cross-platform interactive process viewer. htop allows scrolling the list of processes vertically and horizontally to see their full command lines and related information like memory and CPU consumption. @@ -15,7 +18,7 @@ The information displayed is configurable through a graphical setup and can be s Tasks related to processes (e.g. killing and renicing) can be done without entering their PIDs. %prep -%autosetup -p1 +%autosetup -n %{name}-%{version} -p1 %build ./autogen.sh @@ -34,6 +37,11 @@ Tasks related to processes (e.g. killing and renicing) can be done without enter %{_mandir}/man1/%{name}.1.gz %changelog +* Fri Jul 5 2024 zhangxingrong- - 3.3.0-2 +- Round Upstream Patchs + - Add HeaderLayout format for one single 100%-width column + - Update '__STDC_VERSION__' check with C23 + * Thu Jan 25 2024 yixiangzhike - 3.3.0-1 - Update version to 3.3.0 - htop add '-n/--max-itrations' option -- Gitee