summaryrefslogtreecommitdiff
path: root/net-dns/avahi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-dns/avahi
reinit the tree, so we can have metadata
Diffstat (limited to 'net-dns/avahi')
-rw-r--r--net-dns/avahi/Manifest24
-rw-r--r--net-dns/avahi/avahi-0.6.31-r10.ebuild252
-rw-r--r--net-dns/avahi/avahi-0.6.31-r11.ebuild247
-rw-r--r--net-dns/avahi/avahi-0.6.32-r1.ebuild232
-rw-r--r--net-dns/avahi/avahi-0.6.32-r2.ebuild233
-rw-r--r--net-dns/avahi/avahi-0.6.32.ebuild229
-rw-r--r--net-dns/avahi/avahi-0.7.ebuild211
-rw-r--r--net-dns/avahi/files/autoipd-openrc.sh32
-rw-r--r--net-dns/avahi/files/autoipd.sh52
-rw-r--r--net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch83
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch27
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch31
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch20
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch85
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch11
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch21
-rw-r--r--net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch30
-rw-r--r--net-dns/avahi/files/avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch18
-rw-r--r--net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch22
-rw-r--r--net-dns/avahi/metadata.xml24
20 files changed, 1884 insertions, 0 deletions
diff --git a/net-dns/avahi/Manifest b/net-dns/avahi/Manifest
new file mode 100644
index 000000000000..4c6d3c60e9cf
--- /dev/null
+++ b/net-dns/avahi/Manifest
@@ -0,0 +1,24 @@
+AUX autoipd-openrc.sh 700 SHA256 9f9e8d751bc640491397c8a06cbb6f3dcbf9cdf1a083e274f4d802c9c925c6c0 SHA512 a5dbbac4d6d1959db3a07a63acb7569dbeba33d2274a1dd3253dc27687549371611cf08bad3998d89efb3ace63b5541a4d225e484274450e0c82661f5a1dbc32 WHIRLPOOL e6b256655f64f557338ae5f79eaf98ead572d39cf90c76ca270dc54cee4b5edfc087326e5f04166eb2ff232ec2a8a5b87adadc8b3bd8b2ec2e3b6503ca39bee6
+AUX autoipd.sh 1271 SHA256 9582a49d0674fac714f448976065fd4e1f0423c08f645685160ed682a121f8c9 SHA512 0bff9ca7e32212aef0246db5baf10ee4f7e93a987b7c591b21ed9f116a1c662a84be9d784fc919205c1fecb5cd8421b81a0eb590c3cc066c6b1b9265b98f1ea3 WHIRLPOOL b33889de73f571b18da092342be6a47e71d608466aa0d94fa3f0d8d7e373265767a62bdfb82df31059549e4ec0d05aacef89f1778ea561152fd5e1970072584c
+AUX avahi-0.6.30-optional-gtk-utils.patch 2422 SHA256 1233ba93af567117091094921e5ba76f205b1d984fd5a97153c2004f8f0509e3 SHA512 3ea7f7cd0074286bbe474f783ea9638abef7f68d9466d4f5d4d3a0bc6624a43e48bb293f02f2dd08413d5dcf3f99161e0f45537c5f922b1a326375d40b574596 WHIRLPOOL 82a61a4bce9547e15d6370cd856ac020bcdf9ad220f20929d5c64909c0505406e09fa8503aa79c835477811be48e9c72fbcbfc12061c49722431db196c0cbb8c
+AUX avahi-0.6.31-build-client-without-daemon.patch 738 SHA256 d3d1d451886f7bcd7c20cb2c29ec9b5f59ead4ee9567f40d9820ec2275a01a85 SHA512 0d7ab88560eed40bb04360442b4daba6aa58d9f7f7d60b64c0e47b86ff0e6f2fcc8ccc7fbeab9ed87f77eedfde3814d37f82da9ae010223ef0e81e5b64d34b04 WHIRLPOOL caee48616992cfaf71bd5b7b7b90bd0a179a17ab7b2eb60a04026bc099ad2a611f107cf21a634b2cdaf0f15bcbb44523a7eef84cd692e653f537a1bc1501aacc
+AUX avahi-0.6.31-fix-install-avahi-discover.patch 715 SHA256 79da591066f1ddb454f4d7b7ed7163a0d13c332462ac0c2db3e8a6cd130f8441 SHA512 0cdcf41bbd25caea84a62054c4081dfdba1d421cef56babebe33f480a8ba9af1362c7b698803c17132ee78716439ec70cd5d71f7c85b5d49ba9bda471466cb79 WHIRLPOOL 3b5aa85769688a070707e2a03cccbb4861465bad7b03f5d6e34819dbe2dda5934b332934102616d0a0910cddf80150497f15df19d53726850e1a64d0c48e34d9
+AUX avahi-0.6.31-fix-locale-build.patch 866 SHA256 a55f964f9f834e2d864e05bdda00b514650ecca05d8d35dc570c50c51fa616ed SHA512 c970cd5d199024699e3345d59fb03d0966b62c859e9dd2107a1adef4cb7433a2ebcf2cd6331f4726d84a3ec973b45d7e93824fb80a8c8dcf3fcf6a610a67b337 WHIRLPOOL e1878ae2254b1efcf72e4deff94788a389c5e301e70e699007089f06b60163ce8f34790a5b774b42e255e800a2474f8b3a28e1cd0232f9feb16233cdcd7fff64
+AUX avahi-0.6.31-host-name-from-machine-id.patch 3001 SHA256 257685dde4c7dc78b9fbfeab5f213a94121c8bff6ae8fff99a9aae7eeaa34442 SHA512 659d36b06bf721664105bf51a1610186700004dea2af5dc43e29a8d688e903fb0c69416b1b98957de902901fc5ed04fdd252d30e23f680608608e6f633b94b17 WHIRLPOOL e258af6f138ab7b838a8886d74b73f8d44aefea981bd3e876cca41a144081ad4d199f9ba4031fda71c5d78578869fadd1b226a11b101df406fa2d85911d06e81
+AUX avahi-0.6.31-install-exec-hook.patch 507 SHA256 5411262dd719e647ab7781d2e10ff05d051ff1d7218d58e5bf3a3fbe8628a439 SHA512 c25802f78b5c2f6cc15705c6e426b6590dbcdf30d33e239bd919e9592c5e72c7fb244726e74addfeff4b81fa41cc62afb3ddb880232fea66f3cc9470bb5940b1 WHIRLPOOL 864804ca378b2ef83766ba10e08998f0524ed8c2f6c5fe491eefe88dac2184a3b20848258cd7d19af10a50bbbe8567928c3762b00896bb32b18fda6a4d117c19
+AUX avahi-0.6.31-invalid_packet.patch 1073 SHA256 ec8713f734138bc1d8bdeb357da15f08ba41d81e365c4431691f2a0d68f39211 SHA512 1582efd8c3474e7f675d86449974ae29db6ee28bd61642d37ae3efbe3903183e5f005051de400d28c116d791a6be00d90c61f3eb1d74e0650119269ca04dab4d WHIRLPOOL feaff8e9ed26c7f545757e0906f81e6accc56224bcbd6d615907154e201df654d11b2665a0d14a2e97e03b196f13eaf6ecc443b7d193bbebd22e62699f8c23da
+AUX avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch 1265 SHA256 24954a76f0dfdffc9a079072f8f4d50e292f8ae2a2b8e5a49f488519057c51b0 SHA512 f575e3ba1c704ec3bf92ffd8344a104f35026e6738720955caa23549f602f491c5e209188c5c00189b269e79e6120021d02cc07fbdea22a7c99ce7682f017fe7 WHIRLPOOL f0859f44face57b0eefb6858203bbfa73d6c4be2aa684911d3a152eeca93f972eb81650c4c307b96cd5764c1b12ade6624574331c944db259159bc9321092edb
+AUX avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch 918 SHA256 c4777abe59579227fa6c20fe119689fe8230ce943e54e78b357262dd57a71a7f SHA512 c62167c538af81362abba5a4012336f5d12aa20edc3cbb69f305ba89be90e4c62e1ce1613779d3ad0cbfba99e4ff46b803e4a26fe72cefefd628827a610318a3 WHIRLPOOL d95809c10f2a2bae97c6f03255ece0826c230bd018240c03dd9ac086afbc0c2db5b563e82cc3ba4012fa449e867bd209a1e2478475f85f7871b63a8521c76384
+AUX avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch 633 SHA256 0bd4f2b2f720684b754698d86b6b1f106576473cead815e7b60b1c62171e4cdc SHA512 c2d11b243acdc058cde03b872dccbbbd44a7a584adf168f16016f29c7a5d9d8668095b781f53102feba8b9c80b2cbbd788c9b327d9d1e2e552fbdcf3c2960517 WHIRLPOOL faae601dca07f267ebe6f8254ff2e00d7ff3de3aa4aa92186e9dead9ac49b43c670b3310d0d7671eae8858ef2f046a4c6b27cb1bb23c20413fddb791ad793a67
+DIST avahi-0.6.31.tar.gz 1268686 SHA256 8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48 SHA512 53eb00d570a274d841e1e6ad07da077950089ae39b4f7aa21fcd21cc5320b30b506b43e7e57e56198e155cc7bd289b779a48b2b2fc002dc6194a946110451858 WHIRLPOOL a6d97b87dfbb81be359ee03d8f32ebafdbb311bd596d686aeb55a2952ecb6c7c84466b1230e70392ffe23a20a56da7e0a5bd00c8dc1812b2156c0b4a8022144f
+DIST avahi-0.6.32.tar.gz 934004 SHA256 7eb693d878246f0cd05034173fb3ed53447a84dd3b7f01745313cad11071226e SHA512 e6dc788cc8691288ef001007006719b5eb022d484ee6fc84e68a7d227af5993e4d09484b824998155e5b25fc0ffc014beb8961d312982f63b82b10a6e2edee18 WHIRLPOOL e139eca2d1698976a5fca21361c037dd2b1c075654b01674bea3fa22db70067999aba2a61cbfcf69281d5274f5080450e24cf64f9cec1702d142e129fbf03dc7
+DIST avahi-0.7.tar.gz 940047 SHA256 fd45480cef0559b3eab965ea3ad4fe2d7a8f27db32c851a032ee0b487c378329 SHA512 61f656da7614d8cca1862180038f571db3474c84f05db4d3509f614cdbf8b1a1047661b7e24d63682d5b48ed1bfa1b08b3c9e6dbe9222bcd62d99bc168a11abe WHIRLPOOL bb6f2763309f8426bc65e81f41ac2205076d6f5f9e84f1bba6ed998595c5c2db126b30bf376286f5bd6e61605c3b219fbce9ee325585d2e463d3ef43bc6bcc1a
+EBUILD avahi-0.6.31-r10.ebuild 6444 SHA256 8cad44947022e117a28988289299661f330109a161d484d5fb1379ff69f66328 SHA512 231567dcc74fbe09a4d18cc52074430b2f8c552c2e1212207af5879d6234f0067eebef495872c0c589d77f8fad177d05247f9927dc648963ee9f1e792335da81 WHIRLPOOL 9d74e785d2c6071c0778bf01ea4ef50706032fcb80802ef5dc7c3da8a958fd924206cb20f5373d754ca7ecf08f7fac5f18f4a2583e114612e8199aa59129bfb7
+EBUILD avahi-0.6.31-r11.ebuild 6261 SHA256 a95ba9cbf383b4367598ea67ddecebed497d40549b577d50a74743d16c19b72e SHA512 0a0645d1c38fcde7d34dfdd38f21ab177cfac21bbc01def180ec9fb0f311ce0273565f425c096c6ee29ec20651818136da166d4c3b26d29c8d7f8473a0cd4ed1 WHIRLPOOL a7d72dd4d2b2d3e1c686c28b2b00359cece3bfc5a407577b862e9595220045dd49f2cdb31873b020df759d2ff68738b64e2da546404eca184e336bf8ac86a2a1
+EBUILD avahi-0.6.32-r1.ebuild 5732 SHA256 f69aa86fe2d591a9ce8461184a43b334189b9b6d309ed0c60cb3e1714b789ce4 SHA512 d26256a031d5d7ce6cf58ff4c98d5a88ed93498d0383e1a425e88bc9f1de4ee18c0b2ab6e987163b5a27acc807199c8f91276e449dc6d951607c1dfddfaa74c4 WHIRLPOOL bdeeb0d8a5733ccc3c4885747b8c840703ff706720126167fa08835d6f32f03db2649d8293df0394e216e9752cd718cbd509ddda8a787ef0078cacb026f7a1a1
+EBUILD avahi-0.6.32-r2.ebuild 5855 SHA256 83d4f5676138d0545761c046ac0700375254a00b14eb8c7b2ce545365e6d472a SHA512 44aef809779706e5f0e8c5e047b69a795a7d450a59e7fed174c2f7cb5043f6c9d547daff6699ee9e28e9af3ba02caa54a5293ec8ef11219c35bda4b9f3cfdb00 WHIRLPOOL c7558db4af38b6ee799b554f1a4d99921a529725226266c97245fd5806e3e32b8248ba365eedf4edaa3357c2d24496b2d2f37309e0ce8d2f0a069abb00f7f4ab
+EBUILD avahi-0.6.32.ebuild 5584 SHA256 e070550ca49bd56e096a99dcd924d01ed3433f2e46ba61a7a9b93fc819604b52 SHA512 031b6ea7962717de7f984c78a2814312610b86ce391a2474117b34b2e8c542a6de49b75998c99639f866f415b878ed58f807a12ea713d3b1d15ef0657013e4a0 WHIRLPOOL e362983523708a212b840153090ffd3dbcbed1e53965fa805f3c1f8483a9db52951f49161da8a358c94ce81aeba3f648bfd38c2a89c72db94409e83c3c3f9fe5
+EBUILD avahi-0.7.ebuild 5074 SHA256 87423244c19322addee8ed8f980f31b56600f1dd870dacc0dc824ed3c15a45be SHA512 e52a167c7d76257a58062c173765bd5a5f78ecc90e3e5fd254e36ee43db9cf0c63bf530dfe20b7cbf426d1442ca2c2a8851764833a5d876908f18d625637e93c WHIRLPOOL 64c6db3e0cd26e8d2d0602e10beef86b85cba4572183888784abc0ebdc41f3e24987350462d8b222bf32985866e9e91a67f0f74101769cd09ae335fe8441d0be
+MISC ChangeLog 7687 SHA256 7d2b2911ecc315c9260cc93f78e42fcf442e763a11d6716e547bc73e49db5e45 SHA512 7108d7c7b633ba75c491c38790b771b3ca209d42af98a20244ba756e79196dd28f9a299d13692a51445e0b7a8eef3f5088499b9da178f54a24fd34f0723abb43 WHIRLPOOL 4243d9f9824f678127ffedac72ee8129d7487161ae765828176345d5149531477f4288106b909f4150e6bd5b69c8cf1ef74a4ae4988cb1d0a3c601bd41192ca3
+MISC ChangeLog-2015 43278 SHA256 8127499a1ad257734a5b1e8eef76d640a37fffee164a3a7ef7ec4da4e87d3e06 SHA512 4c2d98e3cc9f9cb91ff28c57d20d57d0f1f1ca14b30c25c43d15963363c2681e3f9b22f9385f4f88812adf041b1edef6a86ca663e59b69f0eaf7de0bb67a0a58 WHIRLPOOL 05760ae18c1d39040d59e95e921479a29c9f44e15985f5b5951943dbd2fa49a2e467bb9236afa59a0082b90928233ce59f297ea4afde98b20271402e1b290899
+MISC metadata.xml 970 SHA256 c14f973568f17f33044e5ad40b4a391cf8ac25ee23bb263d6397f121ea43528a SHA512 b9498d4757b6bd793846e4cbdd5c37da601a8e1430cafd1a6039ff54f8ff10576684c58801ebc679061f975cefa5909c94c30976e84354a5fcc7d2a586f7fa8e WHIRLPOOL a4415d64adc216c956610fe85ba239bce8ac5df4c98b34ca25df71708dd4920ff7a18a31287f3aa09804a4df228de84f399a1c01a6b5047a886848b4ff6bb528
diff --git a/net-dns/avahi/avahi-0.6.31-r10.ebuild b/net-dns/avahi/avahi-0.6.31-r10.ebuild
new file mode 100644
index 000000000000..081dddfdab9a
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.31-r10.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \
+ python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="http://avahi.org/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/intltool
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? (
+ app-doc/doxygen
+ )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if use ipv6; then
+ sed -i \
+ -e s/use-ipv6=no/use-ipv6=yes/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Fix init scripts for >=openrc-0.9.0, bug #383641
+ epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
+
+ # install-exec-local -> install-exec-hook
+ epatch "${FILESDIR}"/${P}-install-exec-hook.patch
+
+ # Backport host-name-from-machine-id patch, bug #466134
+ epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
+
+ epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch
+
+ # allow building client without the daemon
+ epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch
+
+ # Fix build under various locales, bug #501664
+ epatch "${FILESDIR}"/${P}-fix-locale-build.patch
+
+ # Fix "Invalid response packet from host", bug #559408.
+ epatch "${FILESDIR}"/${P}-invalid_packet.patch
+
+ # Drop DEPRECATED flags, bug #384743
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
+
+ # Fix references to Lennart's home directory, bug #466210
+ sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ # Needed for running on systemd properly, bug #537000
+ if multilib_is_native_abi; then
+ ln -s avahi-daemon.service "${D}$(systemd_get_unitdir)"/dbus-org.freedesktop.Avahi.service || die
+ fi
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.31-r11.ebuild b/net-dns/avahi/avahi-0.6.31-r11.ebuild
new file mode 100644
index 000000000000..94f7006549c2
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.31-r11.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env \
+ python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="http://avahi.org/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
+ gdbm? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/intltool
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ doc? (
+ app-doc/doxygen
+ )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if use ipv6; then
+ sed -i \
+ -e s/use-ipv6=no/use-ipv6=yes/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Fix init scripts for >=openrc-0.9.0, bug #383641
+ epatch "${FILESDIR}"/${PN}-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
+
+ # install-exec-local -> install-exec-hook
+ epatch "${FILESDIR}"/${P}-install-exec-hook.patch
+
+ # Backport host-name-from-machine-id patch, bug #466134
+ epatch "${FILESDIR}"/${P}-host-name-from-machine-id.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ epatch "${FILESDIR}"/${P}-fix-install-avahi-discover.patch
+
+ epatch "${FILESDIR}"/${P}-so_reuseport-may-not-exist-in-running-kernel.patch
+
+ # allow building client without the daemon
+ epatch "${FILESDIR}"/${P}-build-client-without-daemon.patch
+
+ # Fix build under various locales, bug #501664
+ epatch "${FILESDIR}"/${P}-fix-locale-build.patch
+
+ # Fix "Invalid response packet from host", bug #559408.
+ epatch "${FILESDIR}"/${P}-invalid_packet.patch
+
+ # Drop DEPRECATED flags, bug #384743
+ sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED=1::g' avahi-ui/Makefile.am || die
+
+ # Fix references to Lennart's home directory, bug #466210
+ sed -i -e 's/\/home\/lennart\/tmp\/avahi//g' man/* || die
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.32-r1.ebuild b/net-dns/avahi/avahi-0.6.32-r1.ebuild
new file mode 100644
index 000000000000..71f6d18d0495
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.32-r1.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ app-doc/xmltoman
+ dev-util/intltool
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if ! use ipv6; then
+ sed -i \
+ -e s/use-ipv6=yes/use-ipv6=no/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-install-avahi-discover.patch
+
+ # Fix build under various locales, bug #501664
+ # https://github.com/lathiat/avahi/issues/27
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-locale-build.patch
+
+ # Update the init scripts for the new openrc, bug #594622
+ epatch "${FILESDIR}"/${PN}-0.6.32-openrc-0.21.7-fix-init-scripts.patch
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --enable-manpages \
+ --enable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ # https://github.com/lathiat/avahi/issues/28
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.32-r2.ebuild b/net-dns/avahi/avahi-0.6.32-r2.ebuild
new file mode 100644
index 000000000000..92aba59f400c
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.32-r2.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk[${PYTHON_USEDEP}] )
+ dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
+ )
+ bookmarks? (
+ ${PYTHON_DEPS}
+ >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ app-doc/xmltoman
+ dev-util/intltool
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if ! use ipv6; then
+ sed -i \
+ -e s/use-ipv6=yes/use-ipv6=no/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-install-avahi-discover.patch
+
+ # Fix build under various locales, bug #501664
+ # https://github.com/lathiat/avahi/issues/27
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-locale-build.patch
+
+ # Update the init scripts for the new openrc, bug #594622
+ epatch "${FILESDIR}"/${PN}-0.6.32-openrc-0.21.7-fix-init-scripts.patch
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --enable-manpages \
+ --enable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ # https://github.com/lathiat/avahi/issues/28
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.6.32.ebuild b/net-dns/avahi/avahi-0.6.32.ebuild
new file mode 100644
index 000000000000..dfb6fef26f2b
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.32.ebuild
@@ -0,0 +1,229 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test utils"
+
+REQUIRED_USE="
+ utils? ( || ( gtk gtk3 ) )
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ gtk? ( dev-python/pygtk )
+ dbus? ( dev-python/dbus-python )
+ )
+ bookmarks? (
+ dev-python/twisted-core
+ dev-python/twisted-web
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ app-doc/xmltoman
+ dev-util/intltool
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if ! use ipv6; then
+ sed -i \
+ -e s/use-ipv6=yes/use-ipv6=no/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ # Make gtk utils optional
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.30-optional-gtk-utils.patch
+
+ # Don't install avahi-discover unless ENABLE_GTK_UTILS, bug #359575
+ # https://github.com/lathiat/avahi/issues/24
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-install-avahi-discover.patch
+
+ # Fix build under various locales, bug #501664
+ # https://github.com/lathiat/avahi/issues/27
+ epatch "${FILESDIR}"/${PN}-0.6.31-fix-locale-build.patch
+
+ # Bug #525832
+ epatch_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_export_best
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable gtk pygtk)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --enable-manpages \
+ --enable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ $(systemd_with_unitdir) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ # https://github.com/lathiat/avahi/issues/28
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/avahi-0.7.ebuild b/net-dns/avahi/avahi-0.7.ebuild
new file mode 100644
index 000000000000..536ccf5311dd
--- /dev/null
+++ b/net-dns/avahi/avahi-0.7.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="gdbm"
+
+WANT_AUTOMAKE=1.11
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal mono-env python-r1 systemd user
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="http://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt4 selinux test"
+
+REQUIRED_USE="
+ python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+ mono? ( dbus )
+ howl-compat? ( dbus )
+ mdnsresponder-compat? ( dbus )
+"
+
+COMMON_DEPEND="
+ dev-libs/libdaemon
+ dev-libs/expat
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] )
+ qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ kernel_linux? ( sys-libs/libcap )
+ introspection? ( dev-libs/gobject-introspection:= )
+ mono? (
+ dev-lang/mono
+ gtk? ( dev-dotnet/gtk-sharp )
+ )
+ python? (
+ ${PYTHON_DEPS}
+ dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
+ introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
+ )
+ bookmarks? (
+ ${PYTHON_DEPS}
+ >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ app-doc/xmltoman
+ dev-util/intltool
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )
+ selinux? ( sec-policy/selinux-avahi )
+"
+
+pkg_preinst() {
+ enewgroup netdev
+ enewgroup avahi
+ enewuser avahi -1 -1 -1 avahi
+
+ if use autoipd; then
+ enewgroup avahi-autoipd
+ enewuser avahi-autoipd -1 -1 -1 avahi-autoipd
+ fi
+}
+
+pkg_setup() {
+ use mono && mono-env_pkg_setup
+}
+
+src_prepare() {
+ if ! use ipv6; then
+ sed -i \
+ -e s/use-ipv6=yes/use-ipv6=no/ \
+ avahi-daemon/avahi-daemon.conf || die
+ fi
+
+ sed -i\
+ -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
+ doxygen_to_devhelp.xsl || die
+
+ eapply_user
+
+ # Prevent .pyc files in DESTDIR
+ >py-compile
+
+ eautoreconf
+
+ # bundled manpages
+ multilib_copy_sources
+}
+
+src_configure() {
+ # those steps should be done once-per-ebuild rather than per-ABI
+ use sh && replace-flags -O? -O0
+ use python && python_setup
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=( --disable-static )
+
+ if use python; then
+ myconf+=(
+ $(multilib_native_use_enable dbus python-dbus)
+ $(multilib_native_use_enable introspection pygobject)
+ )
+ fi
+
+ if use mono; then
+ myconf+=( $(multilib_native_use_enable doc monodoc) )
+ fi
+
+ if ! multilib_is_native_abi; then
+ myconf+=(
+ # used by daemons only
+ --disable-libdaemon
+ --with-xml=none
+ )
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --enable-manpages \
+ --enable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(multilib_native_use_enable doc doxygen-doc) \
+ $(multilib_native_use_enable mono) \
+ $(use_enable dbus) \
+ $(multilib_native_use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable nls) \
+ $(multilib_native_use_enable introspection) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake
+
+ multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ # https://github.com/lathiat/avahi/issues/28
+ use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
+ use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
+
+ if multilib_is_native_abi && use doc; then
+ dohtml -r doxygen/html/. || die
+ insinto /usr/share/devhelp/books/avahi
+ doins avahi.devhelp || die
+ fi
+}
+
+multilib_src_install_all() {
+ if use autoipd; then
+ insinto /$(get_libdir)/rcscripts/net
+ doins "${FILESDIR}"/autoipd.sh
+
+ insinto /$(get_libdir)/netifrc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+ fi
+
+ dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use autoipd; then
+ elog
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ elog
+ fi
+}
diff --git a/net-dns/avahi/files/autoipd-openrc.sh b/net-dns/avahi/files/autoipd-openrc.sh
new file mode 100644
index 000000000000..dec3aa0521c1
--- /dev/null
+++ b/net-dns/avahi/files/autoipd-openrc.sh
@@ -0,0 +1,32 @@
+# Copyright (C) 2004-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Sven Wegener (swegener@gentoo.org)
+
+_config_vars="$_config_vars autoipd"
+
+autoipd_depend() {
+ program /usr/sbin/avahi-autoipd
+ after interface
+}
+
+autoipd_start() {
+ _exists true || return 1
+
+ eval args=\$autoipd_${IFVAR}
+
+ ebegin "Starting avahi-autoipd"
+ /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"
+ eend "${?}" || return 1
+
+ _show_address
+
+ return 0
+}
+
+autoipd_stop() {
+ /usr/sbin/avahi-autoipd --check --syslog "${IFACE}" || return 0
+
+ ebegin "Stopping avahi-autoipd"
+ /usr/sbin/avahi-autoipd --kill --syslog "${IFACE}"
+ eend "${?}"
+}
diff --git a/net-dns/avahi/files/autoipd.sh b/net-dns/avahi/files/autoipd.sh
new file mode 100644
index 000000000000..89d02e338bc3
--- /dev/null
+++ b/net-dns/avahi/files/autoipd.sh
@@ -0,0 +1,52 @@
+# Copyright (c) 2004-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Sven Wegener (swegener@gentoo.org)
+
+# void autoipd_depend(void)
+#
+# Sets up the dependencies for the module
+autoipd_depend() {
+ after interface
+}
+
+# void autoipd_expose(void)
+#
+# Expose variables that can be configured
+autoipd_expose() {
+ variables autoipd
+}
+
+# bool autoipd_start(char *iface)
+#
+# Tries to configure the interface via avahi-autoipd
+autoipd_start() {
+ local iface="${1}" ifvar="$(bash_variable "${iface}")" opts="autoipd_${ifvar}" addr=""
+
+ interface_exists "${iface}" true || return 1
+
+ ebegin "Starting avahi-autoipd"
+ if /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${!opts} "${iface}"
+ then
+ eend 0
+ addr="$(interface_get_address "${iface}")"
+ einfo "${iface} received address ${addr}"
+ return 0
+ fi
+
+ eend "${?}" "Failed to get address via avahi-autoipd!"
+}
+
+# bool autoipd_stop(char *iface)
+#
+# Stops a running avahi-autoipd instance
+autoipd_stop() {
+ local iface="${1}"
+
+ /usr/sbin/avahi-autoipd --check --syslog "${iface}" || return 0
+
+ ebegin "Stopping avahi-autoipd"
+ /usr/sbin/avahi-autoipd --kill --syslog "${iface}"
+ eend "${?}" "Failed to stop running avahi-autoipd instance!"
+}
+
+# vim: set ts=4 :
diff --git a/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch
new file mode 100644
index 000000000000..2c615a2b3a0a
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch
@@ -0,0 +1,83 @@
+--- avahi-discover-standalone/Makefile.am
++++ avahi-discover-standalone/Makefile.am
+@@ -23,7 +23,7 @@
+ # This cool debug trap works on i386/gcc only
+ AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+-if HAVE_GTK2OR3
++if ENABLE_GTK_UTILS
+ if HAVE_GLIB
+ bin_PROGRAMS = \
+ avahi-discover-standalone
+--- avahi-ui/Makefile.am
++++ avahi-ui/Makefile.am
+@@ -76,6 +76,7 @@
+ libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+ endif
+
++if ENABLE_GTK_UTILS
+ bin_PROGRAMS = bssh
+ desktop_DATA += bssh.desktop bvnc.desktop
+ @INTLTOOL_DESKTOP_RULE@
+@@ -102,6 +103,7 @@
+ bvnc.desktop.in: bvnc.desktop.in.in
+ $(AM_V_GEN)sed -e 's,@bindir\@,$(bindir),g' $< > $@
+
++endif # ENABLE_GTK_UTILS
+ endif # HAVE_GLIB
+ endif
+ endif
+--- configure.ac
++++ configure.ac
+@@ -564,7 +564,29 @@
+ fi
+ AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes")
+
+-AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes" )
++#
++# Check for GTK+ Utils
++#
++AC_ARG_ENABLE(gtk-utils,
++ AS_HELP_STRING([--disable-gtk-utils],[Disable GTK+ utilities]),
++ [case "${enableval}" in
++ yes) WANT_GTK_UTILS=yes ;;
++ no) WANT_GTK_UTILS=no ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk-utils) ;;
++ esac],
++ [WANT_GTK_UTILS=yes])
++
++ENABLE_GTK_UTILS=no
++HAVE_GTK2OR3=no
++if test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
++ HAVE_GTK2OR3=yes
++ if test "x$WANT_GTK_UTILS" = "xyes"; then
++ ENABLE_GTK_UTILS=yes
++ fi
++fi
++
++AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK2OR3" = "xyes")
++AM_CONDITIONAL(ENABLE_GTK_UTILS, test "x$ENABLE_GTK_UTILS" = "xyes")
+
+ #
+ # D-Bus
+@@ -1199,11 +1221,6 @@
+ ENABLE_AUTOIPD="no (You need libdaemon!)"
+ fi
+
+-HAVE_GTK2OR3=no
+-if test "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes" ; then
+- HAVE_GTK2OR3=yes
+-fi
+-
+ BUILD_UI="no"
+ if test "x$HAVE_GTK2OR3" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then
+ BUILD_UI="yes"
+@@ -1223,7 +1240,7 @@
+ Building avahi-python: ${BUILD_PYTHON}
+ Building libavahi-glib: ${HAVE_GLIB}
+ Building libavahi-gobject: ${BUILD_GOBJECT}
+- Building avahi-discover-standalone: ${HAVE_GTK2OR3}
++ Building avahi-discover-standalone: ${ENABLE_GTK_UTILS}
+ Building libavahi-qt3: ${HAVE_QT3}
+ Building libavahi-qt4: ${HAVE_QT4}
+ Building avahi-sharp: ${HAVE_MONO}
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
new file mode 100644
index 000000000000..df0c420fa62a
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-build-client-without-daemon.patch
@@ -0,0 +1,27 @@
+From ce3b83de6aa689c0cefe0b1e85c03a627b537099 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 12 May 2014 19:46:22 +0200
+Subject: [PATCH] Allow building client without the daemon.
+
+There's no good reason to disallow that, and that's what we specifically
+want to do for multilib.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0e190ba..c56cf01 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1185,7 +1185,7 @@ fi
+
+ BUILD_CLIENT="no (You need avahi-daemon and D-Bus!)"
+
+-if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
++if "x$HAVE_DBUS" = "xyes" ; then
+ BUILD_CLIENT=yes
+ fi
+
+--
+1.9.3
+
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
new file mode 100644
index 000000000000..62ba967c26ff
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-fix-install-avahi-discover.patch
@@ -0,0 +1,31 @@
+--- avahi-0.6.30.old/avahi-python/avahi-discover/Makefile.am 2010-06-28 23:30:34.000000000 -0400
++++ avahi-0.6.30/avahi-python/avahi-discover/Makefile.am 2012-04-21 18:02:01.642934527 -0400
+@@ -22,6 +22,7 @@
+ avahi-discover.py \
+ avahi-discover.desktop.in.in
+
++if ENABLE_GTK_UTILS
+ if HAVE_PYTHON
+ if HAVE_PYTHON_DBUS
+ if HAVE_PYGTK
+@@ -67,3 +68,4 @@
+ endif
+ endif
+ endif
++endif
+--- avahi-0.6.30.old/man/Makefile.am 2012-04-21 18:10:45.690900742 -0400
++++ avahi-0.6.30/man/Makefile.am 2012-04-21 18:09:15.146906578 -0400
+@@ -65,11 +65,13 @@
+ man_MANS += \
+ avahi-bookmarks.1
+ if HAVE_GTK
++if ENABLE_GTK_UTILS
+ man_MANS += \
+ avahi-discover.1
+ endif
+ endif
+ endif
++endif
+
+ if ENABLE_AUTOIPD
+ if HAVE_LIBDAEMON
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
new file mode 100644
index 000000000000..b0e47e907462
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-fix-locale-build.patch
@@ -0,0 +1,20 @@
+avahi-gobject fails to build under et_EE and possibly other locales.
+
+The regex for a sed in avahi-gobject/Makefile fails under various locales.
+Forcing LC_ALL=C fixes the issue.
+
+X-Gentoo-Bug: 501664
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/501664
+
+diff -Naur avahi-0.6.31.orig/avahi-gobject/Makefile.am avahi-0.6.31/avahi-gobject/Makefile.am
+--- avahi-0.6.31.orig/avahi-gobject/Makefile.am 2010-08-25 20:51:39.007153001 -0400
++++ avahi-0.6.31/avahi-gobject/Makefile.am 2014-09-07 19:00:05.485657990 -0400
+@@ -76,7 +76,7 @@
+
+ signals-marshal.list: $(CORE_SOURCES) Makefile.am
+ $(AM_V_GEN)( cd $(srcdir) && \
+- sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
++ LC_ALL=C sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
+ $(CORE_SOURCES) ) \
+ | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp && \
+ if cmp -s $@.tmp $@; then \
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
new file mode 100644
index 000000000000..17ecba52534b
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-host-name-from-machine-id.patch
@@ -0,0 +1,85 @@
+From: David Zeuthen <zeuthen@chromium.org>
+Date: Tue, 5 Mar 2013 19:52:38 +0000 (-0800)
+Subject: avahi-daemon: add option "host-name-from-machine-id="
+X-Git-Url: http://git.0pointer.de/?p=avahi.git;a=commitdiff_plain;h=147cdce70b22ae7cee9fb4fe123db40952f31c9e
+
+avahi-daemon: add option "host-name-from-machine-id="
+
+Signed-off-by: David Zeuthen <zeuthen@chromium.org>
+---
+
+diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c
+index d46f40a..8c28fd6 100644
+--- a/avahi-daemon/main.c
++++ b/avahi-daemon/main.c
+@@ -65,6 +65,7 @@
+ #include <avahi-core/publish.h>
+ #include <avahi-core/dns-srv-rr.h>
+ #include <avahi-core/log.h>
++#include <avahi-core/util.h>
+
+ #ifdef ENABLE_CHROOT
+ #include "chroot.h"
+@@ -576,6 +577,29 @@ static int parse_usec(const char *s, AvahiUsec *u) {
+ return 0;
+ }
+
++static char *get_machine_id(void) {
++ int fd;
++ char buf[32];
++
++ fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
++ if (fd == -1 && errno == ENOENT)
++ fd = open("/var/lib/dbus/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
++ if (fd == -1)
++ return NULL;
++
++ /* File is on a filesystem so we never get EINTR or partial reads */
++ if (read(fd, buf, sizeof buf) != sizeof buf) {
++ close(fd);
++ return NULL;
++ }
++ close(fd);
++
++ /* Contents can be lower, upper and even mixed case so normalize */
++ avahi_strdown(buf);
++
++ return avahi_strndup(buf, sizeof buf);
++}
++
+ static int load_config_file(DaemonConfig *c) {
+ int r = -1;
+ AvahiIniFile *f;
+@@ -631,6 +655,15 @@ static int load_config_file(DaemonConfig *c) {
+ c->server_config.use_iff_running = is_yes(p->value);
+ else if (strcasecmp(p->key, "disallow-other-stacks") == 0)
+ c->server_config.disallow_other_stacks = is_yes(p->value);
++ else if (strcasecmp(p->key, "host-name-from-machine-id") == 0) {
++ if (*(p->value) == 'y' || *(p->value) == 'Y') {
++ char *machine_id = get_machine_id();
++ if (machine_id != NULL) {
++ avahi_free(c->server_config.host_name);
++ c->server_config.host_name = machine_id;
++ }
++ }
++ }
+ #ifdef HAVE_DBUS
+ else if (strcasecmp(p->key, "enable-dbus") == 0) {
+
+diff --git a/man/avahi-daemon.conf.5.xml.in b/man/avahi-daemon.conf.5.xml.in
+index bea7ed5..2d15017 100644
+--- a/man/avahi-daemon.conf.5.xml.in
++++ b/man/avahi-daemon.conf.5.xml.in
+@@ -40,6 +40,12 @@
+ </option>
+
+ <option>
++ <p><opt>host-name-from-machine-id=</opt> Takes a boolean
++ value ("yes" or "no"). If set to "yes" avahi-daemon
++ will use the machine-id as name on the LAN.</p>
++ </option>
++
++ <option>
+ <p><opt>domain-name=</opt> Set the default domain name avahi-daemon
+ tries to register its host name and services on the LAN in. If
+ omitted defaults to ".local".</p>
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
new file mode 100644
index 000000000000..d9a7bc3434c7
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-install-exec-hook.patch
@@ -0,0 +1,11 @@
+--- avahi-0.6.31/avahi-utils/Makefile.am
++++ avahi-0.6.31/avahi-utils/Makefile.am
+@@ -53,7 +53,7 @@
+ avahi_set_host_name_CFLAGS = $(AM_CFLAGS)
+ avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
+
+-install-exec-local:
++install-exec-hook:
+ cd $(DESTDIR)/$(bindir) && \
+ rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
+ $(LN_S) avahi-resolve avahi-resolve-host-name && \
diff --git a/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch b/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch
new file mode 100644
index 000000000000..5cfb4659bee6
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-invalid_packet.patch
@@ -0,0 +1,21 @@
+Fix "Invalid response packet from host". Bug #559408.
+
+See http://pkgs.fedoraproject.org/cgit/avahi.git/plain/avahi-0.6.31-invalid_packet.patch
+
+diff -up avahi-0.6.31/avahi-core/server.c.invalid_packet avahi-0.6.31/avahi-core/server.c
+--- avahi-0.6.31/avahi-core/server.c.invalid_packet 2015-09-22 08:12:58.544588701 -0500
++++ avahi-0.6.31/avahi-core/server.c 2015-09-22 08:13:39.743862403 -0500
+@@ -972,11 +972,9 @@ static void dispatch_packet(AvahiServer
+ return;
+ }
+
+- if (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_QDCOUNT) != 0 ||
+- avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0 ||
+- avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0) {
++ if (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0) {
+
+- avahi_log_warn("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
++ avahi_log_debug("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
+ return;
+ }
+
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
new file mode 100644
index 000000000000..9c23ca5e4554
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.31-so_reuseport-may-not-exist-in-running-kernel.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/484212
+
+Description: SO_REUSEPORT may not exist in running kernel
+ When userspace defines SO_REUSEPORT we will attempt to enable socket
+ port number reuse. However if the running kernel does not support
+ this call it will fail preventing daemon startup. If this call is
+ present but fails ENOPROTOOPT then we know that actually the kernel
+ does not support it and we should continue as if we did not have the
+ call at all. (LP: #1228204)
+ .
+ This patch could be removed from the debian package after jessie release.
+Author: Andy Whitcroft <apw@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1228204
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732009
+Last-Update: 2013-09-20
+
+Index: avahi-0.6.31/avahi-core/socket.c
+===================================================================
+--- avahi-0.6.31.orig/avahi-core/socket.c 2013-09-20 16:36:50.000000000 +0100
++++ avahi-0.6.31/avahi-core/socket.c 2013-09-20 16:38:23.781863644 +0100
+@@ -177,7 +177,8 @@
+ yes = 1;
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
+ avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
+- return -1;
++ if (errno != ENOPROTOOPT)
++ return -1;
+ }
+ #endif
+
diff --git a/net-dns/avahi/files/avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch b/net-dns/avahi/files/avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch
new file mode 100644
index 000000000000..2b91179dd65f
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.32-openrc-0.21.7-fix-init-scripts.patch
@@ -0,0 +1,18 @@
+diff -Naur avahi-0.6.32.orig/initscript/gentoo/avahi-daemon.in avahi-0.6.32/initscript/gentoo/avahi-daemon.in
+--- avahi-0.6.32.orig/initscript/gentoo/avahi-daemon.in 2016-02-15 21:13:45.000000000 -0500
++++ avahi-0.6.32/initscript/gentoo/avahi-daemon.in 2016-09-21 20:58:01.999109439 -0400
+@@ -1,4 +1,4 @@
+-#!/sbin/runscript
++#!/sbin/openrc-run
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+diff -Naur avahi-0.6.32.orig/initscript/gentoo/avahi-dnsconfd.in avahi-0.6.32/initscript/gentoo/avahi-dnsconfd.in
+--- avahi-0.6.32.orig/initscript/gentoo/avahi-dnsconfd.in 2016-02-15 21:13:45.000000000 -0500
++++ avahi-0.6.32/initscript/gentoo/avahi-dnsconfd.in 2016-09-21 20:58:12.683109618 -0400
+@@ -1,4 +1,4 @@
+-#!/sbin/runscript
++#!/sbin/openrc-run
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
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
new file mode 100644
index 000000000000..394f6d34d0f0
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.x-openrc-0.9.x-init-scripts-fixes.patch
@@ -0,0 +1,22 @@
+--- avahi-0.6.30/initscript/gentoo/avahi-daemon.in
++++ avahi-0.6.30/initscript/gentoo/avahi-daemon.in
+@@ -2,7 +2,7 @@
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+-opts="reload"
++extra_started_commands="reload"
+
+ depend() {
+ before netmount nfsmount
+--- avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
++++ avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
+@@ -2,7 +2,7 @@
+ # Copyright 1999-2007 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+-opts="reload"
++extra_started_commands="reload"
+
+ depend() {
+ need avahi-daemon
diff --git a/net-dns/avahi/metadata.xml b/net-dns/avahi/metadata.xml
new file mode 100644
index 000000000000..046761ce22c0
--- /dev/null
+++ b/net-dns/avahi/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name="autoipd">Build and install the IPv4LL (RFC3927) network address
+ configuration daemon</flag>
+ <flag name="bookmarks">Install the avahi-bookmarks application (requires
+ <pkg>dev-python/twisted-core</pkg> and <pkg>dev-python/twisted-web</pkg>)</flag>
+ <flag name="howl-compat">Enable compat libraries for howl</flag>
+ <flag name="gtk3">Build the avahi-ui-gtk3 library, and use gtk3 for the
+ avahi utilities under USE=utils</flag>
+ <flag name="mdnsresponder-compat">Enable compat libraries for
+ mDNSResponder</flag>
+ <flag name="utils">Install the avahi gtk+ utils avahi-discover, bssh, and
+ bvnc</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">lathiat/avahi</remote-id>
+ </upstream>
+</pkgmetadata>