aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2013-04-28 09:48:25 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2013-04-28 09:48:25 +0000
commit9575980d924d7dd95403b99ac69e208b326e5f01 (patch)
tree139c55c71c4c2c933b7391cebf274dc2cb5acdac /sysutils
parent5c2da02b91e861d4dcee8c345475a99c8e964e2a (diff)
downloadports-9575980d924d7dd95403b99ac69e208b326e5f01.tar.gz
ports-9575980d924d7dd95403b99ac69e208b326e5f01.zip
- Update to 1.0.2
- Convert to new options framework - Trim Makefile headers PR: ports/178010 Submitted by: Hung-Yi Chen <gaod@hychen.org> (maintainer)
Notes
Notes: svn path=/head/; revision=316709
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/htop/Makefile20
-rw-r--r--sysutils/htop/distinfo4
-rw-r--r--sysutils/htop/files/patch-Process.c20
-rw-r--r--sysutils/htop/files/patch-Process.h16
-rw-r--r--sysutils/htop/files/patch-ProcessList.c23
-rw-r--r--sysutils/htop/files/patch-htop.c38
6 files changed, 101 insertions, 20 deletions
diff --git a/sysutils/htop/Makefile b/sysutils/htop/Makefile
index d3f3b6e66877..a6def425cd84 100644
--- a/sysutils/htop/Makefile
+++ b/sysutils/htop/Makefile
@@ -1,22 +1,18 @@
-# New ports collection makefile for: htop
-# Date created: 27 August 2007
-# Whom: Tony Shadwick <tshadwick@oss-solutions.com>
-#
+# Created by: Tony Shadwick <tshadwick@oss-solutions.com>
# $FreeBSD$
-#
PORTNAME= htop
-PORTVERSION= 1.0.1
-PORTREVISION= 2
+PORTVERSION= 1.0.2
CATEGORIES= sysutils
MASTER_SITES= SF
MAINTAINER= gaod@hychen.org
COMMENT= A better top(1) - interactive process viewer
-LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo
+LIB_DEPENDS= execinfo:${PORTSDIR}/devel/libexecinfo
-OPTIONS= LSOF "Enable lsof support" On
+OPTIONS_DEFINE= LSOF
+OPTIONS_DEFAULT= LSOF
NOT_FOR_ARCHS= ia64 powerpc sparc64
@@ -35,9 +31,9 @@ USE_PYTHON_BUILD= yes
MAN1= htop.1
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if !defined(WITHOUT_LSOF)
+.if ${PORT_OPTIONS:MLSOF}
RUN_DEPENDS+= lsof:${PORTSDIR}/sysutils/lsof
.endif
@@ -47,4 +43,4 @@ post-patch:
pre-configure:
@[ -f /compat/linux/proc/stat ] || { ${CAT} ${PKGMESSAGE}; ${FALSE}; }
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/htop/distinfo b/sysutils/htop/distinfo
index efb43f7bdb6a..3fd94ba88a6b 100644
--- a/sysutils/htop/distinfo
+++ b/sysutils/htop/distinfo
@@ -1,2 +1,2 @@
-SHA256 (htop-1.0.1.tar.gz) = 07db2cbe02835f9e186b9610ecc3beca330a5c9beadb3b6069dd0a10561506f2
-SIZE (htop-1.0.1.tar.gz) = 384683
+SHA256 (htop-1.0.2.tar.gz) = ee60657b044ece0df096c053060df7abf3cce3a568ab34d260049e6a37ccd8a1
+SIZE (htop-1.0.2.tar.gz) = 388499
diff --git a/sysutils/htop/files/patch-Process.c b/sysutils/htop/files/patch-Process.c
new file mode 100644
index 000000000000..406eb791fbf9
--- /dev/null
+++ b/sysutils/htop/files/patch-Process.c
@@ -0,0 +1,20 @@
+--- 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
diff --git a/sysutils/htop/files/patch-Process.h b/sysutils/htop/files/patch-Process.h
new file mode 100644
index 000000000000..6aa0eed780bc
--- /dev/null
+++ b/sysutils/htop/files/patch-Process.h
@@ -0,0 +1,16 @@
+--- Process.h.orig 2013-04-21 03:34:39.000000000 +0800
++++ Process.h 2013-04-21 03:34:49.000000000 +0800
+@@ -179,11 +179,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
diff --git a/sysutils/htop/files/patch-ProcessList.c b/sysutils/htop/files/patch-ProcessList.c
index 022dd9f70b0a..f6e24a285cc3 100644
--- a/sysutils/htop/files/patch-ProcessList.c
+++ b/sysutils/htop/files/patch-ProcessList.c
@@ -1,5 +1,5 @@
---- ProcessList.c.orig 2012-02-03 01:45:11.000000000 +0200
-+++ ProcessList.c 2012-05-16 17:39:50.000000000 +0300
+--- ProcessList.c.orig 2013-04-21 03:39:12.000000000 +0800
++++ ProcessList.c 2013-04-21 03:41:41.000000000 +0800
@@ -25,6 +25,19 @@
#include <time.h>
#include <assert.h>
@@ -20,7 +20,16 @@
/*{
#include "Vector.h"
#include "Hashtable.h"
-@@ -749,11 +762,13 @@
+@@ -685,7 +698,7 @@
+ unsigned long long int lasttimes = (process->utime + process->stime);
+ if (! ProcessList_readStatFile(process, dirname, name, command))
+ goto errorReadingProcess;
+- Process_updateIOPriority(process);
++// 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;
+@@ -764,13 +777,15 @@
void ProcessList_scan(ProcessList* this) {
unsigned long long int usertime, nicetime, systemtime, systemalltime, idlealltime, idletime, totaltime, virtalltime;
@@ -32,12 +41,14 @@
+ #ifndef __FreeBSD__
+ unsigned long long int swapFree = 0;
+ file = fopen(PROCMEMINFOFILE, "r");
- assert(file != NULL);
+ if (file == NULL) {
+ CRT_fatalError("Cannot open " PROCMEMINFOFILE);
+ }
- int cpus = this->cpuCount;
{
char buffer[128];
while (fgets(buffer, 128, file)) {
-@@ -788,6 +803,33 @@
+@@ -805,6 +820,33 @@
this->usedMem = this->totalMem - this->freeMem;
this->usedSwap = this->totalSwap - swapFree;
fclose(file);
@@ -70,4 +81,4 @@
+ #endif
file = fopen(PROCSTATFILE, "r");
- assert(file != NULL);
+ if (file == NULL) {
diff --git a/sysutils/htop/files/patch-htop.c b/sysutils/htop/files/patch-htop.c
new file mode 100644
index 000000000000..a78e482384c0
--- /dev/null
+++ b/sysutils/htop/files/patch-htop.c
@@ -0,0 +1,38 @@
+--- htop.c.orig 2012-10-05 07:55:31.000000000 +0800
++++ htop.c 2013-04-21 03:47:54.882373049 +0800
+@@ -126,7 +126,7 @@
+ mvaddstr(13, 0, " Space: tag processes F: cursor follows process");
+ mvaddstr(14, 0, " U: untag all processes + -: expand/collapse tree");
+ mvaddstr(15, 0, " F9 k: kill process/tagged processes P M T: sort by CPU%, MEM% or TIME");
+- mvaddstr(16, 0, " ] F7: higher priority (root only) i: set IO priority");
++ mvaddstr(16, 0, " ] F7: higher priority (root only)");
+ mvaddstr(17, 0, " [ F8: lower priority (+ nice) I: invert sort order");
+ #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
+ if (pl->cpuCount > 1)
+@@ -146,7 +146,7 @@
+ mvaddstr(13, 0, " Space"); mvaddstr(13,40, " F");
+ mvaddstr(14, 0, " U"); mvaddstr(14,40, " + -");
+ mvaddstr(15, 0, " F9 k"); mvaddstr(15,40, "P M T");
+- mvaddstr(16, 0, " ] F7"); mvaddstr(16,40, " i");
++ mvaddstr(16, 0, " ] F7");
+ mvaddstr(17, 0, " [ F8"); mvaddstr(17,40, " I");
+ mvaddstr(18,40, " F6 >");
+ #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
+@@ -850,7 +850,7 @@
+ ((Object*)sortPanel)->delete((Object*)sortPanel);
+ refreshTimeout = 0;
+ break;
+- }
++ }/*
+ case 'i':
+ {
+ Process* p = (Process*) Panel_getSelected(panel);
+@@ -869,7 +869,7 @@
+ ProcessList_printHeader(pl, Panel_getHeader(panel));
+ refreshTimeout = 0;
+ break;
+- }
++ }*/
+ case 'I':
+ {
+ refreshTimeout = 0;