From 4f81ce3e43058ba71ff48e5f692cf0e48587b273 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 8 Oct 2010 22:43:56 +0200 Subject: IMP-429: Link against prebuilt libraries / always use gtk-related system libs (linux) (cherry picked from commit a3cffd06a0e7aa92e1b6c28e7bad655b7085296c) --- linden/scripts/install.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'linden/scripts/install.py') diff --git a/linden/scripts/install.py b/linden/scripts/install.py index 1db9bb3..931968a 100755 --- a/linden/scripts/install.py +++ b/linden/scripts/install.py @@ -35,6 +35,7 @@ $/LicenseInfo$ import sys import os.path +import re # Look for indra/lib/python in all possible parent directories ... # This is an improvement over the setup-path.py method used previously: @@ -563,6 +564,29 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package""" tar.extractall(path=install_dir) except AttributeError: _extractall(tar, path=install_dir) + if _get_platform() == 'linux' or _get_platform() == 'linux64': + first = 1 + for tfile in tar.getnames(): + if tfile.find('.so.') > 0: + LINK = re.sub(r'\.so\.[0-9.]*$', '.so', tfile) + link_name = "../" + LINK + if not os.path.exists(link_name): + if first == 1: + first = 0 + print "Adding missing symlink(s) for package %s:" % ifile.filename + target = os.path.basename(tfile) + soname = os.popen("readelf -d \"../%(tfile)s\" " + " | grep SONAME " + " | sed -e 's/.*\[//;s/\].*//'" % {"tfile": tfile}).read() + soname = soname.strip() + if soname: # not empty + tmpfname = os.path.dirname(LINK) + "/" + soname + if os.path.exists("../" + tmpfname): + target = soname + else: + print "WARNING: SONAME %s doesn't exist!" % tmpfname + os.symlink(target, link_name) + print " %s --> %s" % (LINK, target) if ifile.pkgname in self._installed: self._installed[ifile.pkgname].add_files( ifile.url, -- cgit v1.1