3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
PYTHON_COMPAT=( python3_{9,10} )
|
6 |
|
inherit python-single-r1 autotools multilib-minimal
|
|
6 |
inherit python-single-r1 multilib-minimal
|
7 |
7 |
|
8 |
8 |
DESCRIPTION="A library with the aim to simplify DNS programming in C"
|
9 |
9 |
HOMEPAGE="https://www.nlnetlabs.nl/projects/ldns/"
|
... | ... | |
11 |
11 |
|
12 |
12 |
LICENSE="BSD"
|
13 |
13 |
SLOT="0/3"
|
14 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-macos ~x64-macos ~x64-solaris"
|
15 |
|
IUSE="+dane doc +ecdsa ed25519 ed448 examples gost python static-libs vim-syntax"
|
|
14 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos ~x64-macos ~x64-solaris"
|
|
15 |
IUSE="doc examples python static-libs"
|
16 |
16 |
|
17 |
|
# configure will die if ecdsa is enabled and ssl is not
|
18 |
17 |
REQUIRED_USE="
|
19 |
18 |
python? ( ${PYTHON_REQUIRED_USE} )
|
20 |
19 |
"
|
21 |
20 |
|
22 |
|
COMMON_DEPEND="
|
23 |
|
python? ( ${PYTHON_DEPS} )
|
24 |
|
>=dev-libs/openssl-1.0.1e:0=[${MULTILIB_USEDEP}]
|
25 |
|
examples? ( net-libs/libpcap )
|
26 |
|
"
|
27 |
|
DEPEND="${COMMON_DEPEND}
|
|
21 |
BDEPEND="
|
28 |
22 |
python? ( dev-lang/swig )
|
29 |
23 |
doc? ( app-doc/doxygen )
|
30 |
24 |
"
|
31 |
|
RDEPEND="${COMMON_DEPEND}
|
|
25 |
DEPEND="
|
|
26 |
python? ( ${PYTHON_DEPS} )
|
|
27 |
>=dev-libs/openssl-1.1.1l-r1:0=[${MULTILIB_USEDEP},static-libs?]
|
|
28 |
examples? ( net-libs/libpcap )
|
|
29 |
"
|
|
30 |
RDEPEND="${DEPEND}
|
32 |
31 |
!<net-dns/ldns-utils-1.8.0-r2
|
33 |
32 |
"
|
34 |
33 |
|
35 |
|
RESTRICT="test" # 1.6.9 has no test directory
|
|
34 |
RESTRICT="test" # missing test directory
|
36 |
35 |
|
37 |
36 |
MULTILIB_CHOST_TOOLS=(
|
38 |
37 |
/usr/bin/ldns-config
|
... | ... | |
42 |
41 |
use python && python-single-r1_pkg_setup
|
43 |
42 |
}
|
44 |
43 |
|
45 |
|
multilib_src_configure() {
|
46 |
|
# >=openssl-1.1.0 required for dane-ta
|
47 |
|
if has_version "<dev-libs/openssl-1.1.0"; then
|
48 |
|
local dane_ta_usage="--disable-dane-ta-usage"
|
49 |
|
else
|
50 |
|
local dane_ta_usage=""
|
51 |
|
fi
|
|
44 |
src_prepare() {
|
|
45 |
local PATCHES=(
|
|
46 |
"${FILESDIR}/ldns-1.8.1-pkgconfig.patch"
|
|
47 |
)
|
|
48 |
default
|
|
49 |
}
|
52 |
50 |
|
|
51 |
multilib_src_configure() {
|
53 |
52 |
ECONF_SOURCE=${S} \
|
54 |
53 |
econf \
|
55 |
54 |
$(use_enable static-libs static) \
|
56 |
|
$(use_enable gost) \
|
57 |
|
$(use_enable ecdsa) \
|
58 |
|
$(use_enable ed25519) \
|
59 |
|
$(use_enable ed448) \
|
60 |
|
$(use_enable dane) \
|
61 |
55 |
$(multilib_native_use_with python pyldns) \
|
62 |
56 |
$(multilib_native_use_with python pyldnsx) \
|
63 |
57 |
--with-ssl="${EPREFIX}"/usr \
|
64 |
|
--enable-sha2 \
|
65 |
58 |
$(multilib_native_with drill) \
|
66 |
59 |
$(multilib_native_use_with examples) \
|
67 |
|
${dane_ta_usage} \
|
68 |
60 |
--disable-rpath
|
69 |
61 |
}
|
70 |
62 |
|
71 |
|
src_prepare() {
|
72 |
|
default
|
73 |
|
# remove non-existing dependency for target packaging/libldns.pc
|
74 |
|
sed -i 's,$(srcdir)/packaging/libldns.pc.in,,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
|
75 |
|
|
76 |
|
# remove $(srcdir) from path for multilib build
|
77 |
|
sed -i 's,$(srcdir)/packaging/libldns.pc,packaging/libldns.pc,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
|
78 |
|
|
79 |
|
# remove Libs.private, see bug #695672
|
80 |
|
sed -i '/^Libs.private:/d' "${S}"/packaging/libldns.pc.in || die 'could not patch libldns.pc.in'
|
81 |
|
|
82 |
|
# backport https://github.com/NLnetLabs/ldns/commit/bc9d017f6fd8b6b5d2ff6e4489a2931d0aab8184
|
83 |
|
sed -i 's/AC_SUBST(VERSION_INFO.*/AC_SUBST(VERSION_INFO, [5:0:2])/' "${S}"/configure.ac || die 'could not patch configure.ac'
|
84 |
|
|
85 |
|
eautoreconf
|
86 |
|
}
|
87 |
|
|
88 |
63 |
multilib_src_compile() {
|
89 |
64 |
default
|
90 |
65 |
|
... | ... | |
107 |
82 |
find "${D}" -name '*.la' -delete || die
|
108 |
83 |
use python && python_optimize
|
109 |
84 |
|
110 |
|
if use vim-syntax ; then
|
111 |
|
insinto /usr/share/vim/vimfiles/ftdetect
|
112 |
|
doins libdns.vim
|
113 |
|
fi
|
|
85 |
insinto /usr/share/vim/vimfiles/ftdetect
|
|
86 |
doins libdns.vim
|
114 |
87 |
}
|