diff options
-rw-r--r-- | chrome/chrome.gyp | 4 | ||||
-rw-r--r-- | webkit/tools/libxul_hack/libxul_hack.cc | 14 | ||||
-rw-r--r-- | webkit/webkit.gyp | 30 |
3 files changed, 46 insertions, 2 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 2510259..26ae4f9 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -2184,6 +2184,10 @@ '../build/linux/system.gyp:gtk', '../build/linux/system.gyp:nss', '../base/base.gyp:linux_versioninfo', + # Build placeholder libraries to work around buggy plugins; + # see webkit.gyp for details. + '../webkit/webkit.gyp:xul', + '../webkit/webkit.gyp:xpcom', ], 'sources!': [ 'browser/views/extensions/extension_shelf.cc', diff --git a/webkit/tools/libxul_hack/libxul_hack.cc b/webkit/tools/libxul_hack/libxul_hack.cc new file mode 100644 index 0000000..600d75a --- /dev/null +++ b/webkit/tools/libxul_hack/libxul_hack.cc @@ -0,0 +1,14 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Some plugins on older Linuxes depend on libxul.so and libxpcom.so +// despite not actually requiring any symbols from them. So we build +// a fake libxul.so and libxpcom.so and include them in our library +// path. +// +// This source file is therefore empty, and used to build those +// libraries. +// +// This may sound like a terrible hack, but after I thought of it I +// noticed that nspluginwrapper does the same thing. diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index 2d3f93c..f1bb332 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -1568,7 +1568,7 @@ '../v8/tools/logreader.js', '../v8/tools/profile.js', '../v8/tools/profile_view.js', - '../v8/tools/splaytree.js', + '../v8/tools/splaytree.js', ], }, { @@ -1581,5 +1581,31 @@ }, ], }, - ], + ], # targets + 'conditions': [ + ['OS=="linux"', { + # See the comments in libxul_hack.cc for a description of why these + # libraries exist. + 'targets': [ + { + # We want to build exactly "libxul.so". + 'target_name': 'xul', + 'product_dir': '<(PRODUCT_DIR)', + 'type': 'loadable_module', + 'sources': [ + 'tools/libxul_hack/libxul_hack.cc' + ], + }, + { + # We want to build exactly "libxpcom.so". + 'target_name': 'xpcom', + 'product_dir': '<(PRODUCT_DIR)', + 'type': 'loadable_module', + 'sources': [ + 'tools/libxul_hack/libxul_hack.cc' + ], + }, + ], # targets + }], + ], # conditions } |