r32437 - /desktop/unstable/gnome-shell/debian/patches/10-make-NetworkManager-optional.patch
biebl at users.alioth.debian.org
biebl at users.alioth.debian.org
Wed Jan 25 09:57:59 UTC 2012
Author: biebl
Date: Wed Jan 25 09:57:59 2012
New Revision: 32437
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=32437
Log:
Apply the updated patch from Alexandre Rostovtsev <tetromino at gentoo.org>.
Modified:
desktop/unstable/gnome-shell/debian/patches/10-make-NetworkManager-optional.patch
Modified: desktop/unstable/gnome-shell/debian/patches/10-make-NetworkManager-optional.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-shell/debian/patches/10-make-NetworkManager-optional.patch?rev=32437&op=diff
==============================================================================
--- desktop/unstable/gnome-shell/debian/patches/10-make-NetworkManager-optional.patch [utf-8] (original)
+++ desktop/unstable/gnome-shell/debian/patches/10-make-NetworkManager-optional.patch [utf-8] Wed Jan 25 09:57:59 2012
@@ -1,17 +1,27 @@
-From ce3bc8b64bc1aeaf8917ed5dd5f8437ca87fd906 Mon Sep 17 00:00:00 2001
+From df21e761fc02cf1269a7bbee073b8a129cba1dcd Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl at debian.org>
Date: Thu, 22 Dec 2011 22:04:12 +0100
Subject: [PATCH] Make NM optional
+[ Alexandre Rostovtsev <tetromino at gentoo.org> :
+ * use config.js (and AC_SUBST HAVE_NETWORKMANAGER appropriately);
+ * take care to not import ui.status.network if nm is disabled;
+ * do not try to reassign to const variables;
+ * no point really in fiddling with the list of installed js files;
+ * don't build shell-mobile-providers if nm is disabled;
+ * use "networkmanager" instead of "network_manager" because THE
+ BIKESHED SHOULD BE BLUE, also because the upstream package name is
+ NetworkManager, not Network_Manager. ]
---
- configure.ac | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
- js/Makefile.am | 5 ++++-
- js/ui/main.js | 12 ++++++++++--
- src/Makefile.am | 16 +++++++++++++---
- 4 files changed, 74 insertions(+), 8 deletions(-)
+ configure.ac | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
+ js/misc/config.js.in | 2 ++
+ js/ui/main.js | 8 ++++++--
+ js/ui/panel.js | 3 ++-
+ src/Makefile.am | 18 +++++++++++++-----
+ 5 files changed, 70 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 1c64122..13cd42b 100644
+index d1bea62..b972127 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,8 +95,41 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION
@@ -26,39 +36,39 @@
+# Check for NetworkManager
+##########################
+NM_MIN_VERSION=0.9
-+AC_ARG_ENABLE(network-manager,
-+ AS_HELP_STRING([--disable-network-manager],
++AC_ARG_ENABLE(networkmanager,
++ AS_HELP_STRING([--disable-networkmanager],
+ [disable NetworkManager support @<:@default=auto@:>@]),,
-+ [enable_network_manager=auto])
-+
-+if test "x$enable_network_manager" != "xno"; then
-+ PKG_CHECK_MODULES(NETWORK_MANAGER,
++ [enable_networkmanager=auto])
++
++if test "x$enable_networkmanager" != "xno"; then
++ PKG_CHECK_MODULES(NETWORKMANAGER,
+ [libnm-glib libnm-util gnome-keyring-1],
-+ [have_network_manager=yes],
-+ [have_network_manager=no])
-+
-+ GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $NETWORK_MANAGER_CFLAGS"
-+ GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $NETWORK_MANAGER_LIBS"
-+
-+ if test "x$have_network_manager" = "xyes"; then
-+ AC_DEFINE(HAVE_NETWORK_MANAGER, [], [Define if we have NetworkManager])
-+ fi
++ [have_networkmanager=yes],
++ [have_networkmanager=no])
++
++ GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $NETWORKMANAGER_CFLAGS"
++ GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $NETWORKMANAGER_LIBS"
+else
-+ have_network_manager="no (disabled)"
++ have_networkmanager="no (disabled)"
+fi
+
-+if test "x$enable_network_manager" = "xyes"; then
-+ if test "x$have_network_manager" != "xyes"; then
++if test "x$have_networkmanager" = "xyes"; then
++ AC_DEFINE(HAVE_NETWORKMANAGER, [1], [Define if we have NetworkManager])
++ AC_SUBST([HAVE_NETWORKMANAGER], [1])
++else
++ if test "x$enable_networkmanager" = "xyes"; then
+ AC_MSG_ERROR([Couldn't find NetworkManager.])
+ fi
++ AC_SUBST([HAVE_NETWORKMANAGER], [0])
+fi
+
-+AM_CONDITIONAL(HAVE_NETWORK_MANAGER, test "$have_network_manager" = "yes")
++AM_CONDITIONAL(HAVE_NETWORKMANAGER, test "$have_networkmanager" = "yes")
+
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
-@@ -250,3 +283,15 @@ AC_CONFIG_FILES([
+@@ -256,3 +289,15 @@ AC_CONFIG_FILES([
man/Makefile
])
AC_OUTPUT
@@ -71,121 +81,127 @@
+ Compiler: ${CC}
+ Compiler Warnings: $enable_compile_warnings
+
-+ Support for NetworkManager: $have_network_manager
++ Support for NetworkManager: $have_networkmanager
+ Support for GStreamer recording: $build_recorder
+"
-diff --git a/js/Makefile.am b/js/Makefile.am
-index 58e0489..3d1418d 100644
---- a/js/Makefile.am
-+++ b/js/Makefile.am
-@@ -45,7 +45,6 @@ nobase_dist_js_DATA = \
- ui/main.js \
- ui/messageTray.js \
- ui/modalDialog.js \
-- ui/networkAgent.js \
- ui/shellEntry.js \
- ui/shellMountOperation.js \
- ui/notificationDaemon.js \
-@@ -78,3 +77,7 @@ nobase_dist_js_DATA = \
- ui/workspacesView.js \
- ui/workspaceSwitcherPopup.js \
- ui/xdndHandler.js
-+
-+if HAVE_NETWORK_MANAGER
-+nobase_dist_js_DATA += ui/networkAgent.js
-+endif
+diff --git a/js/misc/config.js.in b/js/misc/config.js.in
+index a35fe28..4a09df6 100644
+--- a/js/misc/config.js.in
++++ b/js/misc/config.js.in
+@@ -8,5 +8,7 @@ const PACKAGE_VERSION = '@PACKAGE_VERSION@';
+ const GJS_VERSION = '@GJS_VERSION@';
+ /* 1 if gnome-bluetooth is available, 0 otherwise */
+ const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
++/* 1 if networkmanager is available, 0 otherwise */
++const HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
+ /* The system TLS CA list */
+ const SHELL_SYSTEM_CA_FILE = '@SHELL_SYSTEM_CA_FILE@';
diff --git a/js/ui/main.js b/js/ui/main.js
-index 4c97440..4574a7d 100644
+index 4c97440..828911b 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
-@@ -27,7 +27,6 @@ const PlaceDisplay = imports.ui.placeDisplay;
+@@ -14,6 +14,7 @@ const St = imports.gi.St;
+
+ const AutomountManager = imports.ui.automountManager;
+ const AutorunManager = imports.ui.autorunManager;
++const Config = imports.misc.config;
+ const CtrlAltTab = imports.ui.ctrlAltTab;
+ const EndSessionDialog = imports.ui.endSessionDialog;
+ const PolkitAuthenticationAgent = imports.ui.polkitAuthenticationAgent;
+@@ -27,7 +28,7 @@ const PlaceDisplay = imports.ui.placeDisplay;
const RunDialog = imports.ui.runDialog;
const Layout = imports.ui.layout;
const LookingGlass = imports.ui.lookingGlass;
-const NetworkAgent = imports.ui.networkAgent;
++const NetworkAgent = Config.HAVE_NETWORKMANAGER ? imports.ui.networkAgent : null;
const NotificationDaemon = imports.ui.notificationDaemon;
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
const Scripting = imports.ui.scripting;
-@@ -39,6 +38,12 @@ const XdndHandler = imports.ui.xdndHandler;
- const StatusIconDispatcher = imports.ui.statusIconDispatcher;
- const Util = imports.misc.util;
-
-+try {
-+ const NetworkAgent = imports.ui.networkAgent;
-+} catch (e) {
-+ NetworkAgent = null;
-+}
-+
- const DEFAULT_BACKGROUND_COLOR = new Clutter.Color();
- DEFAULT_BACKGROUND_COLOR.from_pixel(0x2266bbff);
-
-@@ -84,7 +89,10 @@ function _createUserSession() {
+@@ -84,7 +85,10 @@ function _createUserSession() {
telepathyClient = new TelepathyClient.Client();
automountManager = new AutomountManager.AutomountManager();
autorunManager = new AutorunManager.AutorunManager();
- networkAgent = new NetworkAgent.NetworkAgent();
-+ if (NetworkAgent != null) {
++ if (Config.HAVE_NETWORKMANAGER) {
+ networkAgent = new NetworkAgent.NetworkAgent();
+ }
+
}
function _createGDMSession() {
+diff --git a/js/ui/panel.js b/js/ui/panel.js
+index 2f78db9..63e472c 100644
+--- a/js/ui/panel.js
++++ b/js/ui/panel.js
+@@ -40,7 +40,8 @@ if (Config.HAVE_BLUETOOTH)
+ STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['bluetooth'] = imports.ui.status.bluetooth.Indicator;
+
+ try {
+- STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
++ if (Config.HAVE_NETWORKMANAGER)
++ STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
+ } catch(e) {
+ log('NMApplet is not supported. It is possible that your NetworkManager version is too old');
+ }
diff --git a/src/Makefile.am b/src/Makefile.am
-index d19f0fe..d6a1c86 100644
+index 4f8a1da..ecf4d13 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -110,7 +110,6 @@ shell_public_headers_h = \
+@@ -108,9 +108,7 @@ shell_public_headers_h = \
+ shell-generic-container.h \
+ shell-gtk-embed.h \
shell-global.h \
- shell-mobile-providers.h \
+- shell-mobile-providers.h \
shell-mount-operation.h \
- shell-network-agent.h \
shell-perf-log.h \
shell-slicer.h \
shell-stack.h \
-@@ -122,6 +121,11 @@ shell_public_headers_h = \
+@@ -122,6 +120,11 @@ shell_public_headers_h = \
shell-wm.h \
shell-xfixes-cursor.h
-+if HAVE_NETWORK_MANAGER
-+shell_public_headers_h += shell-network-agent.h
++if HAVE_NETWORKMANAGER
++shell_public_headers_h += shell-mobile-providers.h shell-network-agent.h
+endif
+
+
libgnome_shell_la_SOURCES = \
$(shell_built_sources) \
$(shell_public_headers_h) \
-@@ -147,7 +151,6 @@ libgnome_shell_la_SOURCES = \
+@@ -145,9 +148,7 @@ libgnome_shell_la_SOURCES = \
+ shell-generic-container.c \
+ shell-gtk-embed.c \
shell-global.c \
- shell-mobile-providers.c \
+- shell-mobile-providers.c \
shell-mount-operation.c \
- shell-network-agent.c \
shell-perf-log.c \
shell-polkit-authentication-agent.h \
shell-polkit-authentication-agent.c \
-@@ -161,6 +164,10 @@ libgnome_shell_la_SOURCES = \
+@@ -161,6 +162,10 @@ libgnome_shell_la_SOURCES = \
shell-wm.c \
shell-xfixes-cursor.c
-+if HAVE_NETWORK_MANAGER
-+libgnome_shell_la_SOURCES += shell-network-agent.c
++if HAVE_NETWORKMANAGER
++libgnome_shell_la_SOURCES += shell-mobile-providers.c shell-network-agent.c
+endif
+
libgnome_shell_la_gir_sources = \
$(filter-out %-private.h $(shell_recorder_non_gir_sources), $(shell_public_headers_h) $(libgnome_shell_la_SOURCES))
-@@ -272,7 +279,10 @@ libgnome_shell_la_LIBADD = \
+@@ -272,7 +277,10 @@ libgnome_shell_la_LIBADD = \
libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
Shell-0.1.gir: libgnome-shell.la St-1.0.gir
-Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 NetworkManager-1.0 NMClient-1.0 Folks-0.6
+Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 Folks-0.6
-+if HAVE_NETWORK_MANAGER
++if HAVE_NETWORKMANAGER
+Shell_0_1_gir_INCLUDES += NetworkManager-1.0 NMClient-1.0
+endif
Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
Shell_0_1_gir_LIBS = libgnome-shell.la
Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)
--
-1.7.7.3
+1.7.8.3
More information about the pkg-gnome-commits
mailing list