Gentoo Archives: gentoo-commits

From: Keiji Costantini <strites@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde-sunset:master commit in: net-dns/avahi/, net-dns/avahi/files/
Date: Fri, 27 Dec 2013 10:36:10
Message-Id: 1388140433.944258b475beae2fb90a28bc6e7ab058f0a58d6d.keiji@gentoo
1 commit: 944258b475beae2fb90a28bc6e7ab058f0a58d6d
2 Author: Keiji Costantini <strites <AT> gmail <DOT> com>
3 AuthorDate: Fri Dec 27 09:54:39 2013 +0000
4 Commit: Keiji Costantini <strites <AT> gmail <DOT> com>
5 CommitDate: Fri Dec 27 10:33:53 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde-sunset.git;a=commit;h=944258b4
7
8 Avahi bump
9
10 ---
11 net-dns/avahi/avahi-0.6.29.ebuild | 199 ---------------------
12 ...{avahi-0.6.30.ebuild => avahi-0.6.31-r2.ebuild} | 152 ++++++++--------
13 .../avahi-0.6.31-fix-install-avahi-discover.patch | 31 ++++
14 .../avahi-0.6.31-host-name-from-machine-id.patch | 85 +++++++++
15 .../files/avahi-0.6.31-install-exec-hook.patch | 11 ++
16 ...ahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch | 22 +++
17 6 files changed, 230 insertions(+), 270 deletions(-)
18
19 diff --git a/net-dns/avahi/avahi-0.6.29.ebuild b/net-dns/avahi/avahi-0.6.29.ebuild
20 deleted file mode 100644
21 index e9c8899..0000000
22 --- a/net-dns/avahi/avahi-0.6.29.ebuild
23 +++ /dev/null
24 @@ -1,199 +0,0 @@
25 -# Copyright 1999-2013 Gentoo Foundation
26 -# Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-dns/avahi/avahi-0.6.29.ebuild,v 1.1 2011/03/17 07:11:30 swegener Exp $
28 -
29 -EAPI="3"
30 -
31 -PYTHON_DEPEND="python? 2"
32 -PYTHON_USE_WITH="gdbm"
33 -PYTHON_USE_WITH_OPT="python"
34 -
35 -inherit eutils mono python multilib flag-o-matic
36 -
37 -DESCRIPTION="System which facilitates service discovery on a local network"
38 -HOMEPAGE="http://avahi.org/"
39 -SRC_URI="http://avahi.org/download/${P}.tar.gz"
40 -
41 -LICENSE="LGPL-2.1"
42 -SLOT="0"
43 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
44 -IUSE="autoipd bookmarks dbus doc gdbm gtk howl-compat ipv6 kernel_linux mdnsresponder-compat mono python qt3 qt4 test "
45 -
46 -DBUS_DEPEND=">=sys-apps/dbus-0.30"
47 -RDEPEND=">=dev-libs/libdaemon-0.14
48 - dev-libs/expat
49 - >=dev-libs/glib-2
50 - gdbm? ( sys-libs/gdbm )
51 - qt3? ( dev-qt/qt-meta:3 )
52 - qt4? ( dev-qt/qtcore:4 )
53 - gtk? (
54 - >=x11-libs/gtk+-2.14.0:2
55 - )
56 - dbus? (
57 - ${DBUS_DEPEND}
58 - python? ( dev-python/dbus-python )
59 - )
60 - mono? (
61 - >=dev-lang/mono-1.1.10
62 - gtk? ( >=dev-dotnet/gtk-sharp-2 )
63 - )
64 - howl-compat? (
65 - !net-misc/howl
66 - ${DBUS_DEPEND}
67 - )
68 - mdnsresponder-compat? (
69 - !net-misc/mDNSResponder
70 - ${DBUS_DEPEND}
71 - )
72 - python? (
73 - gtk? ( >=dev-python/pygtk-2 )
74 - )
75 - bookmarks? (
76 - dev-python/twisted
77 - dev-python/twisted-web
78 - )
79 - kernel_linux? ( sys-libs/libcap )"
80 -DEPEND="${RDEPEND}
81 - >=dev-util/intltool-0.40.5
82 - >=dev-util/pkgconfig-0.9.0
83 - doc? (
84 - app-doc/doxygen
85 - mono? ( >=virtual/monodoc-1.1.8 )
86 - )"
87 -
88 -pkg_setup() {
89 - if use python; then
90 - python_set_active_version 2
91 - python_pkg_setup
92 - fi
93 -
94 - if use python && ! use dbus && ! use gtk; then
95 - ewarn "For proper python support you should also enable the dbus and gtk USE flags!"
96 - fi
97 -}
98 -
99 -pkg_preinst() {
100 - enewgroup netdev
101 - enewgroup avahi
102 - enewuser avahi -1 -1 -1 avahi
103 -
104 - if use autoipd; then
105 - enewgroup avahi-autoipd
106 - enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
107 - fi
108 -}
109 -
110 -src_prepare() {
111 - if use ipv6; then
112 - sed -i \
113 - -e s/use-ipv6=no/use-ipv6=yes/ \
114 - avahi-daemon/avahi-daemon.conf || die
115 - fi
116 -
117 - sed -i\
118 - -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
119 - doxygen_to_devhelp.xsl || die
120 -}
121 -
122 -src_configure() {
123 - use sh && replace-flags -O? -O0
124 -
125 - local myconf=""
126 -
127 - if use python; then
128 - myconf+="
129 - $(use_enable dbus python-dbus)
130 - $(use_enable gtk pygtk)
131 - "
132 - fi
133 -
134 - if use mono; then
135 - myconf+=" $(use_enable doc monodoc)"
136 - fi
137 -
138 - # these require dbus enabled
139 - if use mdnsresponder-compat || use howl-compat || use mono; then
140 - myconf+=" --enable-dbus"
141 - fi
142 -
143 - # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
144 - unset DISPLAY
145 -
146 - # Upstream ships a gir file (AvahiCore.gir) which does not work with
147 - # >=gobject-introspection-0.9, so we disable introspection for now.
148 - # http://avahi.org/ticket/318
149 - econf \
150 - --localstatedir=/var \
151 - --with-distro=gentoo \
152 - --disable-python-dbus \
153 - --disable-pygtk \
154 - --disable-xmltoman \
155 - --disable-monodoc \
156 - --disable-introspection \
157 - --enable-glib \
158 - $(use_enable test tests) \
159 - $(use_enable autoipd) \
160 - $(use_enable mdnsresponder-compat compat-libdns_sd) \
161 - $(use_enable howl-compat compat-howl) \
162 - $(use_enable doc doxygen-doc) \
163 - $(use_enable mono) \
164 - $(use_enable dbus) \
165 - $(use_enable python) \
166 - --disable-gtk3 \
167 - $(use_enable gtk) \
168 - $(use_enable qt3) \
169 - $(use_enable qt4) \
170 - $(use_enable gdbm) \
171 - ${myconf}
172 -}
173 -
174 -src_compile() {
175 - emake || die "emake failed"
176 -
177 - use doc && { emake avahi.devhelp || die ; }
178 -}
179 -
180 -src_install() {
181 - emake install py_compile=true DESTDIR="${D}" || die "make install failed"
182 - use bookmarks && use python && use dbus && use gtk || \
183 - rm -f "${D}"/usr/bin/avahi-bookmarks
184 -
185 - use howl-compat && ln -s avahi-compat-howl.pc "${D}"/usr/$(get_libdir)/pkgconfig/howl.pc
186 - use mdnsresponder-compat && ln -s avahi-compat-libdns_sd/dns_sd.h "${D}"/usr/include/dns_sd.h
187 -
188 - if use autoipd; then
189 - insinto /$(get_libdir)/rcscripts/net
190 - doins "${FILESDIR}"/autoipd.sh || die
191 -
192 - insinto /$(get_libdir)/rc/net
193 - newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh || die
194 - fi
195 -
196 - dodoc docs/{AUTHORS,NEWS,README,TODO} || die
197 -
198 - if use doc; then
199 - dohtml -r doxygen/html/. || die
200 - insinto /usr/share/devhelp/books/avahi
201 - doins avahi.devhelp || die
202 - fi
203 -}
204 -
205 -pkg_postrm() {
206 - use python && python_mod_cleanup avahi $(use dbus && use gtk && echo avahi_discover)
207 -}
208 -
209 -pkg_postinst() {
210 - use python && python_mod_optimize avahi $(use dbus && use gtk && echo avahi_discover)
211 -
212 - if use autoipd; then
213 - echo
214 - elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
215 - elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
216 - fi
217 -
218 - if use dbus; then
219 - echo
220 - elog "If this is your first install of avahi please reload your dbus config"
221 - elog "with /etc/init.d/dbus reload before starting avahi-daemon!"
222 - fi
223 -}
224
225 diff --git a/net-dns/avahi/avahi-0.6.30.ebuild b/net-dns/avahi/avahi-0.6.31-r2.ebuild
226 similarity index 54%
227 rename from net-dns/avahi/avahi-0.6.30.ebuild
228 rename to net-dns/avahi/avahi-0.6.31-r2.ebuild
229 index 1e40ee5..5bdaf85 100644
230 --- a/net-dns/avahi/avahi-0.6.30.ebuild
231 +++ b/net-dns/avahi/avahi-0.6.31-r2.ebuild
232 @@ -1,14 +1,15 @@
233 # Copyright 1999-2013 Gentoo Foundation
234 # Distributed under the terms of the GNU General Public License v2
235 -# $Header: /var/cvsroot/gentoo-x86/net-dns/avahi/avahi-0.6.30.ebuild,v 1.2 2011/08/06 09:41:21 zmedico Exp $
236 +# $Header: /var/cvsroot/gentoo-x86/net-dns/avahi/avahi-0.6.31-r2.ebuild,v 1.14 2013/10/12 12:14:46 pacho Exp $
237
238 -EAPI="3"
239 +EAPI="5"
240
241 -PYTHON_DEPEND="python? 2"
242 -PYTHON_USE_WITH="gdbm"
243 -PYTHON_USE_WITH_OPT="python"
244 +PYTHON_COMPAT=( python{2_6,2_7} )
245 +PYTHON_REQ_USE="gdbm"
246
247 -inherit eutils mono python multilib flag-o-matic
248 +WANT_AUTOMAKE=1.11
249 +
250 +inherit autotools eutils mono python-r1 multilib flag-o-matic user systemd
251
252 DESCRIPTION="System which facilitates service discovery on a local network"
253 HOMEPAGE="http://avahi.org/"
254 @@ -16,61 +17,57 @@ SRC_URI="http://avahi.org/download/${P}.tar.gz"
255
256 LICENSE="LGPL-2.1"
257 SLOT="0"
258 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-linux"
259 -IUSE="autoipd bookmarks dbus doc gdbm gtk howl-compat ipv6 kernel_linux mdnsresponder-compat mono python qt3 qt4 test "
260 -
261 -DBUS_DEPEND=">=sys-apps/dbus-0.30"
262 -RDEPEND=">=dev-libs/libdaemon-0.14
263 +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
264 +IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono python qt3 qt4 test utils"
265 +
266 +REQUIRED_USE="
267 + utils? ( || ( gtk gtk3 ) )
268 + python? ( dbus gdbm )
269 + mono? ( dbus )
270 + howl-compat? ( dbus )
271 + mdnsresponder-compat? ( dbus )
272 +"
273 +
274 +COMMON_DEPEND="
275 + dev-libs/libdaemon
276 dev-libs/expat
277 - >=dev-libs/glib-2
278 + dev-libs/glib:2
279 gdbm? ( sys-libs/gdbm )
280 qt3? ( dev-qt/qt-meta:3 )
281 qt4? ( dev-qt/qtcore:4 )
282 - gtk? (
283 - >=x11-libs/gtk+-2.14.0:2
284 - )
285 - dbus? (
286 - ${DBUS_DEPEND}
287 - python? ( dev-python/dbus-python )
288 - )
289 + gtk? ( x11-libs/gtk+:2 )
290 + gtk3? ( x11-libs/gtk+:3 )
291 + dbus? ( sys-apps/dbus )
292 + kernel_linux? ( sys-libs/libcap )
293 + introspection? ( dev-libs/gobject-introspection )
294 mono? (
295 - >=dev-lang/mono-1.1.10
296 - gtk? ( >=dev-dotnet/gtk-sharp-2 )
297 - )
298 - howl-compat? (
299 - !net-misc/howl
300 - ${DBUS_DEPEND}
301 - )
302 - mdnsresponder-compat? (
303 - !net-misc/mDNSResponder
304 - ${DBUS_DEPEND}
305 + dev-lang/mono
306 + gtk? ( dev-dotnet/gtk-sharp )
307 )
308 python? (
309 - gtk? ( >=dev-python/pygtk-2 )
310 + gtk? ( dev-python/pygtk )
311 + dbus? ( dev-python/dbus-python )
312 )
313 bookmarks? (
314 - dev-python/twisted
315 + dev-python/twisted-core
316 dev-python/twisted-web
317 )
318 - kernel_linux? ( sys-libs/libcap )"
319 -DEPEND="${RDEPEND}
320 - >=dev-util/intltool-0.40.5
321 - >=dev-util/pkgconfig-0.9.0
322 +"
323 +
324 +DEPEND="
325 + ${COMMON_DEPEND}
326 + dev-util/intltool
327 + virtual/pkgconfig
328 doc? (
329 app-doc/doxygen
330 - mono? ( >=virtual/monodoc-1.1.8 )
331 - )"
332 + )
333 +"
334
335 -pkg_setup() {
336 - if use python; then
337 - python_set_active_version 2
338 - python_pkg_setup
339 - fi
340 -
341 - if use python && ! use dbus && ! use gtk; then
342 - ewarn "For proper python support you should also enable the dbus and gtk USE flags!"
343 - fi
344 -}
345 +RDEPEND="
346 + ${COMMON_DEPEND}
347 + howl-compat? ( !net-misc/howl )
348 + mdnsresponder-compat? ( !net-misc/mDNSResponder )
349 +"
350
351 pkg_preinst() {
352 enewgroup netdev
353 @@ -93,14 +90,41 @@ src_prepare() {
354 sed -i\
355 -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
356 doxygen_to_devhelp.xsl || die
357 +
358 + # Make gtk utils optional
359 + epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
360 +
361 + # Fix init scripts for >=openrc-0.9.0, bug #383641
362 + epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
363 +
364 + # install-exec-local -> install-exec-hook
365 + epatch "${FILESDIR}"/${P}-install-exec-hook.patch
366 +
367 + # Backport host-name-from-machine-id patch, bug #466134
368 + epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
369 +
370 + # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
371 + epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
372 +
373 + # Drop DEPRECATED flags, bug #384743
374 + sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
375 +
376 + # Fix references to Lennart's home directory, bug #466210
377 + sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
378 +
379 + # Prevent .pyc files in DESTDIR
380 + >py-compile
381 +
382 + eautoreconf
383 }
384
385 src_configure() {
386 use sh && replace-flags -O? -O0
387
388 - local myconf=""
389 + local myconf="--disable-static"
390
391 if use python; then
392 + python_export_best
393 myconf+="
394 $(use_enable dbus python-dbus)
395 $(use_enable gtk pygtk)
396 @@ -111,17 +135,9 @@ src_configure() {
397 myconf+=" $(use_enable doc monodoc)"
398 fi
399
400 - # these require dbus enabled
401 - if use mdnsresponder-compat || use howl-compat || use mono; then
402 - myconf+=" --enable-dbus"
403 - fi
404 -
405 # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
406 unset DISPLAY
407
408 - # Upstream ships a gir file (AvahiCore.gir) which does not work with
409 - # >=gobject-introspection-0.9, so we disable introspection for now.
410 - # http://avahi.org/ticket/318
411 econf \
412 --localstatedir="${EPREFIX}/var" \
413 --with-distro=gentoo \
414 @@ -129,8 +145,8 @@ src_configure() {
415 --disable-pygtk \
416 --disable-xmltoman \
417 --disable-monodoc \
418 - --disable-introspection \
419 --enable-glib \
420 + --enable-gobject \
421 $(use_enable test tests) \
422 $(use_enable autoipd) \
423 $(use_enable mdnsresponder-compat compat-libdns_sd) \
424 @@ -139,11 +155,14 @@ src_configure() {
425 $(use_enable mono) \
426 $(use_enable dbus) \
427 $(use_enable python) \
428 - --disable-gtk3 \
429 $(use_enable gtk) \
430 + $(use_enable gtk3) \
431 + $(use_enable introspection) \
432 + $(use_enable utils gtk-utils) \
433 $(use_enable qt3) \
434 $(use_enable qt4) \
435 $(use_enable gdbm) \
436 + $(systemd_with_unitdir) \
437 ${myconf}
438 }
439
440 @@ -154,7 +173,7 @@ src_compile() {
441 }
442
443 src_install() {
444 - emake install py_compile=true DESTDIR="${D}" || die "make install failed"
445 + emake install DESTDIR="${D}" || die "make install failed"
446 use bookmarks && use python && use dbus && use gtk || \
447 rm -f "${ED}"/usr/bin/avahi-bookmarks
448
449 @@ -176,24 +195,15 @@ src_install() {
450 insinto /usr/share/devhelp/books/avahi
451 doins avahi.devhelp || die
452 fi
453 -}
454
455 -pkg_postrm() {
456 - use python && python_mod_cleanup avahi $(use dbus && use gtk && echo avahi_discover)
457 + find "${ED}" -name '*.la' -exec rm -f {} +
458 }
459
460 pkg_postinst() {
461 - use python && python_mod_optimize avahi $(use dbus && use gtk && echo avahi_discover)
462 -
463 if use autoipd; then
464 - echo
465 + elog
466 elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
467 elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
468 - fi
469 -
470 - if use dbus; then
471 - echo
472 - elog "If this is your first install of avahi please reload your dbus config"
473 - elog "with /etc/init.d/dbus reload before starting avahi-daemon!"
474 + elog
475 fi
476 }
477
478 diff --git a/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch
479 new file mode 100644
480 index 0000000..62ba967
481 --- /dev/null
482 +++ b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch
483 @@ -0,0 +1,31 @@
484 +--- avahi-0.6.30.old/avahi-python/avahi-discover/Makefile.am 2010-06-28 23:30:34.000000000 -0400
485 ++++ avahi-0.6.30/avahi-python/avahi-discover/Makefile.am 2012-04-21 18:02:01.642934527 -0400
486 +@@ -22,6 +22,7 @@
487 + avahi-discover.py \
488 + avahi-discover.desktop.in.in
489 +
490 ++if ENABLE_GTK_UTILS
491 + if HAVE_PYTHON
492 + if HAVE_PYTHON_DBUS
493 + if HAVE_PYGTK
494 +@@ -67,3 +68,4 @@
495 + endif
496 + endif
497 + endif
498 ++endif
499 +--- avahi-0.6.30.old/man/Makefile.am 2012-04-21 18:10:45.690900742 -0400
500 ++++ avahi-0.6.30/man/Makefile.am 2012-04-21 18:09:15.146906578 -0400
501 +@@ -65,11 +65,13 @@
502 + man_MANS += \
503 + avahi-bookmarks.1
504 + if HAVE_GTK
505 ++if ENABLE_GTK_UTILS
506 + man_MANS += \
507 + avahi-discover.1
508 + endif
509 + endif
510 + endif
511 ++endif
512 +
513 + if ENABLE_AUTOIPD
514 + if HAVE_LIBDAEMON
515
516 diff --git a/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch
517 new file mode 100644
518 index 0000000..17ecba5
519 --- /dev/null
520 +++ b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch
521 @@ -0,0 +1,85 @@
522 +From: David Zeuthen <zeuthen@××××××××.org>
523 +Date: Tue, 5 Mar 2013 19:52:38 +0000 (-0800)
524 +Subject: avahi-daemon: add option "host-name-from-machine-id="
525 +X-Git-Url: http://git.0pointer.de/?p=avahi.git;a=commitdiff_plain;h=147cdce70b22ae7cee9fb4fe123db40952f31c9e
526 +
527 +avahi-daemon: add option "host-name-from-machine-id="
528 +
529 +Signed-off-by: David Zeuthen <zeuthen@××××××××.org>
530 +---
531 +
532 +diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c
533 +index d46f40a..8c28fd6 100644
534 +--- a/avahi-daemon/main.c
535 ++++ b/avahi-daemon/main.c
536 +@@ -65,6 +65,7 @@
537 + #include <avahi-core/publish.h>
538 + #include <avahi-core/dns-srv-rr.h>
539 + #include <avahi-core/log.h>
540 ++#include <avahi-core/util.h>
541 +
542 + #ifdef ENABLE_CHROOT
543 + #include "chroot.h"
544 +@@ -576,6 +577,29 @@ static int parse_usec(const char *s, AvahiUsec *u) {
545 + return 0;
546 + }
547 +
548 ++static char *get_machine_id(void) {
549 ++ int fd;
550 ++ char buf[32];
551 ++
552 ++ fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
553 ++ if (fd == -1 && errno == ENOENT)
554 ++ fd = open("/var/lib/dbus/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
555 ++ if (fd == -1)
556 ++ return NULL;
557 ++
558 ++ /* File is on a filesystem so we never get EINTR or partial reads */
559 ++ if (read(fd, buf, sizeof buf) != sizeof buf) {
560 ++ close(fd);
561 ++ return NULL;
562 ++ }
563 ++ close(fd);
564 ++
565 ++ /* Contents can be lower, upper and even mixed case so normalize */
566 ++ avahi_strdown(buf);
567 ++
568 ++ return avahi_strndup(buf, sizeof buf);
569 ++}
570 ++
571 + static int load_config_file(DaemonConfig *c) {
572 + int r = -1;
573 + AvahiIniFile *f;
574 +@@ -631,6 +655,15 @@ static int load_config_file(DaemonConfig *c) {
575 + c->server_config.use_iff_running = is_yes(p->value);
576 + else if (strcasecmp(p->key, "disallow-other-stacks") == 0)
577 + c->server_config.disallow_other_stacks = is_yes(p->value);
578 ++ else if (strcasecmp(p->key, "host-name-from-machine-id") == 0) {
579 ++ if (*(p->value) == 'y' || *(p->value) == 'Y') {
580 ++ char *machine_id = get_machine_id();
581 ++ if (machine_id != NULL) {
582 ++ avahi_free(c->server_config.host_name);
583 ++ c->server_config.host_name = machine_id;
584 ++ }
585 ++ }
586 ++ }
587 + #ifdef HAVE_DBUS
588 + else if (strcasecmp(p->key, "enable-dbus") == 0) {
589 +
590 +diff --git a/man/avahi-daemon.conf.5.xml.in b/man/avahi-daemon.conf.5.xml.in
591 +index bea7ed5..2d15017 100644
592 +--- a/man/avahi-daemon.conf.5.xml.in
593 ++++ b/man/avahi-daemon.conf.5.xml.in
594 +@@ -40,6 +40,12 @@
595 + </option>
596 +
597 + <option>
598 ++ <p><opt>host-name-from-machine-id=</opt> Takes a boolean
599 ++ value ("yes" or "no"). If set to "yes" avahi-daemon
600 ++ will use the machine-id as name on the LAN.</p>
601 ++ </option>
602 ++
603 ++ <option>
604 + <p><opt>domain-name=</opt> Set the default domain name avahi-daemon
605 + tries to register its host name and services on the LAN in. If
606 + omitted defaults to ".local".</p>
607
608 diff --git a/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch
609 new file mode 100644
610 index 0000000..d9a7bc3
611 --- /dev/null
612 +++ b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch
613 @@ -0,0 +1,11 @@
614 +--- avahi-0.6.31/avahi-utils/Makefile.am
615 ++++ avahi-0.6.31/avahi-utils/Makefile.am
616 +@@ -53,7 +53,7 @@
617 + avahi_set_host_name_CFLAGS = $(AM_CFLAGS)
618 + avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
619 +
620 +-install-exec-local:
621 ++install-exec-hook:
622 + cd $(DESTDIR)/$(bindir) && \
623 + rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
624 + $(LN_S) avahi-resolve avahi-resolve-host-name && \
625
626 diff --git a/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
627 new file mode 100644
628 index 0000000..394f6d3
629 --- /dev/null
630 +++ b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
631 @@ -0,0 +1,22 @@
632 +--- avahi-0.6.30/initscript/gentoo/avahi-daemon.in
633 ++++ avahi-0.6.30/initscript/gentoo/avahi-daemon.in
634 +@@ -2,7 +2,7 @@
635 + # Copyright 1999-2007 Gentoo Foundation
636 + # Distributed under the terms of the GNU General Public License v2
637 +
638 +-opts="reload"
639 ++extra_started_commands="reload"
640 +
641 + depend() {
642 + before netmount nfsmount
643 +--- avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
644 ++++ avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
645 +@@ -2,7 +2,7 @@
646 + # Copyright 1999-2007 Gentoo Foundation
647 + # Distributed under the terms of the GNU General Public License v2
648 +
649 +-opts="reload"
650 ++extra_started_commands="reload"
651 +
652 + depend() {
653 + need avahi-daemon