Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8bbf525fd383
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 67b7a57e305c
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Sep 7, 2018

  1. gobject-introspection: Fix macos shared lib paths

    Uses patch Nirbheek Chauhan's patch from this issue upstream issue:
    https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222
    
    Fixes #40599
    hamishmack committed Sep 7, 2018
    Copy the full SHA
    363f78f View commit details

Commits on Nov 21, 2018

  1. Merge pull request #46310 from hamishmack/gobject-introspection-macos

    gobject-introspection: Fix macos shared lib paths
    matthewbauer authored Nov 21, 2018
    Copy the full SHA
    67b7a57 View commit details
Original file line number Diff line number Diff line change
@@ -87,8 +87,8 @@
+ m = pattern.search(line)
if m:
del patterns[library]
- shlibs.append(m.group(1))
+ shlibs.append(os.path.join(options.fallback_libpath, m.group(1)))
- shlibs.append(_sanitize_install_name(m.group(1)))
+ shlibs.append(os.path.join(options.fallback_libpath, _sanitize_install_name(m.group(1))))
break

if len(patterns) > 0:
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ stdenv.mkDerivation rec {
setupHook = ./setup-hook.sh;

patches = [
./macos-shared-library.patch
(substituteAll {
src = ./absolute_shlib_path.patch;
inherit nixStoreDir;
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
index c93d20c..4d4915d 100644
--- a/giscanner/shlibs.py
+++ b/giscanner/shlibs.py
@@ -43,6 +43,22 @@ def _resolve_libtool(options, binary, libraries):

return shlibs

+def _sanitize_install_name(install_name):
+ '''
+ On macOS, the dylib can be built with install_name as @rpath/libfoo.so
+ instead of the absolute path to the library, so handle that. The name
+ can also be @loader_path or @executable_path.
+ '''
+ if not install_name.startswith('@'):
+ return install_name
+ if install_name.startswith('@rpath/'):
+ return install_name[7:]
+ if install_name.startswith('@loader_path/'):
+ return install_name[13:]
+ if install_name.startswith('@executable_path/'):
+ return install_name[17:]
+ raise RuntimeError('Unknown install_name {!r}'.format(install_name))
+

# Assume ldd output is something vaguely like
#
@@ -121,7 +137,7 @@ def _resolve_non_libtool(options, binary, libraries):
m = pattern.search(line)
if m:
del patterns[library]
- shlibs.append(m.group(1))
+ shlibs.append(_sanitize_install_name(m.group(1)))
break

if len(patterns) > 0: