--- /usr/portage/net-dns/avahi/avahi-0.6.31-r4.ebuild 2014-02-09 01:48:03.000000000 +0100 +++ avahi-0.6.31-r4.ebuild 2014-05-04 14:12:19.000000000 +0200 @@ -9,7 +9,7 @@ WANT_AUTOMAKE=1.11 -inherit autotools eutils flag-o-matic multilib mono-env python-r1 systemd user +inherit autotools eutils flag-o-matic multilib mono-env python-r1 systemd user multilib-minimal DESCRIPTION="System which facilitates service discovery on a local network" HOMEPAGE="http://avahi.org/" @@ -29,15 +29,15 @@ " COMMON_DEPEND=" - dev-libs/libdaemon - dev-libs/expat - dev-libs/glib:2 - gdbm? ( sys-libs/gdbm ) + dev-libs/libdaemon[${MULTILIB_USEDEP}] + dev-libs/expat[${MULTILIB_USEDEP}] + dev-libs/glib:2[${MULTILIB_USEDEP}] + gdbm? ( sys-libs/gdbm[${MULTILIB_USEDEP}] ) qt4? ( dev-qt/qtcore:4 ) gtk? ( x11-libs/gtk+:2 ) gtk3? ( x11-libs/gtk+:3 ) - dbus? ( sys-apps/dbus ) - kernel_linux? ( sys-libs/libcap ) + dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + kernel_linux? ( sys-libs/libcap[${MULTILIB_USEDEP}] ) introspection? ( dev-libs/gobject-introspection ) mono? ( dev-lang/mono @@ -58,9 +58,7 @@ ${COMMON_DEPEND} dev-util/intltool virtual/pkgconfig - doc? ( - app-doc/doxygen - ) + doc? ( app-doc/doxygen ) " RDEPEND=" @@ -69,6 +67,11 @@ mdnsresponder-compat? ( !net-misc/mDNSResponder ) " +MULTILIB_WRAPPED_HEADERS=( + /usr/include/avahi-qt4/qt-watch.h + /usr/include/avahi-ui/avahi-ui.h + ) + pkg_preinst() { enewgroup netdev enewgroup avahi @@ -122,28 +125,34 @@ >py-compile eautoreconf + + multilib_copy_sources } -src_configure() { +multilib_src_configure() { use sh && replace-flags -O? -O0 local myconf="--disable-static" - if use python; then - python_export_best - myconf+=" - $(use_enable dbus python-dbus) - $(use_enable gtk pygtk) - " - fi - - if use mono; then - myconf+=" $(use_enable doc monodoc)" + # enable python/mono bindings only on native abi + if multilib_is_native_abi; then + if use python; then + python_export_best + myconf+=" + $(use_enable dbus python-dbus) + $(use_enable gtk pygtk) + " + fi + + if use mono; then + myconf+=" $(use_enable doc monodoc)" + fi fi # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module unset DISPLAY - + + ECONF_SOURCE="${S}" \ econf \ --localstatedir="${EPREFIX}/var" \ --with-distro=gentoo \ @@ -157,35 +166,32 @@ $(use_enable autoipd) \ $(use_enable mdnsresponder-compat compat-libdns_sd) \ $(use_enable howl-compat compat-howl) \ - $(use_enable doc doxygen-doc) \ - $(use_enable mono) \ + $(multilib_native_use_enable doc doxygen-doc) \ + $(multilib_native_use_enable mono) \ $(use_enable dbus) \ - $(use_enable python) \ - $(use_enable gtk) \ - $(use_enable gtk3) \ + $(multilib_native_use_enable python) \ + $(multilib_native_use_enable gtk) \ + $(multilib_native_use_enable gtk3) \ $(use_enable nls) \ - $(use_enable introspection) \ - $(use_enable utils gtk-utils) \ + $(multilib_native_use_enable introspection) \ + $(multilib_native_use_enable utils gtk-utils) \ --disable-qt3 \ - $(use_enable qt4) \ + $(multilib_native_use_enable qt4) \ $(use_enable gdbm) \ $(systemd_with_unitdir) \ ${myconf} } -src_compile() { - emake || die "emake failed" +multilib_src_compile() { + emake - use doc && { emake avahi.devhelp || die ; } + multilib_is_native_abi && use doc && { emake avahi.devhelp ; } } -src_install() { - emake install DESTDIR="${D}" || die "make install failed" - use bookmarks && use python && use dbus && use gtk || \ - rm -f "${ED}"/usr/bin/avahi-bookmarks +multilib_src_install() { + emake install DESTDIR="${D}" use howl-compat && ln -s avahi-compat-howl.pc "${ED}"/usr/$(get_libdir)/pkgconfig/howl.pc - use mdnsresponder-compat && ln -s avahi-compat-libdns_sd/dns_sd.h "${ED}"/usr/include/dns_sd.h if use autoipd; then insinto /$(get_libdir)/rcscripts/net @@ -194,16 +200,25 @@ insinto /$(get_libdir)/rc/net newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh || die fi + + if multilib_is_native_abi; then + use mdnsresponder-compat && ln -s avahi-compat-libdns_sd/dns_sd.h "${ED}"/usr/include/dns_sd.h - dodoc docs/{AUTHORS,NEWS,README,TODO} || die - - if use doc; then - dohtml -r doxygen/html/. || die - insinto /usr/share/devhelp/books/avahi - doins avahi.devhelp || die + if use doc; then + dohtml -r doxygen/html/. + insinto /usr/share/devhelp/books/avahi + doins avahi.devhelp + fi fi +} + +multilib_src_install_all() { + use bookmarks && use python && use dbus && use gtk || \ + rm -f "${ED}"/usr/bin/avahi-bookmarks + + dodoc docs/{AUTHORS,NEWS,README,TODO} - find "${ED}" -name '*.la' -exec rm -f {} + + prune_libtool_files --all } pkg_postinst() {