Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/avahi/
Date: Tue, 04 Aug 2020 13:01:08
Message-Id: 1596546045.f007a3748e038217942d4bdca572d3610d4ad665.blueness@gentoo
1 commit: f007a3748e038217942d4bdca572d3610d4ad665
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 4 13:00:45 2020 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 4 13:00:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f007a374
7
8 net-dns/avahi: restore latest unstable version
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
12
13 net-dns/avahi/avahi-0.7-r7.ebuild | 212 ++++++++++++++++++++++++++++++++++++++
14 1 file changed, 212 insertions(+)
15
16 diff --git a/net-dns/avahi/avahi-0.7-r7.ebuild b/net-dns/avahi/avahi-0.7-r7.ebuild
17 new file mode 100644
18 index 00000000000..e9e84e60c39
19 --- /dev/null
20 +++ b/net-dns/avahi/avahi-0.7-r7.ebuild
21 @@ -0,0 +1,212 @@
22 +# Copyright 1999-2020 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI="7"
26 +
27 +PYTHON_COMPAT=( python3_{6,7} )
28 +PYTHON_REQ_USE="gdbm"
29 +inherit autotools flag-o-matic multilib-minimal mono-env python-r1 systemd
30 +
31 +DESCRIPTION="System which facilitates service discovery on a local network"
32 +HOMEPAGE="http://avahi.org/"
33 +SRC_URI="https://github.com/lathiat/avahi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
34 +
35 +LICENSE="LGPL-2.1"
36 +SLOT="0"
37 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
38 +IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6 kernel_linux mdnsresponder-compat mono nls python qt5 selinux systemd test"
39 +
40 +REQUIRED_USE="
41 + python? ( dbus gdbm ${PYTHON_REQUIRED_USE} )
42 + mono? ( dbus )
43 + howl-compat? ( dbus )
44 + mdnsresponder-compat? ( dbus )
45 + systemd? ( dbus )
46 +"
47 +
48 +RESTRICT="!test? ( test )"
49 +
50 +DEPEND="
51 + dev-libs/libdaemon
52 + dev-libs/expat
53 + dev-libs/glib:2[${MULTILIB_USEDEP}]
54 + gdbm? ( sys-libs/gdbm:=[${MULTILIB_USEDEP}] )
55 + qt5? ( dev-qt/qtcore:5 )
56 + gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
57 + gtk3? ( x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
58 + dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
59 + kernel_linux? ( sys-libs/libcap )
60 + introspection? ( dev-libs/gobject-introspection:= )
61 + mono? (
62 + dev-lang/mono
63 + gtk? ( dev-dotnet/gtk-sharp:2 )
64 + )
65 + python? (
66 + ${PYTHON_DEPS}
67 + dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
68 + introspection? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
69 + )
70 + bookmarks? (
71 + ${PYTHON_DEPS}
72 + >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
73 + )
74 +"
75 +RDEPEND="
76 + acct-user/avahi
77 + acct-group/avahi
78 + acct-group/netdev
79 + autoipd? (
80 + acct-user/avahi-autoipd
81 + acct-group/avahi-autoipd
82 + )
83 + ${DEPEND}
84 + howl-compat? ( !net-misc/howl )
85 + mdnsresponder-compat? ( !net-misc/mDNSResponder )
86 + selinux? ( sec-policy/selinux-avahi )
87 +"
88 +BDEPEND="
89 + dev-util/glib-utils
90 + doc? ( app-doc/doxygen )
91 + app-doc/xmltoman
92 + dev-util/intltool
93 + virtual/pkgconfig
94 +"
95 +
96 +MULTILIB_WRAPPED_HEADERS=( /usr/include/avahi-qt5/qt-watch.h )
97 +
98 +PATCHES=(
99 + "${FILESDIR}/${P}-qt5.patch"
100 + "${FILESDIR}/${P}-CVE-2017-6519.patch"
101 + "${FILESDIR}/${P}-remove-empty-avahi_discover.patch"
102 + "${FILESDIR}/${P}-python3.patch"
103 + "${FILESDIR}/${P}-python3-unittest.patch"
104 + "${FILESDIR}/${P}-python3-gdbm.patch"
105 +)
106 +
107 +pkg_setup() {
108 + use mono && mono-env_pkg_setup
109 + use python || use bookmarks && python_setup
110 +}
111 +
112 +src_prepare() {
113 + default
114 +
115 + if ! use ipv6; then
116 + sed -i \
117 + -e "s/use-ipv6=yes/use-ipv6=no/" \
118 + avahi-daemon/avahi-daemon.conf || die
119 + fi
120 +
121 + sed -i \
122 + -e "s:\\.\\./\\.\\./\\.\\./doc/avahi-docs/html/:../../../doc/${PF}/html/:" \
123 + doxygen_to_devhelp.xsl || die
124 +
125 + eautoreconf
126 +
127 + # bundled manpages
128 + multilib_copy_sources
129 +}
130 +
131 +multilib_src_configure() {
132 + local myconf=(
133 + --disable-monodoc
134 + --disable-python-dbus
135 + --disable-qt3
136 + --disable-qt4
137 + --disable-static
138 + --enable-manpages
139 + --enable-glib
140 + --enable-gobject
141 + --enable-xmltoman
142 + --localstatedir="${EPREFIX}/var"
143 + --with-distro=gentoo
144 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
145 + $(use_enable dbus)
146 + $(use_enable gdbm)
147 + $(use_enable gtk)
148 + $(use_enable gtk3)
149 + $(use_enable howl-compat compat-howl)
150 + $(use_enable mdnsresponder-compat compat-libdns_sd)
151 + $(use_enable nls)
152 + $(multilib_native_use_enable autoipd)
153 + $(multilib_native_use_enable doc doxygen-doc)
154 + $(multilib_native_use_enable introspection)
155 + $(multilib_native_use_enable mono)
156 + $(multilib_native_use_enable python)
157 + $(multilib_native_use_enable test tests)
158 + )
159 +
160 + if use python; then
161 + myconf+=(
162 + $(multilib_native_use_enable dbus python-dbus)
163 + $(multilib_native_use_enable introspection pygobject)
164 + )
165 + fi
166 +
167 + if use mono; then
168 + myconf+=( $(multilib_native_use_enable doc monodoc) )
169 + fi
170 +
171 + if ! multilib_is_native_abi; then
172 + myconf+=(
173 + # used by daemons only
174 + --disable-libdaemon
175 + --with-xml=none
176 + )
177 + fi
178 +
179 + myconf+=( $(multilib_native_use_enable qt5) )
180 +
181 + econf "${myconf[@]}"
182 +}
183 +
184 +multilib_src_compile() {
185 + emake
186 +
187 + multilib_is_native_abi && use doc && emake avahi.devhelp
188 +}
189 +
190 +multilib_src_install() {
191 + emake install DESTDIR="${D}"
192 + use bookmarks && use python && use dbus && use gtk || \
193 + rm -f "${ED}"/usr/bin/avahi-bookmarks
194 +
195 + # https://github.com/lathiat/avahi/issues/28
196 + use howl-compat && dosym avahi-compat-howl.pc /usr/$(get_libdir)/pkgconfig/howl.pc
197 + use mdnsresponder-compat && dosym avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h
198 +
199 + if multilib_is_native_abi && use doc; then
200 + docinto html
201 + dodoc -r doxygen/html/.
202 + insinto /usr/share/devhelp/books/avahi
203 + doins avahi.devhelp
204 + fi
205 +
206 + # The build system creates an empty "/run" directory, so we clean it up here
207 + rmdir "${ED}"/run || die
208 +}
209 +
210 +multilib_src_install_all() {
211 + if use autoipd; then
212 + insinto /lib/rcscripts/net
213 + doins "${FILESDIR}"/autoipd.sh
214 +
215 + insinto /lib/netifrc/net
216 + newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh
217 + fi
218 +
219 + dodoc docs/{AUTHORS,NEWS,README,TODO}
220 +
221 + find "${ED}" -name '*.la' -type f -delete || die
222 +}
223 +
224 +pkg_postinst() {
225 + if use autoipd; then
226 + elog
227 + elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
228 + elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
229 + elog
230 + fi
231 +
232 + systemd_reenable avahi-daemon.service
233 +}