2024-02-18 20:41:06 +01:00
|
|
|
# Copyright 1999-2024 Gentoo Authors
|
2022-11-28 13:35:22 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
2024-02-18 20:41:06 +01:00
|
|
|
|
|
|
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/isc.asc
|
|
|
|
inherit flag-o-matic verify-sig
|
2022-11-28 13:35:22 +01:00
|
|
|
|
|
|
|
MY_PN=${PN//-tools}
|
|
|
|
MY_PV=${PV/_p/-P}
|
|
|
|
MY_PV=${MY_PV/_rc/rc}
|
|
|
|
MY_P="${MY_PN}-${MY_PV}"
|
|
|
|
|
2022-12-23 15:21:58 +01:00
|
|
|
DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen"
|
2024-02-18 20:41:06 +01:00
|
|
|
HOMEPAGE="https://www.isc.org/software/bind https://gitlab.isc.org/isc-projects/bind9"
|
|
|
|
SRC_URI="
|
|
|
|
https://downloads.isc.org/isc/bind9/${PV}/${MY_P}.tar.xz
|
|
|
|
verify-sig? ( https://downloads.isc.org/isc/bind9/${PV}/${MY_P}.tar.xz.asc )
|
|
|
|
"
|
|
|
|
S="${WORKDIR}/${MY_P}"
|
2022-11-28 13:35:22 +01:00
|
|
|
|
|
|
|
LICENSE="MPL-2.0"
|
|
|
|
SLOT="0"
|
2024-02-18 20:41:06 +01:00
|
|
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
2024-02-18 21:12:03 +01:00
|
|
|
IUSE="+caps doc gssapi idn libedit lmdb readline static-libs test xml"
|
2022-11-28 13:35:22 +01:00
|
|
|
|
2023-02-04 03:09:31 +01:00
|
|
|
# libuv lower bound should be the highest value seen at
|
2024-02-18 20:41:06 +01:00
|
|
|
# https://gitlab.isc.org/isc-projects/bind9/-/blob/bind-9.18/lib/isc/netmgr/netmgr.c?ref_type=heads#L203
|
2023-02-04 03:09:31 +01:00
|
|
|
# to avoid issues with matching stable/testing, etc
|
2024-02-18 20:41:06 +01:00
|
|
|
RDEPEND="
|
2023-02-04 03:09:31 +01:00
|
|
|
>=dev-libs/libuv-1.42.0:=
|
2022-11-28 13:35:22 +01:00
|
|
|
dev-libs/jemalloc
|
|
|
|
dev-libs/openssl:=
|
|
|
|
caps? ( sys-libs/libcap )
|
|
|
|
gssapi? ( virtual/krb5 )
|
|
|
|
idn? ( net-dns/libidn2:= )
|
|
|
|
libedit? ( dev-libs/libedit )
|
|
|
|
!libedit? (
|
|
|
|
readline? ( sys-libs/readline:= )
|
|
|
|
)
|
|
|
|
lmdb? ( dev-db/lmdb )
|
|
|
|
xml? ( dev-libs/libxml2 )
|
2024-02-18 20:41:06 +01:00
|
|
|
!net-dns/bind
|
2022-11-28 13:35:22 +01:00
|
|
|
"
|
|
|
|
|
2024-02-18 20:41:06 +01:00
|
|
|
DEPEND="${RDEPEND}"
|
|
|
|
# sphinx required for man-page and html creation
|
|
|
|
BDEPEND="
|
|
|
|
virtual/pkgconfig
|
|
|
|
doc? ( dev-python/sphinx )
|
|
|
|
test? (
|
|
|
|
dev-util/cmocka
|
|
|
|
dev-util/kyua
|
|
|
|
)
|
|
|
|
verify-sig? ( sec-keys/openpgp-keys-isc )
|
|
|
|
"
|
2022-11-28 13:35:22 +01:00
|
|
|
|
|
|
|
# bug 479092, requires networking
|
2024-02-18 20:41:06 +01:00
|
|
|
RESTRICT="!test? ( test )"
|
2022-11-28 13:35:22 +01:00
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
local myeconfargs=(
|
|
|
|
--localstatedir="${EPREFIX}"/var
|
|
|
|
--with-jemalloc
|
|
|
|
--with-zlib
|
2023-05-09 23:03:59 +02:00
|
|
|
--without-json-c
|
2022-11-28 13:35:22 +01:00
|
|
|
--without-maxminddb
|
|
|
|
--disable-geoip
|
|
|
|
--with-openssl="${ESYSROOT}"/usr
|
|
|
|
$(use_enable caps linux-caps)
|
|
|
|
$(use_enable static-libs static)
|
|
|
|
$(use_with gssapi)
|
|
|
|
$(use_with idn libidn2 "${ESYSROOT}"/usr)
|
|
|
|
$(use_with lmdb)
|
|
|
|
$(use_with xml libxml2)
|
|
|
|
)
|
|
|
|
|
|
|
|
# bug 607400
|
|
|
|
if use libedit ; then
|
|
|
|
myeconfargs+=( --with-readline=libedit )
|
|
|
|
elif use readline ; then
|
|
|
|
myeconfargs+=( --with-readline )
|
|
|
|
else
|
|
|
|
myeconfargs+=( --without-readline )
|
|
|
|
fi
|
|
|
|
|
|
|
|
# to expose CMSG_* macros from sys/sockets.h
|
|
|
|
[[ ${CHOST} == *-solaris* ]] && append-cflags "-D_XOPEN_SOURCE=600"
|
|
|
|
|
|
|
|
econf "${myeconfargs[@]}"
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
emake bind.keys.h
|
|
|
|
emake -C lib/
|
|
|
|
emake -C bin/delv/
|
|
|
|
emake -C bin/dig/
|
|
|
|
emake -C bin/nsupdate/
|
|
|
|
emake -C bin/dnssec/
|
|
|
|
emake -C bin/tools/
|
|
|
|
emake -C doc/man/ man
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
local man_dir="${S}/doc/man"
|
|
|
|
|
|
|
|
dodoc README.md CHANGES
|
|
|
|
|
|
|
|
emake DESTDIR="${D}" -C lib/ install
|
|
|
|
|
|
|
|
emake DESTDIR="${D}" -C bin/delv/ install
|
|
|
|
doman ${man_dir}/delv.1
|
|
|
|
|
|
|
|
emake DESTDIR="${D}" -C bin/dig/ install
|
|
|
|
doman ${man_dir}/{dig,host,nslookup}.1
|
|
|
|
|
|
|
|
emake DESTDIR="${D}" -C bin/nsupdate/ install
|
|
|
|
doman ${man_dir}/nsupdate.1
|
|
|
|
|
|
|
|
emake DESTDIR="${D}" -C bin/dnssec/ install
|
2024-02-18 20:41:06 +01:00
|
|
|
local tool
|
2022-11-28 13:35:22 +01:00
|
|
|
for tool in cds dsfromkey importkey keyfromlabel keygen \
|
|
|
|
revoke settime signzone verify; do
|
|
|
|
doman ${man_dir}/dnssec-"${tool}".1
|
|
|
|
done
|
|
|
|
|
|
|
|
emake DESTDIR="${D}" -C bin/tools/ install
|
|
|
|
doman ${man_dir}/{arpaname,mdig,named-journalprint,named-rrchecker,nsec3hash}.1
|
|
|
|
|
2022-12-23 15:21:58 +01:00
|
|
|
# just leave tools to be installed
|
2022-11-28 13:35:22 +01:00
|
|
|
rm -rf "${D}"/usr/include/
|
|
|
|
|
|
|
|
use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
|
|
|
|
}
|