summaryrefslogtreecommitdiff
blob: 7830c98a5d5b1fd577330700a1bf196f32842eda (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit eutils

DESCRIPTION="DNSSEC validator (dnsval)"
HOMEPAGE="http://www.dnssec-tools.org/"
SRC_URI="http://www.dnssec-tools.org/download/dnsval-${PV}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="ipv6 static-libs +threads +ecdsa-check"

RDEPEND="dev-libs/openssl:0
	ecdsa-check? ( dev-libs/openssl:0[-bindist] )
	!<net-dns/dnssec-tools-1.13"
DEPEND="${RDEPEND}"

S=${WORKDIR}/dnsval-${PV}

PATCHES=( "${FILESDIR}"/${PN}-2.1-respect-LDFLAGS.patch
	"${FILESDIR}"/${P}-glib-2.25.patch )

src_configure() {
	econf \
		--with-nsec3 \
		--with-dlv \
		$(use_with ipv6) \
		$(use_with threads) \
		$(use_enable ecdsa-check)
}

src_install() {
	dodir /usr/bin /usr/include/validator
	default

	insinto /etc/dnssec-tools
	doins etc/{dnsval.conf,root.hints}
	elog "Creating /etc/dnssec-tools/resolv.conf as symlink to /etc/resolv.conf"
	dosym ../resolv.conf /etc/dnssec-tools/resolv.conf

	use static-libs || find "${D}" -name "*.a" -delete
	prune_libtool_files
}