Commit 93edee7e authored by John Ralls's avatar John Ralls
Browse files

Handle Gir shared library refs with no path component.

Meson builds do this because Meson sets @rpath on the built library, not
setting the installation path until install. g-ir-scanner doesn't know what
to do with @rpath so it punts.
parent 6e2859f8
......@@ -392,7 +392,17 @@ class GirFile(Path):
typelib = os.path.join(typelib_dest, name + '.typelib')
with open (gir_file, "w", encoding="utf8") as target:
for line in lines:
target.write(re.sub(lib_path, self.bundle_path, line))
if re.match('\s*shared-library=', line):
(new_line, subs) = re.subn(lib_path, self.bundle_path, line)
if subs:
(car, cadr, cddr) = re.split('"', line, 2)
new_line = "".join([car, '"', os.path.join(self.bundle_path, cadr), '"'])
call(['g-ir-compiler', '--output=' + typelib, gir_file])
return typelib
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment