• Christoph Reiter's avatar
    shlibs: fall back to basename on macOS for relative paths. Fixes #222 · fd9125f1
    Christoph Reiter authored
    On macOS we ideally want to write the final absolute path of the library
    into the gir and typelib. Up until now we inferred the install path from
    the .la file in case we used libtool and through otool in case we weren't
    using libtool hoping that the install_name was matching the install path.
    
    meson currently sets the install_name of libraries to "@rpath/foo.dylib"
    and adds rpaths to the executables in the build dir. Only during install does
    it change the install_name to the absolute target path in all places.
    
    Since we get called during build time we only get the @rpath from otool,
    which then makes things fail at runtime since the executables don't have
    the matching rpath set.
    
    To make this somewhat work just fall back to the basename for relative
    paths, so we dlopen "foo.dylib" and depend on things being in /usr/local/lib
    or DYLD_FALLBACK_LIBRARY_PATH including the lib path (see man dlopen)
    fd9125f1
Name
Last commit
Last update
..
doctemplates Loading commit data...
__init__.py Loading commit data...
_version.py.in Loading commit data...
annotationmain.py Loading commit data...
annotationparser.py Loading commit data...
ast.py Loading commit data...
cachestore.py Loading commit data...
ccompiler.py Loading commit data...
codegen.py Loading commit data...
docmain.py Loading commit data...
docwriter.py Loading commit data...
dumper.py Loading commit data...
gdumpparser.py Loading commit data...
girparser.py Loading commit data...
girwriter.py Loading commit data...
giscannermodule.c Loading commit data...
introspectablepass.py Loading commit data...
libtoolimporter.py Loading commit data...
maintransformer.py Loading commit data...
mdextensions.py Loading commit data...
meson.build Loading commit data...
message.py Loading commit data...
msvccompiler.py Loading commit data...
pkgconfig.py Loading commit data...
scannerlexer.l Loading commit data...
scannermain.py Loading commit data...
scannerparser.y Loading commit data...
sectionparser.py Loading commit data...
shlibs.py Loading commit data...
sourcescanner.c Loading commit data...
sourcescanner.h Loading commit data...
sourcescanner.py Loading commit data...
testcodegen.py Loading commit data...
transformer.py Loading commit data...
utils.py Loading commit data...
xmlwriter.py Loading commit data...