public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-control-center/files: gnome-control-center-3.8.5-optional.patch gnome-control-center-3.8.0-optional.patch
@ 2013-10-08 15:24 Alexandre Rostovtsev (tetromino)
  0 siblings, 0 replies; only message in thread
From: Alexandre Rostovtsev (tetromino) @ 2013-10-08 15:24 UTC (permalink / raw
  To: gentoo-commits

tetromino    13/10/08 15:24:51

  Added:                gnome-control-center-3.8.5-optional.patch
  Removed:              gnome-control-center-3.8.0-optional.patch
  Log:
  Fix wacom panel not getting enabled in panel loader (bug #487240, thanks to Serge Gavrilov and Pacho Ramos). Consolidate various *-optional-* patches into one for sanity, since upstream is not willing to accept any of them in any case. Remove old.
  
  (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)

Revision  Changes    Path
1.1                  gnome-base/gnome-control-center/files/gnome-control-center-3.8.5-optional.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-control-center/files/gnome-control-center-3.8.5-optional.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gnome-control-center/files/gnome-control-center-3.8.5-optional.patch?rev=1.1&content-type=text/plain

Index: gnome-control-center-3.8.5-optional.patch
===================================================================
From d8a92119a56b2d61814385a1b66d6597f55678e2 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Sun, 28 Jul 2013 14:23:39 -0400
Subject: [PATCH] Make bluetooth/colord/goa/kerberos/mm/wacom optional

Upstream is not interested in any part of this patch:

https://bugzilla.gnome.org/show_bug.cgi?id=686840
https://bugzilla.gnome.org/show_bug.cgi?id=697478
https://bugzilla.gnome.org/show_bug.cgi?id=700145
---
 configure.ac                            | 157 +++++++++++++++++++++++++++-----
 panels/Makefile.am                      |  10 +-
 panels/user-accounts/um-realm-manager.c |   9 ++
 shell/Makefile.am                       |  10 +-
 shell/cc-panel-loader.c                 |   8 ++
 5 files changed, 165 insertions(+), 29 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1184e44..d226062 100644
--- a/configure.ac
+++ b/configure.ac
@@ -143,13 +143,57 @@ PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2
                   gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11)
 PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES gmodule-2.0)
 PKG_CHECK_MODULES(NOTIFICATIONS_PANEL, $COMMON_MODULES libgnome-menu-3.0)
-PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION)
+
+build_online_accounts=false
+AC_ARG_ENABLE(goa,
+	AC_HELP_STRING([--disable-goa],
+		[disable online accounts management panel]),
+	[case "${enableval}" in
+		yes) WANT_ONLINE_ACCOUNTS=yes ;;
+		no) WANT_ONLINE_ACCOUNTS=no ;;
+		*) AC_MSG_ERROR(bad value ${enableval} for --disable-goa) ;;
+	esac],
+	[WANT_ONLINE_ACCOUNTS=yes]) dnl Default value
+
+if test x$WANT_ONLINE_ACCOUNTS = xyes; then
+	PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION)
+	build_online_accounts=true
+fi
+if test "x$build_online_accounts" = xtrue ; then
+	AC_DEFINE(BUILD_ONLINE_ACCOUNTS, 1, [Define to 1 to build the Online Accounts panel])
+fi
+AM_CONDITIONAL(BUILD_ONLINE_ACCOUNTS, test "x$build_online_accounts" = "xtrue")
+AC_SUBST(ONLINE_ACCOUNTS_PANEL_CFLAGS)
+AC_SUBST(ONLINE_ACCOUNTS_PANEL_LIBS)
+
 PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1
                   gnome-settings-daemon >= $GSD_REQUIRED_VERSION)
-PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES
-                  colord >= $COLORD_REQUIRED_VERSION
-                  colord-gtk >= $COLORD_GTK_REQUIRED_VERSION
-                  gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
+
+build_color=false
+AC_ARG_ENABLE(color,
+	AC_HELP_STRING([--disable-color],
+		[disable color management panel]),
+	[case "${enableval}" in
+		yes) WANT_COLOR=yes ;;
+		no) WANT_COLOR=no ;;
+		*) AC_MSG_ERROR(bad value ${enableval} for --disable-color) ;;
+	esac],
+	[WANT_COLOR=yes]) dnl Default value
+
+if test x$WANT_COLOR = xyes; then
+	PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES
+		colord >= $COLORD_REQUIRED_VERSION
+		colord-gtk >= $COLORD_GTK_REQUIRED_VERSION
+		gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
+	build_color=true
+fi
+if test "x$build_color" = xtrue ; then
+	AC_DEFINE(BUILD_COLOR, 1, [Define to 1 to build the Color panel])
+fi
+AM_CONDITIONAL(BUILD_COLOR, test "x$build_color" = "xtrue")
+AC_SUBST(COLOR_PANEL_CFLAGS)
+AC_SUBST(COLOR_PANEL_LIBS)
+
 PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES
                   polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
 PKG_CHECK_MODULES(PRIVACY_PANEL, $COMMON_MODULES)
