[gnome-builder] git: ensure libgit2-glib has threading and ssh support
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] git: ensure libgit2-glib has threading and ssh support
- Date: Wed, 8 Apr 2015 07:26:15 +0000 (UTC)
commit e419ff5d4b5b42a5930b0550e0bc1f3b083d88e1
Author: Christian Hergert <christian hergert me>
Date: Tue Apr 7 23:58:05 2015 -0700
git: ensure libgit2-glib has threading and ssh support
libide/ide.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide.c b/libide/ide.c
index 9dfc7a0..90ddd56 100644
--- a/libide/ide.c
+++ b/libide/ide.c
@@ -18,6 +18,7 @@
#include <glib/gi18n.h>
#include <libgit2-glib/ggit.h>
+#include <stdlib.h>
#include "gconstructor.h"
#include "ide.h"
@@ -79,6 +80,8 @@ ide_set_program_name (const gchar *program_name)
static void
ide_init_ctor (void)
{
+ GgitFeatureFlags ggit_flags;
+
g_type_ensure (IDE_TYPE_CONTEXT);
g_type_ensure (IDE_TYPE_BUILD_SYSTEM);
g_type_ensure (IDE_TYPE_VCS);
@@ -171,5 +174,20 @@ ide_init_ctor (void)
-200);
modeline_parser_init ();
+
ggit_init ();
+
+ ggit_flags = ggit_get_features ();
+
+ if ((ggit_flags & GGIT_FEATURE_THREADS) == 0)
+ {
+ g_error (_("Builder requires libgit2-glib with threading support."));
+ exit (EXIT_FAILURE);
+ }
+
+ if ((ggit_flags & GGIT_FEATURE_SSH) == 0)
+ {
+ g_error (_("Builder requires libgit2-glib with SSH support."));
+ exit (EXIT_FAILURE);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]