public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
@ 2015-09-25  2:03 Anthony G. Basile
  0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2015-09-25  2:03 UTC (permalink / raw
  To: gentoo-commits

commit:     0bc40f3a0e81ee6e520a0c5ffa006e4e68371735
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 25 02:07:09 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Sep 25 02:07:09 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bc40f3a

net-dns/avahi: bump to 0.6.31-r9 to fix bug #559408.

Package-Manager: portage-2.2.20.1

 net-dns/avahi/avahi-0.6.31-r9.ebuild               | 253 +++++++++++++++++++++
 .../avahi/files/avahi-0.6.31-invalid_packet.patch  |  21 ++
 2 files changed, 274 insertions(+)

diff --git a/net-dns/avahi/avahi-0.6.31-r9.ebuild b/net-dns/avahi/avahi-0.6.31-r9.ebuild
new file mode 100644
index 0000000..1f873b8
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.31-r9.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~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 )
+	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.
+	eptch "${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/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 0000000..5cfb465
--- /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;
+         }
+ 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
@ 2018-01-11 22:32 Andreas Sturmlechner
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Sturmlechner @ 2018-01-11 22:32 UTC (permalink / raw
  To: gentoo-commits

commit:     f97f8e63b790fb4507a613a6ca5d0c35392fe243
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 11 22:26:56 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jan 11 22:31:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f97f8e63

net-dns/avahi: Don't call moc directly

Closes: https://bugs.gentoo.org/587830
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-dns/avahi/avahi-0.6.32-r2.ebuild          |  5 ++++-
 net-dns/avahi/avahi-0.7.ebuild                |  5 ++++-
 net-dns/avahi/files/avahi-0.6.32-mocqt4.patch | 12 ++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/net-dns/avahi/avahi-0.6.32-r2.ebuild b/net-dns/avahi/avahi-0.6.32-r2.ebuild
index 92aba59f400..876f83bcf2d 100644
--- a/net-dns/avahi/avahi-0.6.32-r2.ebuild
+++ b/net-dns/avahi/avahi-0.6.32-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -112,6 +112,9 @@ src_prepare() {
 	# Update the init scripts for the new openrc, bug #594622
 	epatch "${FILESDIR}"/${PN}-0.6.32-openrc-0.21.7-fix-init-scripts.patch
 
+	# Don't pick up wrong moc based on qtchooser default, bug #587830
+	epatch "${FILESDIR}"/${PN}-0.6.32-mocqt4.patch
+
 	# Bug #525832
 	epatch_user
 

diff --git a/net-dns/avahi/avahi-0.7.ebuild b/net-dns/avahi/avahi-0.7.ebuild
index d77bb4af9a0..bfb9882d472 100644
--- a/net-dns/avahi/avahi-0.7.ebuild
+++ b/net-dns/avahi/avahi-0.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -96,6 +96,9 @@ src_prepare() {
 		-e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
 		doxygen_to_devhelp.xsl || die
 
+	# Don't pick up wrong moc based on qtchooser default, bug #587830
+	eapply "${FILESDIR}"/${PN}-0.6.32-mocqt4.patch
+
 	eapply_user
 
 	# Prevent .pyc files in DESTDIR

diff --git a/net-dns/avahi/files/avahi-0.6.32-mocqt4.patch b/net-dns/avahi/files/avahi-0.6.32-mocqt4.patch
new file mode 100644
index 00000000000..bba25e97163
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.32-mocqt4.patch
@@ -0,0 +1,12 @@
+--- a/configure.ac	2018-01-11 23:00:47.503309612 +0100
++++ b/configure.ac	2018-01-11 23:10:04.373295395 +0100
+@@ -516,8 +516,7 @@
+         PKG_CHECK_MODULES( QT4, [ QtCore >= 4.0.0 ])
+         AC_SUBST(QT4_CFLAGS)
+         AC_SUBST(QT4_LIBS)
+-	    QT4_PREFIX="`$PKG_CONFIG --variable=prefix QtCore`/bin"
+-        AC_PATH_PROGS(MOC_QT4, [moc-qt4 moc], no, [$QT4_PREFIX])
++        MOC_QT4="`$PKG_CONFIG --variable=moc_location QtCore`"
+         if test "$MOC_QT4" = no; then
+             AC_MSG_ERROR([Could not find QT4 moc])
+         fi


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
@ 2018-01-21  3:33 Anthony G. Basile
  0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2018-01-21  3:33 UTC (permalink / raw
  To: gentoo-commits

commit:     4449233c9287c5a57aa59db9413d01b80ae371ca
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 21 03:33:37 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Jan 21 03:33:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4449233c

net-dns/avahi: switch to qt5, bug #525884

Package-Manager: Portage-2.3.13, Repoman-2.3.3

 net-dns/avahi/avahi-0.7-r1.ebuild       | 216 ++++++++++++++++++++++++++++++++
 net-dns/avahi/files/avahi-0.7-qt5.patch | 187 +++++++++++++++++++++++++++
 2 files changed, 403 insertions(+)

diff --git a/net-dns/avahi/avahi-0.7-r1.ebuild b/net-dns/avahi/avahi-0.7-r1.ebuild
new file mode 100644
index 00000000000..e2e1bdb100b
--- /dev/null
+++ b/net-dns/avahi/avahi-0.7-r1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2018 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"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt5 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}] )
+	qt5? ( dev-qt/qtcore:5 )
+	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 )
+"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
+
+PATCHES=( "${FILESDIR}/${P}-qt5.patch" )
+
+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() {
+	default
+
+	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
+
+	# 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
+
+	myconf+=( $(multilib_native_use_enable qt5) )
+
+	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 \
+		--disable-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/avahi-0.7-qt5.patch b/net-dns/avahi/files/avahi-0.7-qt5.patch
new file mode 100644
index 00000000000..aa7e4a5c812
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.7-qt5.patch
@@ -0,0 +1,187 @@
+diff -rupN avahi-0.6.31/avahi-qt/Makefile.am avahi-qt5/avahi-qt/Makefile.am
+--- avahi-0.6.31/avahi-qt/Makefile.am	2010-08-25 19:51:39.011153001 -0500
++++ avahi-qt5/avahi-qt/Makefile.am	2014-10-19 13:55:14.825086832 -0500
+@@ -65,4 +65,26 @@ libavahi_qt4_la_LIBADD = $(AM_LDADD) ../
+ libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT4_VERSION_INFO)
+ endif
+ 
++if HAVE_QT5
++
++avahiqt5includedir=$(includedir)/avahi-qt5
++avahiqt5include_HEADERS = \
++	qt-watch.h
++
++lib_LTLIBRARIES += \
++	libavahi-qt5.la
++
++BUILT_SOURCES += qt-watch.moc5
++
++libavahi_qt5_la_SOURCES = \
++	qt-watch.cpp
++
++qt-watch.moc5: qt-watch.cpp
++	$(AM_V_GEN)$(MOC_QT5) $^ > $@
++
++libavahi_qt5_la_CPPFLAGS = $(AM_CFLAGS) --std=gnu++11 $(QT5_CFLAGS) -DQT5 $(VISIBILITY_HIDDEN_CFLAGS)
++libavahi_qt5_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT5_LIBS)
++libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT5_VERSION_INFO)
++endif
++
+ CLEANFILES = $(BUILT_SOURCES)
+diff -rupN avahi-0.6.31/avahi-qt/qt-watch.cpp avahi-qt5/avahi-qt/qt-watch.cpp
+--- avahi-0.6.31/avahi-qt/qt-watch.cpp	2010-08-25 19:51:39.011153001 -0500
++++ avahi-qt5/avahi-qt/qt-watch.cpp	2014-10-19 13:56:14.076226518 -0500
+@@ -18,10 +18,10 @@
+ ***/
+ 
+ #include <sys/time.h>
+-#ifdef QT4
+-#include <Qt/qsocketnotifier.h>
+-#include <Qt/qobject.h>
+-#include <Qt/qtimer.h>
++#if defined(QT5) || defined(QT4)
++#include <QSocketNotifier>
++#include <QObject>
++#include <QTimer>
+ #else
+ #include <qsocketnotifier.h>
+ #include <qobject.h>
+@@ -114,7 +114,7 @@ AvahiTimeout::AvahiTimeout(const struct
+     m_callback(callback), m_userdata(userdata)
+ {
+     connect(&m_timer, SIGNAL(timeout()), this, SLOT(timeout()));
+-#ifdef QT4
++#if defined(QT5) || defined(QT4)
+     m_timer.setSingleShot(true);
+ #endif
+     update(tv);
+@@ -125,7 +125,7 @@ void AvahiTimeout::update(const struct t
+     m_timer.stop();
+     if (tv) {
+     AvahiUsec u = avahi_age(tv)/1000;
+-#ifdef QT4
++#if defined(QT5) || defined(QT4)
+     m_timer.start( (u>0) ? 0 : -u);
+ #else
+     m_timer.start( (u>0) ? 0 : -u,true);
+@@ -191,8 +191,10 @@ const AvahiPoll* avahi_qt_poll_get(void)
+     return &qt_poll;
+ }
+ 
+-#ifdef QT4
++#if defined(QT5)
++#include "qt-watch.moc5"
++#elif defined(QT4)
+ #include "qt-watch.moc4"
+-#else
++#elif defined(QT3)
+ #include "qt-watch.moc3"
+ #endif
+diff -rupN avahi-0.6.31/avahi-qt5.pc.in avahi-qt5/avahi-qt5.pc.in
+--- avahi-0.6.31/avahi-qt5.pc.in	1969-12-31 18:00:00.000000000 -0600
++++ avahi-qt5/avahi-qt5.pc.in	2014-10-19 13:55:14.825086832 -0500
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=${prefix}
++libdir=@libdir@
++includedir=${prefix}/include
++
++Name: avahi-qt5
++Description: Avahi Multicast DNS Responder (QT5 Support)
++Version: @PACKAGE_VERSION@
++Requires: Qt5Core >= 5.0.0
++Libs: -L${libdir} -lavahi-qt5
++Cflags: -D_REENTRANT -I${includedir}
+diff -rupN avahi-0.6.31/configure.ac avahi-qt5/configure.ac
+--- avahi-0.6.31/configure.ac	2012-02-14 15:44:25.484742099 -0600
++++ avahi-qt5/configure.ac	2014-10-19 13:55:14.825086832 -0500
+@@ -34,6 +34,7 @@ AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:
+ AC_SUBST(LIBAVAHI_GOBJECT_VERSION_INFO, [0:4:0])
+ AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:2:0])
+ AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:2:0])
++AC_SUBST(LIBAVAHI_QT5_VERSION_INFO, [1:2:0])
+ AC_SUBST(LIBAVAHI_UI_VERSION_INFO, [1:4:1])
+ 
+ # Do not touch these, since they we took this version-info from upstream HOWL/Bonjour
+@@ -525,6 +526,31 @@ fi
+ AM_CONDITIONAL(HAVE_QT4, test "x$HAVE_QT4" = "xyes")
+ 
+ #
++# Check for Qt 5
++#
++AC_ARG_ENABLE(qt5,
++        AS_HELP_STRING([--disable-qt5],[Disable building of Qt5Core mainloop integration]),
++        [case "${enableval}" in
++                yes) HAVE_QT5=yes ;;
++                no)  HAVE_QT5=no ;;
++                *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt5) ;;
++        esac],
++        [HAVE_QT5=yes])
++
++if test "x$HAVE_QT5" = "xyes" ; then
++        PKG_CHECK_MODULES( QT5, [ Qt5Core >= 5.0.0 ])
++        AC_SUBST(QT5_CFLAGS)
++        AC_SUBST(QT5_LIBS)
++        QT5_PREFIX="`$PKG_CONFIG --variable=host_bins Qt5Core`"
++        AC_PATH_PROGS(MOC_QT5, [moc-qt5 moc], no, [$QT5_PREFIX])
++        if test "$MOC_QT5" = no; then
++            AC_MSG_ERROR([Could not find QT5 moc])
++        fi
++        AC_SUBST(MOC_QT5)
++fi
++AM_CONDITIONAL(HAVE_QT5, test "x$HAVE_QT5" = "xyes")
++
++#
+ # Check for GTK+ 2.0
+ #
+ AC_ARG_ENABLE(gtk,
+@@ -1157,6 +1183,7 @@ echo "
+     Enable python-dbus:                        ${HAVE_PYTHON_DBUS}
+     Enable QT3:                                ${HAVE_QT3}
+     Enable QT4:                                ${HAVE_QT4}
++    Enable QT5:                                ${HAVE_QT5}
+     Enable Mono:                               ${HAVE_MONO}
+     Enable Monodoc:                            ${HAVE_MONODOC}
+     Distribution/OS:                           ${with_distro}
+@@ -1226,6 +1253,7 @@ echo "\
+     Building avahi-discover-standalone: ${HAVE_GTK2OR3}
+     Building libavahi-qt3:              ${HAVE_QT3}
+     Building libavahi-qt4:              ${HAVE_QT4}
++    Building libavahi-qt5:              ${HAVE_QT5}
+     Building avahi-sharp:               ${HAVE_MONO}
+     Building avahi-compat-libdns_sd:    ${ENABLE_COMPAT_LIBDNS_SD}
+     Building avahi-compat-howl:         ${ENABLE_COMPAT_HOWL}
+diff -rupN avahi-0.6.31/Makefile.am avahi-qt5/Makefile.am
+--- avahi-0.6.31/Makefile.am	2011-12-30 15:26:44.925511922 -0600
++++ avahi-qt5/Makefile.am	2014-10-19 13:55:14.825086832 -0500
+@@ -43,6 +43,7 @@ EXTRA_DIST = \
+ 	avahi-gobject.pc.in \
+ 	avahi-qt3.pc.in \
+ 	avahi-qt4.pc.in \
++	avahi-qt5.pc.in \
+ 	avahi-sharp.pc.in \
+ 	avahi-ui-sharp.pc.in \
+ 	avahi-compat-libdns_sd.pc.in \
+@@ -101,6 +102,10 @@ if HAVE_QT4
+ DX_INPUT += \
+ 	$(srcdir)/avahi-qt/qt-watch.h
+ endif
++if HAVE_QT5
++DX_INPUT += \
++	$(srcdir)/avahi-qt/qt-watch.h
++endif
+ endif
+ 
+ if HAVE_GLIB
+@@ -216,6 +221,11 @@ pkgconfig_DATA += avahi-qt4.pc
+ CLEANFILES += avahi-qt4.pc
+ endif
+ 
++if HAVE_QT5
++pkgconfig_DATA += avahi-qt5.pc
++CLEANFILES += avahi-qt5.pc
++endif
++
+ CLEANFILES += avahi.devhelp
+ 
+ avahi.devhelp: doxygen-run


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
@ 2020-01-13 17:36 Anthony G. Basile
  0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2020-01-13 17:36 UTC (permalink / raw
  To: gentoo-commits

commit:     ecb1d2b716b08a3ea9d7aaaf5afc3fcaabbb55ef
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 29 18:41:08 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Jan 13 17:36:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecb1d2b7

net-dns/avahi: python3_7 support, drop obsolete eutils and multilib

Drop >py-compile, seemingly not necessary anymore.
Make more use of myconf array.
Tests passed, fwiw.

Closes: https://bugs.gentoo.org/704200
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 net-dns/avahi/avahi-0.7-r5.ebuild                  | 217 +++++++++++++++++++
 net-dns/avahi/files/avahi-0.7-python3-gdbm.patch   | 234 +++++++++++++++++++++
 .../avahi/files/avahi-0.7-python3-unittest.patch   | 151 +++++++++++++
 net-dns/avahi/files/avahi-0.7-python3.patch        |  94 +++++++++
 .../avahi-0.7-remove-empty-avahi_discover.patch    |  77 +++++++
 5 files changed, 773 insertions(+)

diff --git a/net-dns/avahi/avahi-0.7-r5.ebuild b/net-dns/avahi/avahi-0.7-r5.ebuild
new file mode 100644
index 00000000000..edac01c62ae
--- /dev/null
+++ b/net-dns/avahi/avahi-0.7-r5.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_7 )
+PYTHON_REQ_USE="gdbm"
+inherit autotools flag-o-matic multilib-minimal mono-env python-r1 systemd
+
+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"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt5 selinux systemd test"
+
+REQUIRED_USE="
+	python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+	mono? ( dbus )
+	howl-compat? ( dbus )
+	mdnsresponder-compat? ( dbus )
+	systemd? ( dbus )
+"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	dev-libs/libdaemon
+	dev-libs/expat
+	dev-libs/glib:2[${MULTILIB_USEDEP}]
+	gdbm? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
+	qt5? ( dev-qt/qtcore:5 )
+	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:2 )
+	)
+	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}]
+	)
+"
+RDEPEND="
+	acct-user/avahi
+	acct-group/avahi
+	acct-group/netdev
+	autoipd? (
+		acct-user/avahi-autoipd
+		acct-group/avahi-autoipd
+	)
+	${DEPEND}
+	howl-compat? ( !net-misc/howl )
+	mdnsresponder-compat? ( !net-misc/mDNSResponder )
+	selinux? ( sec-policy/selinux-avahi )
+"
+BDEPEND="
+	dev-util/glib-utils
+	doc? ( app-doc/doxygen )
+	app-doc/xmltoman
+	dev-util/intltool
+	virtual/pkgconfig[${MULTILIB_USEDEP}]
+"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
+
+PATCHES=(
+	"${FILESDIR}/${P}-qt5.patch"
+	"${FILESDIR}/${P}-CVE-2017-6519.patch"
+	"${FILESDIR}/${P}-remove-empty-avahi_discover.patch"
+	"${FILESDIR}/${P}-python3.patch"
+	"${FILESDIR}/${P}-python3-unittest.patch"
+	"${FILESDIR}/${P}-python3-gdbm.patch"
+)
+
+pkg_setup() {
+	use mono && mono-env_pkg_setup
+	use python || use bookmarks && python_setup
+}
+
+src_prepare() {
+	default
+
+	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
+
+	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
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--disable-monodoc
+		--disable-python-dbus
+		--disable-qt3
+		--disable-qt4
+		--disable-static
+		--enable-manpages
+		--enable-glib
+		--enable-gobject
+		--enable-xmltoman
+		--localstatedir="${EPREFIX}/var"
+		--with-distro=gentoo
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		$(use_enable dbus)
+		$(use_enable gdbm)
+		$(use_enable gtk)
+		$(use_enable gtk3)
+		$(use_enable howl-compat compat-howl)
+		$(use_enable mdnsresponder-compat compat-libdns_sd)
+		$(use_enable nls)
+		$(multilib_native_use_enable autoipd)
+		$(multilib_native_use_enable doc doxygen-doc)
+		$(multilib_native_use_enable introspection)
+		$(multilib_native_use_enable mono)
+		$(multilib_native_use_enable python)
+		$(multilib_native_use_enable test tests)
+	)
+
+	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
+
+	myconf+=( $(multilib_native_use_enable qt5) )
+
+	econf "${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
+		docinto html
+		dodoc -r doxygen/html/.
+		insinto /usr/share/devhelp/books/avahi
+		doins avahi.devhelp
+	fi
+
+	# The build system creates an empty "/run" directory, so we clean it up here
+	rmdir "${ED}"/run || die
+}
+
+multilib_src_install_all() {
+	if use autoipd; then
+		insinto /lib/rcscripts/net
+		doins "${FILESDIR}"/autoipd.sh
+
+		insinto /lib/netifrc/net
+		newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+	fi
+
+	dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+	find "${ED}" -name '*.la' -type f -delete || die
+}
+
+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/avahi-0.7-python3-gdbm.patch b/net-dns/avahi/files/avahi-0.7-python3-gdbm.patch
new file mode 100644
index 00000000000..3976b8df2e7
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.7-python3-gdbm.patch
@@ -0,0 +1,234 @@
+From 63750f1be96ad08c407193b08bf3b9ee74310e2d Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Tue, 11 Jul 2017 21:52:37 +0200
+Subject: [PATCH] avahi-python: Use the agnostic DBM interface
+
+Also fixes configure failing if Python 3 is the build python and GDBM is
+enabled, since Py3 only has anydbm under the name of 'dbm'.
+
+Not enough to make ServiceTypeDatabase.py compatible with Py3, but it's
+a start.
+---
+ avahi-python/avahi/Makefile.am                | 15 +--------
+ avahi-python/avahi/ServiceTypeDatabase.py.in  | 33 ++++++++++++++-----
+ configure.ac                                  |  9 +++--
+ service-type-database/.gitignore              |  1 -
+ service-type-database/Makefile.am             | 18 +++-------
+ .../{build-db.in => build-db}                 | 13 +++++---
+ 6 files changed, 42 insertions(+), 47 deletions(-)
+ rename service-type-database/{build-db.in => build-db} (87%)
+
+diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am
+index 3eb67d0d..c906b9bf 100644
+--- a/avahi-python/avahi/Makefile.am
++++ b/avahi-python/avahi/Makefile.am
+@@ -25,29 +25,16 @@ avahidir = $(pythondir)/avahi
+ 
+ if HAVE_GDBM
+ nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
+-
+-ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
+-	$(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
+-		-e 's,@DBM\@,gdbm,g' \
+-		-e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \
+-		-e 's,@CHECK_KEY\@,while key is not None:,g' \
+-		-e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \
+-		-e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \
+-	chmod +x $@
+ endif
+ 
+ if HAVE_DBM
+ nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
++endif
+ 
+ ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
+ 	$(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
+-		-e 's,@DBM\@,dbm,g' \
+-		-e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \
+-		-e 's,@CHECK_KEY\@,for key in keys:,g' \
+-		-e 's,@NEXT_KEY\@,,g' \
+ 		-e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \
+ 	chmod +x $@
+-endif
+ 
+ avahi_PYTHON = $(avahi_SCRIPTS)
+ 
+diff --git a/avahi-python/avahi/ServiceTypeDatabase.py.in b/avahi-python/avahi/ServiceTypeDatabase.py.in
+index 4ddd6544..d7f9969b 100644
+--- a/avahi-python/avahi/ServiceTypeDatabase.py.in
++++ b/avahi-python/avahi/ServiceTypeDatabase.py.in
+@@ -17,7 +17,11 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ # USA.
+ 
+-import @DBM@
++try:
++    import anydbm as dbm
++except ImportError:
++    import dbm
++
+ import locale
+ import re
+ 
+@@ -28,7 +32,7 @@ class ServiceTypeDatabase:
+ 
+     def __init__(self, filename = "@pkglibdatadir@/service-types.db"):
+ 
+-        self.db = @DBM@.open(filename, "r")
++        self.db = dbm.open(filename, "r")
+ 
+         l = locale.getlocale(locale.LC_MESSAGES)
+ 
+@@ -90,13 +94,24 @@ class ServiceTypeDatabase:
+ 
+     def __iter__(self):
+ 
+-        @FIRST_KEY@
+-        @CHECK_KEY@
+-
+-            if re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+', key) and not re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+\[.*\]', key):
+-                yield key
+-
+-            @NEXT_KEY@
++        def want_key(key):
++            if not re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+', key):
++                return False
++            if re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+\[.*\]', key):
++                return False
++            return True
++
++        try:
++            key = self.db.firstkey()
++        except AttributeError:
++            for key in self.db.keys():
++                if want_key(key):
++                    yield key
++        else:
++            while key is not None:
++                if want_key(key):
++                    yield key
++                key = self.db.nextkey(key)
+ 
+     def __len__(self):
+ 
+diff --git a/configure.ac b/configure.ac
+index 66789718..fbbf7cf3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -824,11 +824,10 @@ if test "x$HAVE_PYTHON" = "xyes" ; then
+         fi
+ 
+         AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
+-        if test "x$HAVE_GDBM" = "xyes"; then
+-            AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
+-        fi
+-        if test "x$HAVE_DBM" = "xyes"; then
+-            AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
++        if test "x$HAVE_GDBM" = "xyes" || test "x$HAVE_DBM" = "xyes"; then
++            AM_CHECK_PYMOD(anydbm,,,[
++                AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
++            ])
+         fi
+     fi
+ fi
+diff --git a/service-type-database/.gitignore b/service-type-database/.gitignore
+index 581f1929..51b02600 100644
+--- a/service-type-database/.gitignore
++++ b/service-type-database/.gitignore
+@@ -1,4 +1,3 @@
+ Makefile
+ Makefile.in
+ service-types.db
+-build-db
+diff --git a/service-type-database/Makefile.am b/service-type-database/Makefile.am
+index d184fde3..f9fa0825 100644
+--- a/service-type-database/Makefile.am
++++ b/service-type-database/Makefile.am
+@@ -15,7 +15,7 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ # USA.
+ 
+-EXTRA_DIST=build-db.in service-types
++EXTRA_DIST=service-types
+ 
+ pkglibdatadir=$(libdir)/avahi
+ 
+@@ -27,16 +27,11 @@ if HAVE_GDBM
+ noinst_SCRIPTS=build-db
+ pkglibdata_DATA+=service-types.db
+ 
+-build-db: build-db.in
+-	$(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
+-	    -e 's,@DBM\@,gdbm,g' $< > $@ && \
+-	chmod +x $@
+-
+-service-types.db: service-types build-db
++service-types.db: service-types
+ 	$(AM_V_GEN)$(PYTHON) build-db $< $@.coming && \
+ 	mv $@.coming $@
+ 
+-CLEANFILES = service-types.db build-db
++CLEANFILES = service-types.db
+ 
+ endif
+ if HAVE_DBM
+@@ -44,11 +39,6 @@ if HAVE_DBM
+ noinst_SCRIPTS=build-db
+ pkglibdata_DATA+=service-types.db.pag service-types.db.dir
+ 
+-build-db: build-db.in
+-	$(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
+-	    -e 's,@DBM\@,dbm,g' $< > $@ && \
+-	chmod +x $@
+-
+ service-types.db.pag: service-types.db
+ 	$(AM_V_GEN)mv service-types.db.coming.pag service-types.db.pag
+ service-types.db.dir: service-types.db
+@@ -57,7 +47,7 @@ service-types.db: service-types build-db
+ 	$(AM_V_GEN)$(PYTHON) build-db $< $@.coming && \
+ 	if test -f "$@.coming"; then mv $@.coming $@; fi
+ 
+-CLEANFILES = service-types.db* build-db
++CLEANFILES = service-types.db*
+ 
+ endif
+ endif
+diff --git a/service-type-database/build-db.in b/service-type-database/build-db
+similarity index 87%
+rename from service-type-database/build-db.in
+rename to service-type-database/build-db
+index 4cda4253..78ee892f 100755
+--- a/service-type-database/build-db.in
++++ b/service-type-database/build-db
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python
+ # -*-python-*-
+ # This file is part of avahi.
+ #
+@@ -17,7 +17,12 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ # USA.
+ 
+-import @DBM@, sys
++try:
++    import anydbm as dbm
++except ImportError:
++    import dbm
++
++import sys
+ 
+ if len(sys.argv) > 1:
+     infn = sys.argv[1]
+@@ -29,9 +34,9 @@ if len(sys.argv) > 2:
+ else:
+     outfn = infn + ".db"
+ 
+-db = @DBM@.open(outfn, "n")
++db = dbm.open(outfn, "n")
+ 
+-for ln in file(infn, "r"):
++for ln in open(infn, "r"):
+     ln = ln.strip(" \r\n\t")
+     
+     if ln == "" or ln.startswith("#"):

diff --git a/net-dns/avahi/files/avahi-0.7-python3-unittest.patch b/net-dns/avahi/files/avahi-0.7-python3-unittest.patch
new file mode 100644
index 00000000000..9d735a1780c
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.7-python3-unittest.patch
@@ -0,0 +1,151 @@
+From 62fe263662b52a462895fd8d21cf29b2fa22fe86 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 27 Apr 2018 11:10:57 +0100
+Subject: [PATCH] avahi-python: Add a unit test for string and bytestring
+ conversions
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ .gitignore                     |  1 +
+ avahi-python/avahi/.gitignore  |  5 ++
+ avahi-python/avahi/Makefile.am |  7 +++
+ avahi-python/avahi/test.py     | 85 ++++++++++++++++++++++++++++++++++
+ 4 files changed, 98 insertions(+)
+ create mode 100755 avahi-python/avahi/test.py
+
+diff --git a/.gitignore b/.gitignore
+index beab8d94..06565f06 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -32,3 +32,4 @@ ltmain.sh
+ missing
+ py-compile
+ stamp-h1
++test-driver
+diff --git a/avahi-python/avahi/.gitignore b/avahi-python/avahi/.gitignore
+index 118a34de..9b0f6e3c 100644
+--- a/avahi-python/avahi/.gitignore
++++ b/avahi-python/avahi/.gitignore
+@@ -1 +1,6 @@
++*.log
++*.pyc
++*.pyo
++*.trs
+ ServiceTypeDatabase.py
++__pycache__/
+diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am
+index 3eb67d0d..cf527aff 100644
+--- a/avahi-python/avahi/Makefile.am
++++ b/avahi-python/avahi/Makefile.am
+@@ -16,6 +16,11 @@
+ # USA.
+ 
+ EXTRA_DIST = __init__.py ServiceTypeDatabase.py.in
++EXTRA_DIST += test.py
++
++TESTS =
++TEST_EXTENSIONS = .py
++PY_LOG_COMPILER = $(PYTHON)
+ 
+ pkglibdatadir=$(libdir)/avahi
+ 
+@@ -55,6 +60,8 @@ if HAVE_PYTHON_DBUS
+ 
+ avahi_PYTHON += __init__.py
+ 
++TESTS += test.py
++
+ endif
+ endif
+ 
+diff --git a/avahi-python/avahi/test.py b/avahi-python/avahi/test.py
+new file mode 100755
+index 00000000..7afc4809
+--- /dev/null
++++ b/avahi-python/avahi/test.py
+@@ -0,0 +1,85 @@
++#!/usr/bin/python
++#
++# Copyright 2018 Simon McVittie
++#
++# This file is part of avahi.
++#
++# avahi is free software; you can redistribute it and/or modify it
++# under the terms of the GNU Lesser General Public License as
++# published by the Free Software Foundation; either version 2 of the
++# License, or (at your option) any later version.
++#
++# avahi is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
++# License for more details.
++#
++# You should have received a copy of the GNU Lesser General Public
++# License along with avahi; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
++# USA.
++
++import os
++import os.path
++import sys
++import unittest
++from collections import OrderedDict
++
++sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
++
++import avahi
++import dbus
++
++class TestUtilityMethods(unittest.TestCase):
++    def test_byte_array_to_string(self):
++        self.assertEqual(
++            avahi.byte_array_to_string([1, 2, 127, 128]),
++            '....')
++        self.assertEqual(
++            avahi.byte_array_to_string([ord('a'), ord(' '), ord('b')]),
++            'a b')
++
++    def test_txt_array_to_string_array(self):
++        self.assertEqual(
++            avahi.txt_array_to_string_array([[1, 2], [ord('a'), ord('b')]]),
++            ['..', 'ab'])
++
++    def test_string_to_byte_array(self):
++        self.assertEqual(
++            avahi.string_to_byte_array('abc'),
++            [dbus.Byte(97), dbus.Byte(98), dbus.Byte(99)])
++        self.assertIsInstance(
++            avahi.string_to_byte_array('abc')[0],
++            dbus.Byte)
++        self.assertEqual(
++            avahi.string_to_byte_array(b'\x01\xff'),
++            [dbus.Byte(0x01), dbus.Byte(0xff)])
++        self.assertEqual(
++            avahi.string_to_byte_array(u'\u00e1'),
++            [dbus.Byte(0xc3), dbus.Byte(0xa1)])
++
++    def test_string_array_to_txt_array(self):
++        self.assertEqual(
++            avahi.string_array_to_txt_array(['abc', b'\x01', u'\u00e1']),
++            [
++                [dbus.Byte(97), dbus.Byte(98), dbus.Byte(99)],
++                [dbus.Byte(0x01)],
++                [dbus.Byte(0xc3), dbus.Byte(0xa1)]])
++        self.assertIsInstance(
++            avahi.string_array_to_txt_array(['abc'])[0][0],
++            dbus.Byte)
++
++    def test_dict_to_txt_array(self):
++        self.assertEqual(
++            avahi.dict_to_txt_array(
++                OrderedDict((('a', 'abc'), ('b', b'\x01'), ('c', u'\u00e1')))),
++            [
++                [dbus.Byte(97), dbus.Byte(ord('=')), dbus.Byte(97), dbus.Byte(98), dbus.Byte(99)],
++                [dbus.Byte(98), dbus.Byte(ord('=')), dbus.Byte(0x01)],
++                [dbus.Byte(99), dbus.Byte(ord('=')), dbus.Byte(0xc3), dbus.Byte(0xa1)]])
++        self.assertIsInstance(
++            avahi.dict_to_txt_array({'a': 'abc'})[0][0],
++            dbus.Byte)
++
++if __name__ == '__main__':
++    unittest.main()

diff --git a/net-dns/avahi/files/avahi-0.7-python3.patch b/net-dns/avahi/files/avahi-0.7-python3.patch
new file mode 100644
index 00000000000..a4bb3402996
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.7-python3.patch
@@ -0,0 +1,94 @@
+From 169e85dbc13dcaae8a699618883e512614f540b7 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 27 Apr 2018 11:09:07 +0100
+Subject: [PATCH] avahi-python: Encode unicode strings as UTF-8
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Previously, we would effectively encode anything representable in
+Latin-1 as Latin-1, and crash on anything not representable in Latin-1:
+
+>>> import avahi
+>>> avahi.string_to_byte_array(u'©')
+[dbus.Byte(169)]
+>>> avahi.string_to_byte_array(u'\ufeff')
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+  File "/usr/lib/python2.7/dist-packages/avahi/__init__.py", line 94, in string_to_byte_array
+    r.append(dbus.Byte(ord(c)))
+ValueError: Integer outside range 0-255
+
+This is particularly important for Python 3, where the str type
+is a Unicode string.
+
+The b'' syntax for bytestrings is supported since at least Python 2.7.
+
+These functions now accept either Unicode strings (Python 2 unicode,
+Python 3 str), which are encoded in UTF-8, or bytestrings
+(Python 2 str, Python 3 bytes) which are taken as-is.
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ avahi-python/avahi/__init__.py | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/avahi-python/avahi/__init__.py b/avahi-python/avahi/__init__.py
+index 7b450293..02305b02 100644
+--- a/avahi-python/avahi/__init__.py
++++ b/avahi-python/avahi/__init__.py
+@@ -17,6 +17,8 @@
+ 
+ # Some definitions matching those in avahi-common/defs.h
+ 
++import sys
++
+ import dbus
+ 
+ SERVER_INVALID, SERVER_REGISTERING, SERVER_RUNNING, SERVER_COLLISION, SERVER_FAILURE = range(0, 5)
+@@ -66,6 +68,9 @@
+ DBUS_INTERFACE_SERVICE_RESOLVER = DBUS_NAME + ".ServiceResolver"
+ DBUS_INTERFACE_RECORD_BROWSER = DBUS_NAME + ".RecordBrowser"
+ 
++if sys.version_info[0] >= 3:
++    unicode = str
++
+ def byte_array_to_string(s):
+     r = ""
+     
+@@ -86,12 +91,19 @@ def txt_array_to_string_array(t):
+ 
+     return l
+ 
+-
+ def string_to_byte_array(s):
++    if isinstance(s, unicode):
++        s = s.encode('utf-8')
++
+     r = []
+ 
+     for c in s:
+-        r.append(dbus.Byte(ord(c)))
++        if isinstance(c, int):
++            # Python 3: iterating over bytes yields ints
++            r.append(dbus.Byte(c))
++        else:
++            # Python 2: iterating over str yields str
++            r.append(dbus.Byte(ord(c)))
+ 
+     return r
+ 
+@@ -107,6 +119,12 @@ def dict_to_txt_array(txt_dict):
+     l = []
+ 
+     for k,v in txt_dict.items():
+-        l.append(string_to_byte_array("%s=%s" % (k,v)))
++        if isinstance(k, unicode):
++            k = k.encode('utf-8')
++
++        if isinstance(v, unicode):
++            v = v.encode('utf-8')
++
++        l.append(string_to_byte_array(b"%s=%s" % (k,v)))
+ 
+     return l

diff --git a/net-dns/avahi/files/avahi-0.7-remove-empty-avahi_discover.patch b/net-dns/avahi/files/avahi-0.7-remove-empty-avahi_discover.patch
new file mode 100644
index 00000000000..702499e2218
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.7-remove-empty-avahi_discover.patch
@@ -0,0 +1,77 @@
+From ffb19d8f3c7f1fe4f31f79f8601dd3079730401b Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 27 Apr 2018 09:01:13 +0100
+Subject: [PATCH] Remove empty avahi_discover Python module
+
+The avahi-discover tool no longer has any code outside its main
+executable, so it does not need to install library modules. Its only
+library code was avahi_discover.SimpleGladeApp, which was removed
+in 2009.
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ avahi-python/avahi-discover/Makefile.am |  6 ------
+ avahi-python/avahi-discover/__init__.py | 18 ------------------
+ 2 files changed, 24 deletions(-)
+ delete mode 100755 avahi-python/avahi-discover/__init__.py
+
+diff --git a/avahi-python/avahi-discover/Makefile.am b/avahi-python/avahi-discover/Makefile.am
+index 5fc4b25f..bb4d7172 100644
+--- a/avahi-python/avahi-discover/Makefile.am
++++ b/avahi-python/avahi-discover/Makefile.am
+@@ -18,7 +18,6 @@
+ AM_CFLAGS=-I$(top_srcdir)
+ 
+ EXTRA_DIST = \
+-	__init__.py \
+ 	avahi-discover.py \
+ 	avahi-discover.desktop.in.in
+ 
+@@ -31,15 +30,11 @@ pythonscripts =
+ desktopdir = $(datadir)/applications
+ desktop_DATA =
+ 
+-avahi_discoverdir = $(pythondir)/avahi_discover
+-avahi_discover_PYTHON =
+-
+ if HAVE_GDBM
+ pythonscripts += \
+ 	avahi-discover
+ desktop_DATA += avahi-discover.desktop
+ @INTLTOOL_DESKTOP_RULE@
+-avahi_discover_PYTHON += __init__.py
+ endif
+ 
+ if HAVE_DBM
+@@ -47,7 +42,6 @@ pythonscripts += \
+ 	avahi-discover
+ desktop_DATA += avahi-discover.desktop
+ @INTLTOOL_DESKTOP_RULE@
+-avahi_discover_PYTHON += __init__.py
+ endif
+ 
+ avahi-discover.desktop.in: avahi-discover.desktop.in.in
+diff --git a/avahi-python/avahi-discover/__init__.py b/avahi-python/avahi-discover/__init__.py
+deleted file mode 100755
+index 6f3ec7f9..00000000
+--- a/avahi-python/avahi-discover/__init__.py
++++ /dev/null
+@@ -1,18 +0,0 @@
+-#!@PYTHON@
+-# -*-python-*-
+-# This file is part of avahi.
+-#
+-# avahi is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU Lesser General Public License as
+-# published by the Free Software Foundation; either version 2 of the
+-# License, or (at your option) any later version.
+-#
+-# avahi is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+-# License for more details.
+-#
+-# You should have received a copy of the GNU Lesser General Public
+-# License along with avahi; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+-# USA.


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
@ 2020-09-19 11:28 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2020-09-19 11:28 UTC (permalink / raw
  To: gentoo-commits

commit:     2e374054434b2d1445670a429fb6cc53c473304b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 19 10:46:37 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 11:28:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e374054

net-dns/avahi: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 net-dns/avahi/Manifest                             |   1 -
 net-dns/avahi/avahi-0.7-r6.ebuild                  | 215 -------------------
 net-dns/avahi/avahi-0.7-r7.ebuild                  | 212 -------------------
 net-dns/avahi/files/avahi-0.7-CVE-2017-6519.patch  |  45 ----
 net-dns/avahi/files/avahi-0.7-python3-gdbm.patch   | 234 ---------------------
 .../avahi/files/avahi-0.7-python3-unittest.patch   | 151 -------------
 net-dns/avahi/files/avahi-0.7-python3.patch        |  94 ---------
 net-dns/avahi/files/avahi-0.7-qt5.patch            | 187 ----------------
 .../avahi-0.7-remove-empty-avahi_discover.patch    |  77 -------
 9 files changed, 1216 deletions(-)

diff --git a/net-dns/avahi/Manifest b/net-dns/avahi/Manifest
index 8c49f959d60..8827967c8d2 100644
--- a/net-dns/avahi/Manifest
+++ b/net-dns/avahi/Manifest
@@ -1,2 +1 @@
-DIST avahi-0.7.tar.gz 940047 BLAKE2B 8299577bf27ee65fad5d743dbf94202b148a6fc86825cae303f94c44482eea07cf6570d970ca286e81a787d6a64598b7123f2ac17a259ddc50ef431b9c94b530 SHA512 61f656da7614d8cca1862180038f571db3474c84f05db4d3509f614cdbf8b1a1047661b7e24d63682d5b48ed1bfa1b08b3c9e6dbe9222bcd62d99bc168a11abe
 DIST avahi-0.8.tar.gz 953319 BLAKE2B ddede1b8790ff3057ea5f4bb710e95578229e078a7abac83121e043017dda1ab3d971c723f920fdd4f3d98b88bd2cf21f9645bec1b7bbd2ea194cb399a5f5b46 SHA512 27bba9a551152dfc7e721f326042e7bfce55d227044a6cbaee04d6fb0e3f59c36e159c2b7a4dd42d1c955cdf37cc1c303e91991c08928bbded91d796e9a22abe

diff --git a/net-dns/avahi/avahi-0.7-r6.ebuild b/net-dns/avahi/avahi-0.7-r6.ebuild
deleted file mode 100644
index c1aaac9fe64..00000000000
--- a/net-dns/avahi/avahi-0.7-r6.ebuild
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="gdbm"
-
-inherit autotools eutils flag-o-matic ltprune 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"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
-IUSE="autoipd dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt5 selinux test"
-RESTRICT="!test? ( 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}] )
-	qt5? ( dev-qt/qtcore:5 )
-	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:2 )
-	)
-	python? (
-		${PYTHON_DEPS}
-		dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
-		introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
-	)
-"
-
-DEPEND="
-	${COMMON_DEPEND}
-	dev-util/glib-utils
-	doc? ( app-doc/doxygen )
-	app-doc/xmltoman
-	dev-util/intltool
-	virtual/pkgconfig
-"
-
-RDEPEND="
-	${COMMON_DEPEND}
-	howl-compat? ( !net-misc/howl )
-	mdnsresponder-compat? ( !net-misc/mDNSResponder )
-	selinux? ( sec-policy/selinux-avahi )
-"
-
-MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
-
-PATCHES=(
-	"${FILESDIR}/${P}-qt5.patch"
-	"${FILESDIR}/${P}-CVE-2017-6519.patch"
-)
-
-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() {
-	default
-
-	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
-
-	# 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 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
-
-	myconf+=( $(multilib_native_use_enable qt5) )
-
-	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 \
-		--disable-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}"
-	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
-		docinto html
-		dodoc -r doxygen/html/.
-		insinto /usr/share/devhelp/books/avahi
-		doins avahi.devhelp
-	fi
-
-	# The build system creates an empty "/run" directory, so we clean it up here
-	rmdir "${ED}"/run
-}
-
-multilib_src_install_all() {
-	if use autoipd; then
-		insinto /lib/rcscripts/net
-		doins "${FILESDIR}"/autoipd.sh
-
-		insinto /lib/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-r7.ebuild b/net-dns/avahi/avahi-0.7-r7.ebuild
deleted file mode 100644
index e9e84e60c39..00000000000
--- a/net-dns/avahi/avahi-0.7-r7.ebuild
+++ /dev/null
@@ -1,212 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-PYTHON_COMPAT=( python3_{6,7} )
-PYTHON_REQ_USE="gdbm"
-inherit autotools flag-o-matic multilib-minimal mono-env python-r1 systemd
-
-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"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt5 selinux systemd test"
-
-REQUIRED_USE="
-	python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
-	mono? ( dbus )
-	howl-compat? ( dbus )
-	mdnsresponder-compat? ( dbus )
-	systemd? ( dbus )
-"
-
-RESTRICT="!test? ( test )"
-
-DEPEND="
-	dev-libs/libdaemon
-	dev-libs/expat
-	dev-libs/glib:2[${MULTILIB_USEDEP}]
-	gdbm? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
-	qt5? ( dev-qt/qtcore:5 )
-	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:2 )
-	)
-	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}]
-	)
-"
-RDEPEND="
-	acct-user/avahi
-	acct-group/avahi
-	acct-group/netdev
-	autoipd? (
-		acct-user/avahi-autoipd
-		acct-group/avahi-autoipd
-	)
-	${DEPEND}
-	howl-compat? ( !net-misc/howl )
-	mdnsresponder-compat? ( !net-misc/mDNSResponder )
-	selinux? ( sec-policy/selinux-avahi )
-"
-BDEPEND="
-	dev-util/glib-utils
-	doc? ( app-doc/doxygen )
-	app-doc/xmltoman
-	dev-util/intltool
-	virtual/pkgconfig
-"
-
-MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
-
-PATCHES=(
-	"${FILESDIR}/${P}-qt5.patch"
-	"${FILESDIR}/${P}-CVE-2017-6519.patch"
-	"${FILESDIR}/${P}-remove-empty-avahi_discover.patch"
-	"${FILESDIR}/${P}-python3.patch"
-	"${FILESDIR}/${P}-python3-unittest.patch"
-	"${FILESDIR}/${P}-python3-gdbm.patch"
-)
-
-pkg_setup() {
-	use mono && mono-env_pkg_setup
-	use python || use bookmarks && python_setup
-}
-
-src_prepare() {
-	default
-
-	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
-
-	eautoreconf
-
-	# bundled manpages
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	local myconf=(
-		--disable-monodoc
-		--disable-python-dbus
-		--disable-qt3
-		--disable-qt4
-		--disable-static
-		--enable-manpages
-		--enable-glib
-		--enable-gobject
-		--enable-xmltoman
-		--localstatedir="${EPREFIX}/var"
-		--with-distro=gentoo
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		$(use_enable dbus)
-		$(use_enable gdbm)
-		$(use_enable gtk)
-		$(use_enable gtk3)
-		$(use_enable howl-compat compat-howl)
-		$(use_enable mdnsresponder-compat compat-libdns_sd)
-		$(use_enable nls)
-		$(multilib_native_use_enable autoipd)
-		$(multilib_native_use_enable doc doxygen-doc)
-		$(multilib_native_use_enable introspection)
-		$(multilib_native_use_enable mono)
-		$(multilib_native_use_enable python)
-		$(multilib_native_use_enable test tests)
-	)
-
-	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
-
-	myconf+=( $(multilib_native_use_enable qt5) )
-
-	econf "${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
-		docinto html
-		dodoc -r doxygen/html/.
-		insinto /usr/share/devhelp/books/avahi
-		doins avahi.devhelp
-	fi
-
-	# The build system creates an empty "/run" directory, so we clean it up here
-	rmdir "${ED}"/run || die
-}
-
-multilib_src_install_all() {
-	if use autoipd; then
-		insinto /lib/rcscripts/net
-		doins "${FILESDIR}"/autoipd.sh
-
-		insinto /lib/netifrc/net
-		newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
-	fi
-
-	dodoc docs/{AUTHORS,NEWS,README,TODO}
-
-	find "${ED}" -name '*.la' -type f -delete || die
-}
-
-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
-
-	systemd_reenable avahi-daemon.service
-}

