[gnome-builder] vala: add PACKAGE_DATADIR to vapi directories
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vala: add PACKAGE_DATADIR to vapi directories
- Date: Mon, 22 Feb 2016 04:27:26 +0000 (UTC)
commit b68a95f801b34d973e10291d4d179312f8f0c788
Author: Christian Hergert <christian hergert me>
Date: Sun Feb 21 20:25:37 2016 -0800
vala: add PACKAGE_DATADIR to vapi directories
https://bugzilla.gnome.org/show_bug.cgi?id=762419
plugins/vala-pack/Makefile.am | 2 ++
plugins/vala-pack/config.vapi | 5 +++++
plugins/vala-pack/ide-vala-index.vala | 4 ++++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/plugins/vala-pack/Makefile.am b/plugins/vala-pack/Makefile.am
index 5f17f1d..f50b9be 100644
--- a/plugins/vala-pack/Makefile.am
+++ b/plugins/vala-pack/Makefile.am
@@ -7,6 +7,7 @@ plugin_LTLIBRARIES = libvala-pack-plugin.la
dist_plugin_DATA = vala-pack.plugin
libvala_pack_plugin_la_SOURCES = \
+ config.vapi \
ide-vala-service.vala \
ide-vala-completion.vala \
ide-vala-completion-item.vala \
@@ -38,6 +39,7 @@ libvala_pack_plugin_la_VALAFLAGS = \
$(NULL)
libvala_pack_plugin_la_CFLAGS = \
+ -DPACKAGE_DATADIR=\""$(datadir)/gnome-builder"\" \
-DG_LOG_DOMAIN=\"vala-pack-plugin\" \
-DGETTEXT_PACKAGE=\"gnome-builder\" \
$(LIBIDE_CFLAGS) \
diff --git a/plugins/vala-pack/config.vapi b/plugins/vala-pack/config.vapi
new file mode 100644
index 0000000..e8a85de
--- /dev/null
+++ b/plugins/vala-pack/config.vapi
@@ -0,0 +1,5 @@
+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "")]
+namespace Config {
+ public const string PACKAGE_DATADIR;
+}
+
diff --git a/plugins/vala-pack/ide-vala-index.vala b/plugins/vala-pack/ide-vala-index.vala
index d50de2c..da8c310 100644
--- a/plugins/vala-pack/ide-vala-index.vala
+++ b/plugins/vala-pack/ide-vala-index.vala
@@ -87,6 +87,10 @@ namespace Ide
this.code_context.add_define ("GLIB_2_%d".printf (i));
}
+ this.code_context.vapi_directories = {
+ Path.build_filename (Config.PACKAGE_DATADIR, "vapi"),
+ };
+
this.code_context.add_external_package ("glib-2.0");
this.code_context.add_external_package ("gobject-2.0");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]