1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00

sysutils/htop: some fixes

- re-enable kernel threads
- update to very recent version
- switch to github for distfiles

PR:		194738
Approved by:	Hung-Ti Chen <gaod@hychen.org> (maintainer timeout)
This commit is contained in:
Kurt Jaeger 2016-02-05 22:29:42 +00:00
parent 2ab8c6cf73
commit d75d870a48
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=408275
7 changed files with 8 additions and 102 deletions

View File

@ -3,8 +3,9 @@
PORTNAME= htop
PORTVERSION= 1.0.3
PORTREVISION= 1
DISTVERSIONPREFIX=v
CATEGORIES= sysutils
MASTER_SITES= http://hisham.hm/htop/releases/${PORTVERSION}/
MAINTAINER= gaod@hychen.org
COMMENT= Better top(1) - interactive process viewer
@ -22,6 +23,10 @@ LIBS+= -L${LOCALBASE}/lib -lexecinfo
CONFIGURE_ARGS= --with-proc=/compat/linux/proc --enable-unicode
USES= autoreconf ncurses libtool execinfo python:2,build
USE_GITHUB= yes
GH_ACCOUNT= hishamhm
GH_PROJECT= htop
GH_TAGNAME= 5c593fa
LSOF_RUN_DEPENDS= lsof:${PORTSDIR}/sysutils/lsof

View File

@ -1,2 +1,2 @@
SHA256 (htop-1.0.3.tar.gz) = 055c57927f75847fdc222b5258b079a9542811a9dcf5421c615c7e17f55d1829
SIZE (htop-1.0.3.tar.gz) = 399306
SHA256 (hishamhm-htop-v1.0.3-5c593fa_GH0.tar.gz) = 756e995d4f1489d696205d938cf3cd4864f6c2a1f3569f771a55014e75ed4832
SIZE (hishamhm-htop-v1.0.3-5c593fa_GH0.tar.gz) = 143341

View File

@ -1,20 +0,0 @@
--- Process.c.orig 2013-04-21 03:33:42.000000000 +0800
+++ Process.c 2013-04-21 03:34:27.000000000 +0800
@@ -602,7 +602,7 @@
bool Process_changePriorityBy(Process* this, size_t delta) {
return Process_setPriority(this, this->nice + delta);
}
-
+/*
IOPriority Process_updateIOPriority(Process* this) {
IOPriority ioprio = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, this->pid);
this->ioPriority = ioprio;
@@ -613,7 +613,7 @@
syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, this->pid, ioprio);
return (Process_updateIOPriority(this) == ioprio);
}
-
+*/
/*
[1] Note that before kernel 2.6.26 a process that has not asked for
an io priority formally uses "none" as scheduling class, but the

View File

@ -1,16 +0,0 @@
--- Process.h.orig 2014-10-19 02:06:35.000000000 +0800
+++ Process.h 2014-10-19 02:06:49.000000000 +0800
@@ -201,11 +201,11 @@
bool Process_setPriority(Process* this, int priority);
bool Process_changePriorityBy(Process* this, size_t delta);
-
+/*
IOPriority Process_updateIOPriority(Process* this);
bool Process_setIOPriority(Process* this, IOPriority ioprio);
-
+*/
/*
[1] Note that before kernel 2.6.26 a process that has not asked for
an io priority formally uses "none" as scheduling class, but the

View File

@ -1,11 +0,0 @@
--- ProcessList.c.orig 2014-10-19 02:09:17.000000000 +0800
+++ ProcessList.c 2014-10-19 02:11:07.000000000 +0800
@@ -804,8 +804,6 @@
unsigned long long int lasttimes = (process->utime + process->stime);
if (! ProcessList_readStatFile(process, dirname, name, command))
goto errorReadingProcess;
- if (this->flags & PROCESS_FLAG_IOPRIO)
- Process_updateIOPriority(process);
float percent_cpu = (process->utime + process->stime - lasttimes) / period * 100.0;
process->percent_cpu = MAX(MIN(percent_cpu, cpus*100.0), 0.0);
if (isnan(process->percent_cpu)) process->percent_cpu = 0.0;

View File

@ -1,16 +0,0 @@
--- configure.ac.orig 2014-10-19 02:12:28.000000000 +0800
+++ configure.ac 2014-10-19 02:14:19.000000000 +0800
@@ -23,11 +23,12 @@
# Checks for libraries.
AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"])
+AC_CHECK_LIB([kvm], [kvm_open], [], [missing_libraries="$missing_libraries libkvm"])
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
-AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h],[:],[
+AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h kvm.h paths.h fcntl.h sys/sysctl.h],[:],[
missing_headers="$missing_headers $ac_header"
])
AC_CHECK_HEADERS([execinfo.h],[:],[:])

View File

@ -1,36 +0,0 @@
--- htop.c.orig 2014-10-19 02:15:19.000000000 +0800
+++ htop.c 2014-10-19 02:17:10.000000000 +0800
@@ -96,7 +96,6 @@
#if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
{ .key = " a: ", .info = "set CPU affinity" },
#endif
- { .key = " i: ", .info = "set IO prority" },
{ .key = " l: ", .info = "list open files with lsof" },
{ .key = " s: ", .info = "trace syscalls with strace" },
{ .key = " ", .info = "" },
@@ -856,25 +855,6 @@
}
break;
}
- case 'i':
- {
- Process* p = (Process*) Panel_getSelected(panel);
- if (!p) break;
- IOPriority ioprio = p->ioPriority;
- Panel* ioprioPanel = IOPriorityPanel_new(ioprio);
- const char* fuFunctions[] = {"Set ", "Cancel ", NULL};
- void* set = pickFromVector(panel, ioprioPanel, 21, headerHeight, fuFunctions, defaultBar, header);
- if (set) {
- IOPriority ioprio = IOPriorityPanel_getIOPriority(ioprioPanel);
- bool ok = foreachProcess(panel, (ForeachProcessFn) Process_setIOPriority, (size_t) ioprio, NULL);
- if (!ok)
- beep();
- }
- Panel_delete((Object*)ioprioPanel);
- ProcessList_printHeader(pl, Panel_getHeader(panel));
- refreshTimeout = 0;
- break;
- }
case 'I':
{
refreshTimeout = 0;