Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/
Date: Tue, 04 Aug 2020 12:50:39
Message-Id: 1596545271.6f3573b4475382a306b8fd97ec9c5d373a667970.blueness@gentoo
1 commit: 6f3573b4475382a306b8fd97ec9c5d373a667970
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 4 12:47:51 2020 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 4 12:47:51 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f3573b4
7
8 net-dns/avahi: restore avahi-0.7
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
12
13 net-dns/avahi/Manifest | 1 +
14 net-dns/avahi/avahi-0.7-r6.ebuild | 216 ++++++++++++++++++++++++++++++++++++++
15 net-dns/avahi/metadata.xml | 6 +-
16 3 files changed, 221 insertions(+), 2 deletions(-)
17
18 diff --git a/net-dns/avahi/Manifest b/net-dns/avahi/Manifest
19 index 8827967c8d2..8c49f959d60 100644
20 --- a/net-dns/avahi/Manifest
21 +++ b/net-dns/avahi/Manifest
22 @@ -1 +1,2 @@
23 +DIST avahi-0.7.tar.gz 940047 BLAKE2B 8299577bf27ee65fad5d743dbf94202b148a6fc86825cae303f94c44482eea07cf6570d970ca286e81a787d6a64598b7123f2ac17a259ddc50ef431b9c94b530 SHA512 61f656da7614d8cca1862180038f571db3474c84f05db4d3509f614cdbf8b1a1047661b7e24d63682d5b48ed1bfa1b08b3c9e6dbe9222bcd62d99bc168a11abe
24 DIST avahi-0.8.tar.gz 953319 BLAKE2B ddede1b8790ff3057ea5f4bb710e95578229e078a7abac83121e043017dda1ab3d971c723f920fdd4f3d98b88bd2cf21f9645bec1b7bbd2ea194cb399a5f5b46 SHA512 27bba9a551152dfc7e721f326042e7bfce55d227044a6cbaee04d6fb0e3f59c36e159c2b7a4dd42d1c955cdf37cc1c303e91991c08928bbded91d796e9a22abe
25
26 diff --git a/net-dns/avahi/avahi-0.7-r6.ebuild b/net-dns/avahi/avahi-0.7-r6.ebuild
27 new file mode 100644
28 index 00000000000..acf63a7774c
29 --- /dev/null
30 +++ b/net-dns/avahi/avahi-0.7-r6.ebuild
31 @@ -0,0 +1,216 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="6"
36 +
37 +PYTHON_COMPAT=( python2_7 )
38 +PYTHON_REQ_USE="gdbm"
39 +
40 +inherit autotools eutils flag-o-matic ltprune multilib multilib-minimal mono-env python-r1 systemd user
41 +
42 +DESCRIPTION="System which facilitates service discovery on a local network"
43 +HOMEPAGE="http://avahi.org/"
44 +SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +LICENSE="LGPL-2.1"
47 +SLOT="0"
48 +#KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
49 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
50 +IUSE="autoipd dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt5 selinux test"
51 +RESTRICT="!test? ( test )"
52 +
53 +REQUIRED_USE="
54 + python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
55 + mono? ( dbus )
56 + howl-compat? ( dbus )
57 + mdnsresponder-compat? ( dbus )
58 +"
59 +
60 +COMMON_DEPEND="
61 + dev-libs/libdaemon
62 + dev-libs/expat
63 + dev-libs/glib:2[${MULTILIB_USEDEP}]
64 + gdbm? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
65 + qt5? ( dev-qt/qtcore:5 )
66 + gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
67 + gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
68 + dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
69 + kernel_linux? ( sys-libs/libcap )
70 + introspection? ( dev-libs/gobject-introspection:= )
71 + mono? (
72 + dev-lang/mono
73 + gtk? ( dev-dotnet/gtk-sharp:2 )
74 + )
75 + python? (
76 + ${PYTHON_DEPS}
77 + dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
78 + introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
79 + )
80 +"
81 +
82 +DEPEND="
83 + ${COMMON_DEPEND}
84 + dev-util/glib-utils
85 + doc? ( app-doc/doxygen )
86 + app-doc/xmltoman
87 + dev-util/intltool
88 + virtual/pkgconfig
89 +"
90 +
91 +RDEPEND="
92 + ${COMMON_DEPEND}
93 + howl-compat? ( !net-misc/howl )
94 + mdnsresponder-compat? ( !net-misc/mDNSResponder )
95 + selinux? ( sec-policy/selinux-avahi )
96 +"
97 +
98 +MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
99 +
100 +PATCHES=(
101 + "${FILESDIR}/${P}-qt5.patch"
102 + "${FILESDIR}/${P}-CVE-2017-6519.patch"
103 +)
104 +
105 +pkg_preinst() {
106 + enewgroup netdev
107 + enewgroup avahi
108 + enewuser avahi -1 -1 -1 avahi
109 +
110 + if use autoipd; then
111 + enewgroup avahi-autoipd
112 + enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
113 + fi
114 +}
115 +
116 +pkg_setup() {
117 + use mono && mono-env_pkg_setup
118 +}
119 +
120 +src_prepare() {
121 + default
122 +
123 + if ! use ipv6; then
124 + sed -i \
125 + -e s/use-ipv6=yes/use-ipv6=no/ \
126 + avahi-daemon/avahi-daemon.conf || die
127 + fi
128 +
129 + sed -i\
130 + -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
131 + doxygen_to_devhelp.xsl || die
132 +
133 + # Prevent .pyc files in DESTDIR
134 + >py-compile
135 +
136 + eautoreconf
137 +
138 + # bundled manpages
139 + multilib_copy_sources
140 +}
141 +
142 +src_configure() {
143 + # those steps should be done once-per-ebuild rather than per-ABI
144 + use python && python_setup
145 +
146 + multilib-minimal_src_configure
147 +}
148 +
149 +multilib_src_configure() {
150 + local myconf=( --disable-static )
151 +
152 + if use python; then
153 + myconf+=(
154 + $(multilib_native_use_enable dbus python-dbus)
155 + $(multilib_native_use_enable introspection pygobject)
156 + )
157 + fi
158 +
159 + if use mono; then
160 + myconf+=( $(multilib_native_use_enable doc monodoc) )
161 + fi
162 +
163 + if ! multilib_is_native_abi; then
164 + myconf+=(
165 + # used by daemons only
166 + --disable-libdaemon
167 + --with-xml=none
168 + )
169 + fi
170 +
171 + myconf+=( $(multilib_native_use_enable qt5) )
172 +
173 + econf \
174 + --localstatedir="${EPREFIX}/var" \
175 + --with-distro=gentoo \
176 + --disable-python-dbus \
177 + --enable-manpages \
178 + --enable-xmltoman \
179 + --disable-monodoc \
180 + --enable-glib \
181 + --enable-gobject \
182 + $(multilib_native_use_enable test tests) \
183 + $(multilib_native_use_enable autoipd) \
184 + $(use_enable mdnsresponder-compat compat-libdns_sd) \
185 + $(use_enable howl-compat compat-howl) \
186 + $(multilib_native_use_enable doc doxygen-doc) \
187 + $(multilib_native_use_enable mono) \
188 + $(use_enable dbus) \
189 + $(multilib_native_use_enable python) \
190 + $(use_enable gtk) \
191 + $(use_enable gtk3) \
192 + $(use_enable nls) \
193 + $(multilib_native_use_enable introspection) \
194 + --disable-qt3 \
195 + --disable-qt4 \
196 + $(use_enable gdbm) \
197 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
198 + "${myconf[@]}"
199 +}
200 +
201 +multilib_src_compile() {
202 + emake
203 +
204 + multilib_is_native_abi && use doc && emake avahi.devhelp
205 +}
206 +
207 +multilib_src_install() {
208 + emake install DESTDIR="${D}"
209 + rm -f "${ED}"/usr/bin/avahi-bookmarks
210 +
211 + # https://github.com/lathiat/avahi/issues/28
212 + use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
213 + use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
214 +
215 + if multilib_is_native_abi && use doc; then
216 + docinto html
217 + dodoc -r doxygen/html/.
218 + insinto /usr/share/devhelp/books/avahi
219 + doins avahi.devhelp
220 + fi
221 +
222 + # The build system creates an empty "/run" directory, so we clean it up here
223 + rmdir "${ED}"/run
224 +}
225 +
226 +multilib_src_install_all() {
227 + if use autoipd; then
228 + insinto /lib/rcscripts/net
229 + doins "${FILESDIR}"/autoipd.sh
230 +
231 + insinto /lib/netifrc/net
232 + newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
233 + fi
234 +
235 + dodoc docs/{AUTHORS,NEWS,README,TODO}
236 +
237 + prune_libtool_files --all
238 +}
239 +
240 +pkg_postinst() {
241 + if use autoipd; then
242 + elog
243 + elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
244 + elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
245 + elog
246 + fi
247 +}
248
249 diff --git a/net-dns/avahi/metadata.xml b/net-dns/avahi/metadata.xml
250 index 403d3fbd5a5..0832dd78f28 100644
251 --- a/net-dns/avahi/metadata.xml
252 +++ b/net-dns/avahi/metadata.xml
253 @@ -9,8 +9,10 @@
254 <flag name="autoipd">Build and install the IPv4LL (RFC3927) network address configuration daemon</flag>
255 <flag name="bookmarks">Install the avahi-bookmarks application (requires <pkg>dev-python/twisted</pkg>)</flag>
256 <flag name="howl-compat">Enable compat libraries for howl</flag>
257 - <flag name="gtk2">Use gtk2 for the avahi utilities (overridden by USE=gtk) and build the avahi-ui library</flag>
258 - <flag name="gtk">Use gtk3 for the avahi utilities (overrides USE=gtk2) and build the avahi-ui-gtk3 library</flag>
259 + <flag name="gtk" restrict="&lt;net-dns/avahi-0.8-r2">Use gtk2 for the avahi utilities (overridden by USE=gtk3) and build the avahi-ui library</flag>
260 + <flag name="gtk3" restrict="&lt;net-dns/avahi-0.8-r2">Use gtk3 for the avahi utilities (overrides USE=gtk) and build the avahi-ui-gtk3 library</flag>
261 + <flag name="gtk2" restrict="&gt;=net-dns/avahi-0.8-r2">Use gtk2 for the avahi utilities (overridden by USE=gtk) and build the avahi-ui library</flag>
262 + <flag name="gtk" restrict="&gt;=net-dns/avahi-0.8-r2">Use gtk3 for the avahi utilities (overrides USE=gtk2) and build the avahi-ui-gtk3 library</flag>
263 <flag name="mdnsresponder-compat">Enable compat libraries for mDNSResponder</flag>
264 </use>
265 <upstream>