diff options
author | Arun Raghavan <ford_prefect@gentoo.org> | 2009-02-19 04:06:20 +0000 |
---|---|---|
committer | Arun Raghavan <ford_prefect@gentoo.org> | 2009-02-19 04:06:20 +0000 |
commit | 4751cc7608373a7d3a272a56a4dbb38f339b4683 (patch) | |
tree | 16003b90b6c30d048c2133b7465d479599f1e48b | |
parent | Stable on amd64 (diff) | |
download | gentoo-2-4751cc7608373a7d3a272a56a4dbb38f339b4683.tar.gz gentoo-2-4751cc7608373a7d3a272a56a4dbb38f339b4683.tar.bz2 gentoo-2-4751cc7608373a7d3a272a56a4dbb38f339b4683.zip |
Make Avahi support optional again, and add more USE-conditional deps for net-dns/avahi. Fixes bug #243004, #256190.
(Portage version: 2.2_rc23/cvs/Linux i686)
-rw-r--r-- | net-misc/vinagre/ChangeLog | 11 | ||||
-rw-r--r-- | net-misc/vinagre/files/vinagre-2.24.2-optional-avahi.patch | 373 | ||||
-rw-r--r-- | net-misc/vinagre/vinagre-2.24.2-r1.ebuild | 57 |
3 files changed, 439 insertions, 2 deletions
diff --git a/net-misc/vinagre/ChangeLog b/net-misc/vinagre/ChangeLog index 08834353d503..0a92f1342af6 100644 --- a/net-misc/vinagre/ChangeLog +++ b/net-misc/vinagre/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/vinagre -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/vinagre/ChangeLog,v 1.25 2008/12/13 17:31:33 armin76 Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/vinagre/ChangeLog,v 1.26 2009/02/19 04:06:20 ford_prefect Exp $ + +*vinagre-2.24.2-r1 (19 Feb 2009) + + 19 Feb 2009; Arun Raghavan <ford_prefect@gentoo.org> + +files/vinagre-2.24.2-optional-avahi.patch, +vinagre-2.24.2-r1.ebuild: + Make Avahi support optional again, and add more USE-conditional deps for + net-dns/avahi. Fixes bug #243004, #256190. 13 Dec 2008; Raúl Porcel <armin76@gentoo.org> vinagre-0.5.2.ebuild: alpha/ia64 stable wrt #250314 diff --git a/net-misc/vinagre/files/vinagre-2.24.2-optional-avahi.patch b/net-misc/vinagre/files/vinagre-2.24.2-optional-avahi.patch new file mode 100644 index 000000000000..260a383fb796 --- /dev/null +++ b/net-misc/vinagre/files/vinagre-2.24.2-optional-avahi.patch @@ -0,0 +1,373 @@ +diff -urNp vinagre-2.24.2/configure.ac vinagre-2.24.2-new/configure.ac +--- vinagre-2.24.2/configure.ac 2008-12-05 23:52:47.000000000 +0530 ++++ vinagre-2.24.2-new/configure.ac 2009-02-19 01:24:34.000000000 +0530 +@@ -42,6 +42,23 @@ GTK_VNC_REQUIRED=0.3.7 + AVAHI_REQUIRED=0.6.22 + PANEL_REQUIRED_VERSION=2.0.0 + ++# Check for avahi ++AC_ARG_ENABLE(avahi, ++ AC_HELP_STRING([--disable-avahi], ++ [Do not use avahi for auto-discover machines [default=no]]), ++ enable_avahi=${enableval}, ++ enable_avahi=yes) ++ ++if test "x$enable_avahi" = "xyes" ; then ++ PKG_CHECK_MODULES(AVAHI,\ ++ avahi-ui >= $AVAHI_REQUIRED\ ++ avahi-gobject >= $AVAHI_REQUIRED) ++ AC_SUBST(AVAHI_CFLAGS) ++ AC_SUBST(AVAHI_LIBS) ++ AC_DEFINE([VINAGRE_ENABLE_AVAHI],[1],[We want avahi support]) ++fi ++AM_CONDITIONAL(AVAHI, test "x$enable_avahi" = "xyes") ++ + PKG_CHECK_MODULES(VINAGRE, \ + glib-2.0 >= $GLIB_REQUIRED \ + gio-2.0 >= $GLIB_REQUIRED \ +@@ -50,9 +67,7 @@ PKG_CHECK_MODULES(VINAGRE, \ + gconf-2.0 >= $GCONF_REQUIRED \ + gthread-2.0 >= $GTHREAD_REQUIRED \ + gnome-keyring-1 \ +- gtk-vnc-1.0 >= $GTK_VNC_REQUIRED \ +- avahi-ui >= $AVAHI_REQUIRED \ +- avahi-gobject >= $AVAHI_REQUIRED) ++ gtk-vnc-1.0 >= $GTK_VNC_REQUIRED) + AC_SUBST(VINAGRE_CFLAGS) + AC_SUBST(VINAGRE_LIBS) + +@@ -107,4 +122,6 @@ Configure summary: + + Compiler ...................: ${CC} + Compiler Flags .............: ${CFLAGS} ++ ++ Avahi enabled ..............: ${enable_avahi} + " +diff -urNp vinagre-2.24.2/src/Makefile.am vinagre-2.24.2-new/src/Makefile.am +--- vinagre-2.24.2/src/Makefile.am 2008-12-05 23:52:41.000000000 +0530 ++++ vinagre-2.24.2-new/src/Makefile.am 2009-02-19 01:23:54.000000000 +0530 +@@ -15,6 +15,7 @@ INCLUDES = \ + -DVINAGRE_DATADIR=\""$(datadir)/vinagre"\" \ + -DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \ + $(VINAGRE_CFLAGS) \ ++ $(AVAHI_CFLAGS) \ + $(NULL) + + bin_PROGRAMS = vinagre +@@ -33,15 +34,19 @@ vinagre_SOURCES = \ + vinagre-ui.h vinagre-window-private.h \ + vinagre-enums.h vinagre-enums.c \ + gossip-cell-renderer-expander.c gossip-cell-renderer-expander.h \ +- vinagre-mdns.h vinagre-mdns.c \ + vinagre-prefs.h vinagre-prefs.c \ + bacon-message-connection.h bacon-message-connection.c \ + vinagre-app.h vinagre-app.c \ + vinagre-bacon.h vinagre-bacon.c \ + $(NULL) + ++if AVAHI ++vinagre_SOURCES += vinagre-mdns.h vinagre-mdns.c ++endif ++ + vinagre_LDADD = \ + $(VINAGRE_LIBS) \ ++ $(AVAHI_LIBS) \ + $(GTKVNC_LIBS) \ + view/libview.la \ + $(NULL) +@@ -70,6 +75,7 @@ libexec_PROGRAMS = vinagre-applet + + vinagre_applet_CFLAGS = \ + $(APPLET_CFLAGS) \ ++ $(AVAHI_CFLAGS) \ + $(NULL) + + vinagre_applet_SOURCES = \ +@@ -78,12 +84,16 @@ vinagre_applet_SOURCES = \ + vinagre-connection.h vinagre-connection.c \ + vinagre-utils.h vinagre-utils.c \ + vinagre-enums.h vinagre-enums.c \ +- vinagre-mdns.h vinagre-mdns.c \ + $(NULL) + ++if AVAHI ++vinagre_applet_SOURCES += vinagre-mdns.h vinagre-mdns.c ++endif ++ + vinagre_applet_LDADD = \ + $(APPLET_LIBS) \ + $(VINAGRE_LIBS) \ ++ $(AVAHI_LIBS) \ + $(NULL) + + +diff -urNp vinagre-2.24.2/src/vinagre-applet.c vinagre-2.24.2-new/src/vinagre-applet.c +--- vinagre-2.24.2/src/vinagre-applet.c 2008-12-05 23:52:41.000000000 +0530 ++++ vinagre-2.24.2-new/src/vinagre-applet.c 2009-02-19 01:23:54.000000000 +0530 +@@ -23,12 +23,15 @@ + #include <gtk/gtk.h> + #include <panel-applet.h> + #include "vinagre-bookmarks.h" +-#include "vinagre-mdns.h" + #include "vinagre-utils.h" + #include "vinagre-connection.h" + #include "vinagre-commands.h" + #include <config.h> + ++#ifdef VINAGRE_ENABLE_AVAHI ++#include "vinagre-mdns.h" ++#endif ++ + static void + menu_position (GtkMenu *menu, + gint *x, +@@ -173,8 +176,10 @@ click_cb (GtkWidget *applet, + all = vinagre_bookmarks_get_all (vinagre_bookmarks_get_default ()); + fill_menu (all, menu); + ++#ifdef VINAGRE_ENABLE_AVAHI + all = vinagre_mdns_get_all (vinagre_mdns_get_default ()); + fill_menu (all, menu); ++#endif + + gtk_widget_show_all (menu); + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, (GtkMenuPositionFunc) menu_position, applet, +@@ -205,13 +210,16 @@ vinagre_applet_fill (PanelApplet *applet + { + GtkWidget *image, *button; + gchar *tmp; +- VinagreMdns *mdns; + static const BonoboUIVerb menu_verbs[] = { + BONOBO_UI_VERB ("VinagreHelp", help_cb), + BONOBO_UI_VERB ("VinagreAbout", about_cb), + BONOBO_UI_VERB_END + }; + ++#ifdef VINAGRE_ENABLE_AVAHI ++ VinagreMdns *mdns; ++#endif ++ + if (strcmp (iid, "OAFIID:GNOME_VinagreApplet") != 0) + return FALSE; + +@@ -238,7 +246,9 @@ vinagre_applet_fill (PanelApplet *applet + gtk_container_add (GTK_CONTAINER (applet), image); + gtk_widget_show_all (GTK_WIDGET (applet)); + ++#ifdef VINAGRE_ENABLE_AVAHI + mdns = vinagre_mdns_get_default (); ++#endif + + return TRUE; + } +diff -urNp vinagre-2.24.2/src/vinagre-connect.c vinagre-2.24.2-new/src/vinagre-connect.c +--- vinagre-2.24.2/src/vinagre-connect.c 2008-12-05 23:52:41.000000000 +0530 ++++ vinagre-2.24.2-new/src/vinagre-connect.c 2009-02-19 01:23:54.000000000 +0530 +@@ -18,13 +18,20 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + ++#ifdef HAVE_CONFIG_H ++#include <config.h> ++#endif ++ + #include <glib.h> + #include <glib/gi18n.h> + #include <gtk/gtk.h> + #include <glade/glade.h> +-#include <avahi-ui/avahi-ui.h> + #include <string.h> + ++#ifdef VINAGRE_ENABLE_AVAHI ++#include <avahi-ui/avahi-ui.h> ++#endif ++ + #include "vinagre-connect.h" + #include "vinagre-utils.h" + #include "vinagre-bookmarks.h" +@@ -174,6 +181,7 @@ save_history (GtkWidget *combo) { + } + } + ++#ifdef VINAGRE_ENABLE_AVAHI + static void + vinagre_connect_find_button_cb (GtkButton *button, + VinagreConnectDialog *dialog) +@@ -208,6 +216,7 @@ vinagre_connect_find_button_cb (GtkButto + + gtk_widget_destroy (d); + } ++#endif + + VinagreConnection *vinagre_connect (VinagreWindow *window) + { +@@ -227,10 +236,15 @@ VinagreConnection *vinagre_connect (Vina + + setup_combo (dialog.host_entry); + ++#ifdef VINAGRE_ENABLE_AVAHI + g_signal_connect (dialog.find_button, + "clicked", + G_CALLBACK (vinagre_connect_find_button_cb), + &dialog); ++#else ++ gtk_widget_hide (dialog.find_button); ++ gtk_widget_set_no_show_all (dialog.find_button, TRUE); ++#endif + + gtk_widget_show_all (dialog.dialog); + result = gtk_dialog_run (GTK_DIALOG (dialog.dialog)); +diff -urNp vinagre-2.24.2/src/vinagre-fav.c vinagre-2.24.2-new/src/vinagre-fav.c +--- vinagre-2.24.2/src/vinagre-fav.c 2008-12-05 23:52:41.000000000 +0530 ++++ vinagre-2.24.2-new/src/vinagre-fav.c 2009-02-19 01:23:54.000000000 +0530 +@@ -26,9 +26,12 @@ + #include "vinagre-fav.h" + #include "vinagre-utils.h" + #include "vinagre-bookmarks.h" +-#include "vinagre-mdns.h" + #include "vinagre-window-private.h" + #include "gossip-cell-renderer-expander.h" ++ ++#ifdef VINAGRE_ENABLE_AVAHI ++#include "vinagre-mdns.h" ++#endif + + #define VINAGRE_FAV_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), VINAGRE_TYPE_FAV, VinagreFavPrivate)) + +@@ -724,10 +727,12 @@ vinagre_fav_init (VinagreFav *fav) + "changed", + G_CALLBACK (vinagre_fav_update_list), + fav); ++#ifdef VINAGRE_ENABLE_AVAHI + g_signal_connect_swapped (vinagre_mdns_get_default (), + "changed", + G_CALLBACK (vinagre_fav_update_list), + fav); ++#endif + } + + GtkWidget * +@@ -797,7 +802,7 @@ vinagre_fav_update_list (VinagreFav *fav + gtk_tree_view_expand_row (GTK_TREE_VIEW (fav->priv->tree), path, FALSE); + gtk_tree_path_free (path); + +- /* avahi */ ++#ifdef VINAGRE_ENABLE_AVAHI + list = vinagre_mdns_get_all (vinagre_mdns_get_default ()); + if (!list) + return FALSE; +@@ -841,6 +846,7 @@ vinagre_fav_update_list (VinagreFav *fav + path = gtk_tree_path_new_from_string ("1"); + gtk_tree_view_expand_row (GTK_TREE_VIEW (fav->priv->tree), path, FALSE); + gtk_tree_path_free (path); ++#endif + + return FALSE; + } +diff -urNp vinagre-2.24.2/src/vinagre-main.c vinagre-2.24.2-new/src/vinagre-main.c +--- vinagre-2.24.2/src/vinagre-main.c 2008-12-05 23:52:41.000000000 +0530 ++++ vinagre-2.24.2-new/src/vinagre-main.c 2009-02-19 01:23:54.000000000 +0530 +@@ -33,10 +33,13 @@ + #include "vinagre-app.h" + #include "vinagre-utils.h" + #include "vinagre-prefs.h" +-#include "vinagre-mdns.h" + #include "vinagre-bacon.h" + #include <vncdisplay.h> + ++#ifdef VINAGRE_ENABLE_AVAHI ++#include "vinagre-mdns.h" ++#endif ++ + /* command line */ + static gchar **files = NULL; + static gchar **remaining_args = NULL; +@@ -169,8 +172,10 @@ int main (int argc, char **argv) { + gtk_main (); + + g_object_unref (vinagre_bookmarks_get_default ()); +- g_object_unref (vinagre_mdns_get_default ()); + g_object_unref (vinagre_prefs_get_default ()); ++#ifdef VINAGRE_ENABLE_AVAHI ++ g_object_unref (vinagre_mdns_get_default ()); ++#endif + + return 0; + } +diff -urNp vinagre-2.24.2/src/vinagre-window.c vinagre-2.24.2-new/src/vinagre-window.c +--- vinagre-2.24.2/src/vinagre-window.c 2008-12-05 23:52:41.000000000 +0530 ++++ vinagre-2.24.2-new/src/vinagre-window.c 2009-02-19 01:23:54.000000000 +0530 +@@ -36,10 +36,12 @@ + #include "vinagre-utils.h" + #include "vinagre-bookmarks.h" + #include "vinagre-ui.h" +-#include "vinagre-mdns.h" +- + #include "vinagre-window-private.h" + ++#ifdef VINAGRE_ENABLE_AVAHI ++#include "vinagre-mdns.h" ++#endif ++ + #define VINAGRE_WINDOW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object),\ + VINAGRE_TYPE_WINDOW, \ + VinagreWindowPrivate)) +@@ -565,7 +567,10 @@ vinagre_window_update_bookmarks_list_men + { + VinagreWindowPrivate *p = window->priv; + GList *actions, *l; +- GSList *favs, *mdnss; ++ GSList *favs; ++#ifdef VINAGRE_ENABLE_AVAHI ++ GSList *mdnss; ++#endif + gint n, m, i; + guint id; + +@@ -586,9 +591,14 @@ vinagre_window_update_bookmarks_list_men + g_list_free (actions); + + favs = vinagre_bookmarks_get_all (vinagre_bookmarks_get_default ()); +- mdnss = vinagre_mdns_get_all (vinagre_mdns_get_default ()); + n = g_slist_length (favs); ++ ++#ifdef VINAGRE_ENABLE_AVAHI ++ mdnss = vinagre_mdns_get_all (vinagre_mdns_get_default ()); + m = g_slist_length (mdnss); ++#else ++ m = 0; ++#endif + i = 0; + + id = (n > 0||m > 0) ? gtk_ui_manager_new_merge_id (p->manager) : 0; +@@ -641,7 +651,7 @@ vinagre_window_update_bookmarks_list_men + i++; + } + +- /* avahi */ ++#ifdef VINAGRE_ENABLE_AVAHI + i = 0; + while (mdnss) + { +@@ -690,6 +700,7 @@ vinagre_window_update_bookmarks_list_men + mdnss = mdnss->next; + i++; + } ++#endif + + p->bookmarks_list_menu_ui_id = id; + } +@@ -1017,11 +1028,12 @@ vinagre_window_init (VinagreWindow *wind + "changed", + G_CALLBACK (vinagre_window_update_bookmarks_list_menu), + window); ++#ifdef VINAGRE_ENABLE_AVAHI + g_signal_connect_swapped (vinagre_mdns_get_default (), + "changed", + G_CALLBACK (vinagre_window_update_bookmarks_list_menu), + window); +- ++#endif + vinagre_window_init_clipboard (window); + } + diff --git a/net-misc/vinagre/vinagre-2.24.2-r1.ebuild b/net-misc/vinagre/vinagre-2.24.2-r1.ebuild new file mode 100644 index 000000000000..cc64aed42283 --- /dev/null +++ b/net-misc/vinagre/vinagre-2.24.2-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/vinagre/vinagre-2.24.2-r1.ebuild,v 1.1 2009/02/19 04:06:20 ford_prefect Exp $ + +EAPI=2 + +inherit autotools gnome2 eutils + +DESCRIPTION="VNC Client for the GNOME Desktop" +HOMEPAGE="http://www.gnome.org/projects/vinagre/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="avahi test" + +# FIXME: make gnome-panel applet optional? + +RDEPEND=">=dev-libs/glib-2.17.0 + >=x11-libs/gtk+-2.13.1 + >=gnome-base/libglade-2.6 + >=gnome-base/gconf-2.16 + >=net-libs/gtk-vnc-0.3.7 + >=gnome-base/gnome-keyring-1 + >=gnome-base/gnome-panel-2 + avahi? ( >=net-dns/avahi-0.6.22[dbus,gtk] )" + +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.9 + >=dev-util/intltool-0.35 + app-text/scrollkeeper + app-text/gnome-doc-utils + test? ( ~app-text/docbook-xml-dtd-4.3 )" + +DOCS="AUTHORS ChangeLog MAINTAINERS NEWS README" + +pkg_setup() { + G2CONF="${G2CONF} $(use_enable avahi) + --disable-scrollkeeper --disable-rebuilds" +} + +src_prepare() +{ + gnome2_src_prepare + + # Support enabling/disabling of Avahi support (bug #243004) + epatch "${FILESDIR}/${P}-optional-avahi.patch" + + eautoreconf +} + +src_install() { + gnome2_src_install + + # Remove it's own installation of DOCS that go to $PN instead of $P and aren't ecompressed + rm -rf "${D}"/usr/share/doc/vinagre +} |