summaryrefslogtreecommitdiff
blob: fb82381953d3043ef348d4102407778906448d89 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

AUTOTOOLS_IN_SOURCE_BUILD=1
AUTOTOOLS_AUTORECONF=1
inherit autotools-utils eutils toolchain-funcs

MY_P="${PN}-0.9b3"

DESCRIPTION="An SSLv3/TLS network protocol analyzer"
HOMEPAGE="http://www.rtfm.com/ssldump/"
SRC_URI="${HOMEPAGE}${MY_P}.tar.gz"

LICENSE="openssl"
SLOT="0"
KEYWORDS="amd64 ~arm ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="ssl"

RDEPEND="net-libs/libpcap
	ssl? ( >=dev-libs/openssl-1 )"
DEPEND="${RDEPEND}"

S="${WORKDIR}/${MY_P}"

src_prepare() {
	epatch \
		"${FILESDIR}"/${P}-libpcap-header.patch \
		"${FILESDIR}"/${P}-configure-dylib.patch \
		"${FILESDIR}"/${P}-openssl-0.9.8.compile-fix.patch \
		"${FILESDIR}"/${P}-DLT_LINUX_SLL.patch \
		"${FILESDIR}"/${P}-prefix-fix.patch \
		"${FILESDIR}"/${P}-declaration.patch \
		"${FILESDIR}"/${P}-includes.patch

	autotools-utils_src_prepare
}

src_configure() {
	local myeconfargs=(
		--with-pcap-inc="${EPREFIX}/usr/include"
		--with-pcap-lib="${EPREFIX}/usr/$(get_libdir)"
	)

	if use ssl; then
		myeconfargs+=(
			--with-openssl-inc="${EPREFIX}/usr/include"
			--with-openssl-lib="${EPREFIX}/usr/$(get_libdir)"
		)
	else
		myeconfargs+=( "--without-openssl" )
	fi

	tc-export CC

	autotools-utils_src_configure
}

src_install() {
	dosbin ssldump
	doman ssldump.1
	dodoc ChangeLog CREDITS README
}