Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/ldns/
Date: Sat, 04 Dec 2021 15:58:43
Message-Id: 1638633494.2347bb98e3dc254b6af0a7601bfe2e93ffa241c9.floppym@gentoo
1 commit: 2347bb98e3dc254b6af0a7601bfe2e93ffa241c9
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 3 22:53:25 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 4 15:58:14 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2347bb98
7
8 net-libs/ldns: install 'drill' command
9
10 Bug: https://bugs.gentoo.org/828109
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12
13 net-libs/ldns/ldns-1.8.0-r3.ebuild | 114 +++++++++++++++++++++++++++++++++++++
14 1 file changed, 114 insertions(+)
15
16 diff --git a/net-libs/ldns/ldns-1.8.0-r3.ebuild b/net-libs/ldns/ldns-1.8.0-r3.ebuild
17 new file mode 100644
18 index 000000000000..05e64154dcb4
19 --- /dev/null
20 +++ b/net-libs/ldns/ldns-1.8.0-r3.ebuild
21 @@ -0,0 +1,114 @@
22 +# Copyright 1999-2021 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +PYTHON_COMPAT=( python3_{7,8,9,10} )
27 +inherit python-single-r1 autotools multilib-minimal
28 +
29 +DESCRIPTION="a library with the aim to simplify DNS programming in C"
30 +HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/"
31 +SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
32 +
33 +LICENSE="BSD"
34 +SLOT="0/3"
35 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos ~x64-macos ~x64-solaris"
36 +IUSE="+dane doc +ecdsa ed25519 ed448 examples gost python static-libs vim-syntax"
37 +
38 +# configure will die if ecdsa is enabled and ssl is not
39 +REQUIRED_USE="
40 + python? ( ${PYTHON_REQUIRED_USE} )
41 +"
42 +
43 +COMMON_DEPEND="
44 + python? ( ${PYTHON_DEPS} )
45 + >=dev-libs/openssl-1.0.1e:0=[${MULTILIB_USEDEP}]
46 + examples? ( net-libs/libpcap )
47 +"
48 +DEPEND="${COMMON_DEPEND}
49 + python? ( dev-lang/swig )
50 + doc? ( app-doc/doxygen )
51 +"
52 +RDEPEND="${COMMON_DEPEND}
53 + !net-dns/ldns-utils
54 +"
55 +
56 +RESTRICT="test" # 1.6.9 has no test directory
57 +
58 +MULTILIB_CHOST_TOOLS=(
59 + /usr/bin/ldns-config
60 +)
61 +
62 +pkg_setup() {
63 + use python && python-single-r1_pkg_setup
64 +}
65 +
66 +multilib_src_configure() {
67 + # >=openssl-1.1.0 required for dane-ta
68 + if has_version "<dev-libs/openssl-1.1.0"; then
69 + local dane_ta_usage="--disable-dane-ta-usage"
70 + else
71 + local dane_ta_usage=""
72 + fi
73 +
74 + ECONF_SOURCE=${S} \
75 + econf \
76 + $(use_enable static-libs static) \
77 + $(use_enable gost) \
78 + $(use_enable ecdsa) \
79 + $(use_enable ed25519) \
80 + $(use_enable ed448) \
81 + $(use_enable dane) \
82 + $(multilib_native_use_with python pyldns) \
83 + $(multilib_native_use_with python pyldnsx) \
84 + --with-ssl="${EPREFIX}"/usr \
85 + --enable-sha2 \
86 + $(multilib_native_with drill) \
87 + $(multilib_native_use_with examples) \
88 + ${dane_ta_usage} \
89 + --disable-rpath
90 +}
91 +
92 +src_prepare() {
93 + default
94 + # remove non-existing dependency for target packaging/libldns.pc
95 + sed -i 's,$(srcdir)/packaging/libldns.pc.in,,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
96 +
97 + # remove $(srcdir) from path for multilib build
98 + sed -i 's,$(srcdir)/packaging/libldns.pc,packaging/libldns.pc,' "${S}"/Makefile.in || die 'could not patch Makefile.in'
99 +
100 + # remove Libs.private, see bug #695672
101 + sed -i '/^Libs.private:/d' "${S}"/packaging/libldns.pc.in || die 'could not patch libldns.pc.in'
102 +
103 + # backport https://github.com/NLnetLabs/ldns/commit/bc9d017f6fd8b6b5d2ff6e4489a2931d0aab8184
104 + sed -i 's/AC_SUBST(VERSION_INFO.*/AC_SUBST(VERSION_INFO, [5:0:2])/' "${S}"/configure.ac || die 'could not patch configure.ac'
105 +
106 + eautoreconf
107 +}
108 +
109 +multilib_src_compile() {
110 + default
111 +
112 + if multilib_is_native_abi && use doc ; then
113 + emake doxygen
114 + fi
115 +}
116 +
117 +multilib_src_install() {
118 + default
119 +
120 + if multilib_is_native_abi && use doc ; then
121 + dodoc -r doc/html
122 + fi
123 +}
124 +
125 +multilib_src_install_all() {
126 + dodoc Changelog README*
127 +
128 + find "${D}" -name '*.la' -delete || die
129 + use python && python_optimize
130 +
131 + if use vim-syntax ; then
132 + insinto /usr/share/vim/vimfiles/ftdetect
133 + doins libdns.vim
134 + fi
135 +}