summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@gentoo.org>2011-08-14 12:52:06 +0000
committerNirbheek Chauhan <nirbheek@gentoo.org>2011-08-14 12:52:06 +0000
commit791375b7c1657755f9c0901f5e5df89aea51b810 (patch)
tree68f955edc066cfec9bda9d56a06dab47357b17b3 /net-dns
parentAlso add an xattr USE flag to avoid automagic dependency over sys-apps/attr. (diff)
downloadgentoo-2-791375b7c1657755f9c0901f5e5df89aea51b810.tar.gz
gentoo-2-791375b7c1657755f9c0901f5e5df89aea51b810.tar.bz2
gentoo-2-791375b7c1657755f9c0901f5e5df89aea51b810.zip
Add gtk3 and introspection support, make utilities optional, reorder deps to use COMMON_DEPEND, remove static libraries and .la files
(Portage version: 2.2.0_alpha39_p14/cvs/Linux x86_64)
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/avahi/ChangeLog9
-rw-r--r--net-dns/avahi/avahi-0.6.30-r1.ebuild209
-rw-r--r--net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch83
-rw-r--r--net-dns/avahi/metadata.xml6
4 files changed, 306 insertions, 1 deletions
diff --git a/net-dns/avahi/ChangeLog b/net-dns/avahi/ChangeLog
index 786041399718..19c255d95ea7 100644
--- a/net-dns/avahi/ChangeLog
+++ b/net-dns/avahi/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-dns/avahi
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/avahi/ChangeLog,v 1.204 2011/08/06 09:41:21 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/avahi/ChangeLog,v 1.205 2011/08/14 12:52:06 nirbheek Exp $
+
+*avahi-0.6.30-r1 (14 Aug 2011)
+
+ 14 Aug 2011; Nirbheek Chauhan <nirbheek@gentoo.org> +avahi-0.6.30-r1.ebuild,
+ +files/avahi-0.6.30-optional-gtk-utils.patch:
+ Add gtk3 and introspection support, make utilities optional, reorder deps to
+ use COMMON_DEPEND, remove static libraries and .la files
06 Aug 2011; Zac Medico <zmedico@gentoo.org> avahi-0.6.30.ebuild:
Fix for prefix and add ~x86-linux keyword.
diff --git a/net-dns/avahi/avahi-0.6.30-r1.ebuild b/net-dns/avahi/avahi-0.6.30-r1.ebuild
new file mode 100644
index 000000000000..84cbc8614ce7
--- /dev/null
+++ b/net-dns/avahi/avahi-0.6.30-r1.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/avahi/avahi-0.6.30-r1.ebuild,v 1.1 2011/08/14 12:52:06 nirbheek Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="python? 2"
+PYTHON_USE_WITH="gdbm"
+PYTHON_USE_WITH_OPT="python"
+
+inherit autotools eutils mono python multilib flag-o-matic
+
+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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86
+~x86-fbsd ~x86-linux"
+IUSE="autoipd bookmarks dbus doc gdbm gtk gtk3 howl-compat +introspection ipv6
+kernel_linux mdnsresponder-compat mono python qt4 test utils"
+
+DBUS_DEPEND=">=sys-apps/dbus-0.30"
+COMMON_DEPEND=">=dev-libs/libdaemon-0.14
+ dev-libs/expat
+ dev-libs/glib:2
+ gdbm? ( sys-libs/gdbm )
+ qt4? ( x11-libs/qt-core:4 )
+ gtk? ( >=x11-libs/gtk+-2.14.0:2 )
+ gtk3? ( x11-libs/gtk+:3 )
+ dbus? (
+ ${DBUS_DEPEND}
+ python? ( dev-python/dbus-python )
+ )
+ mono? (
+ >=dev-lang/mono-1.1.10
+ gtk? ( >=dev-dotnet/gtk-sharp-2 )
+ )
+ howl-compat? ( ${DBUS_DEPEND} )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.5 )
+ mdnsresponder-compat? ( ${DBUS_DEPEND} )
+ python? (
+ gtk? ( >=dev-python/pygtk-2 )
+ )
+ bookmarks? (
+ dev-python/twisted
+ dev-python/twisted-web
+ )
+ kernel_linux? ( sys-libs/libcap )"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/intltool-0.40.5
+ >=dev-util/pkgconfig-0.9.0
+ doc? (
+ app-doc/doxygen
+ mono? ( >=virtual/monodoc-1.1.8 )
+ )"
+RDEPEND="${COMMON_DEPEND}
+ howl-compat? ( !net-misc/howl )
+ mdnsresponder-compat? ( !net-misc/mDNSResponder )"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+
+ if use python && ! use dbus && ! use gtk; then
+ ewarn "For proper python support you should also enable the dbus and gtk USE flags!"
+ fi
+
+ # FIXME: Use REQUIRED_USE once python.eclass gets EAPI 4 support, bug 372255
+ if use utils && ! { use gtk || use gtk3; }; then
+ ewarn "To install the avahi utilities, USE='gtk utils' or USE='gtk3 utils''"
+ fi
+}
+
+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
+}
+
+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"
+
+ eautoreconf
+}
+
+src_configure() {
+ use sh && replace-flags -O? -O0
+
+ local myconf="--disable-static"
+
+ if use python; then
+ myconf+="
+ $(use_enable dbus python-dbus)
+ $(use_enable gtk pygtk)
+ "
+ fi
+
+ if use mono; then
+ myconf+=" $(use_enable doc monodoc)"
+ fi
+
+ # these require dbus enabled
+ if use mdnsresponder-compat || use howl-compat || use mono; then
+ myconf+=" --enable-dbus"
+ fi
+
+ # We need to unset DISPLAY, else the configure script might have problems detecting the pygtk module
+ unset DISPLAY
+
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-distro=gentoo \
+ --disable-python-dbus \
+ --disable-pygtk \
+ --disable-xmltoman \
+ --disable-monodoc \
+ --enable-glib \
+ --enable-gobject \
+ $(use_enable test tests) \
+ $(use_enable autoipd) \
+ $(use_enable mdnsresponder-compat compat-libdns_sd) \
+ $(use_enable howl-compat compat-howl) \
+ $(use_enable doc doxygen-doc) \
+ $(use_enable mono) \
+ $(use_enable dbus) \
+ $(use_enable python) \
+ $(use_enable gtk) \
+ $(use_enable gtk3) \
+ $(use_enable introspection) \
+ $(use_enable utils gtk-utils) \
+ --disable-qt3 \
+ $(use_enable qt4) \
+ $(use_enable gdbm) \
+ ${myconf}
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ use doc && { emake avahi.devhelp || die ; }
+}
+
+src_install() {
+ emake install py_compile=true DESTDIR="${D}" || die "make install failed"
+ use bookmarks && use python && use dbus && use gtk || \
+ rm -f "${ED}"/usr/bin/avahi-bookmarks
+
+ 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
+ doins "${FILESDIR}"/autoipd.sh || die
+
+ insinto /$(get_libdir)/rc/net
+ newins "${FILESDIR}"/autoipd-openrc.sh autoipd.sh || die
+ fi
+
+ 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
+ fi
+
+ # Remove .la files
+ find "${D}" -name '*.la' -exec rm -f {} + || die
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup avahi $(use dbus && use gtk && echo avahi_discover)
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize avahi $(use dbus && use gtk && echo avahi_discover)
+
+ if use autoipd; then
+ echo
+ elog "To use avahi-autoipd to configure your interfaces with IPv4LL (RFC3927)"
+ elog "addresses, just set config_<interface>=( autoipd ) in /etc/conf.d/net!"
+ fi
+
+ if use dbus; then
+ echo
+ elog "If this is your first install of avahi please reload your dbus config"
+ elog "with /etc/init.d/dbus reload before starting avahi-daemon!"
+ fi
+}
diff --git a/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch
new file mode 100644
index 000000000000..2c615a2b3a0a
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.6.30-optional-gtk-utils.patch
@@ -0,0 +1,83 @@
+--- avahi-discover-standalone/Makefile.am
++++ avahi-discover-standalone/Makefile.am
+@@ -23,7 +23,7 @@
+ # This cool debug trap works on i386/gcc only
+ AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+-if HAVE_GTK2OR3
++if ENABLE_GTK_UTILS
+ if HAVE_GLIB
+ bin_PROGRAMS = \
+ avahi-discover-standalone
+--- avahi-ui/Makefile.am
++++ avahi-ui/Makefile.am
+@@ -76,6 +76,7 @@
+ libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+ endif
+
++if ENABLE_GTK_UTILS
+ bin_PROGRAMS = bssh
+ desktop_DATA += bssh.desktop bvnc.desktop
+ @INTLTOOL_DESKTOP_RULE@
+@@ -102,6 +103,7 @@
+ bvnc.desktop.in: bvnc.desktop.in.in
+ $(AM_V_GEN)sed -e 's,@bindir\@,$(bindir),g' $< > $@
+
++endif # ENABLE_GTK_UTILS
+ endif # HAVE_GLIB
+ endif
+ endif
+--- configure.ac
++++ configure.ac
+@@ -564,7 +564,29 @@
+ fi
+ AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes")
+
+-AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes" )
++#
++# Check for GTK+ Utils
++#
++AC_ARG_ENABLE(gtk-utils,
++ AS_HELP_STRING([--disable-gtk-utils],[Disable GTK+ utilities]),
++ [case "${enableval}" in
++ yes) WANT_GTK_UTILS=yes ;;
++ no) WANT_GTK_UTILS=no ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk-utils) ;;
++ esac],
++ [WANT_GTK_UTILS=yes])
++
++ENABLE_GTK_UTILS=no
++HAVE_GTK2OR3=no
++if test "x$HAVE_GTK3" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
++ HAVE_GTK2OR3=yes
++ if test "x$WANT_GTK_UTILS" = "xyes"; then
++ ENABLE_GTK_UTILS=yes
++ fi
++fi
++
++AM_CONDITIONAL(HAVE_GTK2OR3, test "x$HAVE_GTK2OR3" = "xyes")
++AM_CONDITIONAL(ENABLE_GTK_UTILS, test "x$ENABLE_GTK_UTILS" = "xyes")
+
+ #
+ # D-Bus
+@@ -1199,11 +1221,6 @@
+ ENABLE_AUTOIPD="no (You need libdaemon!)"
+ fi
+
+-HAVE_GTK2OR3=no
+-if test "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes" ; then
+- HAVE_GTK2OR3=yes
+-fi
+-
+ BUILD_UI="no"
+ if test "x$HAVE_GTK2OR3" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then
+ BUILD_UI="yes"
+@@ -1223,7 +1240,7 @@
+ Building avahi-python: ${BUILD_PYTHON}
+ Building libavahi-glib: ${HAVE_GLIB}
+ Building libavahi-gobject: ${BUILD_GOBJECT}
+- Building avahi-discover-standalone: ${HAVE_GTK2OR3}
++ Building avahi-discover-standalone: ${ENABLE_GTK_UTILS}
+ Building libavahi-qt3: ${HAVE_QT3}
+ Building libavahi-qt4: ${HAVE_QT4}
+ Building avahi-sharp: ${HAVE_MONO}
diff --git a/net-dns/avahi/metadata.xml b/net-dns/avahi/metadata.xml
index d8e743d47a1c..6892e4704173 100644
--- a/net-dns/avahi/metadata.xml
+++ b/net-dns/avahi/metadata.xml
@@ -11,7 +11,13 @@
<flag name='bookmarks'>Install the avahi-bookmarks application (requires
<pkg>dev-python/twisted</pkg>)</flag>
<flag name='howl-compat'>Enable compat libraries for howl</flag>
+ <flag name="gtk3">Build the avahi-ui-gtk3 library, and use gtk3 for the
+ avahi utilities under USE=utils</flag>
+ <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg>
+ for introspection</flag>
<flag name='mdnsresponder-compat'>Enable compat libraries for
mDNSResponder</flag>
+ <flag name="utils">Install the avahi gtk+ utils avahi-discover, bssh, and
+ bvnc</flag>
</use>
</pkgmetadata>