Fix location of libmozjs.so for Ubuntu

/usr/lib/xulrunner-<version>/lib in the previous patch
was wrong, should be /usr/lib/xulrunner-<version>. Also,
fix comment.

svn path=/trunk/; revision=28
This commit is contained in:
Owen Taylor 2008-11-03 21:11:28 +00:00
parent 2ba8aaafca
commit a569063e4f

View File

@ -38,10 +38,10 @@ addpath('XDG_DATA_DIRS', '/usr/share')
addpath('XDG_CONFIG_DIRS', '/etc/xdg') addpath('XDG_CONFIG_DIRS', '/etc/xdg')
# #
# For Ubuntu Intrepid, libmozjs lives in /usr/lib/xulrunner-<version>/lib # For Ubuntu Intrepid, libmozjs lives in /usr/lib/xulrunner-<version>
# However, that path isn't in ld.so.conf, meaning that it's basically # However, that path isn't in ld.so.conf, meaning that it's basically
# impossible to use the xulrunner .pc files and libraries. Work around # impossible to use the xulrunner .pc files and libraries. Work around
# this by deriving the path and adding it to LD_SO_CONF ourself. # this by deriving the path and adding it to LD_LIBRARY_PATH ourself.
# #
import re import re
import subprocess import subprocess
@ -50,7 +50,7 @@ _pkgconfig = subprocess.Popen(['pkg-config', '--variable=sdkdir', 'mozilla-js'],
_sdkdir = _pkgconfig.communicate()[0].strip() _sdkdir = _pkgconfig.communicate()[0].strip()
_pkgconfig.wait() _pkgconfig.wait()
if _pkgconfig.returncode == 0: if _pkgconfig.returncode == 0:
_libdir = re.sub('-(sdk|devel)', '', _sdkdir) + '/lib' _libdir = re.sub('-(sdk|devel)', '', _sdkdir)
if os.path.exists(_libdir + '/libmozjs.so'): if os.path.exists(_libdir + '/libmozjs.so'):
addpath('LD_LIBRARY_PATH', _libdir) addpath('LD_LIBRARY_PATH', _libdir)