aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/bwm-ng
diff options
context:
space:
mode:
authorTim Bishop <tdb@FreeBSD.org>2014-05-12 20:07:56 +0000
committerTim Bishop <tdb@FreeBSD.org>2014-05-12 20:07:56 +0000
commita565af74732c48a31168081ff4aa8082cef33c84 (patch)
tree1c07898eec4c9c0ef11618e13c1cba3812f6c55b /net-mgmt/bwm-ng
parentf0ca1183baa555def7043dcc398bdf74b7488556 (diff)
downloadports-a565af74732c48a31168081ff4aa8082cef33c84.tar.gz
ports-a565af74732c48a31168081ff4aa8082cef33c84.zip
- Fix to work with libstatgrab 0.90
- Stage support - Fix build with clang on FreeBSD 10+ - Use new LIB_DEPENDS format
Notes
Notes: svn path=/head/; revision=353891
Diffstat (limited to 'net-mgmt/bwm-ng')
-rw-r--r--net-mgmt/bwm-ng/Makefile11
-rw-r--r--net-mgmt/bwm-ng/files/patch-src__bwm-ng.c17
-rw-r--r--net-mgmt/bwm-ng/files/patch-src__input__libstatgrab.c22
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;