summaryrefslogtreecommitdiff
path: root/net-analyzer/thc-ipv6/thc-ipv6-3.8_p20250914.ebuild
blob: bdf8ce8c98b2766d01e0736c6b9671ffec0e38ab (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
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="Complete tool set to attack the inherent protocol weaknesses of IPV6 and ICMP6"
HOMEPAGE="https://github.com/vanhauser-thc/thc-ipv6"

if [[ ${PV} == *9999 ]]; then
	EGIT_REPO_URI="https://github.com/vanhauser-thc/thc-ipv6.git"
	EGIT_BRANCH=master
	inherit git-r3
else
	HASH="7f3589fab681966d0b0c76ab9709ff9cafbd009a"
	S="${WORKDIR}/${PN}-${HASH}"
	SRC_URI="https://github.com/vanhauser-thc/thc-ipv6/archive/${HASH}.tar.gz -> ${P}.gh.tar.gz"
	KEYWORDS="~amd64 ~x86"
fi

LICENSE="AGPL-3 openssl"
SLOT="0"
IUSE="ssl"

DEPEND="
	net-libs/libnetfilter_queue
	net-libs/libpcap
	ssl? ( dev-libs/openssl:0= )
"
RDEPEND="${DEPEND}"

PATCHES=(
	# merged
	"${FILESDIR}"/${P}-fix_parallel.patch
)

src_prepare() {
	sed -e '/^CFLAGS+=-g/s,CFLAGS+=,CFLAGS?=,' \
		-i Makefile || die

	if ! use ssl; then
		sed -e '/^HAVE_SSL/s:^:#:' \
			-i Makefile || die
	fi

	default
}

src_compile() {
	emake CC="$(tc-getCC)"
}

src_install() {
	emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" STRIP="true" install
	dodoc CHANGES HOWTO-INJECT README.md
}