diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2018-01-20 22:33:37 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2018-01-20 22:33:37 -0500 |
commit | 4449233c9287c5a57aa59db9413d01b80ae371ca (patch) | |
tree | 3fa0b30c8086ecc1b1d6e5faf060b83ec54537c3 /net-dns | |
parent | dev-util/howdoi: version bump 1.1.12 (diff) | |
download | gentoo-4449233c9287c5a57aa59db9413d01b80ae371ca.tar.gz gentoo-4449233c9287c5a57aa59db9413d01b80ae371ca.tar.bz2 gentoo-4449233c9287c5a57aa59db9413d01b80ae371ca.zip |
net-dns/avahi: switch to qt5, bug #525884
Package-Manager: Portage-2.3.13, Repoman-2.3.3
Diffstat (limited to 'net-dns')
-rw-r--r-- | net-dns/avahi/avahi-0.7-r1.ebuild | 216 | ||||
-rw-r--r-- | net-dns/avahi/files/avahi-0.7-qt5.patch | 187 |
2 files changed, 403 insertions, 0 deletions
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 000000000000..e2e1bdb100b0 --- /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 000000000000..aa7e4a5c812c --- /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 |