'Run after install to inject dependencies into LD_LIBRARY_PATH.
If we don\'t do this, the run files will clear the LD_LIBRARY_PATH.
Since the installer is a binary file, we have no means of specifying
an RPATH to use.'

def filter_ld_library_path(self, spec, prefix):

    files = glob.glob((prefix + '/binaries/*.run'))
    ld_library_path = ':'.join([spec['zlib'].prefix.lib, spec['freetype'].prefix.lib, spec['fontconfig'].prefix.lib, spec['libxrender'].prefix.lib, spec['libcanberra'].prefix.lib])
    for runfile in files:
        filter_file('(export    LD_LIBRARY_PATH=)$', '\\1{0}'.format(ld_library_path), runfile)
