blob: 03ce4e5bfaec73e29ee1fbb8d7688e2d3d5adef8 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit autotools eutils toolchain-funcs
DESCRIPTION="Network Security Analysis Tool, an application-level network security scanner"
HOMEPAGE="http://nsat.sourceforge.net/"
SRC_URI="mirror://sourceforge/nsat/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"
IUSE="X"
RDEPEND="
X? (
x11-libs/libX11
dev-lang/tk
)
dev-libs/libmix
net-libs/libpcap
"
DEPEND="$RDEPEND"
S="${WORKDIR}/${PN}"
src_prepare() {
epatch "${FILESDIR}"/${P}-configure.patch
epatch "${FILESDIR}"/${P}-lvalue-gcc4.patch
epatch "${FILESDIR}"/${P}-strip.patch
epatch "${FILESDIR}"/${P}-misc.patch
epatch "${FILESDIR}"/${P}-va_list.patch
use amd64 && epatch "${FILESDIR}"/${P}-amd64-compat.patch
sed -i \
-e "s:^#CGIFile /usr/local/share/nsat/nsat.cgi$:#CGIFile /usr/share/nsat/nsat.cgi:g" \
nsat.conf || die
sed -i -e "s:/usr/local:/usr:g" tools/xnsat || die
sed -i \
-e "s:/usr/local/share/nsat/nsat.conf:/etc/nsat/nsat.conf:g" \
-e "s:/usr/local/share/nsat/nsat.cgi:/usr/share/nsat/nsat.cgi:g" \
src/lang.h || die
eautoreconf
}
src_configure() {
tc-export CC
econf $(use_with X x)
}
src_compile() {
emake MIXOBJ=-lmix++
}
src_install () {
dobin nsat smb-ns
use X && dobin tools/xnsat
insinto /usr/share/nsat
doins nsat.cgi
insinto /etc/nsat
doins nsat.conf
dodoc README doc/CHANGES
doman doc/nsat.8
}
|