On Thu, Jul 05, 2012 at 09:34:26PM -0400, Brad Smith wrote:
> Here is an update to iftop 1.0pre2. Upstream is practically
> dead and this is better than what is currently in the ports
> tree.

Your diff doesnt apply (REV is 2 since january, and PLIST was changed).
Here's a diff that applies, works on amd64/powerpc/sparc64. It still
doesnt properly redraw the screen; if you toggle help screen twice you
still see some parts of the help lines in the bars for a while...
CCing maintainer.

Landry
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/iftop/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile    26 Jan 2012 08:03:57 -0000      1.7
+++ Makefile    6 Jul 2012 06:33:55 -0000
@@ -2,8 +2,7 @@
 
 COMMENT =              display bandwidth usage on an inteface
 
-DISTNAME =             iftop-0.17
-REVISION =             2
+DISTNAME =             iftop-1.0pre2
 CATEGORIES =           net
 
 HOMEPAGE =             http://www.ex-parrot.com/~pdw/iftop/
@@ -16,16 +15,12 @@
 PERMIT_DISTFILES_CDROM =Yes
 PERMIT_DISTFILES_FTP = Yes
 
-WANTLIB =              c curses m pcap pthread
+WANTLIB =              c ncursesw m pcap pthread
 
 MASTER_SITES =         ${HOMEPAGE}download/
 
-CONFIGURE_STYLE =      gnu dest
 USE_GROFF =            Yes
-
-do-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/iftop ${PREFIX}/bin
-       ${INSTALL_MAN} ${WRKSRC}/iftop.8 ${PREFIX}/man/man8
+CONFIGURE_STYLE =      gnu
 
 NO_REGRESS =           Yes
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/iftop/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo    4 Apr 2008 22:12:46 -0000       1.1.1.1
+++ distinfo    6 Jul 2012 06:33:55 -0000
@@ -1,5 +1,5 @@
-MD5 (iftop-0.17.tar.gz) = BivI+zhWWAMZhXMm4Lh1LQ==
-RMD160 (iftop-0.17.tar.gz) = ARH909K6BorNQdknnJh9ZpmEBzY=
-SHA1 (iftop-0.17.tar.gz) = dc5q/IwL+FEniwoV5m9SOvkM/ak=
-SHA256 (iftop-0.17.tar.gz) = 0DJUfHCDBxWf9f0N8j69PPp3mcMVNvoK6hggMYqODqw=
-SIZE (iftop-0.17.tar.gz) = 160381
+MD5 (iftop-1.0pre2.tar.gz) = /vUhpJ7AEiRY0CxkISrzxQ==
+RMD160 (iftop-1.0pre2.tar.gz) = ARrEOVFOvdF9RBwdlyUSQhTxkqw=
+SHA1 (iftop-1.0pre2.tar.gz) = 1NxHP4JjGSM02mKJtp4QKkrn354=
+SHA256 (iftop-1.0pre2.tar.gz) = GxkwN7swGa+uiM2UyHRoqsSwRdgauBbtjS9IlxaxQCc=
+SIZE (iftop-1.0pre2.tar.gz) = 172736
Index: patches/patch-iptop.c
===================================================================
RCS file: /cvs/ports/net/iftop/patches/patch-iptop.c,v
retrieving revision 1.2
diff -u -r1.2 patch-iptop.c
--- patches/patch-iptop.c       27 Jan 2009 01:03:38 -0000      1.2
+++ patches/patch-iptop.c       6 Jul 2012 06:33:55 -0000
@@ -1,29 +1,30 @@
---- iftop.c.orig       Thu Mar 31 13:08:05 2005
-+++ iftop.c    Mon Jan 26 22:48:19 2009
-@@ -25,6 +25,8 @@
- #include <signal.h>
+--- iftop.c.orig       Tue Oct  4 14:30:37 2011
++++ iftop.c    Fri Jan 20 06:40:39 2012
+@@ -28,6 +28,8 @@
  #include <string.h>
  #include <unistd.h>
+ #include <locale.h>
 +#include <pwd.h>
 +#include <err.h>
  
  #include "iftop.h"
  #include "addr_hash.h"
-@@ -561,8 +563,12 @@ void packet_loop(void* ptr) {
+@@ -763,10 +765,13 @@ void packet_loop(void* ptr) {
   * Entry point. See usage(). */
  int main(int argc, char **argv) {
      pthread_t thread;
 -    struct sigaction sa = {};
 +    struct passwd *pw;
  
-+    if ((pw = getpwnam("_iftop")) == NULL) {
-+        errx(1, "no such user: _iftop");
-+    }
+     setlocale(LC_ALL, "");
+ 
++    if ((pw = getpwnam("_iftop")) == NULL)
++         errx(1, "no such user: _iftop");
 +
      /* TODO: tidy this up */
      /* read command line options and config file */   
      config_init();
-@@ -572,12 +578,16 @@ int main(int argc, char **argv) {
+@@ -776,12 +781,16 @@ int main(int argc, char **argv) {
      read_config(options.config_file, options.config_file_specified);
      options_make();
      
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/iftop/pkg/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- pkg/PLIST   26 Jan 2012 08:03:57 -0000      1.3
+++ pkg/PLIST   6 Jul 2012 06:33:55 -0000
@@ -1,5 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.3 2012/01/26 08:03:57 ajacoutot Exp $
 @newgroup _iftop:615
 @newuser _iftop:615:_iftop:daemon:iftop user:/nonexistent:/sbin/nologin
-bin/iftop
 @man man/man8/iftop.8
+@bin sbin/iftop

Reply via email to