diff --git a/net-dns/avahi/files/avahi-0.7-CVE-2017-6519.patch b/net-dns/avahi/files/avahi-0.7-CVE-2017-6519.patch
deleted file mode 100644
index 5fadfbc2892..00000000000
--- a/net-dns/avahi/files/avahi-0.7-CVE-2017-6519.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From e111def44a7df4624a4aa3f85fe98054bffb6b4f Mon Sep 17 00:00:00 2001
-From: Trent Lloyd <trent@lloyd.id.au>
-Date: Sat, 22 Dec 2018 09:06:07 +0800
-Subject: [PATCH] Drop legacy unicast queries from address not on local link
-
-When handling legacy unicast queries, ensure that the source IP is
-inside a subnet on the local link, otherwise drop the packet.
-
-Fixes #145
-Fixes #203
-CVE-2017-6519
-CVE-2018-100084
----
- avahi-core/server.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/avahi-core/server.c b/avahi-core/server.c
-index a2cb19a..a2580e3 100644
---- a/avahi-core/server.c
-+++ b/avahi-core/server.c
-@@ -930,6 +930,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
- 
-     if (avahi_dns_packet_is_query(p)) {
-         int legacy_unicast = 0;
-+        char t[AVAHI_ADDRESS_STR_MAX];
- 
-         /* For queries EDNS0 might allow ARCOUNT != 0. We ignore the
-          * AR section completely here, so far. Until the day we add
-@@ -947,6 +948,13 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
-             legacy_unicast = 1;
-         }
- 
-+        if (!is_mdns_mcast_address(dst_address) &&
-+            !avahi_interface_address_on_link(i, src_address)) {
-+
-+            avahi_log_debug("Received non-local unicast query from host %s on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), i->hardware->name, i->protocol);
-+            return;
-+        }
-+
-         if (legacy_unicast)
-             reflect_legacy_unicast_query_packet(s, p, i, src_address, port);
- 
--- 
-2.21.0
-

diff --git a/net-dns/avahi/files/avahi-0.7-python3-gdbm.patch b/net-dns/avahi/files/avahi-0.7-python3-gdbm.patch
deleted file mode 100644
index 3976b8df2e7..00000000000
--- a/net-dns/avahi/files/avahi-0.7-python3-gdbm.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From 63750f1be96ad08c407193b08bf3b9ee74310e2d Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
-Date: Tue, 11 Jul 2017 21:52:37 +0200
-Subject: [PATCH] avahi-python: Use the agnostic DBM interface
-
-Also fixes configure failing if Python 3 is the build python and GDBM is
-enabled, since Py3 only has anydbm under the name of 'dbm'.
-
-Not enough to make ServiceTypeDatabase.py compatible with Py3, but it's
-a start.
----
- avahi-python/avahi/Makefile.am                | 15 +--------
- avahi-python/avahi/ServiceTypeDatabase.py.in  | 33 ++++++++++++++-----
- configure.ac                                  |  9 +++--
- service-type-database/.gitignore              |  1 -
- service-type-database/Makefile.am             | 18 +++-------
- .../{build-db.in => build-db}                 | 13 +++++---
- 6 files changed, 42 insertions(+), 47 deletions(-)
- rename service-type-database/{build-db.in => build-db} (87%)
-
-diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am
-index 3eb67d0d..c906b9bf 100644
---- a/avahi-python/avahi/Makefile.am
-+++ b/avahi-python/avahi/Makefile.am
-@@ -25,29 +25,16 @@ avahidir = $(pythondir)/avahi
- 
- if HAVE_GDBM
- nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
--
--ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
--	$(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
--		-e 's,@DBM\@,gdbm,g' \
--		-e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \
--		-e 's,@CHECK_KEY\@,while key is not None:,g' \
--		-e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \
--		-e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \
--	chmod +x $@
- endif
- 
- if HAVE_DBM
- nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
-+endif
- 
- ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
- 	$(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
--		-e 's,@DBM\@,dbm,g' \
--		-e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \
--		-e 's,@CHECK_KEY\@,for key in keys:,g' \
--		-e 's,@NEXT_KEY\@,,g' \
- 		-e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \
- 	chmod +x $@
--endif
- 
- avahi_PYTHON = $(avahi_SCRIPTS)
- 
-diff --git a/avahi-python/avahi/ServiceTypeDatabase.py.in b/avahi-python/avahi/ServiceTypeDatabase.py.in
-index 4ddd6544..d7f9969b 100644
---- a/avahi-python/avahi/ServiceTypeDatabase.py.in
-+++ b/avahi-python/avahi/ServiceTypeDatabase.py.in
-@@ -17,7 +17,11 @@
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- # USA.
- 
--import @DBM@
-+try:
-+    import anydbm as dbm
-+except ImportError:
-+    import dbm
-+
- import locale
- import re
- 
-@@ -28,7 +32,7 @@ class ServiceTypeDatabase:
- 
-     def __init__(self, filename = "@pkglibdatadir@/service-types.db"):
- 
--        self.db = @DBM@.open(filename, "r")
-+        self.db = dbm.open(filename, "r")
- 
-         l = locale.getlocale(locale.LC_MESSAGES)
- 
-@@ -90,13 +94,24 @@ class ServiceTypeDatabase:
- 
-     def __iter__(self):
- 
--        @FIRST_KEY@
--        @CHECK_KEY@
--
--            if re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+', key) and not re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+\[.*\]', key):
--                yield key
--
--            @NEXT_KEY@
-+        def want_key(key):
-+            if not re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+', key):
-+                return False
-+            if re.search('_[a-zA-Z0-9-]+\._[a-zA-Z0-9-]+\[.*\]', key):
-+                return False
-+            return True
-+
-+        try:
-+            key = self.db.firstkey()
-+        except AttributeError:
-+            for key in self.db.keys():
-+                if want_key(key):
-+                    yield key
-+        else:
-+            while key is not None:
-+                if want_key(key):
-+                    yield key
-+                key = self.db.nextkey(key)
- 
-     def __len__(self):
- 
-diff --git a/configure.ac b/configure.ac
-index 66789718..fbbf7cf3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -824,11 +824,10 @@ if test "x$HAVE_PYTHON" = "xyes" ; then
-         fi
- 
-         AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
--        if test "x$HAVE_GDBM" = "xyes"; then
--            AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
--        fi
--        if test "x$HAVE_DBM" = "xyes"; then
--            AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
-+        if test "x$HAVE_GDBM" = "xyes" || test "x$HAVE_DBM" = "xyes"; then
-+            AM_CHECK_PYMOD(anydbm,,,[
-+                AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
-+            ])
-         fi
-     fi
- fi
-diff --git a/service-type-database/.gitignore b/service-type-database/.gitignore
-index 581f1929..51b02600 100644
---- a/service-type-database/.gitignore
-+++ b/service-type-database/.gitignore
-@@ -1,4 +1,3 @@
- Makefile
- Makefile.in
- service-types.db
--build-db
-diff --git a/service-type-database/Makefile.am b/service-type-database/Makefile.am
-index d184fde3..f9fa0825 100644
---- a/service-type-database/Makefile.am
-+++ b/service-type-database/Makefile.am
-@@ -15,7 +15,7 @@
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- # USA.
- 
--EXTRA_DIST=build-db.in service-types
-+EXTRA_DIST=service-types
- 
- pkglibdatadir=$(libdir)/avahi
- 
-@@ -27,16 +27,11 @@ if HAVE_GDBM
- noinst_SCRIPTS=build-db
- pkglibdata_DATA+=service-types.db
- 
--build-db: build-db.in
--	$(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
--	    -e 's,@DBM\@,gdbm,g' $< > $@ && \
--	chmod +x $@
--
--service-types.db: service-types build-db
-+service-types.db: service-types
- 	$(AM_V_GEN)$(PYTHON) build-db $< $@.coming && \
- 	mv $@.coming $@
- 
--CLEANFILES = service-types.db build-db
-+CLEANFILES = service-types.db
- 
- endif
- if HAVE_DBM
-@@ -44,11 +39,6 @@ if HAVE_DBM
- noinst_SCRIPTS=build-db
- pkglibdata_DATA+=service-types.db.pag service-types.db.dir
- 
--build-db: build-db.in
--	$(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
--	    -e 's,@DBM\@,dbm,g' $< > $@ && \
--	chmod +x $@
--
- service-types.db.pag: service-types.db
- 	$(AM_V_GEN)mv service-types.db.coming.pag service-types.db.pag
- service-types.db.dir: service-types.db
-@@ -57,7 +47,7 @@ service-types.db: service-types build-db
- 	$(AM_V_GEN)$(PYTHON) build-db $< $@.coming && \
- 	if test -f "$@.coming"; then mv $@.coming $@; fi
- 
--CLEANFILES = service-types.db* build-db
-+CLEANFILES = service-types.db*
- 
- endif
- endif
-diff --git a/service-type-database/build-db.in b/service-type-database/build-db
-similarity index 87%
-rename from service-type-database/build-db.in
-rename to service-type-database/build-db
-index 4cda4253..78ee892f 100755
---- a/service-type-database/build-db.in
-+++ b/service-type-database/build-db
-@@ -1,4 +1,4 @@
--#!@PYTHON@
-+#!/usr/bin/env python
- # -*-python-*-
- # This file is part of avahi.
- #
-@@ -17,7 +17,12 @@
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- # USA.
- 
--import @DBM@, sys
-+try:
-+    import anydbm as dbm
-+except ImportError:
-+    import dbm
-+
-+import sys
- 
- if len(sys.argv) > 1:
-     infn = sys.argv[1]
-@@ -29,9 +34,9 @@ if len(sys.argv) > 2:
- else:
-     outfn = infn + ".db"
- 
--db = @DBM@.open(outfn, "n")
-+db = dbm.open(outfn, "n")
- 
--for ln in file(infn, "r"):
-+for ln in open(infn, "r"):
-     ln = ln.strip(" \r\n\t")
-     
-     if ln == "" or ln.startswith("#"):

diff --git a/net-dns/avahi/files/avahi-0.7-python3-unittest.patch b/net-dns/avahi/files/avahi-0.7-python3-unittest.patch
deleted file mode 100644
index 9d735a1780c..00000000000
--- a/net-dns/avahi/files/avahi-0.7-python3-unittest.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From 62fe263662b52a462895fd8d21cf29b2fa22fe86 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@debian.org>
-Date: Fri, 27 Apr 2018 11:10:57 +0100
-Subject: [PATCH] avahi-python: Add a unit test for string and bytestring
- conversions
-
-Signed-off-by: Simon McVittie <smcv@debian.org>
----
- .gitignore                     |  1 +
- avahi-python/avahi/.gitignore  |  5 ++
- avahi-python/avahi/Makefile.am |  7 +++
- avahi-python/avahi/test.py     | 85 ++++++++++++++++++++++++++++++++++
- 4 files changed, 98 insertions(+)
- create mode 100755 avahi-python/avahi/test.py
-
-diff --git a/.gitignore b/.gitignore
-index beab8d94..06565f06 100644
---- a/.gitignore
-+++ b/.gitignore
-@@ -32,3 +32,4 @@ ltmain.sh
- missing
- py-compile
- stamp-h1
-+test-driver
-diff --git a/avahi-python/avahi/.gitignore b/avahi-python/avahi/.gitignore
-index 118a34de..9b0f6e3c 100644
---- a/avahi-python/avahi/.gitignore
-+++ b/avahi-python/avahi/.gitignore
-@@ -1 +1,6 @@
-+*.log
-+*.pyc
-+*.pyo
-+*.trs
- ServiceTypeDatabase.py
-+__pycache__/
-diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am
-index 3eb67d0d..cf527aff 100644
---- a/avahi-python/avahi/Makefile.am
-+++ b/avahi-python/avahi/Makefile.am
-@@ -16,6 +16,11 @@
- # USA.
- 
- EXTRA_DIST = __init__.py ServiceTypeDatabase.py.in
-+EXTRA_DIST += test.py
-+
-+TESTS =
-+TEST_EXTENSIONS = .py
-+PY_LOG_COMPILER = $(PYTHON)
- 
- pkglibdatadir=$(libdir)/avahi
- 
-@@ -55,6 +60,8 @@ if HAVE_PYTHON_DBUS
- 
- avahi_PYTHON += __init__.py
- 
-+TESTS += test.py
-+
- endif
- endif
- 
-diff --git a/avahi-python/avahi/test.py b/avahi-python/avahi/test.py
-new file mode 100755
-index 00000000..7afc4809
---- /dev/null
-+++ b/avahi-python/avahi/test.py
-@@ -0,0 +1,85 @@
-+#!/usr/bin/python
-+#
-+# Copyright 2018 Simon McVittie
-+#
-+# This file is part of avahi.
-+#
-+# avahi is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU Lesser General Public License as
-+# published by the Free Software Foundation; either version 2 of the
-+# License, or (at your option) any later version.
-+#
-+# avahi is distributed in the hope that it will be useful, but WITHOUT
-+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-+# License for more details.
-+#
-+# You should have received a copy of the GNU Lesser General Public
-+# License along with avahi; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-+# USA.
-+
-+import os
-+import os.path
-+import sys
-+import unittest
-+from collections import OrderedDict
-+
-+sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
-+
-+import avahi
-+import dbus
-+
-+class TestUtilityMethods(unittest.TestCase):
-+    def test_byte_array_to_string(self):
-+        self.assertEqual(
-+            avahi.byte_array_to_string([1, 2, 127, 128]),
-+            '....')
-+        self.assertEqual(
-+            avahi.byte_array_to_string([ord('a'), ord(' '), ord('b')]),
-+            'a b')
-+
-+    def test_txt_array_to_string_array(self):
-+        self.assertEqual(
-+            avahi.txt_array_to_string_array([[1, 2], [ord('a'), ord('b')]]),
-+            ['..', 'ab'])
-+
-+    def test_string_to_byte_array(self):
-+        self.assertEqual(
-+            avahi.string_to_byte_array('abc'),
-+            [dbus.Byte(97), dbus.Byte(98), dbus.Byte(99)])
-+        self.assertIsInstance(
-+            avahi.string_to_byte_array('abc')[0],
-+            dbus.Byte)
-+        self.assertEqual(
-+            avahi.string_to_byte_array(b'\x01\xff'),
-+            [dbus.Byte(0x01), dbus.Byte(0xff)])
-+        self.assertEqual(
-+            avahi.string_to_byte_array(u'\u00e1'),
-+            [dbus.Byte(0xc3), dbus.Byte(0xa1)])
-+
-+    def test_string_array_to_txt_array(self):
-+        self.assertEqual(
-+            avahi.string_array_to_txt_array(['abc', b'\x01', u'\u00e1']),
-+            [
-+                [dbus.Byte(97), dbus.Byte(98), dbus.Byte(99)],
-+                [dbus.Byte(0x01)],
-+                [dbus.Byte(0xc3), dbus.Byte(0xa1)]])
-+        self.assertIsInstance(
-+            avahi.string_array_to_txt_array(['abc'])[0][0],
-+            dbus.Byte)
-+
-+    def test_dict_to_txt_array(self):
-+        self.assertEqual(
-+            avahi.dict_to_txt_array(
-+                OrderedDict((('a', 'abc'), ('b', b'\x01'), ('c', u'\u00e1')))),
-+            [
-+                [dbus.Byte(97), dbus.Byte(ord('=')), dbus.Byte(97), dbus.Byte(98), dbus.Byte(99)],
-+                [dbus.Byte(98), dbus.Byte(ord('=')), dbus.Byte(0x01)],
-+                [dbus.Byte(99), dbus.Byte(ord('=')), dbus.Byte(0xc3), dbus.Byte(0xa1)]])
-+        self.assertIsInstance(
-+            avahi.dict_to_txt_array({'a': 'abc'})[0][0],
-+            dbus.Byte)
-+
-+if __name__ == '__main__':
-+    unittest.main()

diff --git a/net-dns/avahi/files/avahi-0.7-python3.patch b/net-dns/avahi/files/avahi-0.7-python3.patch
deleted file mode 100644
index a4bb3402996..00000000000
--- a/net-dns/avahi/files/avahi-0.7-python3.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 169e85dbc13dcaae8a699618883e512614f540b7 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@debian.org>
-Date: Fri, 27 Apr 2018 11:09:07 +0100
-Subject: [PATCH] avahi-python: Encode unicode strings as UTF-8
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Previously, we would effectively encode anything representable in
-Latin-1 as Latin-1, and crash on anything not representable in Latin-1:
-
->>> import avahi
->>> avahi.string_to_byte_array(u'©')
-[dbus.Byte(169)]
->>> avahi.string_to_byte_array(u'\ufeff')
-Traceback (most recent call last):
-  File "<stdin>", line 1, in <module>
-  File "/usr/lib/python2.7/dist-packages/avahi/__init__.py", line 94, in string_to_byte_array
-    r.append(dbus.Byte(ord(c)))
-ValueError: Integer outside range 0-255
-
-This is particularly important for Python 3, where the str type
-is a Unicode string.
-
-The b'' syntax for bytestrings is supported since at least Python 2.7.
-
-These functions now accept either Unicode strings (Python 2 unicode,
-Python 3 str), which are encoded in UTF-8, or bytestrings
-(Python 2 str, Python 3 bytes) which are taken as-is.
-
-Signed-off-by: Simon McVittie <smcv@debian.org>
----
- avahi-python/avahi/__init__.py | 24 +++++++++++++++++++++---
- 1 file changed, 21 insertions(+), 3 deletions(-)
-
-diff --git a/avahi-python/avahi/__init__.py b/avahi-python/avahi/__init__.py
-index 7b450293..02305b02 100644
---- a/avahi-python/avahi/__init__.py
-+++ b/avahi-python/avahi/__init__.py
-@@ -17,6 +17,8 @@
- 
- # Some definitions matching those in avahi-common/defs.h
- 
-+import sys
-+
- import dbus
- 
- SERVER_INVALID, SERVER_REGISTERING, SERVER_RUNNING, SERVER_COLLISION, SERVER_FAILURE = range(0, 5)
-@@ -66,6 +68,9 @@
- DBUS_INTERFACE_SERVICE_RESOLVER = DBUS_NAME + ".ServiceResolver"
- DBUS_INTERFACE_RECORD_BROWSER = DBUS_NAME + ".RecordBrowser"
- 
-+if sys.version_info[0] >= 3:
-+    unicode = str
-+
- def byte_array_to_string(s):
-     r = ""
-     
-@@ -86,12 +91,19 @@ def txt_array_to_string_array(t):
- 
-     return l
- 
--
- def string_to_byte_array(s):
-+    if isinstance(s, unicode):
-+        s = s.encode('utf-8')
-+
-     r = []
- 
-     for c in s:
--        r.append(dbus.Byte(ord(c)))
-+        if isinstance(c, int):
-+            # Python 3: iterating over bytes yields ints
-+            r.append(dbus.Byte(c))
-+        else:
-+            # Python 2: iterating over str yields str
-+            r.append(dbus.Byte(ord(c)))
- 
-     return r
- 
-@@ -107,6 +119,12 @@ def dict_to_txt_array(txt_dict):
-     l = []
- 
-     for k,v in txt_dict.items():
--        l.append(string_to_byte_array("%s=%s" % (k,v)))
-+        if isinstance(k, unicode):
-+            k = k.encode('utf-8')
-+
-+        if isinstance(v, unicode):
-+            v = v.encode('utf-8')
-+
-+        l.append(string_to_byte_array(b"%s=%s" % (k,v)))
- 
-     return l

diff --git a/net-dns/avahi/files/avahi-0.7-qt5.patch b/net-dns/avahi/files/avahi-0.7-qt5.patch
deleted file mode 100644
index aa7e4a5c812..00000000000
--- a/net-dns/avahi/files/avahi-0.7-qt5.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-diff -rupN avahi-0.6.31/avahi-qt/Makefile.am avahi-qt5/avahi-qt/Makefile.am
---- avahi-0.6.31/avahi-qt/Makefile.am	2010-08-25 19:51:39.011153001 -0500
-+++ avahi-qt5/avahi-qt/Makefile.am	2014-10-19 13:55:14.825086832 -0500
-@@ -65,4 +65,26 @@ libavahi_qt4_la_LIBADD = $(AM_LDADD) ../
- libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT4_VERSION_INFO)
- endif
- 
-+if HAVE_QT5
-+
-+avahiqt5includedir=$(includedir)/avahi-qt5
-+avahiqt5include_HEADERS = \
-+	qt-watch.h
-+
-+lib_LTLIBRARIES += \
-+	libavahi-qt5.la
-+
-+BUILT_SOURCES += qt-watch.moc5
-+
-+libavahi_qt5_la_SOURCES = \
-+	qt-watch.cpp
-+
-+qt-watch.moc5: qt-watch.cpp
-+	$(AM_V_GEN)$(MOC_QT5) $^ > $@
-+
-+libavahi_qt5_la_CPPFLAGS = $(AM_CFLAGS) --std=gnu++11 $(QT5_CFLAGS) -DQT5 $(VISIBILITY_HIDDEN_CFLAGS)
-+libavahi_qt5_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT5_LIBS)
-+libavahi_qt5_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_QT5_VERSION_INFO)
-+endif
-+
- CLEANFILES = $(BUILT_SOURCES)
-diff -rupN avahi-0.6.31/avahi-qt/qt-watch.cpp avahi-qt5/avahi-qt/qt-watch.cpp
---- avahi-0.6.31/avahi-qt/qt-watch.cpp	2010-08-25 19:51:39.011153001 -0500
-+++ avahi-qt5/avahi-qt/qt-watch.cpp	2014-10-19 13:56:14.076226518 -0500
-@@ -18,10 +18,10 @@
- ***/
- 
- #include <sys/time.h>
--#ifdef QT4
--#include <Qt/qsocketnotifier.h>
--#include <Qt/qobject.h>
--#include <Qt/qtimer.h>
-+#if defined(QT5) || defined(QT4)
-+#include <QSocketNotifier>
-+#include <QObject>
-+#include <QTimer>
- #else
- #include <qsocketnotifier.h>
- #include <qobject.h>
-@@ -114,7 +114,7 @@ AvahiTimeout::AvahiTimeout(const struct
-     m_callback(callback), m_userdata(userdata)
- {
-     connect(&m_timer, SIGNAL(timeout()), this, SLOT(timeout()));
--#ifdef QT4
-+#if defined(QT5) || defined(QT4)
-     m_timer.setSingleShot(true);
- #endif
-     update(tv);
-@@ -125,7 +125,7 @@ void AvahiTimeout::update(const struct t
-     m_timer.stop();
-     if (tv) {
-     AvahiUsec u = avahi_age(tv)/1000;
--#ifdef QT4
-+#if defined(QT5) || defined(QT4)
-     m_timer.start( (u>0) ? 0 : -u);
- #else
-     m_timer.start( (u>0) ? 0 : -u,true);
-@@ -191,8 +191,10 @@ const AvahiPoll* avahi_qt_poll_get(void)
-     return &qt_poll;
- }
- 
--#ifdef QT4
-+#if defined(QT5)
-+#include "qt-watch.moc5"
-+#elif defined(QT4)
- #include "qt-watch.moc4"
--#else
-+#elif defined(QT3)
- #include "qt-watch.moc3"
- #endif
-diff -rupN avahi-0.6.31/avahi-qt5.pc.in avahi-qt5/avahi-qt5.pc.in
---- avahi-0.6.31/avahi-qt5.pc.in	1969-12-31 18:00:00.000000000 -0600
-+++ avahi-qt5/avahi-qt5.pc.in	2014-10-19 13:55:14.825086832 -0500
-@@ -0,0 +1,11 @@
-+prefix=@prefix@
-+exec_prefix=${prefix}
-+libdir=@libdir@
-+includedir=${prefix}/include
-+
-+Name: avahi-qt5
-+Description: Avahi Multicast DNS Responder (QT5 Support)
-+Version: @PACKAGE_VERSION@
-+Requires: Qt5Core >= 5.0.0
-+Libs: -L${libdir} -lavahi-qt5
-+Cflags: -D_REENTRANT -I${includedir}
-diff -rupN avahi-0.6.31/configure.ac avahi-qt5/configure.ac
---- avahi-0.6.31/configure.ac	2012-02-14 15:44:25.484742099 -0600
-+++ avahi-qt5/configure.ac	2014-10-19 13:55:14.825086832 -0500
-@@ -34,6 +34,7 @@ AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:
- AC_SUBST(LIBAVAHI_GOBJECT_VERSION_INFO, [0:4:0])
- AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:2:0])
- AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:2:0])
-+AC_SUBST(LIBAVAHI_QT5_VERSION_INFO, [1:2:0])
- AC_SUBST(LIBAVAHI_UI_VERSION_INFO, [1:4:1])
- 
- # Do not touch these, since they we took this version-info from upstream HOWL/Bonjour
-@@ -525,6 +526,31 @@ fi
- AM_CONDITIONAL(HAVE_QT4, test "x$HAVE_QT4" = "xyes")
- 
- #
-+# Check for Qt 5
-+#
-+AC_ARG_ENABLE(qt5,
-+        AS_HELP_STRING([--disable-qt5],[Disable building of Qt5Core mainloop integration]),
-+        [case "${enableval}" in
-+                yes) HAVE_QT5=yes ;;
-+                no)  HAVE_QT5=no ;;
-+                *) AC_MSG_ERROR(bad value ${enableval} for --enable-qt5) ;;
-+        esac],
-+        [HAVE_QT5=yes])
-+
-+if test "x$HAVE_QT5" = "xyes" ; then
-+        PKG_CHECK_MODULES( QT5, [ Qt5Core >= 5.0.0 ])
-+        AC_SUBST(QT5_CFLAGS)
-+        AC_SUBST(QT5_LIBS)
-+        QT5_PREFIX="`$PKG_CONFIG --variable=host_bins Qt5Core`"
-+        AC_PATH_PROGS(MOC_QT5, [moc-qt5 moc], no, [$QT5_PREFIX])
-+        if test "$MOC_QT5" = no; then
-+            AC_MSG_ERROR([Could not find QT5 moc])
-+        fi
-+        AC_SUBST(MOC_QT5)
-+fi
-+AM_CONDITIONAL(HAVE_QT5, test "x$HAVE_QT5" = "xyes")
-+
-+#
- # Check for GTK+ 2.0
- #
- AC_ARG_ENABLE(gtk,
-@@ -1157,6 +1183,7 @@ echo "
-     Enable python-dbus:                        ${HAVE_PYTHON_DBUS}
-     Enable QT3:                                ${HAVE_QT3}
-     Enable QT4:                                ${HAVE_QT4}
-+    Enable QT5:                                ${HAVE_QT5}
-     Enable Mono:                               ${HAVE_MONO}
-     Enable Monodoc:                            ${HAVE_MONODOC}
-     Distribution/OS:                           ${with_distro}
-@@ -1226,6 +1253,7 @@ echo "\
-     Building avahi-discover-standalone: ${HAVE_GTK2OR3}
-     Building libavahi-qt3:              ${HAVE_QT3}
-     Building libavahi-qt4:              ${HAVE_QT4}
-+    Building libavahi-qt5:              ${HAVE_QT5}
-     Building avahi-sharp:               ${HAVE_MONO}
-     Building avahi-compat-libdns_sd:    ${ENABLE_COMPAT_LIBDNS_SD}
-     Building avahi-compat-howl:         ${ENABLE_COMPAT_HOWL}
-diff -rupN avahi-0.6.31/Makefile.am avahi-qt5/Makefile.am
---- avahi-0.6.31/Makefile.am	2011-12-30 15:26:44.925511922 -0600
-+++ avahi-qt5/Makefile.am	2014-10-19 13:55:14.825086832 -0500
-@@ -43,6 +43,7 @@ EXTRA_DIST = \
- 	avahi-gobject.pc.in \
- 	avahi-qt3.pc.in \
- 	avahi-qt4.pc.in \
-+	avahi-qt5.pc.in \
- 	avahi-sharp.pc.in \
- 	avahi-ui-sharp.pc.in \
- 	avahi-compat-libdns_sd.pc.in \
-@@ -101,6 +102,10 @@ if HAVE_QT4
- DX_INPUT += \
- 	$(srcdir)/avahi-qt/qt-watch.h
- endif
-+if HAVE_QT5
-+DX_INPUT += \
-+	$(srcdir)/avahi-qt/qt-watch.h
-+endif
- endif
- 
- if HAVE_GLIB
-@@ -216,6 +221,11 @@ pkgconfig_DATA += avahi-qt4.pc
- CLEANFILES += avahi-qt4.pc
- endif
- 
-+if HAVE_QT5
-+pkgconfig_DATA += avahi-qt5.pc
-+CLEANFILES += avahi-qt5.pc
-+endif
-+
- CLEANFILES += avahi.devhelp
- 
- avahi.devhelp: doxygen-run

diff --git a/net-dns/avahi/files/avahi-0.7-remove-empty-avahi_discover.patch b/net-dns/avahi/files/avahi-0.7-remove-empty-avahi_discover.patch
deleted file mode 100644
index 702499e2218..00000000000
--- a/net-dns/avahi/files/avahi-0.7-remove-empty-avahi_discover.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From ffb19d8f3c7f1fe4f31f79f8601dd3079730401b Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@debian.org>
-Date: Fri, 27 Apr 2018 09:01:13 +0100
-Subject: [PATCH] Remove empty avahi_discover Python module
-
-The avahi-discover tool no longer has any code outside its main
-executable, so it does not need to install library modules. Its only
-library code was avahi_discover.SimpleGladeApp, which was removed
-in 2009.
-
-Signed-off-by: Simon McVittie <smcv@debian.org>
----
- avahi-python/avahi-discover/Makefile.am |  6 ------
- avahi-python/avahi-discover/__init__.py | 18 ------------------
- 2 files changed, 24 deletions(-)
- delete mode 100755 avahi-python/avahi-discover/__init__.py
-
-diff --git a/avahi-python/avahi-discover/Makefile.am b/avahi-python/avahi-discover/Makefile.am
-index 5fc4b25f..bb4d7172 100644
---- a/avahi-python/avahi-discover/Makefile.am
-+++ b/avahi-python/avahi-discover/Makefile.am
-@@ -18,7 +18,6 @@
- AM_CFLAGS=-I$(top_srcdir)
- 
- EXTRA_DIST = \
--	__init__.py \
- 	avahi-discover.py \
- 	avahi-discover.desktop.in.in
- 
-@@ -31,15 +30,11 @@ pythonscripts =
- desktopdir = $(datadir)/applications
- desktop_DATA =
- 
--avahi_discoverdir = $(pythondir)/avahi_discover
--avahi_discover_PYTHON =
--
- if HAVE_GDBM
- pythonscripts += \
- 	avahi-discover
- desktop_DATA += avahi-discover.desktop
- @INTLTOOL_DESKTOP_RULE@
--avahi_discover_PYTHON += __init__.py
- endif
- 
- if HAVE_DBM
-@@ -47,7 +42,6 @@ pythonscripts += \
- 	avahi-discover
- desktop_DATA += avahi-discover.desktop
- @INTLTOOL_DESKTOP_RULE@
--avahi_discover_PYTHON += __init__.py
- endif
- 
- avahi-discover.desktop.in: avahi-discover.desktop.in.in
-diff --git a/avahi-python/avahi-discover/__init__.py b/avahi-python/avahi-discover/__init__.py
-deleted file mode 100755
-index 6f3ec7f9..00000000
---- a/avahi-python/avahi-discover/__init__.py
-+++ /dev/null
-@@ -1,18 +0,0 @@
--#!@PYTHON@
--# -*-python-*-
--# This file is part of avahi.
--#
--# avahi is free software; you can redistribute it and/or modify it
--# under the terms of the GNU Lesser General Public License as
--# published by the Free Software Foundation; either version 2 of the
--# License, or (at your option) any later version.
--#
--# avahi is distributed in the hope that it will be useful, but WITHOUT
--# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
--# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
--# License for more details.
--#
--# You should have received a copy of the GNU Lesser General Public
--# License along with avahi; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
--# USA.


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
@ 2021-04-24 15:49 Andreas Sturmlechner
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Sturmlechner @ 2021-04-24 15:49 UTC (permalink / raw
  To: gentoo-commits

commit:     93cf079ade538cae967e7d18adcf63d237681e09
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 27 21:25:07 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr 24 15:48:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93cf079a

net-dns/avahi: hard-disable avahi-ui-sharp

Bug: https://bugs.gentoo.org/769062
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 net-dns/avahi/avahi-0.8-r3.ebuild                  | 211 +++++++++++++++++++++
 .../files/avahi-0.8-disable-avahi-ui-sharp.patch   |  57 ++++++
 2 files changed, 268 insertions(+)

diff --git a/net-dns/avahi/avahi-0.8-r3.ebuild b/net-dns/avahi/avahi-0.8-r3.ebuild
new file mode 100644
index 00000000000..26826ded651
--- /dev/null
+++ b/net-dns/avahi/avahi-0.8-r3.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{7,8} )
+PYTHON_REQ_USE="gdbm"
+inherit autotools flag-o-matic multilib-minimal mono-env python-r1 systemd
+
+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"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="autoipd bookmarks +dbus doc gdbm gtk gtk2 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt5 selinux systemd test"
+
+REQUIRED_USE="
+	python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+	mono? ( dbus )
+	howl-compat? ( dbus )
+	mdnsresponder-compat? ( dbus )
+	systemd? ( dbus )
+"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	dev-libs/libdaemon
+	dev-libs/libevent:=[${MULTILIB_USEDEP}]
+	dev-libs/expat
+	dev-libs/glib:2[${MULTILIB_USEDEP}]
+	gdbm? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
+	qt5? ( dev-qt/qtcore:5 )
+	gtk2? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+	gtk?  ( 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 )
+	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}]
+	)
+"
+RDEPEND="
+	acct-user/avahi
+	acct-group/avahi
+	acct-group/netdev
+	autoipd? (
+		acct-user/avahi-autoipd
+		acct-group/avahi-autoipd
+	)
+	${DEPEND}
+	selinux? ( sec-policy/selinux-avahi )
+"
+BDEPEND="
+	dev-util/glib-utils
+	doc? ( app-doc/doxygen )
+	app-doc/xmltoman
+	dev-util/intltool
+	virtual/pkgconfig
+"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
+
+PATCHES=(
+	"${FILESDIR}/${P}-disable-avahi-ui-sharp.patch" # bug 769062
+# These patches do not apply cleanly but may need to be re-instated.
+# I'll leave them commented out for now.
+#	"${FILESDIR}/${PN}-0.7-qt5.patch"
+#	"${FILESDIR}/${PN}-0.7-CVE-2017-6519.patch"
+#	"${FILESDIR}/${PN}-0.7-remove-empty-avahi_discover.patch"
+#	"${FILESDIR}/${PN}-0.7-python3.patch"
+#	"${FILESDIR}/${PN}-0.7-python3-unittest.patch"
+#	"${FILESDIR}/${PN}-0.7-python3-gdbm.patch"
+)
+
+pkg_setup() {
+	use mono && mono-env_pkg_setup
+	use python || use bookmarks && python_setup
+}
+
+src_prepare() {
+	default
+
+	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
+
+	eautoreconf
+
+	# bundled manpages
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--disable-monodoc
+		--disable-python-dbus
+		--disable-qt3
+		--disable-qt4
+		--disable-static
+		--enable-manpages
+		--enable-glib
+		--enable-gobject
+		--enable-xmltoman
+		--localstatedir="${EPREFIX}/var"
+		--with-distro=gentoo
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		$(use_enable dbus)
+		$(use_enable gdbm)
+		$(use_enable gtk2 gtk)
+		$(use_enable gtk  gtk3)
+		$(use_enable howl-compat compat-howl)
+		$(use_enable mdnsresponder-compat compat-libdns_sd)
+		$(use_enable nls)
+		$(multilib_native_use_enable autoipd)
+		$(multilib_native_use_enable doc doxygen-doc)
+		$(multilib_native_use_enable introspection)
+		$(multilib_native_use_enable mono)
+		$(multilib_native_use_enable python)
+		$(multilib_native_use_enable test tests)
+	)
+
+	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
+
+	myconf+=( $(multilib_native_use_enable qt5) )
+
+	econf "${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 gtk2 || \
+		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
+		docinto html
+		dodoc -r doxygen/html/.
+		insinto /usr/share/devhelp/books/avahi
+		doins avahi.devhelp
+	fi
+
+	# The build system creates an empty "/run" directory, so we clean it up here
+	rmdir "${ED}"/run || die
+}
+
+multilib_src_install_all() {
+	if use autoipd; then
+		insinto /lib/rcscripts/net
+		doins "${FILESDIR}"/autoipd.sh
+
+		insinto /lib/netifrc/net
+		newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+	fi
+
+	dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+	find "${ED}" -name '*.la' -type f -delete || die
+}
+
+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
+
+	systemd_reenable avahi-daemon.service
+}

