summaryrefslogtreecommitdiff
blob: 54722fcd38119431d64cf6e568c18ac4302322f9 (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
52
53
54
55
56
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ettercap/ettercap-0.7.4.1-r1.ebuild,v 1.1 2012/08/20 09:23:13 ago Exp $

EAPI=4

inherit eutils autotools

DESCRIPTION="A suite for man in the middle attacks and network mapping"
HOMEPAGE="http://ettercap.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="debug gtk ncurses pcre ssl"

# libtool is needed because it provides libltdl (needed for plugins)
RDEPEND=">=net-libs/libnet-1.1.2.1-r1
	net-libs/libpcap
	sys-devel/libtool
	sys-libs/zlib
	gtk? (
		>=dev-libs/glib-2.2.2:2
		>=x11-libs/gtk+-2.2.2:2
	)
	ncurses? ( sys-libs/ncurses )
	pcre? ( dev-libs/libpcre )
	ssl? ( dev-libs/openssl )"
DEPEND="${RDEPEND}
	virtual/pkgconfig
	sys-devel/flex
	virtual/yacc"

S=${WORKDIR}/${PN}

src_prepare() {
	epatch "${FILESDIR}"/${PN}-0.7.3-as-needed.patch
	epatch "${FILESDIR}"/${PN}-0.7.4-autotools.patch
	epatch "${FILESDIR}"/${PN}-0.7.4-flags.patch
	epatch "${FILESDIR}"/${PN}-0.7.4-use-g-idle.patch

	eautoreconf

	#ettercap defaults to using mozilla so let's try to use xdg-open and pray it works
	sed -i 's#mozilla -remote openurl(http://%host%url)#xdg-open 'http://%host%url'#' "${S}"/share/etter.conf
}

src_configure() {
	econf \
		$(use_enable debug) \
		$(use_enable gtk) \
		$(use_with ncurses libncurses "${EPREFIX}"/usr) \
		$(use_with pcre libpcre "${EPREFIX}"/usr) \
		$(use_with ssl openssl "${EPREFIX}"/usr)
}