@@ -201,8 +245,25 @@ if test x${have_networkmanager} = xyes; then
 fi
 
 # Check for libmm-glib for ModemManager1 support
-PKG_CHECK_MODULES(MM_GLIB, mm-glib,
-                  [have_libmm_glib=yes], have_libmm_glib=no)
+build_modemmanager=false
+AC_ARG_ENABLE(modemmanager,
+	AC_HELP_STRING([--disable-modemmanager],
+		[disable modemmanager support]),
+	[case "${enableval}" in
+		yes) WANT_MODEMMANAGER=yes ;;
+		no)  WANT_MODEMMANAGER=no ;;
+		*) AC_MSG_ERROR(bad value ${enableval} for --disable-modemmanager) ;;
+	esac],
+	[WANT_MODEMMANAGER=no]) dnl Default value
+
+if test "x$WANT_MODEMMANAGER" = xyes ; then
+	PKG_CHECK_MODULES(MM_GLIB, mm-glib,
+                  [have_libmm_glib=yes],
+		  AC_MSG_ERROR(No ModemManager1 support (libmm-glib) not found))
+else
+	have_libmm_glib=no
+fi
+
 if test "x$have_libmm_glib" = xno ; then
   AC_MSG_WARN(*** Network panel will not be built with ModemManager1 support (libmm-glib not found) ***)
 else
@@ -210,9 +271,22 @@ else
 fi
 AM_CONDITIONAL(HAVE_MM_GLIB, test "x$have_libmm_glib" = "xyes")
 
-# Check for gnome-bluetooth
-PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.5.5,
-		  [have_bluetooth=yes], have_bluetooth=no)
+have_bluetooth=no
+AC_ARG_ENABLE(bluetooth,
+	AC_HELP_STRING([--disable-bluetooth],
+		[disable bluetooth management panel]),
+	[case "${enableval}" in
+		yes) WANT_BLUETOOTH=yes ;;
+		no) WANT_BLUETOOTH=no ;;
+		*) AC_MSG_ERROR(bad value ${enableval} for --disable-bluetooth) ;;
+	esac],
+	[WANT_BLUETOOTH=yes]) dnl Default value
+
+if test x$WANT_BLUETOOTH = xyes; then
+	# Check for gnome-bluetooth
+	PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.5.5)
+	have_bluetooth=yes
+fi
 if test "x$have_bluetooth" = xyes ; then
 	AC_DEFINE(BUILD_BLUETOOTH, 1, [Define to 1 to build the Bluetooth panel])
 fi
@@ -297,12 +371,24 @@ case $host_os in
     if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
       have_wacom=no
     else
-      PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
-                        gnome-settings-daemon >= $GSD_REQUIRED_VERSION
-                        xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
-                        gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
-      AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
-      have_wacom=yes
+      AC_ARG_ENABLE(wacom,
+                    AC_HELP_STRING([--disable-wacom],
+                                   [disable wacom management panel]),
+                    [case "${enableval}" in
+                            yes) WANT_WACOM=yes ;;
+                            no) WANT_WACOM=no ;;
+                            *) AC_MSG_ERROR(bad value ${enableval} for --disable-wacom) ;;
+		    esac],
+		    [WANT_WACOM=yes]) dnl Default value
+
+      if test x$WANT_WACOM = xyes; then
+        PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
+                          gnome-settings-daemon >= $GSD_REQUIRED_VERSION
+                          xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
+                          gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
+        AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
+        have_wacom=yes
+      fi
     fi
     ;;
   *)
@@ -312,16 +398,22 @@ esac
 AM_CONDITIONAL(BUILD_WACOM, [test x"$have_wacom" = x"yes"])
 
 # Kerberos kerberos support
-AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
-if test "$KRB5_CONFIG" = "no"; then
-  AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
-fi
-
-AC_MSG_CHECKING(for krb5 libraries and flags)
-KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
-KRB5_LIBS="`$KRB5_CONFIG --libs`"
-AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
+AC_ARG_ENABLE([kerberos],
+              AS_HELP_STRING([--disable-kerberos], [disable kerberos support (default: enabled)]),,
+              [enable_kerberos=yes])
+
+if test x"$enable_kerberos" != x"no" ; then
+    AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
+    if test "$KRB5_CONFIG" = "no"; then
+      AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
+    fi
 
