summaryrefslogtreecommitdiff
path: root/sys-process/htop
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [master] <gitlab@liguros.net>2021-01-17 23:35:33 +0000
committerLiguros - Gitlab CI/CD [master] <gitlab@liguros.net>2021-01-17 23:35:33 +0000
commit8e8120eabdd28020aa69c7a60505cce2edd20adc (patch)
tree061bf0acdc672720e0bc3a2d575f67d25aedb2d8 /sys-process/htop
parentc16790af2c9b4cbc38e565d4311252193ff85484 (diff)
downloadbaldeagleos-repo-21.1.2.tar.gz
baldeagleos-repo-21.1.2.tar.xz
baldeagleos-repo-21.1.2.zip
Updating liguros repo21.1.2
Diffstat (limited to 'sys-process/htop')
-rw-r--r--sys-process/htop/Manifest5
-rw-r--r--sys-process/htop/files/htop-2.2.0-gcc-10.patch27
-rw-r--r--sys-process/htop/files/htop-3.0.4-sort_column_header_highlight.patch153
-rw-r--r--sys-process/htop/htop-2.2.0.ebuild61
-rw-r--r--sys-process/htop/htop-3.0.4-r1.ebuild (renamed from sys-process/htop/htop-3.0.3.ebuild)2
-rw-r--r--sys-process/htop/htop-3.0.5.ebuild (renamed from sys-process/htop/htop-3.0.1.ebuild)29
6 files changed, 174 insertions, 103 deletions
diff --git a/sys-process/htop/Manifest b/sys-process/htop/Manifest
index c6eae48c37a8..d47148de742c 100644
--- a/sys-process/htop/Manifest
+++ b/sys-process/htop/Manifest
@@ -1,4 +1,3 @@
-DIST htop-2.2.0.tar.gz 308109 BLAKE2B 323a3bfe5032b6d59a3f751831a2af6aa7ae7e9ecceb35828812cb375d919de51f401ffe59fffdfc83a72c8dace879c5d5a0e857511c20e2126d11cdc4101b0b SHA512 ec1335bf0e3e0387e5e50acbc508d0effad19c4bc1ac312419dc97b82901f4819600d6f87a91668f39d429536d17304d4b14634426a06bec2ecd09df24adc62e
-DIST htop-3.0.1.tar.gz 179925 BLAKE2B d722bc49d7b546aec1359a5dc838e0f6cc4b17f8d2d2c59fd7fbeaf827233f658ea819f4c69832af5cfd4f836d3d66c223a9580037cf8d6d2ae28c6a6b3499b5 SHA512 0d6a1b0839a94f01429c85a459b0c6439051d1b6e69bf77c6b3bb31c81902a3127936ab9adc5bf1807f4b3d7b10a177a89fb9b883931f8dcf828ed06727d6945
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
+DIST htop-3.0.5.tar.gz 297931 BLAKE2B a6e62f99ef349809d11bb14b4d515036601aa457507b34a96354607f136cc4e0d3d40a715f1576c70833db051d989fa55142b4f8bba0f5f432ea3676364d9575 SHA512 7dae83ceff6b3f30e69c30c9559dbb3bf69281df006c6a26e4e2c49dd5a147e05ed7bafeeac8ec5bedc8ba670470100cc128209a92654858f98df09a9394594f
diff --git a/sys-process/htop/files/htop-2.2.0-gcc-10.patch b/sys-process/htop/files/htop-2.2.0-gcc-10.patch
deleted file mode 100644
index dc49b0bb8508..000000000000
--- a/sys-process/htop/files/htop-2.2.0-gcc-10.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/CRT.h
-+++ b/CRT.h
-@@ -140,7 +140,7 @@ extern const char **CRT_treeStr;
-
- extern int CRT_delay;
-
--int* CRT_colors;
-+extern int* CRT_colors;
-
- extern int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT];
-
-@@ -150,13 +150,13 @@ extern int CRT_scrollHAmount;
-
- extern int CRT_scrollWheelVAmount;
-
--char* CRT_termType;
-+extern char* CRT_termType;
-
- // TODO move color scheme to Settings, perhaps?
-
- extern int CRT_colorScheme;
-
--void *backtraceArray[128];
-+extern void *backtraceArray[128];
-
- #if HAVE_SETUID_ENABLED
-
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?= <cgzones@googlemail.com>
+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-2.2.0.ebuild b/sys-process/htop/htop-2.2.0.ebuild
deleted file mode 100644
index 2e4023f79868..000000000000
--- a/sys-process/htop/htop-2.2.0.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{6,7,8,9,10} )
-
-inherit linux-info python-any-r1
-
-DESCRIPTION="interactive process viewer"
-HOMEPAGE="https://hisham.hm/htop/"
-SRC_URI="https://hisham.hm/htop/releases/${PV}/${P}.tar.gz"
-
-LICENSE="BSD GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
-IUSE="kernel_FreeBSD kernel_linux openvz unicode vserver"
-
-RDEPEND="sys-libs/ncurses:0=[unicode?]"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- virtual/pkgconfig"
-
-PATCHES=( "${FILESDIR}"/${P}-gcc-10.patch )
-DOCS=( ChangeLog README )
-
-CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
-
-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() {
- rm missing || die
-
- default
-
- python_fix_shebang scripts/MakeHeader.py
-}
-
-src_configure() {
- [[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971
-
- local myeconfargs=(
- # fails to build against recent hwloc versions
- --disable-hwloc
- --enable-taskstats
- $(use_enable kernel_linux cgroup)
- $(use_enable kernel_linux linux-affinity)
- $(use_enable openvz)
- $(use_enable unicode)
- $(use_enable vserver)
- )
- econf ${myeconfargs[@]}
-}
diff --git a/sys-process/htop/htop-3.0.3.ebuild b/sys-process/htop/htop-3.0.4-r1.ebuild
index 2f9ad87bdc0e..66ff25ef4b43 100644
--- a/sys-process/htop/htop-3.0.3.ebuild
+++ b/sys-process/htop/htop-3.0.4-r1.ebuild
@@ -30,7 +30,7 @@ CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
S="${WORKDIR}/${P/_}"
PATCHES=(
- "${FILESDIR}/${PN}-3.0.3-tinfo.patch" #690840
+ "${FILESDIR}/${P}-sort_column_header_highlight.patch"
)
pkg_setup() {
diff --git a/sys-process/htop/htop-3.0.1.ebuild b/sys-process/htop/htop-3.0.5.ebuild
index 0484461c805b..e503e1bb84bd 100644
--- a/sys-process/htop/htop-3.0.1.ebuild
+++ b/sys-process/htop/htop-3.0.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -9,15 +9,17 @@ 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"
+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="kernel_FreeBSD kernel_linux openvz unicode vserver"
+IUSE="debug hwloc kernel_FreeBSD kernel_linux lm-sensors openvz unicode vserver"
BDEPEND="virtual/pkgconfig"
-RDEPEND="sys-libs/ncurses:0=[unicode?]"
+RDEPEND="sys-libs/ncurses:0=[unicode?]
+ hwloc? ( sys-apps/hwloc )
+ lm-sensors? ( sys-apps/lm-sensors )"
DEPEND="${RDEPEND}
${PYTHON_DEPS}"
@@ -25,7 +27,7 @@ DOCS=( ChangeLog README )
CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
-PATCHES=()
+S="${WORKDIR}/${P/_}"
pkg_setup() {
if ! has_version sys-process/lsof; then
@@ -47,14 +49,19 @@ src_configure() {
[[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971
local myeconfargs=(
- # fails to build against recent hwloc versions
- --disable-hwloc
- --enable-taskstats
- $(use_enable kernel_linux cgroup)
- $(use_enable kernel_linux linux-affinity)
+ $(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[@]}
}