/[gentoo-x86]/sys-apps/gnome-disk-utility/files/gnome-disk-utility-2.30.1-optional-avahi.patch
Gentoo

Contents of /sys-apps/gnome-disk-utility/files/gnome-disk-utility-2.30.1-optional-avahi.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Jun 13 20:14:43 2010 UTC (2 years, 11 months ago) by pacho
Branch: MAIN
Committing missing patch, thanks to iamben for noticing.
(Portage version: 2.1.8.3/cvs/Linux x86_64)

1 From 674d9284bd09a9378f99ff19b2d2ffb8032ce8ea Mon Sep 17 00:00:00 2001
2 From: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
3 Date: Tue, 16 Mar 2010 10:58:55 +0530
4 Subject: [PATCH] Make avahi support build-time configureable
5
6 ---
7 configure.ac | 21 ++++++++++++++++++++-
8 src/gdu-gtk/gdu-connect-to-server-dialog.c | 7 +++++++
9 2 files changed, 27 insertions(+), 1 deletions(-)
10
11 diff --git a/configure.ac b/configure.ac
12 index 01be5f0..95f2087 100644
13 --- a/configure.ac
14 +++ b/configure.ac
15 @@ -150,7 +150,26 @@ PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= $LIBNOTIFY_REQUIRED])
16 PKG_CHECK_MODULES(UDISKS, [udisks >= $UDISKS_REQUIRED udisks < $UDISKS_NEXT_ABI_INCOMPATIBLE_VERSION])
17 PKG_CHECK_MODULES(X11, [x11])
18 PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14])
19 -PKG_CHECK_MODULES(AVAHI_UI, [avahi-ui >= $AVAHI_UI_REQUIRED])
20 +
21 +# *************
22 +# Avahi
23 +# *************
24 +
25 +have_avahi_ui=no
26 +AC_ARG_ENABLE(avahi-ui, AS_HELP_STRING([--disable-avahi], [disable use of Avahi for server searching]))
27 +
28 +if test "x$enable_avahi" != "xno"; then
29 + PKG_CHECK_MODULES(AVAHI_UI, avahi-ui >= $AVAHI_UI_REQUIRED,
30 + [AC_DEFINE(HAVE_AVAHI_UI, 1, [Define if avahi-ui is available])
31 + have_avahi_ui=yes], have_avahi_ui=no)
32 + if test "x$have_avahi_ui" = xno -a "x$enable_avahi_ui" = xyes; then
33 + AC_MSG_ERROR([avahi-ui support requested but libraries not found])
34 + fi
35 +fi
36 +
37 +AC_SUBST(AVAHI_UI_LIBS)
38 +AC_SUBST(AVAHI_UI_CFLAGS)
39 +AM_CONDITIONAL(ENABLE_AVAHI_UI, [test "$have_avahi_ui" = "yes"])
40
41 # *************
42 # Remote Access
43 diff --git a/src/gdu-gtk/gdu-connect-to-server-dialog.c b/src/gdu-gtk/gdu-connect-to-server-dialog.c
44 index 9ecf08c..5ad47bb 100644
45 --- a/src/gdu-gtk/gdu-connect-to-server-dialog.c
46 +++ b/src/gdu-gtk/gdu-connect-to-server-dialog.c
47 @@ -24,7 +24,10 @@
48
49 #include "config.h"
50 #include <glib/gi18n-lib.h>
51 +
52 +#ifdef HAVE_AVAHI_UI
53 #include <avahi-ui/avahi-ui.h>
54 +#endif
55
56 #include "gdu-connect-to-server-dialog.h"
57
58 @@ -143,6 +146,7 @@ gdu_connect_to_server_dialog_get_address (GduConnectToServerDialog *dialog)
59
60 /* ---------------------------------------------------------------------------------------------------- */
61
62 +#ifdef HAVE_AVAHI_UI
63 static void
64 on_dns_sd_clicked (GtkButton *button,
65 gpointer user_data)
66 @@ -171,6 +175,7 @@ on_dns_sd_clicked (GtkButton *button,
67
68 gtk_widget_destroy (service_dialog);
69 }
70 +#endif
71
72 /* ---------------------------------------------------------------------------------------------------- */
73
74 @@ -218,6 +223,7 @@ gdu_connect_to_server_dialog_constructed (GObject *object)
75 GTK_STOCK_CONNECT,
76 GTK_RESPONSE_OK);
77
78 +#ifdef HAVE_AVAHI_UI
79 button = gtk_button_new_with_mnemonic (_("_Browse..."));
80 image = gtk_image_new_from_stock (GTK_STOCK_NETWORK, GTK_ICON_SIZE_BUTTON);
81 gtk_button_set_image (GTK_BUTTON (button), image);
82 @@ -235,6 +241,7 @@ gdu_connect_to_server_dialog_constructed (GObject *object)
83 "clicked",
84 G_CALLBACK (on_dns_sd_clicked),
85 dialog);
86 +#endif
87
88 content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
89
90 --
91 1.6.4.4
92

  ViewVC Help
Powered by ViewVC 1.1.13