[gnome-builder] git: move git vcs implementation to standalone plugin
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] git: move git vcs implementation to standalone plugin
- Date: Mon, 21 Dec 2015 07:54:57 +0000 (UTC)
commit 588dde141ddc94f0f6f5d19d94597f28070ea323
Author: Christian Hergert <chergert redhat com>
Date: Sun Nov 29 14:15:39 2015 -0800
git: move git vcs implementation to standalone plugin
This should make things a bit clearer for those that want to add support
for additional VCS implementations such as bzr, svn, etc.
configure.ac | 4 +-
libide/Makefile.am | 12 +-----
libide/ide-vcs.c | 4 +-
libide/ide.h | 2 -
libide/resources/libide.gresource.xml | 4 --
plugins/Makefile.am | 1 +
plugins/git/Makefile.am | 42 ++++++++++++++++++++
plugins/git/configure.ac | 3 +
{libide => plugins}/git/git.plugin | 1 -
.../git/ide-git-buffer-change-monitor.c | 0
.../git/ide-git-buffer-change-monitor.h | 0
{libide => plugins}/git/ide-git-plugin.c | 2 +-
{libide => plugins}/git/ide-git-remote-callbacks.c | 0
{libide => plugins}/git/ide-git-remote-callbacks.h | 0
{libide => plugins}/git/ide-git-vcs.c | 0
{libide => plugins}/git/ide-git-vcs.h | 0
16 files changed, 54 insertions(+), 21 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 43b13be..4d58bfa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -235,6 +235,7 @@ m4_include([plugins/ctags/configure.ac])
m4_include([plugins/devhelp/configure.ac])
m4_include([plugins/device-manager/configure.ac])
m4_include([plugins/file-search/configure.ac])
+m4_include([plugins/git/configure.ac])
m4_include([plugins/gnome-code-assistance/configure.ac])
m4_include([plugins/html-completion/configure.ac])
m4_include([plugins/html-preview/configure.ac])
@@ -486,8 +487,9 @@ echo " Clang ................................ : ${enable_clang_plugin}"
echo " Command Bar .......................... : ${enable_command_bar_plugin}"
echo " Ctags ................................ : ${enable_ctags_plugin}"
echo " Devhelp .............................. : ${enable_devhelp_plugin}"
-echo " GNOME Code Assistance ................ : ${enable_gnome_code_assistance_plugin}"
+echo " Git Version Control .................. : ${enable_git_plugin}"
echo " Global File Search ................... : ${enable_file_search_plugin}"
+echo " GNOME Code Assistance ................ : ${enable_gnome_code_assistance_plugin}"
echo " HTML Autocompletion .................. : ${enable_html_completion_plugin}"
echo " HTML and Markdown Preview ............ : ${enable_html_preview_plugin}"
echo " Project Tree ......................... : ${enable_project_tree_plugin}"
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 0ea6428..19407c5 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -22,10 +22,6 @@ libide_1_0_la_public_sources = \
fallback/ide-directory-vcs.c \
fallback/ide-directory-vcs.h \
fallback/ide-fallback-plugin.c \
- git/ide-git-remote-callbacks.c \
- git/ide-git-remote-callbacks.h \
- git/ide-git-vcs.c \
- git/ide-git-vcs.h \
ide-application.c \
ide-application.h \
ide-application-addin.c \
@@ -262,9 +258,6 @@ libide_1_0_la_SOURCES = \
editor/ide-editor-workbench-addin.c \
editor/ide-editor-workbench-addin.h \
gconstructor.h \
- git/ide-git-buffer-change-monitor.c \
- git/ide-git-buffer-change-monitor.h \
- git/ide-git-plugin.c \
greeter/ide-greeter-perspective.c \
greeter/ide-greeter-perspective.h \
greeter/ide-greeter-project-row.c \
@@ -405,7 +398,6 @@ libide_1_0_la_includes = \
-I$(srcdir)/doap \
-I$(srcdir)/editor \
-I$(srcdir)/editorconfig \
- -I$(srcdir)/git \
-I$(srcdir)/greeter \
-I$(srcdir)/gsettings \
-I$(srcdir)/local \
@@ -525,7 +517,7 @@ introspection_sources = \
$(NULL)
Ide-1.0.gir: libide-1.0.la
-Ide_1_0_gir_INCLUDES = Gio-2.0 GtkSource-3.0 Ggit-1.0 Peas-1.0
+Ide_1_0_gir_INCLUDES = Gio-2.0 GtkSource-3.0 Peas-1.0
Ide_1_0_gir_CFLAGS = $(libide_1_0_la_CFLAGS)
Ide_1_0_gir_LIBS = \
libide-1.0.la \
@@ -554,7 +546,7 @@ libide-1.0.vapi: Ide-1.0.gir
VAPIGEN_VAPIS = libide-1.0.vapi
-libide_1_0_vapi_DEPS = gio-2.0 gtk+-3.0 gtksourceview-3.0 ggit-1.0 libpeas-1.0
+libide_1_0_vapi_DEPS = gio-2.0 gtk+-3.0 gtksourceview-3.0 libpeas-1.0
libide_1_0_vapi_METADATADIRS = $(srcdir)
libide_1_0_vapi_FILES = Ide-1.0.gir
diff --git a/libide/ide-vcs.c b/libide/ide-vcs.c
index f13d34a..dee854c 100644
--- a/libide/ide-vcs.c
+++ b/libide/ide-vcs.c
@@ -110,8 +110,8 @@ sort_by_priority (gconstpointer a,
gconstpointer b,
gpointer user_data)
{
- IdeVcs *vcs_a = (IdeVcs *)a;
- IdeVcs *vcs_b = (IdeVcs *)b;
+ IdeVcs *vcs_a = *(IdeVcs **)a;
+ IdeVcs *vcs_b = *(IdeVcs **)b;
return ide_vcs_get_priority (vcs_a) - ide_vcs_get_priority (vcs_b);
}
diff --git a/libide/ide.h b/libide/ide.h
index 10308fc..e279b9a 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -118,8 +118,6 @@ G_BEGIN_DECLS
#include "doap/ide-doap-person.h"
#include "doap/ide-doap.h"
-#include "git/ide-git-remote-callbacks.h"
-#include "git/ide-git-vcs.h"
#include "local/ide-local-device.h"
#include "search/ide-omni-search-row.h"
#include "util/ide-file-manager.h"
diff --git a/libide/resources/libide.gresource.xml b/libide/resources/libide.gresource.xml
index 873fb55..9e8814c 100644
--- a/libide/resources/libide.gresource.xml
+++ b/libide/resources/libide.gresource.xml
@@ -72,8 +72,4 @@
<gresource prefix="/org/gnome/builder/plugins/fallback">
<file alias="fallback.plugin">../fallback/fallback.plugin</file>
</gresource>
-
- <gresource prefix="/org/gnome/builder/plugins/git">
- <file alias="git.plugin">../git/git.plugin</file>
- </gresource>
</gresources>
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 65f9479..2223a01 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS = \
ctags \
devhelp \
file-search \
+ git \
gnome-code-assistance \
html-completion \
html-preview \
diff --git a/plugins/git/Makefile.am b/plugins/git/Makefile.am
new file mode 100644
index 0000000..6a16fad
--- /dev/null
+++ b/plugins/git/Makefile.am
@@ -0,0 +1,42 @@
+if ENABLE_GIT_PLUGIN
+
+DISTCLEANFILES =
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST = $(plugin_DATA)
+
+plugindir = $(libdir)/gnome-builder/plugins
+plugin_LTLIBRARIES = libgit-plugin.la
+dist_plugin_DATA = git.plugin
+
+libgit_plugin_la_SOURCES = \
+ ide-git-buffer-change-monitor.c \
+ ide-git-buffer-change-monitor.h \
+ ide-git-plugin.c \
+ ide-git-remote-callbacks.c \
+ ide-git-remote-callbacks.h \
+ ide-git-vcs.c \
+ ide-git-vcs.h \
+ $(NULL)
+
+libgit_plugin_la_CFLAGS = \
+ $(LIBIDE_CFLAGS) \
+ $(OPTIMIZE_CFLAGS) \
+ -I$(top_srcdir)/libide \
+ -I$(top_srcdir)/contrib/egg \
+ $(NULL)
+
+libgit_plugin_la_LIBADD = $(GIT_LIBS)
+
+libgit_plugin_la_LDFLAGS = \
+ $(OPTIMIZE_LDFLAGS) \
+ -avoid-version \
+ -module \
+ -export-regex peas_register_types \
+ $(NULL)
+
+include $(top_srcdir)/plugins/Makefile.plugin
+
+endif
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/git/configure.ac b/plugins/git/configure.ac
new file mode 100644
index 0000000..dac9f1c
--- /dev/null
+++ b/plugins/git/configure.ac
@@ -0,0 +1,3 @@
+PKG_CHECK_MODULES(GIT, [libgit2-glib-1.0 >= 0.23.7], [enable_git_plugin=yes], [enable_git_plugin=no])
+AM_CONDITIONAL(ENABLE_GIT_PLUGIN, test x$enable_git_plugin != xno)
+AC_CONFIG_FILES([plugins/git/Makefile])
diff --git a/libide/git/git.plugin b/plugins/git/git.plugin
similarity index 87%
rename from libide/git/git.plugin
rename to plugins/git/git.plugin
index 9885bbd..b399d01 100644
--- a/libide/git/git.plugin
+++ b/plugins/git/git.plugin
@@ -6,4 +6,3 @@ Authors=Christian Hergert <christian hergert me>
Copyright=Copyright © 2015 Christian Hergert
Builtin=true
Hidden=true
-Embedded=ide_git_register_types
diff --git a/libide/git/ide-git-buffer-change-monitor.c b/plugins/git/ide-git-buffer-change-monitor.c
similarity index 100%
rename from libide/git/ide-git-buffer-change-monitor.c
rename to plugins/git/ide-git-buffer-change-monitor.c
diff --git a/libide/git/ide-git-buffer-change-monitor.h b/plugins/git/ide-git-buffer-change-monitor.h
similarity index 100%
rename from libide/git/ide-git-buffer-change-monitor.h
rename to plugins/git/ide-git-buffer-change-monitor.h
diff --git a/libide/git/ide-git-plugin.c b/plugins/git/ide-git-plugin.c
similarity index 94%
rename from libide/git/ide-git-plugin.c
rename to plugins/git/ide-git-plugin.c
index 45b89fc..edd1f58 100644
--- a/libide/git/ide-git-plugin.c
+++ b/plugins/git/ide-git-plugin.c
@@ -22,7 +22,7 @@
#include "ide-vcs.h"
void
-ide_git_register_types (PeasObjectModule *module)
+peas_register_types (PeasObjectModule *module)
{
peas_object_module_register_extension_type (module, IDE_TYPE_VCS, IDE_TYPE_GIT_VCS);
}
diff --git a/libide/git/ide-git-remote-callbacks.c b/plugins/git/ide-git-remote-callbacks.c
similarity index 100%
rename from libide/git/ide-git-remote-callbacks.c
rename to plugins/git/ide-git-remote-callbacks.c
diff --git a/libide/git/ide-git-remote-callbacks.h b/plugins/git/ide-git-remote-callbacks.h
similarity index 100%
rename from libide/git/ide-git-remote-callbacks.h
rename to plugins/git/ide-git-remote-callbacks.h
diff --git a/libide/git/ide-git-vcs.c b/plugins/git/ide-git-vcs.c
similarity index 100%
rename from libide/git/ide-git-vcs.c
rename to plugins/git/ide-git-vcs.c
diff --git a/libide/git/ide-git-vcs.h b/plugins/git/ide-git-vcs.h
similarity index 100%
rename from libide/git/ide-git-vcs.h
rename to plugins/git/ide-git-vcs.h
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]