Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde-sunset:master commit in: net-dns/avahi/files/, net-dns/avahi/
Date: Tue, 28 Apr 2015 14:11:34
Message-Id: 1430230230.80c97455ba0a46d74deee8c683fabfc461585427.axs@gentoo
1 commit: 80c97455ba0a46d74deee8c683fabfc461585427
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 28 14:08:53 2015 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 28 14:10:30 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/kde-sunset.git/commit/?id=80c97455
7
8 net-dns/avahi: brought current stable from gentoo repo, re-adding qt3 flag
9
10 Signed-off-by: Ian Stakenvicius <axs <AT> gentoo.org>
11
12 net-dns/avahi/avahi-0.6.31-r6.ebuild | 249 +++++++++++++++++++++
13 .../avahi-0.6.31-build-client-without-daemon.patch | 27 +++
14 .../files/avahi-0.6.31-fix-locale-build.patch | 20 ++
15 ...reuseport-may-not-exist-in-running-kernel.patch | 30 +++
16 4 files changed, 326 insertions(+)
17
18 diff --git a/net-dns/avahi/avahi-0.6.31-r6.ebuild b/net-dns/avahi/avahi-0.6.31-r6.ebuild
19 new file mode 100644
20 index 0000000..0d03a58
21 --- /dev/null
22 +++ b/net-dns/avahi/avahi-0.6.31-r6.ebuild
23 @@ -0,0 +1,249 @@
24 +# Copyright 1999-2015 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Header: /var/cvsroot/gentoo-x86/net-dns/avahi/avahi-0.6.31-r6.ebuild,v 1.11 2015/04/08 18:16:54 mgorny Exp $
27 +
28 +EAPI="5"
29 +
30 +PYTHON_COMPAT=( python2_7 )
31 +PYTHON_REQ_USE="gdbm"
32 +
33 +WANT_AUTOMAKE=1.11
34 +
35 +inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \
36 + python-r1 systemd user
37 +
38 +DESCRIPTION="System which facilitates service discovery on a local network"
39 +HOMEPAGE="http://avahi.org/"
40 +SRC_URI="http://avahi.org/download/${P}.tar.gz"
41 +
42 +LICENSE="LGPL-2.1"
43 +SLOT="0"
44 +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
45 +IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt3 qt4 selinux test utils"
46 +
47 +REQUIRED_USE="
48 + utils? ( || ( gtk gtk3 ) )
49 + python? ( dbus gdbm )
50 + mono? ( dbus )
51 + howl-compat? ( dbus )
52 + mdnsresponder-compat? ( dbus )
53 +"
54 +
55 +COMMON_DEPEND="
56 + dev-libs/libdaemon
57 + dev-libs/expat
58 + >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
59 + gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
60 + qt3? ( dev-qt/qt-meta:3 )
61 + qt4? ( dev-qt/qtcore:4 )
62 + gtk? ( x11-libs/gtk+:2 )
63 + gtk3? ( x11-libs/gtk+:3 )
64 + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
65 + kernel_linux? ( sys-libs/libcap )
66 + introspection? ( dev-libs/gobject-introspection )
67 + mono? (
68 + dev-lang/mono
69 + gtk? ( dev-dotnet/gtk-sharp )
70 + )
71 + python? (
72 + ${PYTHON_DEPS}
73 + gtk? ( dev-python/pygtk )
74 + dbus? ( dev-python/dbus-python )
75 + )
76 + bookmarks? (
77 + dev-python/twisted-core
78 + dev-python/twisted-web
79 + )
80 +"
81 +
82 +DEPEND="
83 + ${COMMON_DEPEND}
84 + dev-util/intltool
85 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
86 + doc? (
87 + app-doc/doxygen
88 + )
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=(
99 + # necessary until the UI libraries are ported
100 + /usr/include/avahi-qt4/qt-watch.h
101 + /usr/include/avahi-ui/avahi-ui.h
102 +)
103 +
104 +pkg_preinst() {
105 + enewgroup netdev
106 + enewgroup avahi
107 + enewuser avahi -1 -1 -1 avahi
108 +
109 + if use autoipd; then
110 + enewgroup avahi-autoipd
111 + enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
112 + fi
113 +}
114 +
115 +pkg_setup() {
116 + use mono && mono-env_pkg_setup
117 +}
118 +
119 +src_prepare() {
120 + if use ipv6; then
121 + sed -i \
122 + -e s/use-ipv6=no/use-ipv6=yes/ \
123 + avahi-daemon/avahi-daemon.conf || die
124 + fi
125 +
126 + sed -i\
127 + -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
128 + doxygen_to_devhelp.xsl || die
129 +
130 + # Make gtk utils optional
131 + epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
132 +
133 + # Fix init scripts for >=openrc-0.9.0, bug #383641
134 + epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
135 +
136 + # install-exec-local -> install-exec-hook
137 + epatch "${FILESDIR}"/${P}-install-exec-hook.patch
138 +
139 + # Backport host-name-from-machine-id patch, bug #466134
140 + epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
141 +
142 + # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
143 + epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
144 +
145 + epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch
146 +
147 + # allow building client without the daemon
148 + epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch
149 +
150 + # Fix build under various locales, bug #501664
151 + epatch "${FILESDIR}"/${P}-fix-locale-build.patch
152 +
153 + # Drop DEPRECATED flags, bug #384743
154 + sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
155 +
156 + # Fix references to Lennart's home directory, bug #466210
157 + sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
158 +
159 + # Prevent .pyc files in DESTDIR
160 + >py-compile
161 +
162 + eautoreconf
163 +
164 + # bundled manpages
165 + multilib_copy_sources
166 +}
167 +
168 +src_configure() {
169 + # those steps should be done once-per-ebuild rather than per-ABI
170 + use sh && replace-flags -O? -O0
171 + use python && python_export_best
172 +
173 + # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
174 + unset DISPLAY
175 +
176 + multilib-minimal_src_configure
177 +}
178 +
179 +multilib_src_configure() {
180 + local myconf=( --disable-static )
181 +
182 + if use python; then
183 + myconf+=(
184 + $(multilib_native_use_enable dbus python-dbus)
185 + $(multilib_native_use_enable gtk pygtk)
186 + )
187 + fi
188 +
189 + if use mono; then
190 + myconf+=( $(multilib_native_use_enable doc monodoc) )
191 + fi
192 +
193 + if ! multilib_is_native_abi; then
194 + myconf+=(
195 + # used by daemons only
196 + --disable-libdaemon
197 + --with-xml=none
198 + )
199 + fi
200 +
201 + econf \
202 + --localstatedir="${EPREFIX}/var" \
203 + --with-distro=gentoo \
204 + --disable-python-dbus \
205 + --disable-pygtk \
206 + --disable-xmltoman \
207 + --disable-monodoc \
208 + --enable-glib \
209 + --enable-gobject \
210 + $(multilib_native_use_enable test tests) \
211 + $(multilib_native_use_enable autoipd) \
212 + $(use_enable mdnsresponder-compat compat-libdns_sd) \
213 + $(use_enable howl-compat compat-howl) \
214 + $(multilib_native_use_enable doc doxygen-doc) \
215 + $(multilib_native_use_enable mono) \
216 + $(use_enable dbus) \
217 + $(multilib_native_use_enable python) \
218 + $(multilib_native_use_enable gtk) \
219 + $(multilib_native_use_enable gtk3) \
220 + $(use_enable nls) \
221 + $(multilib_native_use_enable introspection) \
222 + $(multilib_native_use_enable utils gtk-utils) \
223 + $(multilib_native_use_enable qt3) \
224 + $(multilib_native_use_enable qt4) \
225 + $(use_enable gdbm) \
226 + $(systemd_with_unitdir) \
227 + "${myconf[@]}"
228 +}
229 +
230 +multilib_src_compile() {
231 + emake
232 +
233 + multilib_is_native_abi && use doc && emake avahi.devhelp
234 +}
235 +
236 +multilib_src_install() {
237 + emake install DESTDIR="${D}"
238 + use bookmarks && use python && use dbus && use gtk || \
239 + rm -f "${ED}"/usr/bin/avahi-bookmarks
240 +
241 + use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
242 + use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
243 +
244 + if multilib_is_native_abi && use doc; then
245 + dohtml -r doxygen/html/. || die
246 + insinto /usr/share/devhelp/books/avahi
247 + doins avahi.devhelp || die
248 + fi
249 +}
250 +
251 +multilib_src_install_all() {
252 + if use autoipd; then
253 + insinto /$(get_libdir)/rcscripts/net
254 + doins "${FILESDIR}"/autoipd.sh
255 +
256 + insinto /$(get_libdir)/netifrc/net
257 + newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
258 + fi
259 +
260 + dodoc docs/{AUTHORS,NEWS,README,TODO}
261 +
262 + prune_libtool_files --all
263 +}
264 +
265 +pkg_postinst() {
266 + if use autoipd; then
267 + elog
268 + elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
269 + elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
270 + elog
271 + fi
272 +}
273
274 diff --git a/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch
275 new file mode 100644
276 index 0000000..df0c420
277 --- /dev/null
278 +++ b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch
279 @@ -0,0 +1,27 @@
280 +From ce3b83de6aa689c0cefe0b1e85c03a627b537099 Mon Sep 17 00:00:00 2001
281 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
282 +Date: Mon, 12 May 2014 19:46:22 +0200
283 +Subject: [PATCH] Allow building client without the daemon.
284 +
285 +There's no good reason to disallow that, and that's what we specifically
286 +want to do for multilib.
287 +---
288 + configure.ac | 2 +-
289 + 1 file changed, 1 insertion(+), 1 deletion(-)
290 +
291 +diff --git a/configure.ac b/configure.ac
292 +index 0e190ba..c56cf01 100644
293 +--- a/configure.ac
294 ++++ b/configure.ac
295 +@@ -1185,7 +1185,7 @@ fi
296 +
297 + BUILD_CLIENT="no (You need avahi-daemon and D-Bus!)"
298 +
299 +-if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
300 ++if "x$HAVE_DBUS" = "xyes" ; then
301 + BUILD_CLIENT=yes
302 + fi
303 +
304 +--
305 +1.9.3
306 +
307
308 diff --git a/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch
309 new file mode 100644
310 index 0000000..b0e47e9
311 --- /dev/null
312 +++ b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch
313 @@ -0,0 +1,20 @@
314 +avahi-gobject fails to build under et_EE and possibly other locales.
315 +
316 +The regex for a sed in avahi-gobject/Makefile fails under various locales.
317 +Forcing LC_ALL=C fixes the issue.
318 +
319 +X-Gentoo-Bug: 501664
320 +X-Gentoo-Bug-URL: https://bugs.gentoo.org/501664
321 +
322 +diff -Naur avahi-0.6.31.orig/avahi-gobject/Makefile.am avahi-0.6.31/avahi-gobject/Makefile.am
323 +--- avahi-0.6.31.orig/avahi-gobject/Makefile.am 2010-08-25 20:51:39.007153001 -0400
324 ++++ avahi-0.6.31/avahi-gobject/Makefile.am 2014-09-07 19:00:05.485657990 -0400
325 +@@ -76,7 +76,7 @@
326 +
327 + signals-marshal.list: $(CORE_SOURCES) Makefile.am
328 + $(AM_V_GEN)( cd $(srcdir) && \
329 +- sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
330 ++ LC_ALL=C sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
331 + $(CORE_SOURCES) ) \
332 + | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp && \
333 + if cmp -s $@.tmp $@; then \
334
335 diff --git a/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
336 new file mode 100644
337 index 0000000..9c23ca5
338 --- /dev/null
339 +++ b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
340 @@ -0,0 +1,30 @@
341 +https://bugs.gentoo.org/484212
342 +
343 +Description: SO_REUSEPORT may not exist in running kernel
344 + When userspace defines SO_REUSEPORT we will attempt to enable socket
345 + port number reuse. However if the running kernel does not support
346 + this call it will fail preventing daemon startup. If this call is
347 + present but fails ENOPROTOOPT then we know that actually the kernel
348 + does not support it and we should continue as if we did not have the
349 + call at all. (LP: #1228204)
350 + .
351 + This patch could be removed from the debian package after jessie release.
352 +Author: Andy Whitcroft <apw@×××××××××.com>
353 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1228204
354 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732009
355 +Last-Update: 2013-09-20
356 +
357 +Index: avahi-0.6.31/avahi-core/socket.c
358 +===================================================================
359 +--- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100
360 ++++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100
361 +@@ -177,7 +177,8 @@
362 + yes = 1;
363 + if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
364 + avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
365 +- return -1;
366 ++ if (errno != ENOPROTOOPT)
367 ++ return -1;
368 + }
369 + #endif
370 +