From 63692215e10b693db53a395a9fdefd77cf3a6fc6 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Thu, 16 Sep 2010 00:22:21 +0000 Subject: Linux: make compile-time dependency on gnome-keyring optional. This is upstreaming a Gentoo Linux patch. BUG=none TEST=none Review URL: http://codereview.chromium.org/3380004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59587 0039d316-1c4b-4281-b951-d872f2087c98 --- build/common.gypi | 17 ++++++++++++++--- build/linux/system.gyp | 5 ++++- chrome/browser/profile_impl.cc | 4 ++++ chrome/chrome_browser.gypi | 8 +++++++- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/build/common.gypi b/build/common.gypi index 2730feb..0f721ed 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -73,16 +73,26 @@ 'library%': 'static_library', }, - # Set default value of toolkit_views on for Windows, Chrome OS - # and the touch UI. - # We set it at this level of nesting so the value is available for + # We set those at this level of nesting so the values are available for # other conditionals below. 'conditions': [ + # Set default value of toolkit_views on for Windows, Chrome OS + # and the touch UI. ['OS=="win" or chromeos==1 or touchui==1', { 'toolkit_views%': 1, }, { 'toolkit_views%': 0, }], + + # A flag to enable or disable our compile-time dependency + # on gnome-keyring. If that dependency is disabled, no gnome-keyring + # support will be available. This option is useful + # for Linux distributions. + ['chromeos==1', { + 'use_gnome_keyring%': 0, + }, { + 'use_gnome_keyring%': 1, + }], ], 'host_arch%': '<(host_arch)', @@ -143,6 +153,7 @@ 'target_arch%': '<(target_arch)', 'host_arch%': '<(host_arch)', 'toolkit_views%': '<(toolkit_views)', + 'use_gnome_keyring%': '<(use_gnome_keyring)', 'chromeos%': '<(chromeos)', 'touchui%': '<(touchui)', 'inside_chromium_build%': '<(inside_chromium_build)', diff --git a/build/linux/system.gyp b/build/linux/system.gyp index f746ebf..816c584 100644 --- a/build/linux/system.gyp +++ b/build/linux/system.gyp @@ -259,11 +259,14 @@ 'target_name': 'gnome-keyring', 'type': 'settings', 'conditions': [ - ['chromeos==0', { + ['use_gnome_keyring==1', { 'direct_dependent_settings': { 'cflags': [ 'Init()) LOG(INFO) << "Using GNOME keyring for password storage."; else backend.reset(); +#endif // defined(USE_GNOME_KEYRING) } // TODO(mdm): this can change to a WARNING when we detect by default. if (!backend.get()) diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 5032f92..f2b675f 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -3186,6 +3186,12 @@ ], }, }], + ['use_gnome_keyring==0', { + 'sources!': [ + 'browser/password_manager/native_backend_gnome_x.h', + 'browser/password_manager/native_backend_gnome_x.cc', + ], + }], ['touchui==0', { 'sources!': [ # Nothing yet. @@ -3220,7 +3226,7 @@ 'third_party/mozilla_security_manager/nsUsageArrayHelper.h', ], 'conditions': [ - ['chromeos==0', { + ['use_gnome_keyring==1', { 'dependencies': [ '../build/linux/system.gyp:gnome-keyring', ], -- cgit v1.1