Merge branch 'master' into gnome-updates
[jackhill/guix/guix.git] / gnu / packages / patches / gobject-introspection-absolute-shlib-path.patch
1 # Names of libraries included in typelib files are opened by dlopen. Here we
2 # add the full path.
3 #
4 # This patch was provided by Luca Bruno <lucabru@src.gnome.org> for
5 # 'gobject-introspection' 1.40.0 in Nix.
6 --- ./giscanner/utils.py.orig 2014-08-14 22:05:05.055334080 +0200
7 +++ ./giscanner/utils.py 2014-08-14 22:05:24.687497334 +0200
8 @@ -110,17 +110,11 @@
9 if dlname is None:
10 return None
11
12 - # Darwin uses absolute paths where possible; since the libtool files never
13 - # contain absolute paths, use the libdir field
14 - if platform.system() == 'Darwin':
15 - dlbasename = os.path.basename(dlname)
16 - libdir = _extract_libdir_field(la_file)
17 - if libdir is None:
18 - return dlbasename
19 - return libdir + '/' + dlbasename
20 - # From the comments in extract_libtool(), older libtools had
21 - # a path rather than the raw dlname
22 - return os.path.basename(dlname)
23 + dlbasename = os.path.basename(dlname)
24 + libdir = _extract_libdir_field(la_file)
25 + if libdir is None:
26 + return dlbasename
27 + return libdir + '/' + dlbasename
28
29
30 def extract_libtool(la_file):