summaryrefslogtreecommitdiff
blob: 42bd3c677781d5891f3b95724ba7a9aa21e85400 (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
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

DESCRIPTION="Tools to ease the validation of DNSSEC related technologies"
HOMEPAGE="https://www.dnssec-tools.org/"
SRC_URI="https://github.com/DNSSEC-Tools/DNSSEC-Tools/archive/dnssec-tools-${PV}.tar.gz"
S="${WORKDIR}/DNSSEC-Tools-dnssec-tools-${PV}/dnssec-tools/validator"

LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 arm ~arm64 x86"
IUSE="dlv +nsec3 static-libs +threads"

RDEPEND=">=dev-libs/openssl-1.1.0:0="
DEPEND="${RDEPEND}"

# Tests fail due "Cannot create context: -7"
RESTRICT="test"

PATCHES=(
	# Users LDFLAGS are not respected
	# See https://github.com/DNSSEC-Tools/DNSSEC-Tools/pull/9
	"${FILESDIR}/${P}-ldflags.patch"
	"${FILESDIR}/${PN}-2.2.3-musl-fix.patch"
)

src_prepare() {
	default

	mv configure.in configure.ac || die
	eautoreconf
}

src_configure() {
	local myeconfargs=(
		$(use_with dlv)
		$(use_with nsec3)
		$(use_enable static-libs static)
		$(use_with threads)
		--with-dnsval-conf="${EPREFIX}/etc/dnssec-tools/dnsval.conf"
		--with-ipv6
		--with-resolv-conf="${EPREFIX}/etc/dnssec-tools/resolv.conf"
		--with-root-hints="${EPREFIX}/etc/dnssec-tools/root.hints"
	)

	econf "${myeconfargs[@]}"
}

src_install() {
	# Install fails with MAKEOPTS > -j1
	# See https://github.com/DNSSEC-Tools/DNSSEC-Tools/issues/8
	emake -j1 DESTDIR="${D}" install

	einstalldocs

	find "${D}" -name '*.la' -delete || die
}