• 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
.gitlab-ci Loading commit data...
docs Loading commit data...
examples Loading commit data...
gir Loading commit data...
girepository Loading commit data...
giscanner Loading commit data...
m4 Loading commit data...
misc Loading commit data...
subprojects Loading commit data...
tests Loading commit data...
tools Loading commit data...
.flake8 Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
COPYING Loading commit data...
COPYING.GPL Loading commit data...
COPYING.LGPL Loading commit data...
HACKING Loading commit data...
MSVC.README.rst Loading commit data...
Makefile.introspection Loading commit data...
NEWS Loading commit data...
README.rst Loading commit data...
TODO Loading commit data...
gobject-introspection-1.0.pc.in Loading commit data...
gobject-introspection-no-export-1.0.pc.in Loading commit data...
gobject-introspection.doap Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...