[gjs/gnome-40] build: Provide fallback location for GLib Valgrind suppressions



commit 20744ac401ab74341bfa5704ae788e13d05e0b80
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Jul 31 21:22:00 2021 -0700

    build: Provide fallback location for GLib Valgrind suppressions
    
    If building GLib as a subproject, it won't have a pkgconfig file to tell
    where its install prefix is. It's most likely being built as a subproject
    because the host system has an outdated version, not because it has no
    version. Also, the user is most likely not running Valgrind. Given that,
    it's probably OK to just fall back to the suppressions file in /usr.

 meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7f00b489..3b463895 100644
--- a/meson.build
+++ b/meson.build
@@ -638,8 +638,9 @@ valgrind_environment.set('G_DEBUG',
     'fatal-warnings,fatal-criticals,gc-friendly')
 valgrind_environment.set('VALGRIND', 'valgrind')
 
-glib_suppresssions = (glib.get_pkgconfig_variable('prefix') / 'share' /
-    'glib-2.0' / 'valgrind' / 'glib.supp')
+glib_prefix = glib.get_variable(pkgconfig: 'prefix', default_value: '/usr')
+glib_suppresssions = (glib_prefix / 'share' / 'glib-2.0' / 'valgrind' /
+    'glib.supp')
 gjs_suppressions = (meson.current_source_dir() / 'installed-tests' / 'extra' /
     'gjs.supp')
 valgrind_args = [


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]