From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 29 20:10:10 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0B2C106566C for ; Wed, 29 Dec 2010 20:10:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 635198FC0C for ; Wed, 29 Dec 2010 20:10:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oBTKAAPI051626 for ; Wed, 29 Dec 2010 20:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oBTKAAgr051625; Wed, 29 Dec 2010 20:10:10 GMT (envelope-from gnats) Resent-Date: Wed, 29 Dec 2010 20:10:10 GMT Resent-Message-Id: <201012292010.oBTKAAgr051625@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hung-Yi Chen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B825E1065670 for ; Wed, 29 Dec 2010 20:03:06 +0000 (UTC) (envelope-from gaod@cse.tw) Received: from cse.tw (cse.tw [140.138.145.237]) by mx1.freebsd.org (Postfix) with ESMTP id 56BC98FC08 for ; Wed, 29 Dec 2010 20:03:06 +0000 (UTC) Received: from cse.tw (localhost [127.0.0.1]) by cse.tw (Postfix) with ESMTP id 3C1011E8C1F for ; Thu, 30 Dec 2010 04:02:06 +0800 (CST) Received: (from root@localhost) by cse.tw (8.14.4/8.14.4/Submit) id oBTK26qE057692; Thu, 30 Dec 2010 04:02:06 +0800 (CST) (envelope-from gaod) Message-Id: <201012292002.oBTK26qE057692@cse.tw> Date: Thu, 30 Dec 2010 04:02:06 +0800 (CST) From: Hung-Yi Chen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/153529: [PATCH] sysutils/htop: Update & Take maintainership X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hung-Yi Chen List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2010 20:10:10 -0000 >Number: 153529 >Category: ports >Synopsis: [PATCH] sysutils/htop: Update & Take maintainership >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Dec 29 20:10:09 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Hung-Yi Chen >Release: FreeBSD 8.2-PRERELEASE i386 >Organization: >Environment: System: FreeBSD cse.tw 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #13: Tue Nov 30 16:35:58 CST 2010 gaod@cse.tw:/usr/obj/usr/src/sys/CSETW i386 >Description: Update to 0.9. I would like to take maintainership to provide further updates. >How-To-Repeat: >Fix: --- htop.diff begins here --- ===> 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 +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 --- htop.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: