diff options
author | tdb <tdb@FreeBSD.org> | 2014-05-13 04:07:56 +0800 |
---|---|---|
committer | tdb <tdb@FreeBSD.org> | 2014-05-13 04:07:56 +0800 |
commit | 8579a81f77d2fbfa925c2c90e7f1d9c62f3d8a00 (patch) | |
tree | 1c07898eec4c9c0ef11618e13c1cba3812f6c55b /net-mgmt/bwm-ng | |
parent | 8a124d1431d9e95995eecbf694a560b9181e4c56 (diff) | |
download | freebsd-ports-gnome-8579a81f77d2fbfa925c2c90e7f1d9c62f3d8a00.tar.gz freebsd-ports-gnome-8579a81f77d2fbfa925c2c90e7f1d9c62f3d8a00.tar.zst freebsd-ports-gnome-8579a81f77d2fbfa925c2c90e7f1d9c62f3d8a00.zip |
- Fix to work with libstatgrab 0.90
- Stage support
- Fix build with clang on FreeBSD 10+
- Use new LIB_DEPENDS format
Diffstat (limited to 'net-mgmt/bwm-ng')
-rw-r--r-- | net-mgmt/bwm-ng/Makefile | 11 | ||||
-rw-r--r-- | net-mgmt/bwm-ng/files/patch-src__bwm-ng.c | 17 | ||||
-rw-r--r-- | net-mgmt/bwm-ng/files/patch-src__input__libstatgrab.c | 22 |
3 files changed, 45 insertions, 5 deletions
diff --git a/net-mgmt/bwm-ng/Makefile b/net-mgmt/bwm-ng/Makefile index 2d5a070eec38..25400a6e391e 100644 --- a/net-mgmt/bwm-ng/Makefile +++ b/net-mgmt/bwm-ng/Makefile @@ -3,20 +3,21 @@ PORTNAME= bwm-ng PORTVERSION= 0.6 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= http://www.gropp.org/bwm-ng/ MAINTAINER= tdb@FreeBSD.org COMMENT= A small and simple bandwidth monitor -LIB_DEPENDS= statgrab.8:${PORTSDIR}/devel/libstatgrab +LIB_DEPENDS= libstatgrab.so:${PORTSDIR}/devel/libstatgrab GNU_CONFIGURE= yes USES= pkgconfig -MAN1= bwm-ng.1 -PLIST_FILES= bin/bwm-ng +PLIST_FILES= bin/bwm-ng man/man1/bwm-ng.1.gz -CONFIGURE_ENV= LIBS="`pkg-config --libs libstatgrab`" +CONFIGURE_ENV= CPPFLAGS="-std=gnu89 `pkg-config --cflags libstatgrab`" \ + LIBS="`pkg-config --libs libstatgrab`" +CONFIGURE_ARGS= --with-libstatgrab -NO_STAGE= yes .include <bsd.port.mk> diff --git a/net-mgmt/bwm-ng/files/patch-src__bwm-ng.c b/net-mgmt/bwm-ng/files/patch-src__bwm-ng.c new file mode 100644 index 000000000000..d22691d9ca8b --- /dev/null +++ b/net-mgmt/bwm-ng/files/patch-src__bwm-ng.c @@ -0,0 +1,17 @@ +--- ./src/bwm-ng.c.orig 2007-02-27 14:29:33.000000000 +0000 ++++ ./src/bwm-ng.c 2014-05-10 23:06:43.231799957 +0100 +@@ -193,7 +193,13 @@ + deinit(1,"invalid output selected\n"); + if (input_method<0) + deinit(1,"invalid input selected\n"); +- ++ ++#ifdef LIBSTATGRAB ++ if (sg_init(0) != 0) { ++ deinit(1,"libstatgrab failed to initialise\n"); ++ } ++#endif ++ + /* init total stats to zero */ + memset(&if_stats_total,0,(size_t)sizeof(t_iface_stats)); + #ifdef HAVE_CURSES diff --git a/net-mgmt/bwm-ng/files/patch-src__input__libstatgrab.c b/net-mgmt/bwm-ng/files/patch-src__input__libstatgrab.c new file mode 100644 index 000000000000..0c558e88607d --- /dev/null +++ b/net-mgmt/bwm-ng/files/patch-src__input__libstatgrab.c @@ -0,0 +1,22 @@ +--- ./src/input/libstatgrab.c.orig 2007-02-28 02:05:56.000000000 +0000 ++++ ./src/input/libstatgrab.c 2014-05-10 23:06:43.234799929 +0100 +@@ -27,7 +27,8 @@ + /* do the actual work, get and print stats if verbose */ + void get_iface_stats_libstat (char verbose) { + sg_network_io_stats *network_stats=NULL; +- int num_network_stats,current_if_num=0,hidden_if=0; ++ size_t num_network_stats; ++ int current_if_num=0,hidden_if=0; + + t_iface_speed_stats stats; /* local struct, used to calc total values */ + t_iface_speed_stats tmp_if_stats; +@@ -61,7 +62,8 @@ + + void get_iface_stats_libstatdisk (char verbose) { + sg_disk_io_stats *disk_stats=NULL; +- int num_disk_stats,current_if_num=0,hidden_if=0; ++ size_t num_disk_stats; ++ int current_if_num=0,hidden_if=0; + + t_iface_speed_stats stats; /* local struct, used to calc total values */ + t_iface_speed_stats tmp_if_stats; |