[gnome-builder] meson: allow specifying $MESON in build configuration



commit bdd774d56f3ad4a6b316e2242303088559c824ab
Author: Christian Hergert <chergert redhat com>
Date:   Mon Nov 27 22:32:44 2017 -0800

    meson: allow specifying $MESON in build configuration
    
    If meson is located in a non-standard system $PATH, we might have trouble
    locating it. This patch teaches the Meson build pipeline integration to
    use the path specified in $MESON before using the default value of "meson".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790904

 src/plugins/meson/gbp-meson-pipeline-addin.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-pipeline-addin.c b/src/plugins/meson/gbp-meson-pipeline-addin.c
index 7372d75..1cfd862 100644
--- a/src/plugins/meson/gbp-meson-pipeline-addin.c
+++ b/src/plugins/meson/gbp-meson-pipeline-addin.c
@@ -63,6 +63,7 @@ gbp_meson_pipeline_addin_load (IdeBuildPipelineAddin *addin,
   const gchar *ninja = NULL;
   const gchar *prefix;
   const gchar *srcdir;
+  const gchar *meson;
   guint id;
   gint parallel;
 
@@ -111,9 +112,12 @@ gbp_meson_pipeline_addin_load (IdeBuildPipelineAddin *addin,
   config_opts = ide_configuration_get_config_opts (config);
   parallel = ide_configuration_get_parallelism (config);
 
+  if (NULL == (meson = ide_configuration_getenv (config, "MESON")))
+    meson = "meson";
+
   /* Setup our meson configure stage. */
 
-  ide_subprocess_launcher_push_argv (config_launcher, "meson");
+  ide_subprocess_launcher_push_argv (config_launcher, meson);
   ide_subprocess_launcher_push_argv (config_launcher, srcdir);
   ide_subprocess_launcher_push_argv (config_launcher, ".");
   ide_subprocess_launcher_push_argv (config_launcher, "--prefix");


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