diff --git a/net-dns/avahi/files/avahi-0.8-disable-avahi-ui-sharp.patch b/net-dns/avahi/files/avahi-0.8-disable-avahi-ui-sharp.patch
new file mode 100644
index 00000000000..31b361d4e17
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.8-disable-avahi-ui-sharp.patch
@@ -0,0 +1,57 @@
+From ebd2a01a7b5e88f3be35b2f803d5adbd36ae6593 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sat, 27 Mar 2021 22:49:08 +0100
+Subject: [PATCH] Disable avahi-ui-sharp
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ Makefile.am  | 6 ++----
+ configure.ac | 1 -
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 33c51f5..0e12120 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -46,7 +46,6 @@ EXTRA_DIST = \
+ 	avahi-qt4.pc.in \
+ 	avahi-qt5.pc.in \
+ 	avahi-sharp.pc.in \
+-	avahi-ui-sharp.pc.in \
+ 	avahi-compat-libdns_sd.pc.in \
+ 	avahi-compat-howl.pc.in \
+ 	avahi-ui.pc.in \
+@@ -77,7 +76,6 @@ SUBDIRS = \
+ 	avahi-compat-howl \
+ 	avahi-autoipd \
+ 	avahi-ui \
+-	avahi-ui-sharp \
+ 	avahi-libevent \
+ 	po
+ 
+@@ -188,8 +186,8 @@ CLEANFILES += avahi-compat-libdns_sd.pc
+ endif
+ 
+ if HAVE_MONO
+-pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc
+-CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc
++pkgconfig_DATA += avahi-sharp.pc
++CLEANFILES += avahi-sharp.pc
+ endif
+ 
+ endif
+diff --git a/configure.ac b/configure.ac
+index 58db8c7..844360f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1166,7 +1166,6 @@ man/Makefile
+ tests/Makefile
+ service-type-database/Makefile
+ avahi-sharp/Makefile
+-avahi-ui-sharp/Makefile
+ avahi-compat-libdns_sd/Makefile
+ avahi-compat-howl/Makefile
+ avahi-compat-howl/samples/Makefile
+-- 
+2.31.1
+


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
@ 2022-11-06  1:49 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-06  1:49 UTC (permalink / raw
  To: gentoo-commits

commit:     3e56cd93c27c158d848d6f495b3563816f49e888
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  5 23:58:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov  6 01:49:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e56cd93

net-dns/avahi: fix configure w/ -Werror=strict-prototypes

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{avahi-0.8-r6.ebuild => avahi-0.8-r7.ebuild}   |  1 +
 .../avahi/files/avahi-0.8-strict-prototypes.patch  | 38 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/net-dns/avahi/avahi-0.8-r6.ebuild b/net-dns/avahi/avahi-0.8-r7.ebuild
similarity index 99%
rename from net-dns/avahi/avahi-0.8-r6.ebuild
rename to net-dns/avahi/avahi-0.8-r7.ebuild
index 73f14ba3bf3c..ed36d9edfc0c 100644
--- a/net-dns/avahi/avahi-0.8-r6.ebuild
+++ b/net-dns/avahi/avahi-0.8-r7.ebuild
@@ -74,6 +74,7 @@ PATCHES=(
 	"${FILESDIR}/${P}-dependency-error.patch"
 	"${FILESDIR}/${P}-null-pointer-crash.patch"
 	"${FILESDIR}/${P}-potentially-undefined-fix.patch"
+	"${FILESDIR}/${P}-strict-prototypes.patch"
 # These patches do not apply cleanly but may need to be re-instated.
 # I'll leave them commented out for now.
 #	"${FILESDIR}/${PN}-0.7-qt5.patch"

diff --git a/net-dns/avahi/files/avahi-0.8-strict-prototypes.patch b/net-dns/avahi/files/avahi-0.8-strict-prototypes.patch
new file mode 100644
index 000000000000..3954aa4357ae
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.8-strict-prototypes.patch
@@ -0,0 +1,38 @@
+https://github.com/lathiat/avahi/pull/405
+
+From 54409e5af9c382117b67674756971f4f1bf646f8 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 5 Nov 2022 23:49:47 +0000
+Subject: [PATCH] configure.ac: fix -Wstrict-prototypes
+
+Fixes errors like:
+```
+-ignoreme: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
++ignoreme: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
+ void test_broken_ssp(c)
+      ^
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -99,8 +99,7 @@ if test x"$enable_ssp" = x"yes"; then
+     LDFLAGS="$LDFLAGS -Wl,-z,defs"
+     cat confdefs.h > conftest.c
+     cat >>conftest.c <<_ACEOF
+-void test_broken_ssp(c)
+-    const char *c;
++void test_broken_ssp(const char *c)
+ {
+     char arr[[123]], *p; /* beware of possible double-braces if copying this */
+     for (p = arr; *c; ++p) {
+@@ -300,7 +299,7 @@ AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd)
+ AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
+ 
+ test_gcc_flag() {
+-    AC_LANG_CONFTEST([int main() {}])
++    AC_LANG_CONFTEST([int main(void) {}])
+     $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
+     ret=$?
+     rm -f conftest.o
+


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/
@ 2024-02-15 19:09 Patrick McLean
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McLean @ 2024-02-15 19:09 UTC (permalink / raw
  To: gentoo-commits

commit:     d9c877258c6b7321f4305396b19d5bf2441efd8d
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 15 19:09:21 2024 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Feb 15 19:09:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9c87725

net-dns/avahi: add 0.9_rc1

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 net-dns/avahi/Manifest                             |   1 +
 net-dns/avahi/avahi-0.9_rc1.ebuild                 | 203 +++++++++++++++++++++
 .../avahi-0.9_rc1-disable-avahi-ui-sharp.patch     |  43 +++++
 3 files changed, 247 insertions(+)

diff --git a/net-dns/avahi/Manifest b/net-dns/avahi/Manifest
index 8827967c8d22..ac584b7aa178 100644
--- a/net-dns/avahi/Manifest
+++ b/net-dns/avahi/Manifest
@@ -1 +1,2 @@
 DIST avahi-0.8.tar.gz 953319 BLAKE2B ddede1b8790ff3057ea5f4bb710e95578229e078a7abac83121e043017dda1ab3d971c723f920fdd4f3d98b88bd2cf21f9645bec1b7bbd2ea194cb399a5f5b46 SHA512 27bba9a551152dfc7e721f326042e7bfce55d227044a6cbaee04d6fb0e3f59c36e159c2b7a4dd42d1c955cdf37cc1c303e91991c08928bbded91d796e9a22abe
+DIST avahi-0.9_rc1.tar.gz 1057252 BLAKE2B f38c35d25c439d0d4dce00131d61d4be816fdcf14ddbe4f91fed95990ac6313b8ed905bca84f693feeccf92b891c849a994cbee80b02732108a18378b044d4b4 SHA512 c46ef2c646ae7a7be8e61ef18924a5c1349e19293ecd2e95f51dd6cd41967ea2f118ca2af48671c68a5b33687cdd6cbadb8745d95e8b69963d0b73f2d447db8d

diff --git a/net-dns/avahi/avahi-0.9_rc1.ebuild b/net-dns/avahi/avahi-0.9_rc1.ebuild
new file mode 100644
index 000000000000..e4f7cb84a6ab
--- /dev/null
+++ b/net-dns/avahi/avahi-0.9_rc1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+PYTHON_REQ_USE="gdbm"
+inherit autotools multilib-minimal python-single-r1 systemd
+
+DESCRIPTION="System which facilitates service discovery on a local network"
+HOMEPAGE="https://avahi.org/"
+SRC_URI="https://github.com/lathiat/avahi/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="autoipd bookmarks +dbus doc gdbm gtk howl-compat +introspection ipv6 mdnsresponder-compat nls python qt5 selinux systemd test"
+
+REQUIRED_USE="
+	python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
+	bookmarks? ( python )
+	howl-compat? ( dbus )
+	mdnsresponder-compat? ( dbus )
+	systemd? ( dbus )
+"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	dev-libs/libdaemon
+	dev-libs/libevent:=[${MULTILIB_USEDEP}]
+	dev-libs/expat
+	dev-libs/glib:2[${MULTILIB_USEDEP}]
+	gdbm? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
+	qt5? ( dev-qt/qtcore:5 )
+	gtk?  ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+	dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+	kernel_linux? ( sys-libs/libcap )
+	introspection? ( dev-libs/gobject-introspection:= )
+	systemd? ( sys-apps/systemd:=[${MULTILIB_USEDEP}] )
+	python? (
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep '
+			bookmarks? ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}] )
+			dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
+			introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
+		')
+	)
+"
+RDEPEND="
+	acct-user/avahi
+	acct-group/avahi
+	acct-group/netdev
+	autoipd? (
+		acct-user/avahi-autoipd
+		acct-group/avahi-autoipd
+	)
+	${DEPEND}
+	selinux? ( sec-policy/selinux-avahi )
+"
+BDEPEND="
+	dev-util/glib-utils
+	doc? ( app-text/doxygen )
+	app-text/xmltoman
+	sys-devel/gettext
+	virtual/pkgconfig
+"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
+
+PATCHES=(
+	"${FILESDIR}/${P}-disable-avahi-ui-sharp.patch" # bug 769062
+)
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	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
+
+	eautoreconf
+
+	# bundled manpages
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--disable-gtk
+		--disable-mono
+		--disable-monodoc
+		--disable-python-dbus
+		--disable-qt3
+		--disable-qt4
+		--disable-static
+		--enable-manpages
+		--enable-glib
+		--enable-gobject
+		--enable-xmltoman
+		--localstatedir="${EPREFIX}/var"
+		--runstatedir="${EPREFIX}/run"
+		--with-distro=gentoo
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		$(use_enable dbus)
+		$(use_enable gdbm)
+		$(use_enable gtk gtk3)
+		$(use_enable howl-compat compat-howl)
+		$(use_enable mdnsresponder-compat compat-libdns_sd)
+		$(use_enable nls)
+		$(use_enable systemd libsystemd)
+		$(multilib_native_use_enable autoipd)
+		$(multilib_native_use_enable doc doxygen-doc)
+		$(multilib_native_use_enable introspection)
+		$(multilib_native_use_enable python)
+		$(multilib_native_use_enable test tests)
+	)
+
+	if use python; then
+		myconf+=(
+			$(multilib_native_use_enable dbus python-dbus)
+			$(multilib_native_use_enable introspection pygobject)
+		)
+	fi
+
+	if ! multilib_is_native_abi; then
+		myconf+=(
+			# used by daemons only
+			--disable-libdaemon
+			--with-xml=none
+		)
+	fi
+
+	myconf+=( $(multilib_native_use_enable qt5) )
+
+	econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+	emake
+
+	multilib_is_native_abi && use doc && emake avahi.devhelp
+}
+
+multilib_src_install() {
+	emake install DESTDIR="${D}"
+
+	if ! use bookmarks || ! use python || ! use dbus; then
+		rm -f "${ED}"/usr/bin/avahi-bookmarks || die
+	fi
+
+	# 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
+		docinto html
+		dodoc -r doxygen/html/.
+		insinto /usr/share/devhelp/books/avahi
+		doins avahi.devhelp
+	fi
+
+	# The build system creates an empty "/run" directory, so we clean it up here
+	rmdir "${ED}"/run || die
+}
+
+multilib_src_install_all() {
+	use python && python_optimize
+
+	if use autoipd; then
+		insinto /lib/rcscripts/net
+		doins "${FILESDIR}"/autoipd.sh
+
+		insinto /lib/netifrc/net
+		newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
+	fi
+
+	dodoc docs/{AUTHORS,NEWS,README,TODO}
+
+	find "${ED}" -name '*.la' -type f -delete || die
+}
+
+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
+
+	systemd_reenable avahi-daemon.service
+}

diff --git a/net-dns/avahi/files/avahi-0.9_rc1-disable-avahi-ui-sharp.patch b/net-dns/avahi/files/avahi-0.9_rc1-disable-avahi-ui-sharp.patch
new file mode 100644
index 000000000000..587bd315856e
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.9_rc1-disable-avahi-ui-sharp.patch
@@ -0,0 +1,43 @@
+diff --git a/Makefile.am b/Makefile.am
+index 33c51f5..0e12120 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -46,7 +46,6 @@ EXTRA_DIST = \
+ 	avahi-qt4.pc.in \
+ 	avahi-qt5.pc.in \
+ 	avahi-sharp.pc.in \
+-	avahi-ui-sharp.pc.in \
+ 	avahi-compat-libdns_sd.pc.in \
+ 	avahi-compat-howl.pc.in \
+ 	avahi-ui.pc.in \
+@@ -77,7 +76,6 @@ SUBDIRS = \
+ 	avahi-compat-howl \
+ 	avahi-autoipd \
+ 	avahi-ui \
+-	avahi-ui-sharp \
+ 	avahi-libevent \
+ 	po
+ 
+@@ -188,8 +186,8 @@ CLEANFILES += avahi-compat-libdns_sd.pc
+ endif
+ 
+ if HAVE_MONO
+-pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc
+-CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc
++pkgconfig_DATA += avahi-sharp.pc
++CLEANFILES += avahi-sharp.pc
+ endif
+ 
+ endif
+diff --git a/configure.ac b/configure.ac
+index 2f63730..fed400d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1183,7 +1183,6 @@ man/Makefile
+ tests/Makefile
+ service-type-database/Makefile
+ avahi-sharp/Makefile
+-avahi-ui-sharp/Makefile
+ avahi-compat-libdns_sd/Makefile
+ avahi-compat-howl/Makefile
+ avahi-compat-howl/samples/Makefile


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-15 19:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-19 11:28 [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/files/, net-dns/avahi/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-02-15 19:09 Patrick McLean
2022-11-06  1:49 Sam James
2021-04-24 15:49 Andreas Sturmlechner
2020-01-13 17:36 Anthony G. Basile
2018-01-21  3:33 Anthony G. Basile
2018-01-11 22:32 Andreas Sturmlechner
2015-09-25  2:03 Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox