[gnome-builder] git: move dependency check to daemon



commit 3931be09aecec85f694549101cab5dd434d1d9fc
Author: Christian Hergert <chergert redhat com>
Date:   Wed Apr 10 21:29:48 2019 -0700

    git: move dependency check to daemon
    
    This is only used by the daemon, so we can keep the checks there.

 meson.build                        | 32 --------------------------------
 src/plugins/git/daemon/meson.build | 35 ++++++++++++++++++++++++++++++++++-
 2 files changed, 34 insertions(+), 33 deletions(-)
---
diff --git a/meson.build b/meson.build
index dd6b1e0e1..3fc827fcb 100644
--- a/meson.build
+++ b/meson.build
@@ -267,38 +267,6 @@ libtemplate_glib_dep = dependency('template-glib-1.0', version: '>= 3.28.0')
 libvte_dep = dependency('vte-2.91', version: '>= 0.40.2')
 libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.22')
 libxml2_dep = dependency('libxml-2.0', version: '>= 2.9.0')
-libgit_dep = dependency('libgit2-glib-1.0', version: '>= 0.25.0')
-
-# Make sure libgit2/libgit2-glib were compiled with proper flags
-libgit_thread_safe_check = '''
-#include <libgit2-glib/ggit.h>
-int main(int argc, const char *argv[])
-{
-ggit_init ();
-return ((ggit_get_features() & GGIT_FEATURE_THREADS) != 0) ? 0 : 1;
-}
-'''
-res = cc.run(libgit_thread_safe_check,
-dependencies: libgit_dep,
-)
-if res.returncode() != 0
-error('libgit2 was not compiled with -DTHREADSAFE:BOOL=ON')
-endif
-
-libgit_ssh_check = '''
-#include <libgit2-glib/ggit.h>
-int main(int argc, const char *argv[])
-{
-ggit_init ();
-return ((ggit_get_features() & GGIT_FEATURE_SSH) != 0) ? 0 : 1;
-}
-'''
-res = cc.run(libgit_ssh_check,
-dependencies: libgit_dep,
-)
-if res.returncode() != 0
-error('libgit2 was not compiled with SSH support')
-endif
 
 check_functions = [
   # pty
diff --git a/src/plugins/git/daemon/meson.build b/src/plugins/git/daemon/meson.build
index e6e35ad0d..09d783b0d 100644
--- a/src/plugins/git/daemon/meson.build
+++ b/src/plugins/git/daemon/meson.build
@@ -1,6 +1,39 @@
+libgit2_glib_dep = dependency('libgit2-glib-1.0', version: '>= 0.27.0')
+
+# Make sure libgit2/libgit2-glib were compiled with proper flags
+libgit_thread_safe_check = '''
+#include <libgit2-glib/ggit.h>
+int main(int argc, const char *argv[])
+{
+ggit_init ();
+return ((ggit_get_features() & GGIT_FEATURE_THREADS) != 0) ? 0 : 1;
+}
+'''
+res = cc.run(libgit_thread_safe_check,
+dependencies: libgit2_glib_dep,
+)
+if res.returncode() != 0
+error('libgit2 was not compiled with -DTHREADSAFE:BOOL=ON')
+endif
+
+libgit_ssh_check = '''
+#include <libgit2-glib/ggit.h>
+int main(int argc, const char *argv[])
+{
+ggit_init ();
+return ((ggit_get_features() & GGIT_FEATURE_SSH) != 0) ? 0 : 1;
+}
+'''
+res = cc.run(libgit_ssh_check,
+dependencies: libgit2_glib_dep,
+)
+if res.returncode() != 0
+error('libgit2 was not compiled with SSH support')
+endif
+
 gnome_builder_git_deps = [
   libgiounix_dep,
-  libgit_dep,
+  libgit2_glib_dep,
 ]
 
 ipc_git_change_monitor_src = gnome.gdbus_codegen('ipc-git-change-monitor',


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