Gentoo Archives: gentoo-commits

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