summaryrefslogtreecommitdiff
blob: 1875e4c74f854067e6b2421e49454f8663b173fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ttt/ttt-1.8.1.ebuild,v 1.1 2005/04/12 11:50:18 ka0ttic Exp $

inherit eutils

DESCRIPTION="Tele Traffic Taper (ttt) - Real-time Graphical Remote Traffic Monitor"
SRC_URI="ftp://ftp.csl.sony.co.jp/pub/kjc/${P}.tar.gz"
HOMEPAGE="http://www.csl.sony.co.jp/person/kjc/kjc/software.html"

SLOT="0"
LICENSE="BSD"
KEYWORDS="~x86"
IUSE="ipv6"

DEPEND="virtual/libc
	virtual/x11
	dev-lang/tcl
	dev-lang/tk
	>=dev-tcltk/blt-2.4
	virtual/libpcap"

src_unpack() {
	unpack ${A}
	cd ${S}
	grep 'pcap_lookupnet.*const' /usr/include/pcap.h &>/dev/null && \
		epatch ${FILESDIR}/${PN}-1.8-pcap.patch

	epatch ${FILESDIR}/${PN}-1.8-linux-sll.patch

	epatch ${FILESDIR}/${PN}-gcc4.diff
	# remove -Wwrite-strings -fwritable-strings (naughty)
	sed -i 's/\(GCCFLAGS="\).*\("\)/\1-Wall\2/' configure || die "sed failed"
}

src_compile() {
	local myconf
	use ipv6 && myconf="${myconf} --enable-ipv6"

	econf ${myconf} || die "./configure failed"
	emake || die "make failed"
}

src_install() {
	dodoc README
	dodir /usr/bin
	dodir /usr/lib/ttt
	dodir /usr/share/man/man1
	einstall exec_prefix=${D}/usr install-man || die "make install failed"
	prepall
}