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