summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/bwmon')
-rw-r--r--net-analyzer/bwmon/Manifest1
-rw-r--r--net-analyzer/bwmon/bwmon-1.3-r2.ebuild37
-rw-r--r--net-analyzer/bwmon/files/bwmon-1.3-build.patch22
-rw-r--r--net-analyzer/bwmon/files/bwmon-1.3-overflow.patch20
-rw-r--r--net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch11
-rw-r--r--net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch11
-rw-r--r--net-analyzer/bwmon/metadata.xml9
7 files changed, 111 insertions, 0 deletions
diff --git a/net-analyzer/bwmon/Manifest b/net-analyzer/bwmon/Manifest
new file mode 100644
index 000000000000..23a0bc7e5212
--- /dev/null
+++ b/net-analyzer/bwmon/Manifest
@@ -0,0 +1 @@
+DIST bwmon-1.3.tar.gz 5668 SHA256 624381208d0faae6c123bc6198a59d6c4316cd4fffb1ba5aca206374f5a42df6 SHA512 6552ba03f0cfe7d2adebe7ae49379cc109b4f8da56dafec1264ac39c114809c7cde161f6321a67516b22b04abbad5d1ab3b4efb313479ad131fb20638c6871e8 WHIRLPOOL 1b05208fdae45881b3175f5f84fe5d816c1d0db182ccb34be1b61e3f2e14bde5cb627dda0ded10cb1f21490277eb6d5c3cd3456001854e0dd418cca6d63cb8d1
diff --git a/net-analyzer/bwmon/bwmon-1.3-r2.ebuild b/net-analyzer/bwmon/bwmon-1.3-r2.ebuild
new file mode 100644
index 000000000000..e54f6d2ef235
--- /dev/null
+++ b/net-analyzer/bwmon/bwmon-1.3-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Simple ncurses bandwidth monitor"
+HOMEPAGE="http://bwmon.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+SLOT="0"
+LICENSE="GPL-2 public-domain"
+KEYWORDS="amd64 hppa ppc sparc x86"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-build.patch \
+ "${FILESDIR}"/${P}-typo-fix.patch \
+ "${FILESDIR}"/${P}-overflow.patch \
+ "${FILESDIR}"/${P}-tinfo.patch
+}
+
+src_compile() {
+ emake -C src CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install () {
+ dobin ${PN}
+ dodoc README
+}
diff --git a/net-analyzer/bwmon/files/bwmon-1.3-build.patch b/net-analyzer/bwmon/files/bwmon-1.3-build.patch
new file mode 100644
index 000000000000..6d4eadf15551
--- /dev/null
+++ b/net-analyzer/bwmon/files/bwmon-1.3-build.patch
@@ -0,0 +1,22 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -10,8 +10,8 @@ CC = gcc
+ RM = /bin/rm
+ INSTALL = install
+
+-CFLAGS = -I../include -Wall -D__THREADS
+-LDFLAGS = -lpthread -lncurses
++CFLAGS += -I../include -Wall -D__THREADS
++LIBS = -lpthread -lncurses
+
+ SRC = bwmon.c
+ OBJS = $(SRC:.c=.o)
+@@ -19,7 +19,7 @@ OBJS = $(SRC:.c=.o)
+ all: bwmon
+
+ bwmon: $(OBJS)
+- $(CC) $(LDFLAGS) -o ../$@ $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ../$@ $(OBJS) $(LIBS)
+
+ clean:
+ @for i in $(OBJS) *~ core bwmon; do \
diff --git a/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch b/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch
new file mode 100644
index 000000000000..052d1d766351
--- /dev/null
+++ b/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch
@@ -0,0 +1,20 @@
+--- a/src/bwmon.c
++++ b/src/bwmon.c
+@@ -408,7 +408,7 @@ bool_t
+ print_uptime(float * uptime)
+ {
+ unsigned int tmp = 0, hour = 0, min = 0, sec = 0;
+- char hostname[30];
++ char hostname[50];
+
+ tmp = (uint)(*uptime);
+ sec = tmp % 60;
+@@ -418,7 +418,7 @@ print_uptime(float * uptime)
+ hour = tmp % 24;
+ tmp = (tmp - hour) / 24;
+
+- if (gethostname(hostname, strlen(hostname)) != 0)
++ if (gethostname(hostname, sizeof(hostname)) != 0)
+ strcpy(hostname, "System");
+
+ printw("\n%s uptime: %u day%c %u hour%c %u minutes and %u seconds\n",
diff --git a/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch b/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch
new file mode 100644
index 000000000000..df0bb06cb968
--- /dev/null
+++ b/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -11,7 +11,7 @@
+ INSTALL = install
+
+ CFLAGS += -I../include -Wall -D__THREADS
+-LIBS = -lpthread -lncurses
++LIBS = -lpthread $(shell ${PKG_CONFIG} --libs ncurses)
+
+ SRC = bwmon.c
+ OBJS = $(SRC:.c=.o)
diff --git a/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch b/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch
new file mode 100644
index 000000000000..36f6af8e5ee6
--- /dev/null
+++ b/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch
@@ -0,0 +1,11 @@
+--- a/src/bwmon.c
++++ b/src/bwmon.c
+@@ -36,7 +36,7 @@
+ "by Kimmo Nupponen (kimmoon@users.sourceforge.net)\n"
+ "$Date: 2014/07/10 19:51:24 $\n\n"
+ "usage: %s [-b] [-h] [-a] [-m] [-u seconds]\n"
+- "\t-a Print bandwidth utiliasation in Kbytes rather than Kbits. The default\n"
++ "\t-b Print bandwidth utilisation in KBytes rather than Kbits. The default\n"
+ "\t is to use Kbits\n"
+ "\t-a Print also average bandwidth since last boot per interface\n"
+ "\t-m Print maximum bandwidth since launch of this utility\n"
diff --git a/net-analyzer/bwmon/metadata.xml b/net-analyzer/bwmon/metadata.xml
new file mode 100644
index 000000000000..27806ec6db3f
--- /dev/null
+++ b/net-analyzer/bwmon/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Simple ncurses bandwidth monitor</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">bwmon</remote-id>
+ </upstream>
+</pkgmetadata>