From d7a23b7e31d151b50f23a0586b2e1622222629ae Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 27 Feb 2009 11:14:11 -0500 Subject: [PATCH] =?UTF-8?q?Bug=20573413=20=E2=80=93=20libmozjs=20linking?= =?UTF-8?q?=20broken=20on=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch gnome-shell.in to work around Ubuntu xulrunner bug in the same way our .jhbuildrc does --- src/gnome-shell.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gnome-shell.in b/src/gnome-shell.in index 5a1cac6b2..2e452d429 100755 --- a/src/gnome-shell.in +++ b/src/gnome-shell.in @@ -114,13 +114,25 @@ def start_shell(): js_dir = os.path.join(top_dir, "js") data_dir = os.path.join(top_dir, "data") + # Work around Ubuntu xulrunner bug, + # http://bugzilla.gnome.org/show_bug.cgi?id=573413 + mozjs_ld_library_path = '' + pkgconfig = subprocess.Popen(['pkg-config', '--variable=sdkdir', 'mozilla-js'], + stdout=subprocess.PIPE) + mozjs_sdkdir = pkgconfig.communicate()[0].strip() + pkgconfig.wait() + if pkgconfig.returncode == 0: + mozjs_libdir = re.sub('-(sdk|devel)', '', mozjs_sdkdir) + if os.path.exists(mozjs_libdir + '/libmozjs.so'): + mozjs_ld_library_path = ':' + mozjs_libdir + # Set up environment env = dict(os.environ) env.update({'GNOME_SHELL_JS' : '@GJS_JS_DIR@:@GJS_JS_NATIVE_DIR@:' + js_dir, 'GNOME_SHELL_DATADIR' : data_dir, 'GI_TYPELIB_PATH' : plugin_dir, 'PATH' : '@META_BIN_DIR@:' + os.environ.get('PATH', '') + ':' + plugin_dir, - 'LD_LIBRARY_PATH' : os.environ.get('LD_LIBRARY_PATH', '') + ':' + plugin_dir, + 'LD_LIBRARY_PATH' : os.environ.get('LD_LIBRARY_PATH', '') + ':' + plugin_dir + mozjs_ld_library_path, 'GNOME_DISABLE_CRASH_DIALOG' : '1'}) if not options.verbose: