Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
Date: Sat, 24 Apr 2021 15:49:33
Message-Id: 1619279326.93cf079ade538cae967e7d18adcf63d237681e09.asturm@gentoo
1 commit: 93cf079ade538cae967e7d18adcf63d237681e09
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 27 21:25:07 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 24 15:48:46 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93cf079a
7
8 net-dns/avahi: hard-disable avahi-ui-sharp
9
10 Bug: https://bugs.gentoo.org/769062
11 Package-Manager: Portage-3.0.17, Repoman-3.0.2
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 net-dns/avahi/avahi-0.8-r3.ebuild | 211 +++++++++++++++++++++
15 .../files/avahi-0.8-disable-avahi-ui-sharp.patch | 57 ++++++
16 2 files changed, 268 insertions(+)
17
18 diff --git a/net-dns/avahi/avahi-0.8-r3.ebuild b/net-dns/avahi/avahi-0.8-r3.ebuild
19 new file mode 100644
20 index 00000000000..26826ded651
21 --- /dev/null
22 +++ b/net-dns/avahi/avahi-0.8-r3.ebuild
23 @@ -0,0 +1,211 @@
24 +# Copyright 1999-2021 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI="7"
28 +
29 +PYTHON_COMPAT=( python3_{7,8} )
30 +PYTHON_REQ_USE="gdbm"
31 +inherit autotools flag-o-matic multilib-minimal mono-env python-r1 systemd
32 +
33 +DESCRIPTION="System which facilitates service discovery on a local network"
34 +HOMEPAGE="http://avahi.org/"
35 +SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
36 +
37 +LICENSE="LGPL-2.1"
38 +SLOT="0"
39 +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
40 +IUSE="autoipd bookmarks +dbus doc gdbm gtk gtk2 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt5 selinux systemd test"
41 +
42 +REQUIRED_USE="
43 + python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
44 + mono? ( dbus )
45 + howl-compat? ( dbus )
46 + mdnsresponder-compat? ( dbus )
47 + systemd? ( dbus )
48 +"
49 +
50 +RESTRICT="!test? ( test )"
51 +
52 +DEPEND="
53 + dev-libs/libdaemon
54 + dev-libs/libevent:=[${MULTILIB_USEDEP}]
55 + dev-libs/expat
56 + dev-libs/glib:2[${MULTILIB_USEDEP}]
57 + gdbm? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
58 + qt5? ( dev-qt/qtcore:5 )
59 + gtk2? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
60 + gtk? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
61 + dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
62 + kernel_linux? ( sys-libs/libcap )
63 + introspection? ( dev-libs/gobject-introspection:= )
64 + mono? ( dev-lang/mono )
65 + python? (
66 + ${PYTHON_DEPS}
67 + dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
68 + introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
69 + )
70 + bookmarks? (
71 + ${PYTHON_DEPS}
72 + >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
73 + )
74 +"
75 +RDEPEND="
76 + acct-user/avahi
77 + acct-group/avahi
78 + acct-group/netdev
79 + autoipd? (
80 + acct-user/avahi-autoipd
81 + acct-group/avahi-autoipd
82 + )
83 + ${DEPEND}
84 + selinux? ( sec-policy/selinux-avahi )
85 +"
86 +BDEPEND="
87 + dev-util/glib-utils
88 + doc? ( app-doc/doxygen )
89 + app-doc/xmltoman
90 + dev-util/intltool
91 + virtual/pkgconfig
92 +"
93 +
94 +MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
95 +
96 +PATCHES=(
97 + "${FILESDIR}/${P}-disable-avahi-ui-sharp.patch" # bug 769062
98 +# These patches do not apply cleanly but may need to be re-instated.
99 +# I'll leave them commented out for now.
100 +# "${FILESDIR}/${PN}-0.7-qt5.patch"
101 +# "${FILESDIR}/${PN}-0.7-CVE-2017-6519.patch"
102 +# "${FILESDIR}/${PN}-0.7-remove-empty-avahi_discover.patch"
103 +# "${FILESDIR}/${PN}-0.7-python3.patch"
104 +# "${FILESDIR}/${PN}-0.7-python3-unittest.patch"
105 +# "${FILESDIR}/${PN}-0.7-python3-gdbm.patch"
106 +)
107 +
108 +pkg_setup() {
109 + use mono && mono-env_pkg_setup
110 + use python || use bookmarks && python_setup
111 +}
112 +
113 +src_prepare() {
114 + default
115 +
116 + if ! use ipv6; then
117 + sed -i \
118 + -e "s/use-ipv6=yes/use-ipv6=no/" \
119 + avahi-daemon/avahi-daemon.conf || die
120 + fi
121 +
122 + sed -i \
123 + -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
124 + doxygen_to_devhelp.xsl || die
125 +
126 + eautoreconf
127 +
128 + # bundled manpages
129 + multilib_copy_sources
130 +}
131 +
132 +multilib_src_configure() {
133 + local myconf=(
134 + --disable-monodoc
135 + --disable-python-dbus
136 + --disable-qt3
137 + --disable-qt4
138 + --disable-static
139 + --enable-manpages
140 + --enable-glib
141 + --enable-gobject
142 + --enable-xmltoman
143 + --localstatedir="${EPREFIX}/var"
144 + --with-distro=gentoo
145 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
146 + $(use_enable dbus)
147 + $(use_enable gdbm)
148 + $(use_enable gtk2 gtk)
149 + $(use_enable gtk gtk3)
150 + $(use_enable howl-compat compat-howl)
151 + $(use_enable mdnsresponder-compat compat-libdns_sd)
152 + $(use_enable nls)
153 + $(multilib_native_use_enable autoipd)
154 + $(multilib_native_use_enable doc doxygen-doc)
155 + $(multilib_native_use_enable introspection)
156 + $(multilib_native_use_enable mono)
157 + $(multilib_native_use_enable python)
158 + $(multilib_native_use_enable test tests)
159 + )
160 +
161 + if use python; then
162 + myconf+=(
163 + $(multilib_native_use_enable dbus python-dbus)
164 + $(multilib_native_use_enable introspection pygobject)
165 + )
166 + fi
167 +
168 + if use mono; then
169 + myconf+=( $(multilib_native_use_enable doc monodoc) )
170 + fi
171 +
172 + if ! multilib_is_native_abi; then
173 + myconf+=(
174 + # used by daemons only
175 + --disable-libdaemon
176 + --with-xml=none
177 + )
178 + fi
179 +
180 + myconf+=( $(multilib_native_use_enable qt5) )
181 +
182 + econf "${myconf[@]}"
183 +}
184 +
185 +multilib_src_compile() {
186 + emake
187 +
188 + multilib_is_native_abi && use doc && emake avahi.devhelp
189 +}
190 +
191 +multilib_src_install() {
192 + emake install DESTDIR="${D}"
193 + use bookmarks && use python && use dbus && use gtk2 || \
194 + rm -f "${ED}"/usr/bin/avahi-bookmarks
195 +
196 + # https://github.com/lathiat/avahi/issues/28
197 + use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
198 + use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
199 +
200 + if multilib_is_native_abi && use doc; then
201 + docinto html
202 + dodoc -r doxygen/html/.
203 + insinto /usr/share/devhelp/books/avahi
204 + doins avahi.devhelp
205 + fi
206 +
207 + # The build system creates an empty "/run" directory, so we clean it up here
208 + rmdir "${ED}"/run || die
209 +}
210 +
211 +multilib_src_install_all() {
212 + if use autoipd; then
213 + insinto /lib/rcscripts/net
214 + doins "${FILESDIR}"/autoipd.sh
215 +
216 + insinto /lib/netifrc/net
217 + newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
218 + fi
219 +
220 + dodoc docs/{AUTHORS,NEWS,README,TODO}
221 +
222 + find "${ED}" -name '*.la' -type f -delete || die
223 +}
224 +
225 +pkg_postinst() {
226 + if use autoipd; then
227 + elog
228 + elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
229 + elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
230 + elog
231 + fi
232 +
233 + systemd_reenable avahi-daemon.service
234 +}
235
236 diff --git a/net-dns/avahi/files/avahi-0.8-disable-avahi-ui-sharp.patch b/net-dns/avahi/files/avahi-0.8-disable-avahi-ui-sharp.patch
237 new file mode 100644
238 index 00000000000..31b361d4e17
239 --- /dev/null
240 +++ b/net-dns/avahi/files/avahi-0.8-disable-avahi-ui-sharp.patch
241 @@ -0,0 +1,57 @@
242 +From ebd2a01a7b5e88f3be35b2f803d5adbd36ae6593 Mon Sep 17 00:00:00 2001
243 +From: Andreas Sturmlechner <asturm@g.o>
244 +Date: Sat, 27 Mar 2021 22:49:08 +0100
245 +Subject: [PATCH] Disable avahi-ui-sharp
246 +
247 +Signed-off-by: Andreas Sturmlechner <asturm@g.o>
248 +---
249 + Makefile.am | 6 ++----
250 + configure.ac | 1 -
251 + 2 files changed, 2 insertions(+), 5 deletions(-)
252 +
253 +diff --git a/Makefile.am b/Makefile.am
254 +index 33c51f5..0e12120 100644
255 +--- a/Makefile.am
256 ++++ b/Makefile.am
257 +@@ -46,7 +46,6 @@ EXTRA_DIST = \
258 + avahi-qt4.pc.in \
259 + avahi-qt5.pc.in \
260 + avahi-sharp.pc.in \
261 +- avahi-ui-sharp.pc.in \
262 + avahi-compat-libdns_sd.pc.in \
263 + avahi-compat-howl.pc.in \
264 + avahi-ui.pc.in \
265 +@@ -77,7 +76,6 @@ SUBDIRS = \
266 + avahi-compat-howl \
267 + avahi-autoipd \
268 + avahi-ui \
269 +- avahi-ui-sharp \
270 + avahi-libevent \
271 + po
272 +
273 +@@ -188,8 +186,8 @@ CLEANFILES += avahi-compat-libdns_sd.pc
274 + endif
275 +
276 + if HAVE_MONO
277 +-pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc
278 +-CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc
279 ++pkgconfig_DATA += avahi-sharp.pc
280 ++CLEANFILES += avahi-sharp.pc
281 + endif
282 +
283 + endif
284 +diff --git a/configure.ac b/configure.ac
285 +index 58db8c7..844360f 100644
286 +--- a/configure.ac
287 ++++ b/configure.ac
288 +@@ -1166,7 +1166,6 @@ man/Makefile
289 + tests/Makefile
290 + service-type-database/Makefile
291 + avahi-sharp/Makefile
292 +-avahi-ui-sharp/Makefile
293 + avahi-compat-libdns_sd/Makefile
294 + avahi-compat-howl/Makefile
295 + avahi-compat-howl/samples/Makefile
296 +--
297 +2.31.1
298 +