FreeBSD Bugzilla – Attachment 112163 Details for
Bug 153529
[PATCH] sysutils/htop: Update & Take maintainership
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
htop.diff
htop.diff (text/plain), 7.52 KB, created by
Hung-Yi Chen
on 2010-12-29 20:10:09 UTC
(
hide
)
Description:
htop.diff
Filename:
MIME Type:
Creator:
Hung-Yi Chen
Created:
2010-12-29 20:10:09 UTC
Size:
7.52 KB
patch
obsolete
>===> Generating patch >===> Viewing diff with more >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/Makefile /usr/ports/sysutils/htop/Makefile >--- /usr/ports/sysutils/htop.orig/Makefile 2010-12-13 08:14:00.000000000 +0800 >+++ /usr/ports/sysutils/htop/Makefile 2010-12-30 03:55:08.000000000 +0800 >@@ -6,12 +6,11 @@ > # > > 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 > > OPTIONS= LSOF "Enable lsof support" On >@@ -19,6 +18,14 @@ > NOT_FOR_ARCHS= sparc64 > > GNU_CONFIGURE= yes >+CFLAGS+= -I${LOCALBASE}/include >+CPPFLAGS+= -I${LOCALBASE}/include >+LDFLAGS+= -L${LOCALBASE}/lib >+CONFIGURE_ENV= CFLAGS="${CFLAGS}" \ >+ CPPFLAGS="${CPPFLAGS}" \ >+ LDFLAGS="${LDFLAGS}" \ >+ LIBS="-lexecinfo" >+ > CONFIGURE_ARGS= --with-proc=/compat/linux/proc --enable-unicode > USE_AUTOTOOLS= autoconf aclocal automake libtool > ACLOCAL_ARGS= -I ${ACLOCAL_DIR} >@@ -29,6 +36,7 @@ > > .include <bsd.port.pre.mk> > >+LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo > .if ${OSVERSION} < 602107 || (${OSVERSION} > 700000 && ${OSVERSION} < 700033) > LIB_DEPENDS+= ncursesw.5:${PORTSDIR}/devel/ncurses > .endif >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/distinfo /usr/ports/sysutils/htop/distinfo >--- /usr/ports/sysutils/htop.orig/distinfo 2009-08-07 23:27:02.000000000 +0800 >+++ /usr/ports/sysutils/htop/distinfo 2010-12-30 02:32:02.000000000 +0800 >@@ -1,3 +1,3 @@ >-MD5 (htop-0.8.3.tar.gz) = 5c9f093f9eaddf6e77aa6d54c2116d0c >-SHA256 (htop-0.8.3.tar.gz) = f03bac8999c57c399cbf4332831bcce905d0393d0f97f7e32a1407b48890dd9d >-SIZE (htop-0.8.3.tar.gz) = 428061 >+MD5 (htop-0.9.tar.gz) = 7c5507f35f363f3f40183a2ba3c561f8 >+SHA256 (htop-0.9.tar.gz) = 4de65c38e1886bccd30ed692b30eb9bf195240680781bfe1eaf5faf84ee6fbfd >+SIZE (htop-0.9.tar.gz) = 418767 >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-OpenFilesScreen.c /usr/ports/sysutils/htop/files/patch-OpenFilesScreen.c >--- /usr/ports/sysutils/htop.orig/files/patch-OpenFilesScreen.c 2010-09-09 06:51:55.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-OpenFilesScreen.c 1970-01-01 08:00:00.000000000 +0800 >@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-OpenFilesScreen.h /usr/ports/sysutils/htop/files/patch-OpenFilesScreen.h >--- /usr/ports/sysutils/htop.orig/files/patch-OpenFilesScreen.h 2010-09-09 06:51:55.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-OpenFilesScreen.h 1970-01-01 08:00:00.000000000 +0800 >@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-ProcessList.c /usr/ports/sysutils/htop/files/patch-ProcessList.c >--- /usr/ports/sysutils/htop.orig/files/patch-ProcessList.c 2010-09-09 06:51:55.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-ProcessList.c 1970-01-01 08:00:00.000000000 +0800 >@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-UptimeMeter.c /usr/ports/sysutils/htop/files/patch-UptimeMeter.c >--- /usr/ports/sysutils/htop.orig/files/patch-UptimeMeter.c 2010-09-09 06:51:55.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-UptimeMeter.c 1970-01-01 08:00:00.000000000 +0800 >@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-configure.ac /usr/ports/sysutils/htop/files/patch-configure.ac >--- /usr/ports/sysutils/htop.orig/files/patch-configure.ac 1970-01-01 08:00:00.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-configure.ac 2010-12-30 03:13:44.000000000 +0800 >@@ -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"]) >===> Done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 153529
: 112163