From 129160ec854dca4c3fedb5bcfbcb56930371da0f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 1 Jan 2021 21:06:00 +0000 Subject: gentoo new year resync : 01.01.2021 --- sys-process/htop/Manifest | 5 +- .../htop-3.0.4-sort_column_header_highlight.patch | 153 +++++++++++++++++++++ sys-process/htop/htop-3.0.2.ebuild | 2 +- sys-process/htop/htop-3.0.4-r1.ebuild | 71 ++++++++++ sys-process/htop/htop-3.0.4.ebuild | 67 --------- 5 files changed, 228 insertions(+), 70 deletions(-) create mode 100644 sys-process/htop/files/htop-3.0.4-sort_column_header_highlight.patch create mode 100644 sys-process/htop/htop-3.0.4-r1.ebuild delete mode 100644 sys-process/htop/htop-3.0.4.ebuild (limited to 'sys-process/htop') diff --git a/sys-process/htop/Manifest b/sys-process/htop/Manifest index a0c86fa39e74..dc2c2a68c371 100644 --- a/sys-process/htop/Manifest +++ b/sys-process/htop/Manifest @@ -1,8 +1,9 @@ AUX htop-3.0.3-tinfo.patch 1643 BLAKE2B d3aadf6f244fda024cf4d129a9972fa864f24768a9e6bd5858af1964832064669d034f86a63163568e3c982efc11ce6593a81d108fbbbe8a0c507b39241cfe16 SHA512 9fc5763418f3a380d1841febf2f09ef795a012ca91454f4f36c763d9c74660806a1cfc527d3a686cdfe94e7d6efafaef79ad2d312fd1f8431da24ddbf7f7cb6e +AUX htop-3.0.4-sort_column_header_highlight.patch 5294 BLAKE2B f046ca56c10151d534b533af9e76a84311283729a9f1c145833354f184593ae6b4a18e4b007904e00746524cdf07a6756bfea7137516fd12f7fa4be1bafe9645 SHA512 e04046dde72ae3ba0b9ff89160ba3fa1d6c3f45ed3ef98ff5fda61746f26d304b5e2b157589375f781d2a298437a8e554a332bc913ead915b37cda43701796c3 DIST htop-3.0.2.tar.gz 176132 BLAKE2B 9abc28461d346eeac7f9741bc1ba08c898d00be013abce972be4370b9b35d92661fcb4521fa715bc779c1c9b56bc3c0eeb5375c0df8ec7585df3774ac67ca504 SHA512 5b578972e40e3229aa8b2bdc931c4c8bceaafd2a150b02e0257ab35a4fbac25852e959ecc472bd6747be57ea8734b59cc4b872a5ac829624cc80e1722c54d868 DIST htop-3.0.3.tar.gz 292925 BLAKE2B 7e227188e3954c0cb273b4bc95eaf2e11237daca3d929d4674dcdfc987c4af26e4b08da2b0f184d6d3e06952dee5704e468bf4b7bc03dfa0b6602c058beac495 SHA512 208eff95a0df3ab38f5e3175bb34420c8833ad630c797825a3fb188a1111476a3287aa5f53511c83da90d181afc3e6ea246ea01fbc3227466c5c928a5d70badc DIST htop-3.0.4.tar.gz 296224 BLAKE2B b8fc4fe7c595f0a22b253f1eeea24d571c87401a426b8f6dba0ce15d98ea77ca94bc286428386cbf478f0e7ea4afde0e86e5e6b93bb88af616ba474e45e745f5 SHA512 d57e4fd326791bd2306f4a6ce2c4f4bf0499a0050efbaeb71a211148fa52993f707d8afdf0292dc26234cffdcba84a97e1d4422bc61aec40ba3ef9ebd91ebf6c -EBUILD htop-3.0.2.ebuild 1511 BLAKE2B a1b6eaf69aabdb450abde79d4b22cc76c7ce1bedec581f6a567495e8102c920f50e86a748c5b1d525d372b9fd1bf239004311e58d84f7f6f645ca3af864e16da SHA512 948286f10b37d29ed2ae9115c8fdbf813399ba30ef301014220019b0329671c6e5bef93b43c9f406497250ec1f7eb091dcb803e3b2b54dae595ec94834e943eb +EBUILD htop-3.0.2.ebuild 1512 BLAKE2B 0dc8a28aef689f7982bbdb07aa7f281c54dd464fb7ca96f591bffcad8f5869ce98b47754f1f6fd448abd2e30a2dc9b7df5e5bccbb2eee9130f8d020e2c6484a7 SHA512 d6b37c6261d5bf3a39d5aab53a325e6b3d6a7f36d8de03245732b3b256edddcc61a39869187610b031d582d71d15bc7f5a8892539c958865c49fdd8b8f5fb068 EBUILD htop-3.0.3.ebuild 1687 BLAKE2B f5f32ebffb159df027c4b85d3e8f7499b8b1169afa7ede0b1d8af439f8dab8fdca10eea7dfb8ae17029ec168e8518fe0451103b4cc1ead085b879d9337cf0efc SHA512 0d6ab37677a4081b4a76dad83159cbcceba98767b667376fd48da9e506ea2580ddd0fdf6d03eff807a86a3bff82066bb3cb3def555b49b0916e1dd3a80f87b86 -EBUILD htop-3.0.4.ebuild 1627 BLAKE2B 7130531eb4b7ed77b4fc0a47f4bb72a562e6fd641cd13ad669bc244d1e718cd7b609070964014c657a3be20d444822d99b973780fd13eabf61f7ad9e86b267a6 SHA512 3d8b757b2e88e5e94168f7fff0ab4d3a690a2edcddabd2a93f6eb3a2c3250f1660fbbc0fdc6ac3e04e2a242135b30d47b6c0f29994bdc37ec457a4ef24950e07 +EBUILD htop-3.0.4-r1.ebuild 1695 BLAKE2B 62320d1cbf512fae1323b130e314fd498f5051c1203fbe0f59de6c6855c7da4da52d7212cf8b93fdf66fc979aa5b1df1ed1e3b3471e3605b63cb0b93901140a4 SHA512 60b3d49c38e271bdc7261776ecb00e6b30a93fa404775a533127296ae48abef40691fe811b66340aec0c04ed30da4b3938d2699bfbadf954f6ec00fc02ba7592 MISC metadata.xml 911 BLAKE2B e92af64c9d4ead9348cecca14425e8778d3d69e63cd45063e76c1a8052610e6155299c01606aa3a3540ec3b432629d074cda74130ad86f1d31bb09957fb51a75 SHA512 686e8459e279182fcba99f65d67491c11ed144149207e2ac952797b6d66f145ef7b2ea19a5116e9e9a70d6a6ad6d4ecbf106c8f3734e45019f7e274311437ece diff --git a/sys-process/htop/files/htop-3.0.4-sort_column_header_highlight.patch b/sys-process/htop/files/htop-3.0.4-sort_column_header_highlight.patch new file mode 100644 index 000000000000..a2b6a0d4259a --- /dev/null +++ b/sys-process/htop/files/htop-3.0.4-sort_column_header_highlight.patch @@ -0,0 +1,153 @@ +From 86d293125565a15bbd94683080dbc755c5d7edee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= +Date: Tue, 22 Dec 2020 17:12:38 +0100 +Subject: [PATCH] Restore highlighted header of current sorted process column + +--- + MainPanel.c | 10 ++++++++-- + Panel.c | 22 ++++++++++------------ + Panel.h | 6 ++++-- + ScreenManager.c | 2 +- + htop.c | 2 -- + 5 files changed, 23 insertions(+), 19 deletions(-) + +diff --git a/MainPanel.c b/MainPanel.c +index 949138dc..c8a4c059 100644 +--- a/MainPanel.c ++++ b/MainPanel.c +@@ -102,7 +102,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) { + MainPanel_updateTreeFunctions(this, this->state->settings->treeView); + } + if (reaction & HTOP_UPDATE_PANELHDR) { +- ProcessList_printHeader(this->state->pl, Panel_getHeader(super)); ++ result |= REDRAW; + } + if (reaction & HTOP_REFRESH) { + result |= REFRESH; +@@ -168,13 +168,19 @@ static void MainPanel_drawFunctionBar(Panel* super) { + } + } + ++static void MainPanel_printHeader(Panel* super) { ++ MainPanel* this = (MainPanel*) super; ++ ProcessList_printHeader(this->state->pl, &super->header); ++} ++ + const PanelClass MainPanel_class = { + .super = { + .extends = Class(Panel), + .delete = MainPanel_delete + }, + .eventHandler = MainPanel_eventHandler, +- .drawFunctionBar = MainPanel_drawFunctionBar ++ .drawFunctionBar = MainPanel_drawFunctionBar, ++ .printHeader = MainPanel_printHeader + }; + + MainPanel* MainPanel_new() { +diff --git a/Panel.c b/Panel.c +index b36f1efc..26a0c0ec 100644 +--- a/Panel.c ++++ b/Panel.c +@@ -76,13 +76,6 @@ void Panel_setSelectionColor(Panel* this, ColorElements colorId) { + this->selectionColorId = colorId; + } + +-RichString* Panel_getHeader(Panel* this) { +- assert (this != NULL); +- +- this->needsRedraw = true; +- return &(this->header); +-} +- + inline void Panel_setHeader(Panel* this, const char* header) { + RichString_writeWide(&(this->header), CRT_colors[PANEL_HEADER_FOCUS], header); + this->needsRedraw = true; +@@ -228,15 +221,20 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect + int x = this->x; + int h = this->h; + ++ const int header_attr = focus ++ ? CRT_colors[PANEL_HEADER_FOCUS] ++ : CRT_colors[PANEL_HEADER_UNFOCUS]; ++ if (force_redraw) { ++ if (Panel_printHeaderFn(this)) ++ Panel_printHeader(this); ++ else ++ RichString_setAttr(&this->header, header_attr); ++ } + int headerLen = RichString_sizeVal(this->header); + if (headerLen > 0) { +- int attr = focus +- ? CRT_colors[PANEL_HEADER_FOCUS] +- : CRT_colors[PANEL_HEADER_UNFOCUS]; +- attrset(attr); ++ attrset(header_attr); + mvhline(y, x, ' ', this->w); + if (scrollH < headerLen) { +- RichString_setAttr(&this->header, attr); + RichString_printoffnVal(this->header, y, x, scrollH, + MINIMUM(headerLen - scrollH, this->w)); + } +diff --git a/Panel.h b/Panel.h +index 959c0b78..63659e3c 100644 +--- a/Panel.h ++++ b/Panel.h +@@ -37,11 +37,13 @@ typedef enum HandlerResult_ { + + typedef HandlerResult (*Panel_EventHandler)(Panel*, int); + typedef void (*Panel_DrawFunctionBar)(Panel*); ++typedef void (*Panel_PrintHeader)(Panel*); + + typedef struct PanelClass_ { + const ObjectClass super; + const Panel_EventHandler eventHandler; + const Panel_DrawFunctionBar drawFunctionBar; ++ const Panel_PrintHeader printHeader; + } PanelClass; + + #define As_Panel(this_) ((const PanelClass*)((this_)->super.klass)) +@@ -49,6 +51,8 @@ typedef struct PanelClass_ { + #define Panel_eventHandler(this_, ev_) (assert(As_Panel(this_)->eventHandler), As_Panel(this_)->eventHandler((Panel*)(this_), ev_)) + #define Panel_drawFunctionBarFn(this_) As_Panel(this_)->drawFunctionBar + #define Panel_drawFunctionBar(this_) (assert(As_Panel(this_)->drawFunctionBar), As_Panel(this_)->drawFunctionBar((Panel*)(this_))) ++#define Panel_printHeaderFn(this_) As_Panel(this_)->printHeader ++#define Panel_printHeader(this_) (assert(As_Panel(this_)->printHeader), As_Panel(this_)->printHeader((Panel*)(this_))) + + struct Panel_ { + Object super; +@@ -84,8 +88,6 @@ void Panel_done(Panel* this); + + void Panel_setSelectionColor(Panel* this, ColorElements colorId); + +-RichString* Panel_getHeader(Panel* this); +- + void Panel_setHeader(Panel* this, const char* header); + + void Panel_move(Panel* this, int x, int y); +diff --git a/ScreenManager.c b/ScreenManager.c +index 57cb564d..4c74e477 100644 +--- a/ScreenManager.c ++++ b/ScreenManager.c +@@ -141,7 +141,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { + + bool timedOut = true; + bool redraw = true; +- bool force_redraw = false; ++ bool force_redraw = true; + bool rescan = false; + int sortTimeout = 0; + int resetSortTimeout = 5; +diff --git a/htop.c b/htop.c +index 4b43ed2a..aa6d9147 100644 +--- a/htop.c ++++ b/htop.c +@@ -313,8 +313,6 @@ int main(int argc, char** argv) { + + MainPanel_updateTreeFunctions(panel, settings->treeView); + +- ProcessList_printHeader(pl, Panel_getHeader((Panel*)panel)); +- + State state = { + .settings = settings, + .ut = ut, diff --git a/sys-process/htop/htop-3.0.2.ebuild b/sys-process/htop/htop-3.0.2.ebuild index e046b0cceb60..334cec5e4ece 100644 --- a/sys-process/htop/htop-3.0.2.ebuild +++ b/sys-process/htop/htop-3.0.2.ebuild @@ -10,7 +10,7 @@ inherit autotools linux-info python-any-r1 DESCRIPTION="interactive process viewer" HOMEPAGE="https://htop.dev/ https://github.com/htop-dev/htop" SRC_URI="https://github.com/htop-dev/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~x64-macos" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~x64-macos" LICENSE="BSD GPL-2" SLOT="0" diff --git a/sys-process/htop/htop-3.0.4-r1.ebuild b/sys-process/htop/htop-3.0.4-r1.ebuild new file mode 100644 index 000000000000..8b37c2d31a59 --- /dev/null +++ b/sys-process/htop/htop-3.0.4-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit autotools linux-info python-any-r1 + +DESCRIPTION="interactive process viewer" +HOMEPAGE="https://htop.dev/ https://github.com/htop-dev/htop" +SRC_URI="https://github.com/htop-dev/${PN}/archive/${PV/_}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" + +LICENSE="BSD GPL-2" +SLOT="0" +IUSE="debug hwloc kernel_FreeBSD kernel_linux lm-sensors openvz unicode vserver" + +BDEPEND="virtual/pkgconfig" +RDEPEND="sys-libs/ncurses:0=[unicode?] + hwloc? ( sys-apps/hwloc ) + lm-sensors? ( sys-apps/lm-sensors )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS}" + +DOCS=( ChangeLog README ) + +CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS" + +S="${WORKDIR}/${P/_}" + +PATCHES=( + "${FILESDIR}/${P}-sort_column_header_highlight.patch" +) + +pkg_setup() { + if ! has_version sys-process/lsof; then + ewarn "To use lsof features in htop (what processes are accessing" + ewarn "what files), you must have sys-process/lsof installed." + fi + + python-any-r1_pkg_setup + linux-info_pkg_setup +} + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + [[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971 + + local myeconfargs=( + $(use_enable debug) + $(use_enable hwloc) + $(use_enable openvz) + $(use_enable unicode) + $(use_enable vserver) + $(use_with lm-sensors sensors) + ) + + if ! use hwloc && use kernel_linux ; then + myeconfargs+=( --enable-linux-affinity ) + else + myeconfargs+=( --disable-linux-affinity ) + fi + + econf ${myeconfargs[@]} +} diff --git a/sys-process/htop/htop-3.0.4.ebuild b/sys-process/htop/htop-3.0.4.ebuild deleted file mode 100644 index 1e6c67cacd04..000000000000 --- a/sys-process/htop/htop-3.0.4.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6..9} ) - -inherit autotools linux-info python-any-r1 - -DESCRIPTION="interactive process viewer" -HOMEPAGE="https://htop.dev/ https://github.com/htop-dev/htop" -SRC_URI="https://github.com/htop-dev/${PN}/archive/${PV/_}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" - -LICENSE="BSD GPL-2" -SLOT="0" -IUSE="debug hwloc kernel_FreeBSD kernel_linux lm-sensors openvz unicode vserver" - -BDEPEND="virtual/pkgconfig" -RDEPEND="sys-libs/ncurses:0=[unicode?] - hwloc? ( sys-apps/hwloc ) - lm-sensors? ( sys-apps/lm-sensors )" -DEPEND="${RDEPEND} - ${PYTHON_DEPS}" - -DOCS=( ChangeLog README ) - -CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS" - -S="${WORKDIR}/${P/_}" - -pkg_setup() { - if ! has_version sys-process/lsof; then - ewarn "To use lsof features in htop (what processes are accessing" - ewarn "what files), you must have sys-process/lsof installed." - fi - - python-any-r1_pkg_setup - linux-info_pkg_setup -} - -src_prepare() { - default - - eautoreconf -} - -src_configure() { - [[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971 - - local myeconfargs=( - $(use_enable debug) - $(use_enable hwloc) - $(use_enable openvz) - $(use_enable unicode) - $(use_enable vserver) - $(use_with lm-sensors sensors) - ) - - if ! use hwloc && use kernel_linux ; then - myeconfargs+=( --enable-linux-affinity ) - else - myeconfargs+=( --disable-linux-affinity ) - fi - - econf ${myeconfargs[@]} -} -- cgit v1.2.3