svn commit: r353891 - in head/net-mgmt/bwm-ng: . files
Tim Bishop
tdb at FreeBSD.org
Mon May 12 20:07:57 UTC 2014
Author: tdb
Date: Mon May 12 20:07:56 2014
New Revision: 353891
URL: http://svnweb.freebsd.org/changeset/ports/353891
QAT: https://qat.redports.org/buildarchive/r353891/
Log:
- Fix to work with libstatgrab 0.90
- Stage support
- Fix build with clang on FreeBSD 10+
- Use new LIB_DEPENDS format
Added:
head/net-mgmt/bwm-ng/files/
head/net-mgmt/bwm-ng/files/patch-src__bwm-ng.c (contents, props changed)
head/net-mgmt/bwm-ng/files/patch-src__input__libstatgrab.c (contents, props changed)
Modified:
head/net-mgmt/bwm-ng/Makefile
Modified: head/net-mgmt/bwm-ng/Makefile
==============================================================================
--- head/net-mgmt/bwm-ng/Makefile Mon May 12 20:05:10 2014 (r353890)
+++ head/net-mgmt/bwm-ng/Makefile Mon May 12 20:07:56 2014 (r353891)
@@ -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 at 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>
Added: head/net-mgmt/bwm-ng/files/patch-src__bwm-ng.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/bwm-ng/files/patch-src__bwm-ng.c Mon May 12 20:07:56 2014 (r353891)
@@ -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
Added: head/net-mgmt/bwm-ng/files/patch-src__input__libstatgrab.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/bwm-ng/files/patch-src__input__libstatgrab.c Mon May 12 20:07:56 2014 (r353891)
@@ -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;
More information about the svn-ports-all
mailing list