diff options
-rw-r--r-- | net-analyzer/bwmon/ChangeLog | 10 | ||||
-rw-r--r-- | net-analyzer/bwmon/bwmon-1.3-r2.ebuild | 35 | ||||
-rw-r--r-- | net-analyzer/bwmon/files/bwmon-1.3-build.patch | 24 | ||||
-rw-r--r-- | net-analyzer/bwmon/files/bwmon-1.3-overflow.patch | 22 |
4 files changed, 90 insertions, 1 deletions
diff --git a/net-analyzer/bwmon/ChangeLog b/net-analyzer/bwmon/ChangeLog index 83027f9e463b..d6bf08dca6b4 100644 --- a/net-analyzer/bwmon/ChangeLog +++ b/net-analyzer/bwmon/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-analyzer/bwmon # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/bwmon/ChangeLog,v 1.21 2012/11/04 20:22:33 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/bwmon/ChangeLog,v 1.22 2012/11/05 02:58:44 flameeyes Exp $ + +*bwmon-1.3-r2 (05 Nov 2012) + + 05 Nov 2012; Diego E. Pettenò <flameeyes@gentoo.org> +bwmon-1.3-r2.ebuild, + +files/bwmon-1.3-build.patch, +files/bwmon-1.3-overflow.patch: + Fix overflow identified by Vicente Olivert Riera in bug #441420; use a patch + instead of a chain of seds for the makefile changes, which also saves us from + using flag-o-matic. 04 Nov 2012; Agostino Sarubbo <ago@gentoo.org> bwmon-1.3-r1.ebuild: Stable for amd64, wrt bug #441420 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..70bcf33f8b06 --- /dev/null +++ b/net-analyzer/bwmon/bwmon-1.3-r2.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/bwmon/bwmon-1.3-r2.ebuild,v 1.1 2012/11/05 02:58:44 flameeyes Exp $ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="Simple ncurses bandwidth monitor" +HOMEPAGE="http://bwmon.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +DEPEND="sys-libs/ncurses" +RDEPEND="${DEPEND}" + +SLOT="0" +LICENSE="GPL-2 public-domain" +KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-build.patch + # Fix a typo in help wrt bug #263326 + epatch "${FILESDIR}"/${P}-typo-fix.patch + epatch "${FILESDIR}"/${P}-overflow.patch +} + +src_compile() { + emake -Csrc CC="$(tc-getCC)" +} + +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..336cf66445ec --- /dev/null +++ b/net-analyzer/bwmon/files/bwmon-1.3-build.patch @@ -0,0 +1,24 @@ +Index: bwmon-1.3/src/Makefile +=================================================================== +--- bwmon-1.3.orig/src/Makefile ++++ bwmon-1.3/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..a6280ffa6c29 --- /dev/null +++ b/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch @@ -0,0 +1,22 @@ +Index: bwmon-1.3/src/bwmon.c +=================================================================== +--- bwmon-1.3.orig/src/bwmon.c ++++ bwmon-1.3/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", |