diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2011-08-08 10:50:01 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2011-08-08 10:50:01 +0000 |
commit | 3850ec3bee30cbb39ec0e082e16e827af6876678 (patch) | |
tree | 45726dc104ff05ab9df4c0589df4d0fb576932f9 /sysutils/htop | |
parent | cd51fc3abb4d89fdcf9e398a382abd8e4aacb387 (diff) | |
download | ports-3850ec3bee30cbb39ec0e082e16e827af6876678.tar.gz ports-3850ec3bee30cbb39ec0e082e16e827af6876678.zip |
Notes
Diffstat (limited to 'sysutils/htop')
-rw-r--r-- | sysutils/htop/Makefile | 12 | ||||
-rw-r--r-- | sysutils/htop/distinfo | 4 | ||||
-rw-r--r-- | sysutils/htop/files/patch-OpenFilesScreen.c | 56 | ||||
-rw-r--r-- | sysutils/htop/files/patch-OpenFilesScreen.h | 11 | ||||
-rw-r--r-- | sysutils/htop/files/patch-ProcessList.c | 20 | ||||
-rw-r--r-- | sysutils/htop/files/patch-UptimeMeter.c | 11 | ||||
-rw-r--r-- | sysutils/htop/files/patch-configure.ac | 11 |
7 files changed, 22 insertions, 103 deletions
diff --git a/sysutils/htop/Makefile b/sysutils/htop/Makefile index 62a3e56559bd..ee0c909884ca 100644 --- a/sysutils/htop/Makefile +++ b/sysutils/htop/Makefile @@ -6,19 +6,25 @@ # PORTNAME= htop -PORTVERSION= 0.8.3 -PORTREVISION= 2 +PORTVERSION= 0.9 CATEGORIES= sysutils MASTER_SITES= SF -MAINTAINER= yzlin@FreeBSD.org +MAINTAINER= gaod@hychen.org COMMENT= A better top(1) - interactive process viewer +LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo + OPTIONS= LSOF "Enable lsof support" On NOT_FOR_ARCHS= sparc64 GNU_CONFIGURE= yes +CFLAGS+= -I${LOCALBASE}/include +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ENV= LIBS="-lexecinfo" + CONFIGURE_ARGS= --with-proc=/compat/linux/proc --enable-unicode USE_AUTOTOOLS= autoconf aclocal automake libtool USE_NCURSES= yes diff --git a/sysutils/htop/distinfo b/sysutils/htop/distinfo index 20f23d0930e0..045af34459da 100644 --- a/sysutils/htop/distinfo +++ b/sysutils/htop/distinfo @@ -1,2 +1,2 @@ -SHA256 (htop-0.8.3.tar.gz) = f03bac8999c57c399cbf4332831bcce905d0393d0f97f7e32a1407b48890dd9d -SIZE (htop-0.8.3.tar.gz) = 428061 +SHA256 (htop-0.9.tar.gz) = 4de65c38e1886bccd30ed692b30eb9bf195240680781bfe1eaf5faf84ee6fbfd +SIZE (htop-0.9.tar.gz) = 418767 diff --git a/sysutils/htop/files/patch-OpenFilesScreen.c b/sysutils/htop/files/patch-OpenFilesScreen.c deleted file mode 100644 index 36ea28b7b905..000000000000 --- a/sysutils/htop/files/patch-OpenFilesScreen.c +++ /dev/null @@ -1,56 +0,0 @@ ---- OpenFilesScreen.c.orig 2010-01-26 03:53:04.000000000 +0800 -+++ OpenFilesScreen.c 2010-01-26 03:56:23.000000000 +0800 -@@ -26,7 +26,7 @@ - typedef struct OpenFiles_ProcessData_ { - char* data[256]; - struct OpenFiles_FileData_* files; -- bool failed; -+ int error; - } OpenFiles_ProcessData; - - typedef struct OpenFiles_FileData_ { -@@ -80,16 +80,18 @@ - OpenFiles_ProcessData* process = calloc(sizeof(OpenFiles_ProcessData), 1); - OpenFiles_FileData* file = NULL; - OpenFiles_ProcessData* item = process; -- process->failed = true; - bool anyRead = false; -+ -+ if (!fd) { -+ process->error = 127; -+ return process; -+ } -+ - while (!feof(fd)) { - int cmd = fgetc(fd); -- if (cmd == EOF && !anyRead) { -- process->failed = true; -+ if (cmd == EOF && !anyRead) - break; -- } - anyRead = true; -- process->failed = false; - char* entry = malloc(1024); - if (!fgets(entry, 1024, fd)) break; - char* newline = strrchr(entry, '\n'); -@@ -106,7 +108,7 @@ - } - item->data[cmd] = entry; - } -- pclose(fd); -+ process->error = pclose(fd); - return process; - } - -@@ -115,8 +117,10 @@ - int index = MAX(Panel_getSelectedIndex(panel), 0); - Panel_prune(panel); - OpenFiles_ProcessData* process = OpenFilesScreen_getProcessData(this->process->pid); -- if (process->failed) { -+ if (process->error == 127) { - Panel_add(panel, (Object*) ListItem_new("Could not execute 'lsof'. Please make sure it is available in your $PATH.", 0)); -+ } else if (process->error == 1) { -+ Panel_add(panel, (Object*) ListItem_new("Failed listing open files.", 0)); - } else { - OpenFiles_FileData* file = process->files; - while (file) { diff --git a/sysutils/htop/files/patch-OpenFilesScreen.h b/sysutils/htop/files/patch-OpenFilesScreen.h deleted file mode 100644 index 0a3a8d35e1b9..000000000000 --- a/sysutils/htop/files/patch-OpenFilesScreen.h +++ /dev/null @@ -1,11 +0,0 @@ ---- OpenFilesScreen.h.orig 2010-01-26 03:57:03.000000000 +0800 -+++ OpenFilesScreen.h 2010-01-26 03:57:19.000000000 +0800 -@@ -28,7 +28,7 @@ - typedef struct OpenFiles_ProcessData_ { - char* data[256]; - struct OpenFiles_FileData_* files; -- bool failed; -+ int error; - } OpenFiles_ProcessData; - - typedef struct OpenFiles_FileData_ { diff --git a/sysutils/htop/files/patch-ProcessList.c b/sysutils/htop/files/patch-ProcessList.c deleted file mode 100644 index cecb029a7371..000000000000 --- a/sysutils/htop/files/patch-ProcessList.c +++ /dev/null @@ -1,20 +0,0 @@ ---- ProcessList.c.orig 2010-01-26 03:58:10.000000000 +0800 -+++ ProcessList.c 2010-01-26 04:22:58.000000000 +0800 -@@ -313,7 +313,7 @@ - unsigned int pid = p->pid; - int index = Vector_indexOf(this->processes, p, Process_pidCompare); - assert(index != -1); -- Vector_remove(this->processes, index); -+ if (index >= 0) Vector_remove(this->processes, index); - assert(Hashtable_get(this->processTable, pid) == NULL); (void)pid; - assert(Hashtable_count(this->processTable) == Vector_count(this->processes)); - } -@@ -730,7 +730,7 @@ - - void ProcessList_scan(ProcessList* this) { - unsigned long long int usertime, nicetime, systemtime, systemalltime, idlealltime, idletime, totaltime; -- unsigned long long int swapFree; -+ unsigned long long int swapFree = 0; - - FILE* status; - char buffer[128]; diff --git a/sysutils/htop/files/patch-UptimeMeter.c b/sysutils/htop/files/patch-UptimeMeter.c deleted file mode 100644 index 4790908e0f9b..000000000000 --- a/sysutils/htop/files/patch-UptimeMeter.c +++ /dev/null @@ -1,11 +0,0 @@ ---- UptimeMeter.c.orig 2010-01-26 04:26:23.000000000 +0800 -+++ UptimeMeter.c 2010-01-26 04:27:01.000000000 +0800 -@@ -19,7 +19,7 @@ - }; - - static void UptimeMeter_setValues(Meter* this, char* buffer, int len) { -- double uptime; -+ double uptime = 0; - FILE* fd = fopen(PROCDIR "/uptime", "r"); - fscanf(fd, "%lf", &uptime); - fclose(fd); diff --git a/sysutils/htop/files/patch-configure.ac b/sysutils/htop/files/patch-configure.ac new file mode 100644 index 000000000000..a752d5d06feb --- /dev/null +++ b/sysutils/htop/files/patch-configure.ac @@ -0,0 +1,11 @@ +--- configure.ac.orig 2010-12-30 03:13:16.000000000 +0800 ++++ configure.ac 2010-12-30 03:13:23.000000000 +0800 +@@ -86,7 +86,7 @@ + AC_ARG_ENABLE(unicode, [AC_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="no") + if test "x$enable_unicode" = xyes; then + AC_CHECK_LIB([ncursesw], [refresh], [], [missing_libraries="$missing_libraries libncursesw"]) +- AC_CHECK_HEADERS([ncursesw/curses.h],[:],[missing_headers="$missing_headers $ac_header"]) ++ AC_CHECK_HEADERS([curses.h],[:],[missing_headers="$missing_headers $ac_header"]) + else + AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"]) + AC_CHECK_HEADERS([curses.h],[:],[missing_headers="$missing_headers $ac_header"]) |