summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/meson/0.57/gir-fallback-path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/build-managers/meson/0.57/gir-fallback-path.patch')
-rw-r--r--pkgs/development/tools/build-managers/meson/0.57/gir-fallback-path.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/tools/build-managers/meson/0.57/gir-fallback-path.patch b/pkgs/development/tools/build-managers/meson/0.57/gir-fallback-path.patch
new file mode 100644
index 00000000000..0c924bacf73
--- /dev/null
+++ b/pkgs/development/tools/build-managers/meson/0.57/gir-fallback-path.patch
@@ -0,0 +1,16 @@
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -807,6 +807,13 @@ class GnomeModule(ExtensionModule):
+         if fatal_warnings:
+             scan_command.append('--warn-error')
+ 
++        if len(set([girtarget.get_custom_install_dir()[0] for girtarget in girtargets])) > 1:
++            raise MesonException('generate_gir tries to build multiple libraries with different install_dir at once: {}'.format(','.join([str(girtarget) for girtarget in girtargets])))
++
++        fallback_libpath = girtargets[0].get_custom_install_dir()[0]
++        if fallback_libpath is not None and isinstance(fallback_libpath, str) and len(fallback_libpath) > 0 and fallback_libpath[0] == "/":
++            scan_command += ['--fallback-library-path=' + fallback_libpath]
++
+         scan_target = self._make_gir_target(state, girfile, scan_command, depends, kwargs)
+ 
+         typelib_output = '%s-%s.typelib' % (ns, nsversion)