1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils autotools flag-o-matic toolchain-funcs
11 MY_P="${MY_PN}-${MY_PV}"
13 DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen"
14 HOMEPAGE="http://www.isc.org/software/bind"
15 SRC_URI="https://www.isc.org/downloads/file/${MY_P}/?version=tar-gz -> ${MY_PN}-${PV}.tar.gz"
17 LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
19 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
20 IUSE="doc gost gssapi idn ipv6 libedit libidn2 libressl readline seccomp ssl urandom xml"
21 # no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
23 REQUIRED_USE="gost? ( !libressl ssl )
29 !libressl? ( dev-libs/openssl:0= )
30 libressl? ( dev-libs/libressl:= )
32 gost? ( >=dev-libs/openssl-1.0.0:0=[-bindist] )
33 xml? ( dev-libs/libxml2 )
34 idn? ( <net-dns/idnkit-2:= )
35 libidn2? ( net-dns/libidn2 )
36 gssapi? ( virtual/krb5 )
37 libedit? ( dev-libs/libedit )
39 readline? ( sys-libs/readline:0= )
41 seccomp? ( sys-libs/libseccomp )"
45 !<net-dns/bind-9.10.2"
47 S="${WORKDIR}/${MY_P}"
49 # bug 479092, requires networking
53 # Disable tests for now, bug 406399
54 sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
60 mv configure.in configure.ac || die # configure.in is deprecated
68 myconf="${myconf} --with-randomdev=/dev/urandom"
70 myconf="${myconf} --with-randomdev=/dev/random"
75 myconf+=' --with-readline=-ledit'
76 elif use readline ; then
77 myconf+=' --with-readline=-lreadline'
79 myconf+=' --without-readline'
83 append-cflags "-DDIG_SIGCHASE"
85 # localstatedir for nsupdate -l, bug 395785
88 --localstatedir="${EPREFIX}"/var \
94 $(use_with idn idnkit) \
95 $(usex idn --with-idnlib=-lidnkit '') \
97 $(use_enable seccomp) \
98 $(use_with ssl openssl "${EPREFIX}"/usr) \
99 $(use_with xml libxml2) \
101 $(use_with readline) \
106 echo '#undef SO_BSDCOMPAT' >> config.h
112 emake AR="${AR}" -C lib/
113 emake AR="${AR}" -C bin/delv/
114 emake AR="${AR}" -C bin/dig/
115 emake AR="${AR}" -C bin/nsupdate/
116 emake AR="${AR}" -C bin/dnssec/
127 dobin dig host nslookup
128 doman {dig,host,nslookup}.1
130 cd "${S}"/bin/nsupdate
138 for tool in dsfromkey importkey keyfromlabel keygen \
139 revoke settime signzone verify; do
140 dobin dnssec-"${tool}"
141 doman dnssec-"${tool}".8
143 dohtml dnssec-"${tool}".html