/[gentoo-x86]/gnome-base/gnome-control-center/files/gnome-control-center-3.8.5-optional.patch
Gentoo

Contents of /gnome-base/gnome-control-center/files/gnome-control-center-3.8.5-optional.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Oct 8 15:24:51 2013 UTC (9 months, 2 weeks ago) by tetromino
Branch: MAIN
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)

1 From d8a92119a56b2d61814385a1b66d6597f55678e2 Mon Sep 17 00:00:00 2001
2 From: Alexandre Rostovtsev <tetromino@gentoo.org>
3 Date: Sun, 28 Jul 2013 14:23:39 -0400
4 Subject: [PATCH] Make bluetooth/colord/goa/kerberos/mm/wacom optional
5
6 Upstream is not interested in any part of this patch:
7
8 https://bugzilla.gnome.org/show_bug.cgi?id=686840
9 https://bugzilla.gnome.org/show_bug.cgi?id=697478
10 https://bugzilla.gnome.org/show_bug.cgi?id=700145
11 ---
12 configure.ac | 157 +++++++++++++++++++++++++++-----
13 panels/Makefile.am | 10 +-
14 panels/user-accounts/um-realm-manager.c | 9 ++
15 shell/Makefile.am | 10 +-
16 shell/cc-panel-loader.c | 8 ++
17 5 files changed, 165 insertions(+), 29 deletions(-)
18
19 diff --git a/configure.ac b/configure.ac
20 index 1184e44..d226062 100644
21 --- a/configure.ac
22 +++ b/configure.ac
23 @@ -143,13 +143,57 @@ PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2
24 gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11)
25 PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES gmodule-2.0)
26 PKG_CHECK_MODULES(NOTIFICATIONS_PANEL, $COMMON_MODULES libgnome-menu-3.0)
27 -PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION)
28 +
29 +build_online_accounts=false
30 +AC_ARG_ENABLE(goa,
31 + AC_HELP_STRING([--disable-goa],
32 + [disable online accounts management panel]),
33 + [case "${enableval}" in
34 + yes) WANT_ONLINE_ACCOUNTS=yes ;;
35 + no) WANT_ONLINE_ACCOUNTS=no ;;
36 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-goa) ;;
37 + esac],
38 + [WANT_ONLINE_ACCOUNTS=yes]) dnl Default value
39 +
40 +if test x$WANT_ONLINE_ACCOUNTS = xyes; then
41 + PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION)
42 + build_online_accounts=true
43 +fi
44 +if test "x$build_online_accounts" = xtrue ; then
45 + AC_DEFINE(BUILD_ONLINE_ACCOUNTS, 1, [Define to 1 to build the Online Accounts panel])
46 +fi
47 +AM_CONDITIONAL(BUILD_ONLINE_ACCOUNTS, test "x$build_online_accounts" = "xtrue")
48 +AC_SUBST(ONLINE_ACCOUNTS_PANEL_CFLAGS)
49 +AC_SUBST(ONLINE_ACCOUNTS_PANEL_LIBS)
50 +
51 PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1
52 gnome-settings-daemon >= $GSD_REQUIRED_VERSION)
53 -PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES
54 - colord >= $COLORD_REQUIRED_VERSION
55 - colord-gtk >= $COLORD_GTK_REQUIRED_VERSION
56 - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
57 +
58 +build_color=false
59 +AC_ARG_ENABLE(color,
60 + AC_HELP_STRING([--disable-color],
61 + [disable color management panel]),
62 + [case "${enableval}" in
63 + yes) WANT_COLOR=yes ;;
64 + no) WANT_COLOR=no ;;
65 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-color) ;;
66 + esac],
67 + [WANT_COLOR=yes]) dnl Default value
68 +
69 +if test x$WANT_COLOR = xyes; then
70 + PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES
71 + colord >= $COLORD_REQUIRED_VERSION
72 + colord-gtk >= $COLORD_GTK_REQUIRED_VERSION
73 + gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
74 + build_color=true
75 +fi
76 +if test "x$build_color" = xtrue ; then
77 + AC_DEFINE(BUILD_COLOR, 1, [Define to 1 to build the Color panel])
78 +fi
79 +AM_CONDITIONAL(BUILD_COLOR, test "x$build_color" = "xtrue")
80 +AC_SUBST(COLOR_PANEL_CFLAGS)
81 +AC_SUBST(COLOR_PANEL_LIBS)
82 +
83 PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES
84 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
85 PKG_CHECK_MODULES(PRIVACY_PANEL, $COMMON_MODULES)
86 @@ -201,8 +245,25 @@ if test x${have_networkmanager} = xyes; then
87 fi
88
89 # Check for libmm-glib for ModemManager1 support
90 -PKG_CHECK_MODULES(MM_GLIB, mm-glib,
91 - [have_libmm_glib=yes], have_libmm_glib=no)
92 +build_modemmanager=false
93 +AC_ARG_ENABLE(modemmanager,
94 + AC_HELP_STRING([--disable-modemmanager],
95 + [disable modemmanager support]),
96 + [case "${enableval}" in
97 + yes) WANT_MODEMMANAGER=yes ;;
98 + no) WANT_MODEMMANAGER=no ;;
99 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-modemmanager) ;;
100 + esac],
101 + [WANT_MODEMMANAGER=no]) dnl Default value
102 +
103 +if test "x$WANT_MODEMMANAGER" = xyes ; then
104 + PKG_CHECK_MODULES(MM_GLIB, mm-glib,
105 + [have_libmm_glib=yes],
106 + AC_MSG_ERROR(No ModemManager1 support (libmm-glib) not found))
107 +else
108 + have_libmm_glib=no
109 +fi
110 +
111 if test "x$have_libmm_glib" = xno ; then
112 AC_MSG_WARN(*** Network panel will not be built with ModemManager1 support (libmm-glib not found) ***)
113 else
114 @@ -210,9 +271,22 @@ else
115 fi
116 AM_CONDITIONAL(HAVE_MM_GLIB, test "x$have_libmm_glib" = "xyes")
117
118 -# Check for gnome-bluetooth
119 -PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.5.5,
120 - [have_bluetooth=yes], have_bluetooth=no)
121 +have_bluetooth=no
122 +AC_ARG_ENABLE(bluetooth,
123 + AC_HELP_STRING([--disable-bluetooth],
124 + [disable bluetooth management panel]),
125 + [case "${enableval}" in
126 + yes) WANT_BLUETOOTH=yes ;;
127 + no) WANT_BLUETOOTH=no ;;
128 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-bluetooth) ;;
129 + esac],
130 + [WANT_BLUETOOTH=yes]) dnl Default value
131 +
132 +if test x$WANT_BLUETOOTH = xyes; then
133 + # Check for gnome-bluetooth
134 + PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.5.5)
135 + have_bluetooth=yes
136 +fi
137 if test "x$have_bluetooth" = xyes ; then
138 AC_DEFINE(BUILD_BLUETOOTH, 1, [Define to 1 to build the Bluetooth panel])
139 fi
140 @@ -297,12 +371,24 @@ case $host_os in
141 if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
142 have_wacom=no
143 else
144 - PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
145 - gnome-settings-daemon >= $GSD_REQUIRED_VERSION
146 - xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
147 - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
148 - AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
149 - have_wacom=yes
150 + AC_ARG_ENABLE(wacom,
151 + AC_HELP_STRING([--disable-wacom],
152 + [disable wacom management panel]),
153 + [case "${enableval}" in
154 + yes) WANT_WACOM=yes ;;
155 + no) WANT_WACOM=no ;;
156 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-wacom) ;;
157 + esac],
158 + [WANT_WACOM=yes]) dnl Default value
159 +
160 + if test x$WANT_WACOM = xyes; then
161 + PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
162 + gnome-settings-daemon >= $GSD_REQUIRED_VERSION
163 + xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
164 + gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
165 + AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
166 + have_wacom=yes
167 + fi
168 fi
169 ;;
170 *)
171 @@ -312,16 +398,22 @@ esac
172 AM_CONDITIONAL(BUILD_WACOM, [test x"$have_wacom" = x"yes"])
173
174 # Kerberos kerberos support
175 -AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
176 -if test "$KRB5_CONFIG" = "no"; then
177 - AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
178 -fi
179 -
180 -AC_MSG_CHECKING(for krb5 libraries and flags)
181 -KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
182 -KRB5_LIBS="`$KRB5_CONFIG --libs`"
183 -AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
184 +AC_ARG_ENABLE([kerberos],
185 + AS_HELP_STRING([--disable-kerberos], [disable kerberos support (default: enabled)]),,
186 + [enable_kerberos=yes])
187 +
188 +if test x"$enable_kerberos" != x"no" ; then
189 + AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
190 + if test "$KRB5_CONFIG" = "no"; then
191 + AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
192 + fi
193
194 + AC_MSG_CHECKING(for krb5 libraries and flags)
195 + KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
196 + KRB5_LIBS="`$KRB5_CONFIG --libs`"
197 + AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
198 + AC_DEFINE(HAVE_KERBEROS, 1, [defined if krb5 is available])
199 +fi
200 AC_SUBST(KRB5_CFLAGS)
201 AC_SUBST(KRB5_LIBS)
202
203 @@ -563,6 +655,11 @@ if test "x$have_bluetooth" = "xyes"; then
204 else
205 AC_MSG_NOTICE([ Bluetooth panel disabled])
206 fi
207 +if test "x$build_color" = "xtrue"; then
208 + AC_MSG_NOTICE([** colord (Color panel)])
209 +else
210 + AC_MSG_NOTICE([ Color panel disabled])
211 +fi
212 if test "x$enable_cups" = "xyes"; then
213 AC_MSG_NOTICE([** CUPS (Printers panel)])
214 else
215 @@ -573,11 +670,21 @@ if test "x$have_cheese" = "xyes"; then
216 else
217 AC_MSG_NOTICE([ Users panel webcam support disabled])
218 fi
219 +if test "x$build_online_accounts" = "xtrue"; then
220 + AC_MSG_NOTICE([** gnome-online-accounts (Online Accounts panel)])
221 +else
222 + AC_MSG_NOTICE([ Online Accounts panel disabled])
223 +fi
224 if test "x$with_libsocialweb" = "xyes"; then
225 AC_MSG_NOTICE([** libsocialweb (Background panel Flickr support)])
226 else
227 AC_MSG_NOTICE([ Background panel Flickr support disabled])
228 fi
229 +if test "x$build_wacom" = "xtrue"; then
230 + AC_MSG_NOTICE([** libwacom (Wacom Graphics Tablet panel)])
231 +else
232 + AC_MSG_NOTICE([ Wacom Graphics Tablet panel disabled])
233 +fi
234 if test "x$have_wacom" = "xyes"; then
235 AC_MSG_NOTICE([** wacom (Wacom tablet panel)])
236 else
237 diff --git a/panels/Makefile.am b/panels/Makefile.am
238 index 9961c25..0c54622 100644
239 --- a/panels/Makefile.am
240 +++ b/panels/Makefile.am
241 @@ -2,11 +2,9 @@ SUBDIRS= \
242 common \
243 background \
244 power \
245 - color \
246 display \
247 mouse \
248 notifications \
249 - online-accounts \
250 region \
251 info \
252 sound \
253 @@ -18,6 +16,10 @@ SUBDIRS= \
254 privacy \
255 sharing
256
257 +if BUILD_COLOR
258 +SUBDIRS += color
259 +endif
260 +
261 if BUILD_WACOM
262 SUBDIRS += wacom
263 endif
264 @@ -34,4 +36,8 @@ if BUILD_BLUETOOTH
265 SUBDIRS += bluetooth
266 endif
267
268 +if BUILD_ONLINE_ACCOUNTS
269 +SUBDIRS += online-accounts
270 +endif
271 +
272 -include $(top_srcdir)/git.mk
273 diff --git a/panels/user-accounts/um-realm-manager.c b/panels/user-accounts/um-realm-manager.c
274 index 1fd41ad..ce0988e 100644
275 --- a/panels/user-accounts/um-realm-manager.c
276 +++ b/panels/user-accounts/um-realm-manager.c
277 @@ -23,7 +23,9 @@
278
279 #include "um-realm-manager.h"
280
281 +#ifdef HAVE_KERBEROS
282 #include <krb5/krb5.h>
283 +#endif
284
285 #include <glib.h>
286 #include <glib/gi18n.h>
287 @@ -697,6 +699,7 @@ login_closure_free (gpointer data)
288 g_slice_free (LoginClosure, login);
289 }
290
291 +#ifdef HAVE_KERBEROS
292 static krb5_error_code
293 login_perform_kinit (krb5_context k5,
294 const gchar *realm,
295 @@ -760,12 +763,14 @@ login_perform_kinit (krb5_context k5,
296
297 return code;
298 }
299 +#endif /* HAVE_KERBEROS */
300
301 static void
302 kinit_thread_func (GSimpleAsyncResult *async,
303 GObject *object,
304 GCancellable *cancellable)
305 {
306 +#ifdef HAVE_KERBEROS
307 LoginClosure *login = g_simple_async_result_get_op_res_gpointer (async);
308 krb5_context k5 = NULL;
309 krb5_error_code code;
310 @@ -843,6 +848,10 @@ kinit_thread_func (GSimpleAsyncResult *async,
311
312 if (k5)
313 krb5_free_context (k5);
314 +#else /* HAVE_KERBEROS */
315 + g_simple_async_result_set_error (async, UM_REALM_ERROR, UM_REALM_ERROR_GENERIC,
316 + _("gnome-control-center was built without kerberos support"));
317 +#endif
318 }
319
320 void
321 diff --git a/shell/Makefile.am b/shell/Makefile.am
322 index f9f9070..094aca1 100644
323 --- a/shell/Makefile.am
324 +++ b/shell/Makefile.am
325 @@ -51,14 +51,12 @@ gnome_control_center_LDADD = \
326 $(top_builddir)/libgd/libgd.la \
327 $(top_builddir)/panels/common/liblanguage.la \
328 $(top_builddir)/panels/background/libbackground.la \
329 - $(top_builddir)/panels/color/libcolor.la \
330 $(top_builddir)/panels/datetime/libdate_time.la \
331 $(top_builddir)/panels/display/libdisplay.la \
332 $(top_builddir)/panels/info/libinfo.la \
333 $(top_builddir)/panels/keyboard/libkeyboard.la \
334 $(top_builddir)/panels/mouse/libmouse-properties.la \
335 $(top_builddir)/panels/notifications/libnotifications.la \
336 - $(top_builddir)/panels/online-accounts/libonline-accounts.la \
337 $(top_builddir)/panels/power/libpower.la \
338 $(top_builddir)/panels/privacy/libprivacy.la \
339 $(top_builddir)/panels/region/libregion.la \
340 @@ -84,6 +82,14 @@ if BUILD_BLUETOOTH
341 gnome_control_center_LDADD += $(top_builddir)/panels/bluetooth/libbluetooth.la
342 endif
343
344 +if BUILD_COLOR
345 +gnome_control_center_LDADD += $(top_builddir)/panels/color/libcolor.la
346 +endif
347 +
348 +if BUILD_ONLINE_ACCOUNTS
349 +gnome_control_center_LDADD += $(top_builddir)/panels/online-accounts/libonline-accounts.la
350 +endif
351 +
352 AM_CPPFLAGS = -DGNOMELOCALEDIR="\"$(datadir)/locale\""
353
354 sysdir = $(datadir)/applications
355 diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
356 index 1484cd8..f15678b 100644
357 --- a/shell/cc-panel-loader.c
358 +++ b/shell/cc-panel-loader.c
359 @@ -33,7 +33,9 @@ extern GType cc_background_panel_get_type (void);
360 #ifdef BUILD_BLUETOOTH
361 extern GType cc_bluetooth_panel_get_type (void);
362 #endif /* BUILD_BLUETOOTH */
363 +#ifdef BUILD_COLOR
364 extern GType cc_color_panel_get_type (void);
365 +#endif /* BUILD_COLOR */
366 extern GType cc_date_time_panel_get_type (void);
367 extern GType cc_display_panel_get_type (void);
368 extern GType cc_info_panel_get_type (void);
369 @@ -43,7 +45,9 @@ extern GType cc_mouse_panel_get_type (void);
370 extern GType cc_network_panel_get_type (void);
371 #endif /* BUILD_NETWORK */
372 extern GType cc_notifications_panel_get_type (void);
373 +#ifdef BUILD_ONLINE_ACCOUNTS
374 extern GType cc_goa_panel_get_type (void);
375 +#endif /* BUILD_ONLINE_ACCOUNTS */
376 extern GType cc_power_panel_get_type (void);
377 #ifdef BUILD_PRINTERS
378 extern GType cc_printers_panel_get_type (void);
379 @@ -77,7 +81,9 @@ static struct {
380 #ifdef BUILD_BLUETOOTH
381 PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type ),
382 #endif
383 +#ifdef BUILD_COLOR
384 PANEL_TYPE("color", cc_color_panel_get_type ),
385 +#endif
386 PANEL_TYPE("datetime", cc_date_time_panel_get_type ),
387 PANEL_TYPE("display", cc_display_panel_get_type ),
388 PANEL_TYPE("info", cc_info_panel_get_type ),
389 @@ -87,7 +93,9 @@ static struct {
390 PANEL_TYPE("network", cc_network_panel_get_type ),
391 #endif
392 PANEL_TYPE("notifications", cc_notifications_panel_get_type),
393 +#ifdef BUILD_ONLINE_ACCOUNTS
394 PANEL_TYPE("online-accounts", cc_goa_panel_get_type ),
395 +#endif
396 PANEL_TYPE("power", cc_power_panel_get_type ),
397 #ifdef BUILD_PRINTERS
398 PANEL_TYPE("printers", cc_printers_panel_get_type ),
399 --
400 1.8.3.2

  ViewVC Help
Powered by ViewVC 1.1.20