+    AC_MSG_CHECKING(for krb5 libraries and flags)
+    KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
+    KRB5_LIBS="`$KRB5_CONFIG --libs`"
+    AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
+    AC_DEFINE(HAVE_KERBEROS, 1, [defined if krb5 is available])
+fi
 AC_SUBST(KRB5_CFLAGS)
 AC_SUBST(KRB5_LIBS)
 
@@ -563,6 +655,11 @@ if test "x$have_bluetooth" = "xyes"; then
 else
 	AC_MSG_NOTICE([   Bluetooth panel disabled])
 fi
+if test "x$build_color" = "xtrue"; then
+	AC_MSG_NOTICE([** colord (Color panel)])
+else
+	AC_MSG_NOTICE([   Color panel disabled])
+fi
 if test "x$enable_cups" = "xyes"; then
 	AC_MSG_NOTICE([** CUPS (Printers panel)])
 else
@@ -573,11 +670,21 @@ if test "x$have_cheese" = "xyes"; then
 else
 	AC_MSG_NOTICE([   Users panel webcam support disabled])
 fi
+if test "x$build_online_accounts" = "xtrue"; then
+	AC_MSG_NOTICE([** gnome-online-accounts (Online Accounts panel)])
+else
+	AC_MSG_NOTICE([   Online Accounts panel disabled])
+fi
 if test "x$with_libsocialweb" = "xyes"; then
 	AC_MSG_NOTICE([** libsocialweb (Background panel Flickr support)])
 else
 	AC_MSG_NOTICE([   Background panel Flickr support disabled])
 fi
+if test "x$build_wacom" = "xtrue"; then
+	AC_MSG_NOTICE([** libwacom (Wacom Graphics Tablet panel)])
+else
+	AC_MSG_NOTICE([   Wacom Graphics Tablet panel disabled])
+fi
 if test "x$have_wacom" = "xyes"; then
 	AC_MSG_NOTICE([** wacom (Wacom tablet panel)])
 else
diff --git a/panels/Makefile.am b/panels/Makefile.am
index 9961c25..0c54622 100644
--- a/panels/Makefile.am
+++ b/panels/Makefile.am
@@ -2,11 +2,9 @@ SUBDIRS= \
 	common \
 	background \
 	power \
-	color \
 	display \
 	mouse \
 	notifications \
-	online-accounts \
 	region \
 	info \
 	sound \
@@ -18,6 +16,10 @@ SUBDIRS= \
 	privacy \
 	sharing
 
+if BUILD_COLOR
+SUBDIRS += color
+endif
+
 if BUILD_WACOM
 SUBDIRS += wacom
 endif
@@ -34,4 +36,8 @@ if BUILD_BLUETOOTH
 SUBDIRS += bluetooth
 endif
 
+if BUILD_ONLINE_ACCOUNTS
+SUBDIRS += online-accounts
+endif
+
 -include $(top_srcdir)/git.mk
diff --git a/panels/user-accounts/um-realm-manager.c b/panels/user-accounts/um-realm-manager.c
index 1fd41ad..ce0988e 100644
--- a/panels/user-accounts/um-realm-manager.c
+++ b/panels/user-accounts/um-realm-manager.c
@@ -23,7 +23,9 @@
 
 #include "um-realm-manager.h"
 
+#ifdef HAVE_KERBEROS
 #include <krb5/krb5.h>
+#endif
 
 #include <glib.h>
 #include <glib/gi18n.h>
@@ -697,6 +699,7 @@ login_closure_free (gpointer data)
         g_slice_free (LoginClosure, login);
 }
 
