[evolution-data-server/openismus-work-master: 10/12] Remove libedataserverui and make google backend optional



commit e9d9a1ea3a2d2dbcdb8ff8df928220fb8dd08b18
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Wed Dec 5 15:56:07 2012 +0900

    Remove libedataserverui and make google backend optional
    
    This patch removes libedataserverui (which is planned to be folded
    into evolution proper) and only builds the google backend gdata is
    present and the build has been configured to build google (enabled
    by default). Based on Patrick Ohly's patch on bgo #686688.
    
    Conflicts:
    
    	addressbook/backends/Makefile.am
    	configure.ac
    	docs/reference/libedataserverui/libedataserverui-docs.sgml
    	docs/reference/libedataserverui/libedataserverui-sections.txt
    	libedataserverui/Makefile.am
    	libedataserverui/e-book-auth-util.h
    	libedataserverui/e-categories-editor.c
    	libedataserverui/e-categories-editor.h
    	libedataserverui/e-category-editor.c
    	libedataserverui/e-cell-renderer-color.c
    	libedataserverui/e-client-utils.c
    	libedataserverui/e-client-utils.h
    	libedataserverui/e-name-selector-dialog.c
    	libedataserverui/e-name-selector-dialog.h
    	libedataserverui/e-name-selector-entry.c
    	libedataserverui/e-name-selector-list.c
    	libedataserverui/e-name-selector.c
    	libedataserverui/e-passwords-win32.c
    	libedataserverui/e-passwords.c
    	libedataserverui/e-source-selector-dialog.c
    	tests/Makefile.am
    	tests/libedataserverui/Makefile.am
    	tests/libedataserverui/evolution-source-viewer.c
    	tests/libedataserverui/test-category-completion.c
    	tests/libedataserverui/test-contact-store.c
    	tests/libedataserverui/test-source-selector.c

 Makefile.am                                        |    2 +-
 addressbook/backends/Makefile.am                   |    8 +-
 configure.ac                                       |   52 +-
 docs/reference/Makefile.am                         |    1 -
 docs/reference/libedataserverui/Makefile.am        |   45 -
 .../libedataserverui/libedataserverui-docs.sgml    |   94 -
 .../libedataserverui/libedataserverui-sections.txt |  446 ---
 .../libedataserverui/libedataserverui.types        |   17 -
 libedataserver/e-source-registry.c                 |   16 +
 libedataserverui/Makefile.am                       |  113 -
 libedataserverui/e-book-auth-util.c                |  187 -
 libedataserverui/e-book-auth-util.h                |   49 -
 libedataserverui/e-categories-dialog.c             |  156 -
 libedataserverui/e-categories-dialog.h             |   73 -
 libedataserverui/e-categories-editor.c             |  436 ---
 libedataserverui/e-categories-editor.h             |   88 -
 libedataserverui/e-categories-selector.c           |  589 ----
 libedataserverui/e-categories-selector.h           |   97 -
 libedataserverui/e-category-completion.c           |  505 ---
 libedataserverui/e-category-completion.h           |   72 -
 libedataserverui/e-category-editor.c               |  343 --
 libedataserverui/e-category-editor.h               |   81 -
 libedataserverui/e-cell-renderer-color.c           |  243 --
 libedataserverui/e-cell-renderer-color.h           |   79 -
 libedataserverui/e-client-utils.c                  |  448 ---
 libedataserverui/e-client-utils.h                  |   64 -
 libedataserverui/e-contact-store.c                 | 1370 --------
 libedataserverui/e-contact-store.h                 |   94 -
 libedataserverui/e-data-server-ui-marshal.list     |    3 -
 libedataserverui/e-destination-store.c             |  751 -----
 libedataserverui/e-destination-store.h             |  106 -
 libedataserverui/e-name-selector-dialog.c          | 1863 ----------
 libedataserverui/e-name-selector-dialog.h          |  100 -
 libedataserverui/e-name-selector-entry.c           | 3542 --------------------
 libedataserverui/e-name-selector-entry.h           |  124 -
 libedataserverui/e-name-selector-list.c            |  793 -----
 libedataserverui/e-name-selector-list.h            |   82 -
 libedataserverui/e-name-selector-model.c           |  663 ----
 libedataserverui/e-name-selector-model.h           |  108 -
 libedataserverui/e-name-selector.c                 |  658 ----
 libedataserverui/e-name-selector.h                 |   94 -
 libedataserverui/e-passwords-win32.c               | 1064 ------
 libedataserverui/e-passwords.c                     |  890 -----
 libedataserverui/e-passwords.h                     |   81 -
 libedataserverui/e-source-combo-box.c              |  701 ----
 libedataserverui/e-source-combo-box.h              |   90 -
 libedataserverui/e-source-selector-dialog.c        |  453 ---
 libedataserverui/e-source-selector-dialog.h        |   85 -
 libedataserverui/e-source-selector.c               | 2085 ------------
 libedataserverui/e-source-selector.h               |  141 -
 libedataserverui/e-tree-model-generator.c          | 1345 --------
 libedataserverui/e-tree-model-generator.h          |  104 -
 libedataserverui/libedataserverui.h                |   50 -
 libedataserverui/libedataserverui.pc.in            |   13 -
 .../evolution-addressbook-factory.c                |    4 +-
 .../evolution-calendar-factory.c                   |    4 +-
 .../evolution-source-registry.c                    |    4 +-
 tests/Makefile.am                                  |    2 +-
 tests/libedataserverui/Makefile.am                 |   57 -
 tests/libedataserverui/evolution-source-viewer.c   | 1176 -------
 tests/libedataserverui/test-category-completion.c  |   67 -
 tests/libedataserverui/test-contact-store.c        |  143 -
 tests/libedataserverui/test-name-selector.c        |  102 -
 tests/libedataserverui/test-source-combo-box.c     |  107 -
 tests/libedataserverui/test-source-selector.c      |  157 -
 65 files changed, 48 insertions(+), 23532 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8f6b082..aad317e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS=-I m4
 
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --with-private-docs --with-krb5=/usr --enable-introspection
 
-SUBDIRS = camel data private libedataserver libebackend addressbook calendar libedataserverui modules services tests docs art po
+SUBDIRS = camel data private libedataserver libebackend addressbook calendar modules services tests docs art po
 
 if HAVE_INTROSPECTION
 if HAVE_VALA
diff --git a/addressbook/backends/Makefile.am b/addressbook/backends/Makefile.am
index f98bd2e..fe72ec0 100644
--- a/addressbook/backends/Makefile.am
+++ b/addressbook/backends/Makefile.am
@@ -4,6 +4,12 @@ else
 LDAP_SUBDIR =
 endif
 
-SUBDIRS = file $(LDAP_SUBDIR) google webdav
+if HAVE_GOOGLE
+GOOGLE_SUBDIR = google
+else
+GOOGLE_SUBDIR = 
+endif
+
+SUBDIRS = file $(LDAP_SUBDIR) $(GOOGLE_SUBDIR) webdav
 
 -include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index aba166a..6db0d92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,10 +98,6 @@ LIBEDATASERVER_CURRENT=17
 LIBEDATASERVER_REVISION=0
 LIBEDATASERVER_AGE=0
 
-LIBEDATASERVERUI_CURRENT=5
-LIBEDATASERVERUI_REVISION=0
-LIBEDATASERVERUI_AGE=0
-
 LIBECAL_CURRENT=15
 LIBECAL_REVISION=0
 LIBECAL_AGE=0
@@ -136,9 +132,6 @@ AC_SUBST(EDS_MICRO_VERSION)
 AC_SUBST(LIBEDATASERVER_CURRENT)
 AC_SUBST(LIBEDATASERVER_REVISION)
 AC_SUBST(LIBEDATASERVER_AGE)
-AC_SUBST(LIBEDATASERVERUI_CURRENT)
-AC_SUBST(LIBEDATASERVERUI_REVISION)
-AC_SUBST(LIBEDATASERVERUI_AGE)
 AC_SUBST(LIBECAL_CURRENT)
 AC_SUBST(LIBECAL_REVISION)
 AC_SUBST(LIBECAL_AGE)
@@ -364,10 +357,8 @@ dnl ***********************************
 PKG_CHECK_MODULES(GNOME_PLATFORM,
 	[gio-2.0 >= glib_minimum_version
 	gmodule-2.0 >= glib_minimum_version
-	gtk+-3.0 >= gdk_minimum_version
 	libxml-2.0 >= libxml_minimum_version
-	libsoup-2.4 >= libsoup_minimum_version
-	libgdata >= libgdata_minimum_version])
+	libsoup-2.4 >= libsoup_minimum_version])
 
 if test x$os_win32 = xno; then
 	PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
@@ -1294,26 +1285,10 @@ AC_SUBST(E_DATA_SERVER_CFLAGS)
 AC_SUBST(E_DATA_SERVER_LIBS)
 
 dnl ******************************
-dnl libedataserverui
+dnl libebackend flags
 dnl ******************************
-E_DATA_SERVER_UI_DEPS="gtk+-3.0 libxml-2.0 libsoup-2.4"
-
-EVO_SET_COMPILE_FLAGS(E_DATA_SERVER_UI, $E_DATA_SERVER_UI_DEPS, , )
-AC_SUBST(E_DATA_SERVER_UI_CFLAGS)
-AC_SUBST(E_DATA_SERVER_UI_LIBS)
-
-if test "x$enable_maintainer_mode" = "xyes" ; then
-	FACTORY_GTK_CFLAGS=$E_DATA_SERVER_UI_CFLAGS
-	FACTORY_GTK_LIBS=$E_DATA_SERVER_UI_LIBS
-	AC_SUBST(FACTORY_GTK_CFLAGS)
-	AC_SUBST(FACTORY_GTK_LIBS)
-fi
-
 E_BACKEND_DEPS="gio-2.0 gmodule-2.0 libsecret-1 libsoup-2.4 libxml-2.0"
 
-dnl ******************************
-dnl libebackend flags
-dnl ******************************
 EVO_SET_COMPILE_FLAGS(E_BACKEND, $E_BACKEND_DEPS)
 AC_SUBST(E_BACKEND_CFLAGS)
 AC_SUBST(E_BACKEND_LIBS)
@@ -1367,10 +1342,20 @@ dnl Google flags
 dnl ******************************
 LIBGDATA_REQUIRED=libgdata_minimum_version
 AC_SUBST(LIBGDATA_REQUIRED)
-
-EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
-AC_SUBST(GDATA_CFLAGS)
-AC_SUBST(GDATA_LIBS)
+AC_ARG_ENABLE([google],
+	[AS_HELP_STRING([--enable-google],
+	[enable Google Contacts support (default=yes)])],
+	[enable_google=$enableval], [enable_google=yes])
+AC_MSG_CHECKING([if Google Contacts support is enabled])
+AC_MSG_RESULT([$enable_google])
+if test "x$enable_google" = xyes; then
+	EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
+	AC_SUBST(GDATA_CFLAGS)
+	AC_SUBST(GDATA_LIBS)
+
+	AC_DEFINE(HAVE_GOOGLE, 1, [Define to 1 if you have the google-1.0 package.])
+fi
+AM_CONDITIONAL(HAVE_GOOGLE, [test x$enable_google = xyes])
 
 dnl ******************************
 dnl Groupwise flags
@@ -1619,8 +1604,6 @@ libebackend/libebackend.pc
 libedataserver/Makefile
 libedataserver/eds-version.h
 libedataserver/libedataserver.pc
-libedataserverui/Makefile
-libedataserverui/libedataserverui.pc
 modules/Makefile
 modules/cache-reaper/Makefile
 modules/gnome-online-accounts/Makefile
@@ -1639,7 +1622,6 @@ tests/libecal/Makefile
 tests/libecal/client/Makefile
 tests/libedata-cal/Makefile
 tests/libedataserver/Makefile
-tests/libedataserverui/Makefile
 tests/tools/Makefile
 docs/Makefile
 docs/reference/Makefile
@@ -1651,7 +1633,6 @@ docs/reference/calendar/libecal/Makefile
 docs/reference/calendar/libedata-cal/Makefile
 docs/reference/camel/Makefile
 docs/reference/libedataserver/Makefile
-docs/reference/libedataserverui/Makefile
 docs/reference/libebackend/Makefile
 docs/reference/private/Makefile
 po/Makefile.in
@@ -1675,6 +1656,7 @@ echo "
 	Introspection:		$enable_introspection
 	Vala bindings:		$enable_vala_bindings
 	GNOME Online Accounts	$enable_goa
+	Google Contacts		$enable_google
 	Code coverage (gcov):	$enable_code_coverage
 	Strict building:	$enable_strict
 "
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 2d64b2c..f1f2986 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -9,7 +9,6 @@ SUBDIRS = \
 	calendar \
 	camel \
 	libedataserver \
-	libedataserverui \
 	libebackend \
 	$(PRIVATE_DIR) \
 	$(NULL)
diff --git a/libedataserver/e-source-registry.c b/libedataserver/e-source-registry.c
index 0d83d98..9b29137 100644
--- a/libedataserver/e-source-registry.c
+++ b/libedataserver/e-source-registry.c
@@ -44,10 +44,12 @@
 #include <glib/gstdio.h>
 #include <glib/gi18n-lib.h>
 
+#ifdef ENABLE_AUTHENTICATION
 /* XXX Yeah, yeah... */
 #define GCR_API_SUBJECT_TO_CHANGE
 
 #include <gcr/gcr-base.h>
+#endif
 
 /* Private D-Bus classes. */
 #include <e-dbus-source.h>
@@ -124,7 +126,9 @@ struct _AuthContext {
 	GCancellable *cancellable;
 	GMainLoop *main_loop;
 	ESourceAuthenticationResult auth_result;
+#ifdef ENABLE_AUTHENTICATION
 	GcrSecretExchange *secret_exchange;
+#endif
 	gboolean authenticating;
 	gboolean success;
 	GError **error;
@@ -204,6 +208,7 @@ async_context_free (AsyncContext *async_context)
 	g_slice_free (AsyncContext, async_context);
 }
 
+#ifdef ENABLE_AUTHENTICATION
 static void
 auth_context_free (AuthContext *auth_context)
 {
@@ -224,6 +229,7 @@ auth_context_free (AuthContext *auth_context)
 
 	g_slice_free (AuthContext, auth_context);
 }
+#endif
 
 static CreateContext *
 create_context_new (void)
@@ -1448,6 +1454,7 @@ source_registry_authenticate_thread (GSimpleAsyncResult *simple,
 		g_simple_async_result_take_error (simple, error);
 }
 
+#ifdef ENABLE_AUTHENTICATION
 /* Helper for e_source_registry_authenticate_sync() */
 static gboolean
 source_registry_authenticate_respond_cb (AuthContext *auth_context)
@@ -1652,6 +1659,7 @@ source_registry_call_authenticate_for_source (ESourceRegistry *registry,
 
 	return success;
 }
+#endif /* ENABLE_AUTHENTICATION */
 
 /**
  * e_source_registry_authenticate_sync:
@@ -1684,6 +1692,7 @@ e_source_registry_authenticate_sync (ESourceRegistry *registry,
                                      GCancellable *cancellable,
                                      GError **error)
 {
+#ifdef ENABLE_AUTHENTICATION
 	AuthContext *auth_context;
 	GMainContext *main_context;
 	EDBusAuthenticator *dbus_auth;
@@ -1775,6 +1784,13 @@ exit:
 	g_main_context_unref (main_context);
 
 	return success;
+#else
+	g_set_error_literal (error,
+			     G_IO_ERROR, G_IO_ERROR_CANCELLED,
+			     _("Authentication support not enabled in EDS"));
+	return FALSE;
+
+#endif /* ENABLE_AUTHENTICATION */
 }
 
 /**
diff --git a/services/evolution-addressbook-factory/evolution-addressbook-factory.c b/services/evolution-addressbook-factory/evolution-addressbook-factory.c
index ffb69b7..037deaa 100644
--- a/services/evolution-addressbook-factory/evolution-addressbook-factory.c
+++ b/services/evolution-addressbook-factory/evolution-addressbook-factory.c
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 #include <gtk/gtk.h>
 #endif
 
@@ -92,7 +92,7 @@ main (gint argc,
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 	/* This is only to load gtk-modules, like
 	 * bug-buddy's gnomesegvhandler, if possible */
 	gtk_init_check (&argc, &argv);
diff --git a/services/evolution-calendar-factory/evolution-calendar-factory.c b/services/evolution-calendar-factory/evolution-calendar-factory.c
index a80731b..4d3a9a3 100644
--- a/services/evolution-calendar-factory/evolution-calendar-factory.c
+++ b/services/evolution-calendar-factory/evolution-calendar-factory.c
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 #include <gtk/gtk.h>
 #endif
 
@@ -96,7 +96,7 @@ main (gint argc,
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 	/* This is only to load gtk-modules, like
 	 * bug-buddy's gnomesegvhandler, if possible. */
 	gtk_init_check (&argc, &argv);
diff --git a/services/evolution-source-registry/evolution-source-registry.c b/services/evolution-source-registry/evolution-source-registry.c
index 6aca836..6fb936b 100644
--- a/services/evolution-source-registry/evolution-source-registry.c
+++ b/services/evolution-source-registry/evolution-source-registry.c
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 #include <gtk/gtk.h>
 #endif
 
@@ -43,7 +43,7 @@ main (gint argc,
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
-#ifdef ENABLE_MAINTAINER_MODE
+#if defined(ENABLE_MAINTAINER_MODE) && defined(HAVE_EDATASERVERUI)
 	/* This is only to load gtk-modules, like
 	 * bug-buddy's gnomesegvhandler, if possible */
 	gtk_init_check (&argc, &argv);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 46f96be..6c5f457 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = libedataserver libedataserverui libebook libecal libedata-cal tools
+SUBDIRS = libedataserver libebook libecal libedata-cal tools
 
 @GNOME_CODE_COVERAGE_RULES@
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]