summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2010-09-10 05:14:31 +0000
committerJeroen Roovers <jer@gentoo.org>2010-09-10 05:14:31 +0000
commit69fba6f0de9cb49d8e6ea0b63e6ccf01d892407c (patch)
tree6d542228181b0111b0ed8ebfa6852b65fd0ed157 /net-analyzer
parentFix building with recent glibc wrt #336649 by Jochen Schlick. (diff)
downloadgentoo-2-69fba6f0de9cb49d8e6ea0b63e6ccf01d892407c.tar.gz
gentoo-2-69fba6f0de9cb49d8e6ea0b63e6ccf01d892407c.tar.bz2
gentoo-2-69fba6f0de9cb49d8e6ea0b63e6ccf01d892407c.zip
Use pkg-config instead of glib-config. Fix parallel make. Respect LDFLAGS (bug #336570) and CC.
(Portage version: 2.2_rc78/cvs/Linux i686)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/traffic-vis/ChangeLog11
-rw-r--r--net-analyzer/traffic-vis/files/traffic-vis-0.35-gentoo.patch89
-rw-r--r--net-analyzer/traffic-vis/traffic-vis-0.35-r2.ebuild56
3 files changed, 132 insertions, 24 deletions
diff --git a/net-analyzer/traffic-vis/ChangeLog b/net-analyzer/traffic-vis/ChangeLog
index 67c04117d97e..b32bb1d39f3c 100644
--- a/net-analyzer/traffic-vis/ChangeLog
+++ b/net-analyzer/traffic-vis/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-analyzer/traffic-vis
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/traffic-vis/ChangeLog,v 1.18 2009/12/26 17:40:55 pva Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/traffic-vis/ChangeLog,v 1.19 2010/09/10 05:14:31 jer Exp $
+
+*traffic-vis-0.35-r2 (10 Sep 2010)
+
+ 10 Sep 2010; Jeroen Roovers <jer@gentoo.org> +traffic-vis-0.35-r2.ebuild,
+ files/traffic-vis-0.35-gentoo.patch:
+ Use pkg-config instead of glib-config. Fix parallel make. Respect LDFLAGS
+ (bug #336570) and CC.
26 Dec 2009; Peter Volkov <pva@gentoo.org> traffic-vis-0.35-r1.ebuild:
virtual/ghostscript->app-text/ghostscript-gpl: ghostscript-gpl is the only
diff --git a/net-analyzer/traffic-vis/files/traffic-vis-0.35-gentoo.patch b/net-analyzer/traffic-vis/files/traffic-vis-0.35-gentoo.patch
index 9b0e076d4ec8..23dd7f4f4add 100644
--- a/net-analyzer/traffic-vis/files/traffic-vis-0.35-gentoo.patch
+++ b/net-analyzer/traffic-vis/files/traffic-vis-0.35-gentoo.patch
@@ -1,5 +1,5 @@
---- frontends/htmlfe.c
-+++ frontends/htmlfe.c 2003-06-20 07:07:17.000000000 +0000
+--- a/frontends/htmlfe.c
++++ b/frontends/htmlfe.c
@@ -188,7 +188,7 @@
<TD ALIGN=\"RIGHT\">\n\
%llu\n\
@@ -9,8 +9,8 @@
", host->bytes_sent, host->bytes_received);
fprintf(out, "\
---- frontends/traffic-togif
-+++ frontends/traffic-togif 2003-10-23 19:29:30.000000000 +0000
+--- a/frontends/traffic-togif
++++ b/frontends/traffic-togif
@@ -31,7 +31,7 @@
my $y_size = 750;
@@ -20,8 +20,50 @@
my $pnmcrop = "/usr/bin/pnmcrop";
my $pnmscale = "/usr/bin/pnmscale";
my $ppmtogif = "/usr/bin/ppmtogif";
---- collector/Makefile
-+++ collector/Makefile 2003-10-23 19:45:52.000000000 +0000
+--- a/Makefile 2003-06-20 09:07:17.000000000 +0200
++++ b/Makefile 2010-09-10 06:53:46.000000000 +0200
+@@ -7,11 +7,11 @@
+ OPT_FLAGS=$(RPM_OPT_FLAGS)
+ WARNFLAGS=-Wall -Wno-conversion -Waggregate-return -Wmissing-prototypes -Wstrict-prototypes
+ DEBUGFLAGS=-g #-DDEBUG
+-INCLUDES=-I/usr/include/pcap `glib-config --cflags`
++INCLUDES=-I/usr/include/pcap `pkg-config --cflags glib-2.0`
+ DEFINES= -DHAVE_GETOPT_LONG
+ CFLAGS+= -DVERSION="\"$(VERSION)"\" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) $(OPT_FLAGS)
+ LFLAGS=
+-GLIB=`glib-config --libs`
++GLIB=`pkg-config --libs glib-2.0`
+ #GLIB=/usr/lib/libglib.a
+ #DEBUGLIBS=-lefence
+
+@@ -25,7 +25,7 @@
+ all: $(TARGETS)
+ for x in $(SUBDIRS) ; \
+ do \
+- make -C $$x \
++ $(MAKE) -C $$x \
+ VERSION="$(VERSION)" OPT_FLAGS="$(OPT_FLAGS)" \
+ WARNFLAGS="$(WARNFLAGS)" INCLUDES="$(INCLUDES)" \
+ DEFINES="$(DEFINES)" GLIB="$(GLIB)" \
+@@ -38,7 +38,7 @@
+ install:
+ for x in $(SUBDIRS) ; \
+ do \
+- make -C $$x SBINDIR="$(SBINDIR)" MANDIR="$(MANDIR)" install || exit 1; \
++ $(MAKE) -C $$x SBINDIR="$(SBINDIR)" MANDIR="$(MANDIR)" install || exit 1; \
+ done
+ install -m 644 -o root -g root traffic-vis.8 $(MANDIR)/man8/
+
+@@ -46,6 +46,6 @@
+ rm -f *.o core ~* *.a *.ps *.txt *.html test test.o *.tv
+ for x in $(SUBDIRS) ; \
+ do \
+- (cd $$x && make clean && cd ..) ; \
++ (cd $$x && $(MAKE) clean && cd ..) ; \
+ done
+
+--- a/collector/Makefile 1999-02-11 04:23:50.000000000 +0100
++++ b/collector/Makefile 2010-09-10 06:53:46.000000000 +0200
@@ -1,4 +1,4 @@
-CFLAGS= -DVERSION="\"$(VERSION)"\" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) -I.. $(OPT_FLAGS)
+CFLAGS+= -DVERSION="\"$(VERSION)"\" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) -I.. $(OPT_FLAGS)
@@ -33,12 +75,12 @@
traffic-collector: traffic-collector.o $(OBJS)
- $(CC) -o $@ traffic-collector.o $(OBJS) $(LIBS)
-+ $(CC) $(CFLAGS) -o $@ traffic-collector.o $(OBJS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ traffic-collector.o $(OBJS) $(LIBS)
install:
install -m 750 -o root -g root traffic-collector $(SBINDIR)
---- frontends/Makefile
-+++ frontends/Makefile 2003-10-23 19:48:02.000000000 +0000
+--- a/frontends/Makefile 1999-02-11 04:23:50.000000000 +0100
++++ b/frontends/Makefile 2010-09-10 06:53:46.000000000 +0200
@@ -1,4 +1,4 @@
-CFLAGS= -DVERSION="\"$(VERSION)\"" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) -I.. $(OPT_FLAGS)
+CFLAGS+= -DVERSION="\"$(VERSION)\"" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) -I.. $(OPT_FLAGS)
@@ -50,37 +92,40 @@
traffic-tops: traffic-tops.o psfe.o ../libreport.a
- $(CC) -o $@ traffic-tops.o psfe.o $(LFLAGS) $(LIBS) -lm
-+ $(CC) $(CFLAGS) -o $@ traffic-tops.o psfe.o $(LFLAGS) $(LIBS) -lm
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ traffic-tops.o psfe.o $(LFLAGS) $(LIBS) -lm
traffic-totext: traffic-totext.o textfe.o ../libreport.a
- $(CC) -o $@ traffic-totext.o textfe.o $(LFLAGS) $(LIBS)
-+ $(CC) $(CFLAGS) -o $@ traffic-totext.o textfe.o $(LFLAGS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ traffic-totext.o textfe.o $(LFLAGS) $(LIBS)
traffic-tohtml: traffic-tohtml.o htmlfe.o ../libreport.a
- $(CC) -o $@ traffic-tohtml.o htmlfe.o $(LFLAGS) $(LIBS)
-+ $(CC) $(CFLAGS) -o $@ traffic-tohtml.o htmlfe.o $(LFLAGS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ traffic-tohtml.o htmlfe.o $(LFLAGS) $(LIBS)
install:
install -m 755 -o root -g root traffic-tops $(SBINDIR)
---- sort/Makefile
-+++ sort/Makefile 2003-10-23 19:49:11.000000000 +0000
-@@ -1,4 +1,4 @@
+--- a/sort/Makefile 1999-02-11 04:23:50.000000000 +0100
++++ b/sort/Makefile 2010-09-10 06:56:39.000000000 +0200
+@@ -1,13 +1,13 @@
-CFLAGS= -DVERSION="\"$(VERSION)\"" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) -I.. $(OPT_FLAGS)
+CFLAGS+= -DVERSION="\"$(VERSION)\"" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) -I.. $(OPT_FLAGS)
OBJS=
TARGETS=traffic-sort
- LFLAGS=-L..
-@@ -7,7 +7,7 @@
+-LFLAGS=-L..
+-LIBS=-lreport $(GLIB) $(DEBUGLIBS)
++LFLAGS=
++LIBS=-L.. -lreport $(GLIB) $(DEBUGLIBS)
+
all: $(TARGETS)
traffic-sort: traffic-sort.o ../libreport.a
- $(CC) $(LFLAGS) -o $@ traffic-sort.o $(LIBS)
-+ $(CC) $(CFLAGS) $(LFLAGS) -o $@ traffic-sort.o $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(LFLAGS) -o $@ traffic-sort.o $(LIBS)
install:
install -m 755 -o root -g root traffic-sort $(SBINDIR)
---- utils/Makefile
-+++ utils/Makefile 2003-10-23 19:50:48.000000000 +0000
+--- a/utils/Makefile 1999-02-11 04:23:50.000000000 +0100
++++ b/utils/Makefile 2010-09-10 06:53:46.000000000 +0200
@@ -1,4 +1,4 @@
-CFLAGS= -DVERSION="\"$(VERSION)\"" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) -I.. $(OPT_FLAGS)
+CFLAGS+= -DVERSION="\"$(VERSION)\"" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) -I.. $(OPT_FLAGS)
@@ -92,11 +137,11 @@
traffic-exclude: traffic-exclude.o ../libreport.a
- $(CC) -o $@ traffic-exclude.o $(LFLAGS) $(LIBS)
-+ $(CC) $(CFLAGS) -o $@ traffic-exclude.o $(LFLAGS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ traffic-exclude.o $(LFLAGS) $(LIBS)
traffic-resolve: traffic-resolve.o ../libreport.a
- $(CC) -o $@ traffic-resolve.o $(LFLAGS) $(LIBS)
-+ $(CC) $(CFLAGS) -o $@ traffic-resolve.o $(LFLAGS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ traffic-resolve.o $(LFLAGS) $(LIBS)
install:
install -m 755 -o root -g root traffic-resolve $(SBINDIR)
diff --git a/net-analyzer/traffic-vis/traffic-vis-0.35-r2.ebuild b/net-analyzer/traffic-vis/traffic-vis-0.35-r2.ebuild
new file mode 100644
index 000000000000..412ed683bb33
--- /dev/null
+++ b/net-analyzer/traffic-vis/traffic-vis-0.35-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/traffic-vis/traffic-vis-0.35-r2.ebuild,v 1.1 2010/09/10 05:14:31 jer Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Generate traffic stats in html, ps, text and gif format"
+HOMEPAGE="http://www.mindrot.org/traffic-vis.html"
+SRC_URI="http://www.mindrot.org/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE="gif"
+DEPEND="net-libs/libpcap
+ gif? ( media-libs/netpbm
+ app-text/ghostscript-gpl
+ dev-lang/perl )
+ =dev-libs/glib-1.2*"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-libpcap-header-fix.patch
+
+ # bug 143930 - traffic-vis expects /usr/sbin/traffic-tops
+ sed -i frontends/traffic-togif \
+ -e "s:/usr/sbin/traffic-tops:/usr/bin/traffic-tops:g" \
+ || die "sed frontends/traffic-togif"
+
+ tc-export CC
+}
+
+src_install() {
+ dosbin collector/traffic-collector
+ doman collector/traffic-collector.8
+
+ for mybin in $(useq gif && echo frontends/traffic-togif) \
+ frontends/traffic-tohtml \
+ frontends/traffic-tops \
+ frontends/traffic-totext \
+ sort/traffic-sort \
+ utils/traffic-exclude \
+ utils/traffic-resolve ; do
+
+ dobin ${mybin}
+ doman ${mybin}.8
+ done
+
+ newinitd "${FILESDIR}"/traffic-vis.init.d traffic-vis
+ newconfd "${FILESDIR}"/traffic-vis.conf.d traffic-vis
+
+ dodoc TODO README BUGS CHANGELOG
+}