+#ifdef HAVE_KERBEROS
 static krb5_error_code
 login_perform_kinit (krb5_context k5,
                      const gchar *realm,
@@ -760,12 +763,14 @@ login_perform_kinit (krb5_context k5,
 
         return code;
 }
+#endif /* HAVE_KERBEROS */
 
 static void
 kinit_thread_func (GSimpleAsyncResult *async,
                    GObject *object,
                    GCancellable *cancellable)
 {
+#ifdef HAVE_KERBEROS
         LoginClosure *login = g_simple_async_result_get_op_res_gpointer (async);
         krb5_context k5 = NULL;
         krb5_error_code code;
@@ -843,6 +848,10 @@ kinit_thread_func (GSimpleAsyncResult *async,
 
         if (k5)
                 krb5_free_context (k5);
+#else /* HAVE_KERBEROS */
+        g_simple_async_result_set_error (async, UM_REALM_ERROR, UM_REALM_ERROR_GENERIC,
+                                         _("gnome-control-center was built without kerberos support"));
+#endif
 }
 
 void
diff --git a/shell/Makefile.am b/shell/Makefile.am
index f9f9070..094aca1 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -51,14 +51,12 @@ gnome_control_center_LDADD =						\
 	$(top_builddir)/libgd/libgd.la					\
 	$(top_builddir)/panels/common/liblanguage.la			\
 	$(top_builddir)/panels/background/libbackground.la		\
-	$(top_builddir)/panels/color/libcolor.la			\
 	$(top_builddir)/panels/datetime/libdate_time.la			\
 	$(top_builddir)/panels/display/libdisplay.la			\
 	$(top_builddir)/panels/info/libinfo.la				\
 	$(top_builddir)/panels/keyboard/libkeyboard.la			\
 	$(top_builddir)/panels/mouse/libmouse-properties.la		\
 	$(top_builddir)/panels/notifications/libnotifications.la	\
-	$(top_builddir)/panels/online-accounts/libonline-accounts.la	\
 	$(top_builddir)/panels/power/libpower.la			\
 	$(top_builddir)/panels/privacy/libprivacy.la			\
 	$(top_builddir)/panels/region/libregion.la			\
@@ -84,6 +82,14 @@ if BUILD_BLUETOOTH
 gnome_control_center_LDADD += $(top_builddir)/panels/bluetooth/libbluetooth.la
 endif
 
+if BUILD_COLOR
+gnome_control_center_LDADD += $(top_builddir)/panels/color/libcolor.la
+endif
+
+if BUILD_ONLINE_ACCOUNTS
+gnome_control_center_LDADD += $(top_builddir)/panels/online-accounts/libonline-accounts.la
+endif
+
 AM_CPPFLAGS = -DGNOMELOCALEDIR="\"$(datadir)/locale\""
 
 sysdir = $(datadir)/applications
diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
index 1484cd8..f15678b 100644
--- a/shell/cc-panel-loader.c
+++ b/shell/cc-panel-loader.c
@@ -33,7 +33,9 @@ extern GType cc_background_panel_get_type (void);
 #ifdef BUILD_BLUETOOTH
 extern GType cc_bluetooth_panel_get_type (void);
 #endif /* BUILD_BLUETOOTH */
+#ifdef BUILD_COLOR
 extern GType cc_color_panel_get_type (void);
+#endif /* BUILD_COLOR */
 extern GType cc_date_time_panel_get_type (void);
 extern GType cc_display_panel_get_type (void);
 extern GType cc_info_panel_get_type (void);
@@ -43,7 +45,9 @@ extern GType cc_mouse_panel_get_type (void);
 extern GType cc_network_panel_get_type (void);
 #endif /* BUILD_NETWORK */
 extern GType cc_notifications_panel_get_type (void);
+#ifdef BUILD_ONLINE_ACCOUNTS
 extern GType cc_goa_panel_get_type (void);
+#endif /* BUILD_ONLINE_ACCOUNTS */
 extern GType cc_power_panel_get_type (void);
 #ifdef BUILD_PRINTERS
 extern GType cc_printers_panel_get_type (void);
@@ -77,7 +81,9 @@ static struct {
 #ifdef BUILD_BLUETOOTH
   PANEL_TYPE("bluetooth",        cc_bluetooth_panel_get_type    ),
 #endif
+#ifdef BUILD_COLOR
   PANEL_TYPE("color",            cc_color_panel_get_type        ),
+#endif
   PANEL_TYPE("datetime",         cc_date_time_panel_get_type    ),
   PANEL_TYPE("display",          cc_display_panel_get_type      ),
   PANEL_TYPE("info",             cc_info_panel_get_type         ),
@@ -87,7 +93,9 @@ static struct {
   PANEL_TYPE("network",          cc_network_panel_get_type      ),
 #endif
   PANEL_TYPE("notifications",    cc_notifications_panel_get_type),
+#ifdef BUILD_ONLINE_ACCOUNTS
   PANEL_TYPE("online-accounts",  cc_goa_panel_get_type          ),
+#endif
   PANEL_TYPE("power",            cc_power_panel_get_type        ),
 #ifdef BUILD_PRINTERS
   PANEL_TYPE("printers",         cc_printers_panel_get_type     ),
-- 
1.8.3.2






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-08 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 15:24 [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-control-center/files: gnome-control-center-3.8.5-optional.patch gnome-control-center-3.8.0-optional.patch Alexandre Rostovtsev (tetromino)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox