public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/
@ 2020-12-07 14:47 Lars Wendler
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2020-12-07 14:47 UTC (permalink / raw
  To: gentoo-commits

commit:     fcb9a9dd103f542b2382497615c72817ab61ad73
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  7 14:46:37 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Dec  7 14:46:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcb9a9dd

sys-process/htop: Fixed build with USE="-unicode"

Closes: https://bugs.gentoo.org/690840
Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-process/htop/files/htop-3.0.3-tinfo.patch | 38 +++++++++++++++++++++++++++
 sys-process/htop/htop-3.0.2.ebuild            |  4 ++-
 sys-process/htop/htop-3.0.3.ebuild            |  4 +++
 3 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/sys-process/htop/files/htop-3.0.3-tinfo.patch b/sys-process/htop/files/htop-3.0.3-tinfo.patch
new file mode 100644
index 00000000000..ea65a799ed7
--- /dev/null
+++ b/sys-process/htop/files/htop-3.0.3-tinfo.patch
@@ -0,0 +1,38 @@
+From ead978bce6236a55d75b72e059686766fa708db4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
+Date: Mon, 7 Dec 2020 15:30:56 +0100
+Subject: [PATCH] configure: check for additional linker flags for keypad(3)
+
+Gentoo requires an explicit addition of -ltinfo
+
+Resolves: https://bugs.gentoo.org/show_bug.cgi?id=690840
+---
+ configure.ac | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 460b16aa..f91d8e92 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -217,6 +217,10 @@ if test "x$enable_unicode" = xyes; then
+       [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
+          [AC_CHECK_HEADERS([ncurses/curses.h],[:],
+             [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
++
++   # check if additional linker flags are needed for keypad(3)
++   # (at this point we already link against a working ncurses library with wide character support)
++   AC_SEARCH_LIBS([keypad], [tinfow tinfo])
+ else
+    HTOP_CHECK_SCRIPT([ncurses6], [refresh], [HAVE_LIBNCURSES], "ncurses6-config",
+     HTOP_CHECK_SCRIPT([ncurses], [refresh], [HAVE_LIBNCURSES], "ncurses5-config",
+@@ -229,6 +233,10 @@ else
+       [AC_CHECK_HEADERS([ncurses/curses.h],[:],
+          [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
+             [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
++
++   # check if additional linker flags are needed for keypad(3)
++   # (at this point we already link against a working ncurses library)
++   AC_SEARCH_LIBS([keypad], [tinfo])
+ fi
+ 
+ if test "$my_htop_platform" = "freebsd"; then

diff --git a/sys-process/htop/htop-3.0.2.ebuild b/sys-process/htop/htop-3.0.2.ebuild
index a9fd130d98b..9a0da288eaf 100644
--- a/sys-process/htop/htop-3.0.2.ebuild
+++ b/sys-process/htop/htop-3.0.2.ebuild
@@ -25,7 +25,9 @@ DOCS=( ChangeLog README )
 
 CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
 
-PATCHES=()
+PATCHES=(
+	"${FILESDIR}/${PN}-3.0.3-tinfo.patch" #690840
+)
 
 pkg_setup() {
 	if ! has_version sys-process/lsof; then

diff --git a/sys-process/htop/htop-3.0.3.ebuild b/sys-process/htop/htop-3.0.3.ebuild
index 3e1ec19ce2e..32795d9586e 100644
--- a/sys-process/htop/htop-3.0.3.ebuild
+++ b/sys-process/htop/htop-3.0.3.ebuild
@@ -29,6 +29,10 @@ CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
 
 S="${WORKDIR}/${P/_}"
 
+PATCHES=(
+	"${FILESDIR}/${PN}-3.0.3-tinfo.patch" #690840
+)
+
 pkg_setup() {
 	if ! has_version sys-process/lsof; then
 		ewarn "To use lsof features in htop (what processes are accessing"


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/
@ 2024-01-14  3:40 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-01-14  3:40 UTC (permalink / raw
  To: gentoo-commits

commit:     749ac0676681c2688522ea4b4bd5c4cac3c51fda
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 14 03:30:32 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 03:31:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=749ac067

sys-process/htop: add 3.3.0

Closes: https://bugs.gentoo.org/902861
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-process/htop/Manifest                          |   1 +
 .../files/htop-3.3.0-display-running-tasks.patch   |  24 +++++
 sys-process/htop/htop-3.3.0.ebuild                 | 109 +++++++++++++++++++++
 3 files changed, 134 insertions(+)

diff --git a/sys-process/htop/Manifest b/sys-process/htop/Manifest
index a9d7f274d4ea..04591b8a57dd 100644
--- a/sys-process/htop/Manifest
+++ b/sys-process/htop/Manifest
@@ -1 +1,2 @@
 DIST htop-3.2.2.tar.xz 384820 BLAKE2B da3b4aea4e5d32d4b432e0f45089e7795b59d9a947dc4af76cb6b7f9137e6d45901c8169c8d2c796a3f43162c1e3c8f1e18bd17f20750637e06fe4c3ebe22caa SHA512 59f3f06677076262e25a478552e4438ce37028e2f064d3fb78653d3213b48ae4d78c7e0d62ee785a4ed3c6c99b7faafd9afab94c4350a4e5c5843cef81aaf489
+DIST htop-3.3.0.tar.xz 337956 BLAKE2B dabad4a4e973c5e0e9478e3b6cd1002369a3a3c8f152dbb72f0294ea3b8d92bbb79ab21b23ee997f2c142d5095e81706f3dfac023f27d9b3c83739754c3bf011 SHA512 f98d4a4370954969d0ae16993d80ca5ce48670a711f17445de979513ac9caf2b197291732d937ae07d48709ded660ea09601b3a41ad7c48b3abb87e7a67deb65

diff --git a/sys-process/htop/files/htop-3.3.0-display-running-tasks.patch b/sys-process/htop/files/htop-3.3.0-display-running-tasks.patch
new file mode 100644
index 000000000000..ac03adec2998
--- /dev/null
+++ b/sys-process/htop/files/htop-3.3.0-display-running-tasks.patch
@@ -0,0 +1,24 @@
+https://github.com/htop-dev/htop/issues/1369
+https://github.com/htop-dev/htop/commit/b6b9384678fa111d47a8d3074c31490863619d12
+
+From b6b9384678fa111d47a8d3074c31490863619d12 Mon Sep 17 00:00:00 2001
+From: Benny Baumann <BenBE@geshi.org>
+Date: Thu, 11 Jan 2024 21:09:43 +0100
+Subject: [PATCH] Fix the display of number of running tasks
+
+This was broken by a logic change in 72235d8e.
+
+Fixes: #1369
+--- a/linux/LinuxMachine.c
++++ b/linux/LinuxMachine.c
+@@ -489,8 +489,7 @@ static void LinuxMachine_scanCPUTime(LinuxMachine* this) {
+    char buffer[PROC_LINE_LENGTH + 1];
+    while (fgets(buffer, sizeof(buffer), file)) {
+       if (String_startsWith(buffer, "procs_running")) {
+-         ProcessTable* pt = (ProcessTable*) super->processTable;
+-         pt->runningTasks = strtoul(buffer + strlen("procs_running"), NULL, 10);
++         this->runningTasks = strtoul(buffer + strlen("procs_running"), NULL, 10);
+          break;
+       }
+    }
+

diff --git a/sys-process/htop/htop-3.3.0.ebuild b/sys-process/htop/htop-3.3.0.ebuild
new file mode 100644
index 000000000000..511fff1b3fac
--- /dev/null
+++ b/sys-process/htop/htop-3.3.0.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# We avoid xdg.eclass here because it'll pull in glib, desktop utils on
+# htop which is often used on headless machines. bug #787470
+inherit linux-info optfeature xdg-utils
+
+DESCRIPTION="Interactive process viewer"
+HOMEPAGE="https://htop.dev/ https://github.com/htop-dev/htop"
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/htop-dev/htop.git"
+	inherit autotools git-r3
+else
+	SRC_URI="https://github.com/htop-dev/htop/releases/download/${PV}/${P}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+fi
+
+S="${WORKDIR}/${P/_}"
+
+LICENSE="BSD GPL-2+"
+SLOT="0"
+IUSE="caps debug delayacct hwloc lm-sensors llvm-libunwind openvz unicode unwind vserver"
+
+RDEPEND="
+	sys-libs/ncurses:=[unicode(+)?]
+	hwloc? ( sys-apps/hwloc:= )
+	unwind? (
+		!llvm-libunwind? ( sys-libs/libunwind:= )
+		llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+	)
+	kernel_linux? (
+		caps? ( sys-libs/libcap )
+		delayacct? ( dev-libs/libnl:3 )
+		lm-sensors? ( sys-apps/lm-sensors )
+	)
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+DOCS=( ChangeLog README )
+
+CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.3.0-display-running-tasks.patch
+)
+
+src_prepare() {
+	default
+
+	if [[ ${PV} == 9999 ]] ; then
+		eautoreconf
+	fi
+}
+
+src_configure() {
+	if [[ ${CBUILD} != ${CHOST} ]] ; then
+		# bug #328971
+		export ac_cv_file__proc_{meminfo,stat}=yes
+	fi
+
+	local myeconfargs=(
+		--enable-unicode
+		$(use_enable debug)
+		$(use_enable hwloc)
+		$(use_enable !hwloc affinity)
+		$(use_enable openvz)
+		$(use_enable unicode)
+		$(use_enable unwind)
+		$(use_enable vserver)
+	)
+
+	if use kernel_linux ; then
+		myeconfargs+=(
+			$(use_enable caps capabilities)
+			$(use_enable delayacct)
+			$(use_enable lm-sensors sensors)
+		)
+	else
+		if use kernel_Darwin ; then
+			# Upstream default to checking but --enable-affinity
+			# overrides this. Simplest to just disable on Darwin
+			# given it works on BSD anyway.
+			myeconfargs+=( --disable-affinity )
+		fi
+
+		myeconfargs+=(
+			--disable-capabilities
+			--disable-delayacct
+			--disable-sensors
+		)
+	fi
+
+	econf "${myeconfargs[@]}"
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+	xdg_icon_cache_update
+
+	optfeature "Viewing processes accessing certain files" sys-process/lsof
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+	xdg_icon_cache_update
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/
@ 2020-12-27 23:45 Lars Wendler
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2020-12-27 23:45 UTC (permalink / raw
  To: gentoo-commits

commit:     2750c23c9e168f7e2d53f75405d5f8d0f1f7a7bc
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 27 23:44:42 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 23:45:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2750c23c

sys-process/htop: Revbump to fix column header sort highlight

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../htop-3.0.4-sort_column_header_highlight.patch  | 153 +++++++++++++++++++++
 .../{htop-3.0.4.ebuild => htop-3.0.4-r1.ebuild}    |   4 +
 2 files changed, 157 insertions(+)

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 00000000000..a2b6a0d4259
--- /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-3.0.4.ebuild b/sys-process/htop/htop-3.0.4-r1.ebuild
similarity index 95%
rename from sys-process/htop/htop-3.0.4.ebuild
rename to sys-process/htop/htop-3.0.4-r1.ebuild
index 1e6c67cacd0..8b37c2d31a5 100644
--- a/sys-process/htop/htop-3.0.4.ebuild
+++ b/sys-process/htop/htop-3.0.4-r1.ebuild
@@ -29,6 +29,10 @@ 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"


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/
@ 2020-12-22 11:43 Lars Wendler
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2020-12-22 11:43 UTC (permalink / raw
  To: gentoo-commits

commit:     b2562fdf3e3487a4df4ad99869a49950d89a6353
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 22 11:43:22 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Dec 22 11:43:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2562fdf

sys-process/htop: Removed old

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-process/htop/Manifest                      |  2 -
 sys-process/htop/files/htop-2.2.0-gcc-10.patch | 27 ------------
 sys-process/htop/htop-2.2.0.ebuild             | 61 --------------------------
 sys-process/htop/htop-3.0.1.ebuild             | 60 -------------------------
 4 files changed, 150 deletions(-)

diff --git a/sys-process/htop/Manifest b/sys-process/htop/Manifest
index bb6f3155610..b1210f530c5 100644
--- a/sys-process/htop/Manifest
+++ b/sys-process/htop/Manifest
@@ -1,5 +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

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 dc49b0bb850..00000000000
--- 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/htop-2.2.0.ebuild b/sys-process/htop/htop-2.2.0.ebuild
deleted file mode 100644
index fa7b79e33e2..00000000000
--- 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} )
-
-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.1.ebuild b/sys-process/htop/htop-3.0.1.ebuild
deleted file mode 100644
index eacb7a88db2..00000000000
--- a/sys-process/htop/htop-3.0.1.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-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"
-
-LICENSE="BSD GPL-2"
-SLOT="0"
-IUSE="kernel_FreeBSD kernel_linux openvz unicode vserver"
-
-BDEPEND="virtual/pkgconfig"
-RDEPEND="sys-libs/ncurses:0=[unicode?]"
-DEPEND="${RDEPEND}
-	${PYTHON_DEPS}"
-
-DOCS=( ChangeLog README )
-
-CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
-
-PATCHES=()
-
-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=(
-		# 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[@]}
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/
@ 2018-03-01  9:50 Lars Wendler
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2018-03-01  9:50 UTC (permalink / raw
  To: gentoo-commits

commit:     8a2abcdad0d08cc33200186bec556de59e1a2973
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  1 09:50:00 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar  1 09:50:14 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a2abcda

sys-process/htop: Revbump to fix build with non-utf8 and python3.

Also added several upstream fixes.

Closes: https://bugs.gentoo.org/646880
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../htop/files/htop-2.1.0-MakeHeader-python3.patch | 29 ++++++++
 sys-process/htop/files/htop-2.1.0-bashisms.patch   | 37 +++++++++
 .../htop/files/htop-2.1.0-clear_on_sigwinch.patch  | 21 ++++++
 .../htop/files/htop-2.1.0-color_issues.patch       | 87 ++++++++++++++++++++++
 .../htop/files/htop-2.1.0-header_updates.patch     | 42 +++++++++++
 sys-process/htop/files/htop-2.1.0-ldflags.patch    | 21 ++++++
 .../htop/files/htop-2.1.0-ncurses_cflags.patch     | 46 ++++++++++++
 sys-process/htop/htop-2.1.0-r1.ebuild              | 75 +++++++++++++++++++
 8 files changed, 358 insertions(+)

diff --git a/sys-process/htop/files/htop-2.1.0-MakeHeader-python3.patch b/sys-process/htop/files/htop-2.1.0-MakeHeader-python3.patch
new file mode 100644
index 00000000000..7c8590a2991
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-MakeHeader-python3.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/646880
+
+--- a/scripts/MakeHeader.py
++++ b/scripts/MakeHeader.py
+@@ -1,5 +1,5 @@
+ #!/usr/bin/env python
+-import os, sys, string
++import os, sys, string, io
+ try:
+    from cStringIO import StringIO
+ except ImportError:
+@@ -16,7 +16,7 @@ SKIPONE=4
+ state = ANY
+ static = 0
+ 
+-file = open(sys.argv[1])
++file = io.open(sys.argv[1], "r", errors="ignore")
+ name = sys.argv[1][:-2]
+ 
+ out = StringIO()
+@@ -94,7 +94,7 @@ out.write( "#endif\n" )
+ # This prevents a lot of recompilation during development
+ out.seek(0)
+ try:
+-   with open(name + ".h", "r") as orig:
++   with io.open(name + ".h", "r", errors="ignore") as orig:
+       origcontents = orig.readlines()
+ except:
+    origcontents = ""

diff --git a/sys-process/htop/files/htop-2.1.0-bashisms.patch b/sys-process/htop/files/htop-2.1.0-bashisms.patch
new file mode 100644
index 00000000000..3b5bdabe82f
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-bashisms.patch
@@ -0,0 +1,37 @@
+From d4ea7cd65ccf8551cabb0706167b2c15aad7866d Mon Sep 17 00:00:00 2001
+From: Jesin <jesin00@gmail.com>
+Date: Mon, 26 Feb 2018 18:07:52 -0500
+Subject: [PATCH] Fix bashisms (#749)
+
+The configure script relied on bash-specific extensions to shell syntax
+and behavior, causing build failures on systems with other /bin/sh
+implementations. This commit replaces those with equivalent constructs
+that should work in all POSIX shells.
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d4bb36b0..3d69756d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -66,7 +66,7 @@ dnl glibc 2.25 deprecates 'major' and 'minor' in <sys/types.h> and requires to
+ dnl include <sys/sysmacros.h>. However the logic in AC_HEADER_MAJOR has not yet
+ dnl been updated in Autoconf 2.69, so use a workaround:
+ m4_version_prereq([2.70], [],
+-[if test $ac_cv_header_sys_mkdev_h = no; then
++[if test "x$ac_cv_header_sys_mkdev_h" = xno; then
+    AC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS, 1,
+       [Define to 1 if `major', `minor', and `makedev' are declared in <sys/sysmacros.h>.])])
+ fi])
+@@ -278,8 +278,8 @@ then
+    PKG_PROG_PKG_CONFIG()
+    PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [], [missing_libraries="$missing_libraries libnl-3"])
+    PKG_CHECK_MODULES(LIBNL3GENL, libnl-genl-3.0, [], [missing_libraries="$missing_libraries libnl-genl-3"])
+-   CFLAGS+=" $LIBNL3_CFLAGS $LIBNL3GENL_CFLAGS"
+-   LIBS+=" $LIBNL3_LIBS $LIBNL3GENL_LIBS"
++   CFLAGS="$CFLAGS $LIBNL3_CFLAGS $LIBNL3GENL_CFLAGS"
++   LIBS="$LIBS $LIBNL3_LIBS $LIBNL3GENL_LIBS"
+    AC_DEFINE(HAVE_DELAYACCT, 1, [Define if delay accounting support should be enabled.])
+ fi
+ 

diff --git a/sys-process/htop/files/htop-2.1.0-clear_on_sigwinch.patch b/sys-process/htop/files/htop-2.1.0-clear_on_sigwinch.patch
new file mode 100644
index 00000000000..3ba7147e3b4
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-clear_on_sigwinch.patch
@@ -0,0 +1,21 @@
+From 5fca258f33e08cd7733940391edbf9e22208de83 Mon Sep 17 00:00:00 2001
+From: guoci <zguoci@gmail.com>
+Date: Sat, 17 Feb 2018 13:25:57 -0500
+Subject: [PATCH] call clear() function when SIGWINCH is received. (#660)
+
+---
+ Action.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Action.c b/Action.c
+index a6394ac3..50ab0bb9 100644
+--- a/Action.c
++++ b/Action.c
+@@ -185,6 +185,7 @@ static Htop_Reaction sortBy(State* st) {
+ // ----------------------------------------
+ 
+ static Htop_Reaction actionResize(State* st) {
++   clear();
+    Panel_resize(st->panel, COLS, LINES-(st->panel->y)-1);
+    return HTOP_REDRAW_BAR;
+ }

diff --git a/sys-process/htop/files/htop-2.1.0-color_issues.patch b/sys-process/htop/files/htop-2.1.0-color_issues.patch
new file mode 100644
index 00000000000..0b4bea8bb95
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-color_issues.patch
@@ -0,0 +1,87 @@
+From ac2dff2881a7ab203750e8edf7a46b69ae492ed0 Mon Sep 17 00:00:00 2001
+From: Hisham Muhammad <hisham@gobolinux.org>
+Date: Mon, 5 Feb 2018 07:01:12 +0100
+Subject: [PATCH] Fix color behavior on some terminals.
+
+Fixes #635.
+---
+ CRT.c         | 32 +++++++++++++++++---------------
+ CRT.h         |  1 +
+ ColorsPanel.c |  1 +
+ 3 files changed, 19 insertions(+), 15 deletions(-)
+
+diff --git a/CRT.c b/CRT.c
+index 237e30ef..ca9a10dd 100644
+--- a/CRT.c
++++ b/CRT.c
+@@ -37,6 +37,7 @@ in the source distribution for its full text.
+ #define White COLOR_WHITE
+ 
+ #define ColorPairGrayBlack ColorPair(Magenta,Magenta)
++#define ColorIndexGrayBlack ColorIndex(Magenta,Magenta)
+ 
+ #define KEY_WHEELUP KEY_F(20)
+ #define KEY_WHEELDOWN KEY_F(21)
+@@ -713,22 +714,23 @@ void CRT_enableDelay() {
+ 
+ void CRT_setColors(int colorScheme) {
+    CRT_colorScheme = colorScheme;
+-   if (colorScheme == COLORSCHEME_BLACKNIGHT) {
+-      for (int i = 0; i < 8; i++)
+-         for (int j = 0; j < 8; j++) {
+-            if (ColorIndex(i,j) != ColorIndex(Magenta,Magenta)) {
+-               init_pair(ColorIndex(i,j), i, j);
+-            }
+-         }
+-      init_pair(ColorIndex(Magenta,Magenta), 8, 0);
+-   } else {
+-      for (int i = 0; i < 8; i++) 
+-         for (int j = 0; j < 8; j++) {
+-            if (ColorIndex(i,j) != ColorIndex(Magenta,Magenta)) {
+-               init_pair(ColorIndex(i,j), i, (j==0?-1:j));
+-            }
++
++   for (int i = 0; i < 8; i++) {
++      for (int j = 0; j < 8; j++) {
++         if (ColorIndex(i,j) != ColorPairGrayBlack) {
++            int bg = (colorScheme != COLORSCHEME_BLACKNIGHT)
++                     ? (j==0 ? -1 : j)
++                     : j;
++            init_pair(ColorIndex(i,j), i, bg);
+          }
+-      init_pair(ColorIndex(Magenta,Magenta), 8, -1);
++      }
+    }
++
++   int grayBlackFg = COLORS > 8 ? 8 : 0;
++   int grayBlackBg = (colorScheme != COLORSCHEME_BLACKNIGHT)
++                     ? -1
++                     : 0;
++   init_pair(ColorIndexGrayBlack, grayBlackFg, grayBlackBg);
++
+    CRT_colors = CRT_colorSchemes[colorScheme];
+ }
+diff --git a/CRT.h b/CRT.h
+index 590fff6e..933fe068 100644
+--- a/CRT.h
++++ b/CRT.h
+@@ -26,6 +26,7 @@ in the source distribution for its full text.
+ #define White COLOR_WHITE
+ 
+ #define ColorPairGrayBlack ColorPair(Magenta,Magenta)
++#define ColorIndexGrayBlack ColorIndex(Magenta,Magenta)
+ 
+ #define KEY_WHEELUP KEY_F(20)
+ #define KEY_WHEELDOWN KEY_F(21)
+diff --git a/ColorsPanel.c b/ColorsPanel.c
+index 627a516a..2028335f 100644
+--- a/ColorsPanel.c
++++ b/ColorsPanel.c
+@@ -78,6 +78,7 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) {
+       this->settings->changed = true;
+       const Header* header = this->scr->header;
+       CRT_setColors(mark);
++      clear();
+       Panel* menu = (Panel*) Vector_get(this->scr->panels, 0);
+       Header_draw(header);
+       RichString_setAttr(&(super->header), CRT_colors[PANEL_HEADER_FOCUS]);

diff --git a/sys-process/htop/files/htop-2.1.0-header_updates.patch b/sys-process/htop/files/htop-2.1.0-header_updates.patch
new file mode 100644
index 00000000000..5c36d8b337e
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-header_updates.patch
@@ -0,0 +1,42 @@
+From ccd156f8ba68c3c82f9a3afef46e414b2af16613 Mon Sep 17 00:00:00 2001
+From: Hisham Muhammad <hisham@gobolinux.org>
+Date: Mon, 26 Feb 2018 11:44:00 -0300
+Subject: [PATCH] Updates to generated header files
+
+---
+ Process.h                | 5 +++++
+ linux/LinuxProcessList.h | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/Process.h b/Process.h
+index 6c41edc2..fda8480a 100644
+--- a/Process.h
++++ b/Process.h
+@@ -9,6 +9,11 @@ Released under the GNU GPL, see the COPYING file
+ in the source distribution for its full text.
+ */
+ 
++#ifdef MAJOR_IN_MKDEV
++#elif defined(MAJOR_IN_SYSMACROS) || \
++   (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H)
++#endif
++
+ #ifdef __ANDROID__
+ #define SYS_ioprio_get __NR_ioprio_get
+ #define SYS_ioprio_set __NR_ioprio_set
+diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
+index 5005220a..0851a102 100644
+--- a/linux/LinuxProcessList.h
++++ b/linux/LinuxProcessList.h
+@@ -9,6 +9,11 @@ Released under the GNU GPL, see the COPYING file
+ in the source distribution for its full text.
+ */
+ 
++#ifdef MAJOR_IN_MKDEV
++#elif defined(MAJOR_IN_SYSMACROS) || \
++   (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H)
++#endif
++
+ #ifdef HAVE_DELAYACCT
+ #endif
+ 

diff --git a/sys-process/htop/files/htop-2.1.0-ldflags.patch b/sys-process/htop/files/htop-2.1.0-ldflags.patch
new file mode 100644
index 00000000000..386542f3547
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-ldflags.patch
@@ -0,0 +1,21 @@
+From df9922a67eb8e02ab4cf1ff8f24b40f14094e699 Mon Sep 17 00:00:00 2001
+From: Hisham Muhammad <hisham@gobolinux.org>
+Date: Sat, 17 Feb 2018 14:50:55 -0200
+Subject: [PATCH] Fix preservation of LDFLAGS value during configure script
+
+Fixes #738.
+---
+
+diff --git a/configure.ac b/configure.ac
+index df922e07..44595050 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -167,7 +167,7 @@ m4_define([HTOP_CHECK_SCRIPT],
+          LIBS="$htop_config_script $LIBS "
+          htop_script_success=yes
+       ], [])
+-      LDFLAGS="$save_LDFLAGS"
++      LDFLAGS="$htop_save_LDFLAGS"
+    fi
+    if test "x$htop_script_success" = xno; then
+       [$5]

diff --git a/sys-process/htop/files/htop-2.1.0-ncurses_cflags.patch b/sys-process/htop/files/htop-2.1.0-ncurses_cflags.patch
new file mode 100644
index 00000000000..0a25aeb7fa2
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-ncurses_cflags.patch
@@ -0,0 +1,46 @@
+From bc5d46982f3504000567e00f59e4f7a5905597a9 Mon Sep 17 00:00:00 2001
+From: Michael Klein <michael.klein@puffin.lb.shuttle.de>
+Date: Mon, 26 Feb 2018 14:19:01 +0100
+Subject: [PATCH] use CFLAGS from ncurses*-config, if present (#745)
+
+Fixes #695.
+---
+ configure.ac | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 36aebc5e..d4bb36b0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -164,19 +164,25 @@ m4_define([HTOP_CHECK_SCRIPT],
+ [
+    if test ! -z "m4_toupper($HTOP_[$1]_CONFIG_SCRIPT)"; then
+       # to be used to set the path to ncurses*-config when cross-compiling
+-      htop_config_script=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
++      htop_config_script_libs=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
++      htop_config_script_cflags=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --cflags 2> /dev/null)
+    else
+-      htop_config_script=$([$4] --libs 2> /dev/null)
++      htop_config_script_libs=$([$4] --libs 2> /dev/null)
++      htop_config_script_cflags=$([$4] --cflags 2> /dev/null)
+    fi
+    htop_script_success=no
+    htop_save_LDFLAGS="$LDFLAGS"
+-   if test ! "x$htop_config_script" = x; then
+-      LDFLAGS="$htop_config_script $LDFLAGS"
++   htop_save_CFLAGS="$CFLAGS"
++   if test ! "x$htop_config_script_libs" = x; then
++      LDFLAGS="$htop_config_script_libs $LDFLAGS"
++      CFLAGS="$htop_config_script_cflags $CFLAGS"
+       AC_CHECK_LIB([$1], [$2], [
+          AC_DEFINE([$3], 1, [The library is present.])
+-         LIBS="$htop_config_script $LIBS "
++         LIBS="$htop_config_script_libs $LIBS "
+          htop_script_success=yes
+-      ], [])
++      ], [
++        CFLAGS="$htop_save_CFLAGS"
++      ])
+       LDFLAGS="$htop_save_LDFLAGS"
+    fi
+    if test "x$htop_script_success" = xno; then

diff --git a/sys-process/htop/htop-2.1.0-r1.ebuild b/sys-process/htop/htop-2.1.0-r1.ebuild
new file mode 100644
index 00000000000..a6d93f24ee2
--- /dev/null
+++ b/sys-process/htop/htop-2.1.0-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit autotools linux-info python-single-r1
+
+DESCRIPTION="interactive process viewer"
+HOMEPAGE="http://hisham.hm/htop/"
+SRC_URI="http://hisham.hm/htop/releases/${PV}/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="kernel_FreeBSD kernel_linux openvz unicode vserver"
+
+RDEPEND="sys-libs/ncurses:0=[unicode?]"
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	virtual/pkgconfig"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DOCS=( ChangeLog README )
+
+CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.1.0-MakeHeader-python3.patch" #646880
+
+	# Fixes from upstream (can usually be removed with next version bump)
+	"${FILESDIR}/${P}-sysmacros.patch"
+	"${FILESDIR}/${P}-ldflags.patch"
+	"${FILESDIR}/${P}-bashisms.patch"
+	"${FILESDIR}/${P}-ncurses_cflags.patch"
+	"${FILESDIR}/${P}-clear_on_sigwinch.patch"
+	"${FILESDIR}/${P}-header_updates.patch"
+	"${FILESDIR}/${P}-color_issues.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-single-r1_pkg_setup
+	linux-info_pkg_setup
+}
+
+src_prepare() {
+	rm missing || die
+
+	default
+	eautoreconf
+	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[@]}
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/
@ 2018-02-05 15:12 Lars Wendler
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2018-02-05 15:12 UTC (permalink / raw
  To: gentoo-commits

commit:     d132a1abba93e343616592e513c0f384c74f8e73
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  5 15:07:49 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Feb  5 15:12:41 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d132a1ab

sys-process/htop: Bump to version 2.1.0

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 sys-process/htop/Manifest                         |  1 +
 sys-process/htop/files/htop-2.1.0-sysmacros.patch | 38 +++++++++++++++
 sys-process/htop/htop-2.1.0.ebuild                | 59 +++++++++++++++++++++++
 3 files changed, 98 insertions(+)

diff --git a/sys-process/htop/Manifest b/sys-process/htop/Manifest
index bf53ce06053..72879e96ad0 100644
--- a/sys-process/htop/Manifest
+++ b/sys-process/htop/Manifest
@@ -1,3 +1,4 @@
 DIST htop-1.0.3.tar.gz 399306 BLAKE2B 3ce3aad0f72102c2aa6d9c7a198eef5e1591dec41f6fabfbe03f2626e08d0967c023adba8285c94e5b5ac05d3b05ec78964035f0bd70bbdff9f429f9cb052097 SHA512 4c5c784b093bcad06eb2e8d8bb215e14f6e838a3d47d8da8402344c270c1724f85d0bcde2899571ba5d0e5a02274a0c3390a76fed61785b2604b51351f08f232
 DIST htop-2.0.1.tar.gz 477196 BLAKE2B 03b6d7a71cbf261413e828d8678daecc969c76439a1241734d7bed13f7f8a3d22b40ebc4845c924ea6c61ddae20f1b90f78790c634908cf4d161ecb314e57c72 SHA512 57991a55b69028c01549b067ec749099466df5b08a0ed9a65dd779e6d2c8ee0a5d9c330bb6c727b04a349146ad441b7115718e433d1f8232f74b28903fb351ff
 DIST htop-2.0.2.tar.gz 476364 BLAKE2B f5519977b4bd6d189cb7f379a9f9b535a4b67a575b30056a43e259ab39a69f84083d310bbefefe8408c7ca99918f1ea9ae775808b9afe9d0f78097ac6bb88dc7 SHA512 1c9bf71a36c56b301667aa6d03756fc757fbcb63e848d9581d10db3df6193cdeb00e55ceb6e2392794ac03ea034b04459a8fe550b3ac2318cd86263a74c78cda
+DIST htop-2.1.0.tar.gz 302938 BLAKE2B 3e290a3dbb0bf5424780ba5dcb9de8ea478bf4cabbbde202c19eb3db7e0f8d1e108ec3ea41544ac095097c39100417c72477dab96f104a6317f4edd06d69199f SHA512 203e8f4abd63334330fc673f6c9609adbeab763d80f553d8b48670091d18dd347599a9ce2dbbac374fa4a13fa904948711a441fa676f52ab1612bd2b4ee4c6eb

diff --git a/sys-process/htop/files/htop-2.1.0-sysmacros.patch b/sys-process/htop/files/htop-2.1.0-sysmacros.patch
new file mode 100644
index 00000000000..08f023b442e
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-sysmacros.patch
@@ -0,0 +1,38 @@
+From 25c50af220c2de4542b440b7470a644caf2a3b65 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Mon, 5 Feb 2018 16:02:19 +0100
+Subject: [PATCH] Add <sys/sysmacros.h> to two files.
+
+Future glibc releases will no longer include sysmacros implicitly.
+---
+ Process.c                | 1 +
+ linux/LinuxProcessList.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/Process.c b/Process.c
+index 1836080..5122afb 100644
+--- a/Process.c
++++ b/Process.c
+@@ -19,6 +19,7 @@ in the source distribution for its full text.
+ #include <sys/param.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <signal.h>
+diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
+index 6f2631a..7522fb1 100644
+--- a/linux/LinuxProcessList.c
++++ b/linux/LinuxProcessList.c
+@@ -25,6 +25,7 @@ in the source distribution for its full text.
+ #include <time.h>
+ #include <assert.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <fcntl.h>
+ 
+ #ifdef HAVE_DELAYACCT
+-- 
+2.16.1
+

diff --git a/sys-process/htop/htop-2.1.0.ebuild b/sys-process/htop/htop-2.1.0.ebuild
new file mode 100644
index 00000000000..1ba6ab8008f
--- /dev/null
+++ b/sys-process/htop/htop-2.1.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools linux-info
+
+DESCRIPTION="interactive process viewer"
+HOMEPAGE="http://hisham.hm/htop/"
+SRC_URI="http://hisham.hm/htop/releases/${PV}/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="kernel_FreeBSD kernel_linux openvz unicode vserver"
+
+RDEPEND="sys-libs/ncurses:0=[unicode?]"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
+
+DOCS=( ChangeLog README )
+
+CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
+
+PATCHES=(
+	"${FILESDIR}/${P}-sysmacros.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
+
+	linux-info_pkg_setup
+}
+
+src_prepare() {
+	rm missing || die
+
+	default
+	eautoreconf
+}
+
+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[@]}
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/
@ 2018-02-05 15:12 Lars Wendler
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2018-02-05 15:12 UTC (permalink / raw
  To: gentoo-commits

commit:     6ab816b4b2bbfd375d272a82b5d91757be3f87ca
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  5 15:10:21 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Feb  5 15:12:43 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ab816b4

sys-process/htop: Removed old.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 sys-process/htop/Manifest                     |  2 -
 sys-process/htop/files/htop-1.0.3-tinfo.patch | 62 --------------------
 sys-process/htop/files/htop-2.0.0-tinfo.patch | 82 ---------------------------
 sys-process/htop/htop-1.0.3-r1.ebuild         | 74 ------------------------
 sys-process/htop/htop-1.0.3.ebuild            | 82 ---------------------------
 sys-process/htop/htop-2.0.1.ebuild            | 61 --------------------
 sys-process/htop/metadata.xml                 |  1 -
 7 files changed, 364 deletions(-)

diff --git a/sys-process/htop/Manifest b/sys-process/htop/Manifest
index 72879e96ad0..f0451a60ad1 100644
--- a/sys-process/htop/Manifest
+++ b/sys-process/htop/Manifest
@@ -1,4 +1,2 @@
-DIST htop-1.0.3.tar.gz 399306 BLAKE2B 3ce3aad0f72102c2aa6d9c7a198eef5e1591dec41f6fabfbe03f2626e08d0967c023adba8285c94e5b5ac05d3b05ec78964035f0bd70bbdff9f429f9cb052097 SHA512 4c5c784b093bcad06eb2e8d8bb215e14f6e838a3d47d8da8402344c270c1724f85d0bcde2899571ba5d0e5a02274a0c3390a76fed61785b2604b51351f08f232
-DIST htop-2.0.1.tar.gz 477196 BLAKE2B 03b6d7a71cbf261413e828d8678daecc969c76439a1241734d7bed13f7f8a3d22b40ebc4845c924ea6c61ddae20f1b90f78790c634908cf4d161ecb314e57c72 SHA512 57991a55b69028c01549b067ec749099466df5b08a0ed9a65dd779e6d2c8ee0a5d9c330bb6c727b04a349146ad441b7115718e433d1f8232f74b28903fb351ff
 DIST htop-2.0.2.tar.gz 476364 BLAKE2B f5519977b4bd6d189cb7f379a9f9b535a4b67a575b30056a43e259ab39a69f84083d310bbefefe8408c7ca99918f1ea9ae775808b9afe9d0f78097ac6bb88dc7 SHA512 1c9bf71a36c56b301667aa6d03756fc757fbcb63e848d9581d10db3df6193cdeb00e55ceb6e2392794ac03ea034b04459a8fe550b3ac2318cd86263a74c78cda
 DIST htop-2.1.0.tar.gz 302938 BLAKE2B 3e290a3dbb0bf5424780ba5dcb9de8ea478bf4cabbbde202c19eb3db7e0f8d1e108ec3ea41544ac095097c39100417c72477dab96f104a6317f4edd06d69199f SHA512 203e8f4abd63334330fc673f6c9609adbeab763d80f553d8b48670091d18dd347599a9ce2dbbac374fa4a13fa904948711a441fa676f52ab1612bd2b4ee4c6eb

diff --git a/sys-process/htop/files/htop-1.0.3-tinfo.patch b/sys-process/htop/files/htop-1.0.3-tinfo.patch
deleted file mode 100644
index 62a887baf37..00000000000
--- a/sys-process/htop/files/htop-1.0.3-tinfo.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 820e2e5..85f49e9 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -36,6 +36,8 @@ SUFFIXES = .h
- BUILT_SOURCES = $(myhtopheaders)
- htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h
- 
-+htop_LDADD = $(NCURSES_LIBS)
-+
- profile:
- 	$(MAKE) all CFLAGS="-pg" AM_CPPFLAGS="-pg -O2 -DNDEBUG"
- 
-diff --git a/configure.ac b/configure.ac
-index 2b934e8..3593885 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -20,6 +20,7 @@ AM_PROG_CC_C_O
- AC_DISABLE_SHARED
- AC_ENABLE_STATIC
- AC_PROG_LIBTOOL
-+PKG_PROG_PKG_CONFIG
- 
- # Checks for libraries.
- AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"])
-@@ -89,20 +90,24 @@ fi
- 
- AC_ARG_ENABLE(unicode, [AC_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="yes")
- if test "x$enable_unicode" = xyes; then
--   AC_CHECK_LIB([ncursesw], [refresh], [], [
--      missing_libraries="$missing_libraries libncursesw"
--      AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.])
-+   PKG_CHECK_MODULES([NCURSES], [ncursesw],[
-+     AC_CHECK_LIB([ncursesw], [refresh], [], [
-+         missing_libraries="$missing_libraries libncursesw"
-+         AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.])
-+      ])
-+      AC_CHECK_HEADERS([ncursesw/curses.h],[:],
-+         [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
-+            [AC_CHECK_HEADERS([ncurses/curses.h],[:],
-+               [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
-    ])
--   AC_CHECK_HEADERS([ncursesw/curses.h],[:],
--      [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
--         [AC_CHECK_HEADERS([ncurses/curses.h],[:],
--            [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
- else
--   AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"])
--   AC_CHECK_HEADERS([curses.h],[:],
--      [AC_CHECK_HEADERS([ncurses/curses.h],[:],
--         [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
--            [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
-+   PKG_CHECK_MODULES([NCURSES], [ncurses],[
-+      AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"])
-+      AC_CHECK_HEADERS([curses.h],[:],
-+         [AC_CHECK_HEADERS([ncurses/curses.h],[:],
-+            [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
-+               [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
-+   ])
- fi
- 
- if test ! -z "$missing_libraries"; then

diff --git a/sys-process/htop/files/htop-2.0.0-tinfo.patch b/sys-process/htop/files/htop-2.0.0-tinfo.patch
deleted file mode 100644
index e04019519e0..00000000000
--- a/sys-process/htop/files/htop-2.0.0-tinfo.patch
+++ /dev/null
@@ -1,82 +0,0 @@
---- htop-2.0.0/configure.ac
-+++ htop-2.0.0/configure.ac
-@@ -23,6 +23,7 @@
- AC_DISABLE_SHARED
- AC_ENABLE_STATIC
- AC_PROG_LIBTOOL
-+PKG_PROG_PKG_CONFIG
- 
- # Checks for platform.
- # ----------------------------------------------------------------------
-@@ -175,32 +176,36 @@
- 
- AC_ARG_ENABLE(unicode, [AC_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="yes")
- if test "x$enable_unicode" = xyes; then
--   HTOP_CHECK_SCRIPT([ncursesw6], [addnwstr], [HAVE_LIBNCURSESW], "ncursesw6-config",
--    HTOP_CHECK_SCRIPT([ncursesw], [addnwstr], [HAVE_LIBNCURSESW], "ncursesw5-config",
--     HTOP_CHECK_SCRIPT([ncurses], [addnwstr], [HAVE_LIBNCURSESW], "ncurses5-config",
--      HTOP_CHECK_LIB([ncursesw6], [addnwstr], [HAVE_LIBNCURSESW],
--       HTOP_CHECK_LIB([ncursesw], [addnwstr], [HAVE_LIBNCURSESW],
--        HTOP_CHECK_LIB([ncurses], [addnwstr], [HAVE_LIBNCURSESW],
--      missing_libraries="$missing_libraries libncursesw"
--      AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.])
--   ))))))
--
--   AC_CHECK_HEADERS([ncursesw/curses.h],[:],
--      [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
--         [AC_CHECK_HEADERS([ncurses/curses.h],[:],
--            [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
-+   PKG_CHECK_MODULES([NCURSES], [ncursesw],[
-+    HTOP_CHECK_SCRIPT([ncursesw6], [addnwstr], [HAVE_LIBNCURSESW], "ncursesw6-config",
-+     HTOP_CHECK_SCRIPT([ncursesw], [addnwstr], [HAVE_LIBNCURSESW], "ncursesw5-config",
-+      HTOP_CHECK_SCRIPT([ncurses], [addnwstr], [HAVE_LIBNCURSESW], "ncurses5-config",
-+       HTOP_CHECK_LIB([ncursesw6], [addnwstr], [HAVE_LIBNCURSESW],
-+        HTOP_CHECK_LIB([ncursesw], [addnwstr], [HAVE_LIBNCURSESW],
-+         HTOP_CHECK_LIB([ncurses], [addnwstr], [HAVE_LIBNCURSESW],
-+       missing_libraries="$missing_libraries libncursesw"
-+       AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.])
-+    ))))))
-+
-+    AC_CHECK_HEADERS([ncursesw/curses.h],[:],
-+       [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
-+          [AC_CHECK_HEADERS([ncurses/curses.h],[:],
-+             [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
-+   ])
- else
--   HTOP_CHECK_SCRIPT([ncurses6], [refresh], [HAVE_LIBNCURSES], "ncurses6-config",
--    HTOP_CHECK_SCRIPT([ncurses], [refresh], [HAVE_LIBNCURSES], "ncurses5-config",
--     HTOP_CHECK_LIB([ncurses6],  [refresh], [HAVE_LIBNCURSES],
--      HTOP_CHECK_LIB([ncurses],  [refresh], [HAVE_LIBNCURSES],
--      missing_libraries="$missing_libraries libncurses"
--   ))))
-+   PKG_CHECK_MODULES([NCURSES], [ncurses],[
-+    HTOP_CHECK_SCRIPT([ncurses6], [refresh], [HAVE_LIBNCURSES], "ncurses6-config",
-+     HTOP_CHECK_SCRIPT([ncurses], [refresh], [HAVE_LIBNCURSES], "ncurses5-config",
-+      HTOP_CHECK_LIB([ncurses6],  [refresh], [HAVE_LIBNCURSES],
-+       HTOP_CHECK_LIB([ncurses],  [refresh], [HAVE_LIBNCURSES],
-+       missing_libraries="$missing_libraries libncurses"
-+    ))))
-    
--   AC_CHECK_HEADERS([curses.h],[:],
--      [AC_CHECK_HEADERS([ncurses/curses.h],[:],
--         [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
--            [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
-+    AC_CHECK_HEADERS([curses.h],[:],
-+       [AC_CHECK_HEADERS([ncurses/curses.h],[:],
-+          [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
-+             [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])])
-+   ])
- fi
- 
- if test "$my_htop_platform" = "freebsd"; then
---- htop-2.0.0/Makefile.am
-+++ htop-2.0.0/Makefile.am
-@@ -85,6 +85,8 @@
- BUILT_SOURCES = $(myhtopheaders) $(myhtopplatheaders)
- htop_SOURCES  = $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources) config.h
- 
-+htop_LDADD = $(NCURSES_LIBS)
-+
- target:
- 	echo $(htop_SOURCES)
- 

diff --git a/sys-process/htop/htop-1.0.3-r1.ebuild b/sys-process/htop/htop-1.0.3-r1.ebuild
deleted file mode 100644
index 3f35a581888..00000000000
--- a/sys-process/htop/htop-1.0.3-r1.ebuild
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-AUTOTOOLS_AUTORECONF=true
-
-inherit autotools-utils linux-info
-
-DESCRIPTION="interactive process viewer"
-HOMEPAGE="http://hisham.hm/htop/"
-SRC_URI="http://hisham.hm/htop/releases/${PV}/${P}.tar.gz"
-
-LICENSE="BSD GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="kernel_FreeBSD kernel_linux oom openvz unicode vserver"
-
-RDEPEND="sys-libs/ncurses:0=[unicode?]"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-DOCS=( ChangeLog README )
-
-CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
-
-# config.h problems
-AUTOTOOLS_IN_SOURCE_BUILD=1
-
-PATCHES=("${FILESDIR}/${P}-tinfo.patch")
-
-pkg_setup() {
-	if use kernel_FreeBSD && ! [[ -f ${ROOT}/compat/linux/proc/stat && -f ${ROOT}/compat/linux/proc/meminfo ]]; then
-		echo
-		eerror "htop requires linprocfs mounted at /compat/linux/proc to build and function."
-		eerror "To mount it, type:"
-		[ -d /compat/linux/proc ] || eerror "mkdir -p /compat/linux/proc"
-		eerror "mount -t linprocfs none /compat/linux/proc"
-		eerror "Alternatively, place this information into /etc/fstab"
-		echo
-		die "htop needs /compat/linux/proc mounted"
-	fi
-
-	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
-
-	linux-info_pkg_setup
-}
-
-src_prepare() {
-	rm missing || die
-
-	autotools-utils_src_prepare
-}
-
-src_configure() {
-	[[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971
-
-	local myeconfargs=()
-
-	use kernel_FreeBSD && myeconfargs+=( --with-proc=/compat/linux/proc )
-
-	myeconfargs+=(
-		$(use_enable openvz)
-		$(use_enable kernel_linux cgroup)
-		$(use_enable vserver)
-		$(use_enable unicode)
-		$(use_enable oom)
-		--enable-taskstats
-		)
-	autotools-utils_src_configure
-}

diff --git a/sys-process/htop/htop-1.0.3.ebuild b/sys-process/htop/htop-1.0.3.ebuild
deleted file mode 100644
index 1665da56d72..00000000000
--- a/sys-process/htop/htop-1.0.3.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-AUTOTOOLS_AUTORECONF=true
-
-inherit autotools-utils linux-info python-any-r1
-
-DESCRIPTION="interactive process viewer"
-HOMEPAGE="http://hisham.hm/htop/"
-SRC_URI="http://hisham.hm/htop/releases/${PV}/${P}.tar.gz"
-
-LICENSE="BSD GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux"
-IUSE="kernel_FreeBSD kernel_linux oom openvz unicode vserver"
-
-RDEPEND="sys-libs/ncurses:0=[unicode?]"
-DEPEND="${RDEPEND}
-	${PYTHON_DEPS}
-	virtual/pkgconfig"
-
-DOCS=( ChangeLog README )
-
-CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
-
-# config.h problems
-AUTOTOOLS_IN_SOURCE_BUILD=1
-
-PATCHES=("${FILESDIR}/${P}-tinfo.patch")
-
-pkg_setup() {
-	if use kernel_FreeBSD && ! [[ -f ${ROOT}/compat/linux/proc/stat && -f ${ROOT}/compat/linux/proc/meminfo ]]; then
-		echo
-		eerror "htop requires linprocfs mounted at /compat/linux/proc to build and function."
-		eerror "To mount it, type:"
-		[ -d /compat/linux/proc ] || eerror "mkdir -p /compat/linux/proc"
-		eerror "mount -t linprocfs none /compat/linux/proc"
-		eerror "Alternatively, place this information into /etc/fstab"
-		echo
-		die "htop needs /compat/linux/proc mounted"
-	fi
-
-	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
-
-	sed \
-		-e '1c\#!'"${EPREFIX}"'/usr/bin/python' \
-		-i scripts/MakeHeader.py || die
-
-	autotools-utils_src_prepare
-}
-
-src_configure() {
-	[[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971
-
-	local myeconfargs=()
-
-	use kernel_FreeBSD && myeconfargs+=( --with-proc=/compat/linux/proc )
-
-	myeconfargs+=(
-		$(use_enable openvz)
-		$(use_enable kernel_linux cgroup)
-		$(use_enable vserver)
-		$(use_enable unicode)
-		$(use_enable oom)
-		--enable-taskstats
-		)
-	autotools-utils_src_configure
-}

diff --git a/sys-process/htop/htop-2.0.1.ebuild b/sys-process/htop/htop-2.0.1.ebuild
deleted file mode 100644
index a2b10fdb96a..00000000000
--- a/sys-process/htop/htop-2.0.1.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools linux-info
-
-DESCRIPTION="interactive process viewer"
-HOMEPAGE="http://hisham.hm/htop/"
-SRC_URI="http://hisham.hm/htop/releases/${PV}/${P}.tar.gz"
-
-LICENSE="BSD GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="kernel_FreeBSD kernel_linux openvz unicode vserver"
-
-RDEPEND="sys-libs/ncurses:0=[unicode?]"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-DOCS=( ChangeLog README )
-
-CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.0.0-tinfo.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
-
-	linux-info_pkg_setup
-}
-
-src_prepare() {
-	rm missing || die
-
-	default
-	eautoreconf
-}
-
-src_configure() {
-	[[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971
-
-	local myeconfargs=()
-
-	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/metadata.xml b/sys-process/htop/metadata.xml
index 31af477b5ce..b3278785fde 100644
--- a/sys-process/htop/metadata.xml
+++ b/sys-process/htop/metadata.xml
@@ -10,7 +10,6 @@
 		<name>Lars Wendler</name>
 	</maintainer>
 	<use>
-		<flag name="oom">Add column to track the OOM-killer score of processes</flag>
 		<flag name="openvz">Enable openvz support</flag>
 		<flag name="vserver">Enable vserver support</flag>
 	</use>


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/
@ 2016-02-16 14:38 Jason Donenfeld
  0 siblings, 0 replies; 8+ messages in thread
From: Jason Donenfeld @ 2016-02-16 14:38 UTC (permalink / raw
  To: gentoo-commits

commit:     dfb0fda447041b8658d13919e348a04f56cf1073
Author:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 16 14:36:41 2016 +0000
Commit:     Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Tue Feb 16 14:37:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfb0fda4

sys-process/htop: do not crash on startup

Certain htoprc files trigger a crash at startup. Upstream's instruction
is to include this commit until a new version is released.

 sys-process/htop/files/htop-2.0.0-commlen.patch | 22 +++++++
 sys-process/htop/htop-2.0.0-r1.ebuild           | 76 +++++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/sys-process/htop/files/htop-2.0.0-commlen.patch b/sys-process/htop/files/htop-2.0.0-commlen.patch
new file mode 100644
index 0000000..f44e43e
--- /dev/null
+++ b/sys-process/htop/files/htop-2.0.0-commlen.patch
@@ -0,0 +1,22 @@
+From 0b70439316b4e4608c0916317ded7e6e56982de6 Mon Sep 17 00:00:00 2001
+From: Hisham <hisham@gobolinux.org>
+Date: Sat, 13 Feb 2016 02:18:28 -0200
+Subject: [PATCH] Fix buffer reuse.
+
+---
+ linux/LinuxProcessList.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
+index 591210e..ec643ab 100644
+--- a/linux/LinuxProcessList.c
++++ b/linux/LinuxProcessList.c
+@@ -446,7 +446,7 @@ static void LinuxProcessList_readOomData(LinuxProcess* process, const char* dirn
+ }
+ 
+ static void setCommand(Process* process, const char* command, int len) {
+-   if (process->comm && process->commLen <= len) {
++   if (process->comm && process->commLen >= len) {
+       strncpy(process->comm, command, len + 1);
+    } else {
+       free(process->comm);

diff --git a/sys-process/htop/htop-2.0.0-r1.ebuild b/sys-process/htop/htop-2.0.0-r1.ebuild
new file mode 100644
index 0000000..f7224ea
--- /dev/null
+++ b/sys-process/htop/htop-2.0.0-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools linux-info
+
+DESCRIPTION="interactive process viewer"
+HOMEPAGE="http://hisham.hm/htop/"
+SRC_URI="http://hisham.hm/htop/releases/${PV}/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="kernel_FreeBSD kernel_linux openvz unicode vserver"
+
+RDEPEND="sys-libs/ncurses:0=[unicode?]"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
+
+DOCS=( ChangeLog README )
+
+CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.0.0-tinfo.patch"
+	"${FILESDIR}/${P}-commlen.patch"
+)
+
+pkg_setup() {
+	if use kernel_FreeBSD && ! [[ -f ${ROOT}/compat/linux/proc/stat && -f ${ROOT}/compat/linux/proc/meminfo ]]; then
+		echo
+		eerror "htop requires linprocfs mounted at /compat/linux/proc to build and function."
+		eerror "To mount it, type:"
+		[ -d /compat/linux/proc ] || eerror "mkdir -p /compat/linux/proc"
+		eerror "mount -t linprocfs none /compat/linux/proc"
+		eerror "Alternatively, place this information into /etc/fstab"
+		echo
+		die "htop needs /compat/linux/proc mounted"
+	fi
+
+	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
+
+	linux-info_pkg_setup
+}
+
+src_prepare() {
+	rm missing || die
+
+	default
+	eautoreconf
+}
+
+src_configure() {
+	[[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971
+
+	local myeconfargs=()
+
+	use kernel_FreeBSD && myeconfargs+=( --with-proc=/compat/linux/proc )
+
+	myeconfargs+=(
+		# fails to build against recent hwloc versions
+		--disable-hwloc
+		--enable-native-affinity
+		--enable-taskstats
+		$(use_enable kernel_linux cgroup)
+		$(use_enable openvz)
+		$(use_enable unicode)
+		$(use_enable vserver)
+	)
+	econf ${myeconfargs[@]}
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-14  3:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-07 14:47 [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/, sys-process/htop/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2024-01-14  3:40 Sam James
2020-12-27 23:45 Lars Wendler
2020-12-22 11:43 Lars Wendler
2018-03-01  9:50 Lars Wendler
2018-02-05 15:12 Lars Wendler
2018-02-05 15:12 Lars Wendler
2016-02-16 14:38 Jason Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox