[gnome-builder/wip/tingping/meson-build] build: Add support for Meson
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/tingping/meson-build] build: Add support for Meson
- Date: Tue, 18 Oct 2016 00:02:33 +0000 (UTC)
commit 22df1c2cb240b52fcf33308aacac505c0df96fea
Author: Patrick Griffis <tingping tingping se>
Date: Sat Oct 1 09:10:00 2016 -0400
build: Add support for Meson
.buildconfig | 2 +-
.editorconfig | 4 +
build/meson/meson_post_install.sh | 12 +
build/meson/meson_run_locally.sh | 35 +
config.h.meson | 49 ++
contrib/egg/meson.build | 121 ++++
contrib/gd/meson.build | 24 +
contrib/gstyle/meson.build | 145 +++++
contrib/gstyle/tests/Makefile.am | 2 +-
contrib/gstyle/tests/meson.build | 100 +++
contrib/libeditorconfig/meson.build | 48 ++
contrib/nautilus/meson.build | 18 +
contrib/pnl/meson.build | 123 ++++
contrib/rg/meson.build | 38 ++
contrib/search/meson.build | 21 +
contrib/tmpl/Makefile.am | 27 +-
contrib/tmpl/meson.build | 172 +++++
contrib/tmpl/tmpl-enums.h.in | 3 +-
contrib/tmpl/tmpl-expr-scanner.l | 3 -
contrib/xml/meson.build | 21 +
data/fonts/meson.build | 3 +
data/gsettings/meson.build | 40 ++
data/icons/meson.build | 33 +
data/meson.build | 62 ++
data/style-schemes/meson.build | 4 +
doc/reference/libide/meson.build | 46 ++
doc/reference/libide/xml/gtkdocentities.ent.in | 7 +
doc/reference/libide/xml/meson.build | 13 +
doc/reference/libide/xml/tree_index.sgml | 11 +
help/meson.build | 9 +
libide/Makefile.am | 10 +-
libide/application/ide-application-plugins.c | 2 +
libide/editor/ide-editor-map-bin.c | 2 +
.../editorconfig/ide-editorconfig-file-settings.c | 2 +-
libide/ide.map | 6 +
libide/meson.build | 656 ++++++++++++++++++++
libide/resources/meson.build | 5 +
libide/workers/ide-worker-manager.c | 2 +
meson.build | 181 ++++++
meson_options.txt | 50 ++
plugins/autotools-templates/meson.build | 10 +
plugins/autotools/meson.build | 37 ++
plugins/build-tools/meson.build | 41 ++
plugins/c-pack/meson.build | 21 +
plugins/clang/meson.build | 44 ++
plugins/color-picker/meson.build | 45 ++
plugins/command-bar/meson.build | 47 ++
plugins/comment-code/meson.build | 24 +
plugins/contributing/meson.build | 6 +
plugins/create-project/meson.build | 30 +
plugins/ctags/meson.build | 32 +
plugins/devhelp/meson.build | 34 +
plugins/file-search/meson.build | 24 +
plugins/flatpak/meson.build | 23 +
plugins/fpaste/meson.build | 10 +
plugins/gcc/meson.build | 17 +
plugins/gettext/meson.build | 17 +
plugins/git/meson.build | 76 +++
plugins/gnome-code-assistance/meson.build | 30 +
plugins/hello-cpp/meson.build | 19 +
plugins/html-completion/meson.build | 20 +
plugins/html-preview/meson.build | 15 +
plugins/jedi/meson.build | 5 +
plugins/jhbuild/meson.build | 5 +
plugins/meson.build | 44 ++
plugins/mingw/meson.build | 19 +
plugins/project-tree/meson.build | 51 ++
plugins/python-gi-imports-completion/meson.build | 8 +
plugins/python-pack/meson.build | 19 +
plugins/quick-highlight/meson.build | 19 +
plugins/support/meson.build | 26 +
plugins/symbol-tree/meson.build | 28 +
plugins/sysmon/meson.build | 30 +
plugins/sysprof/meson.build | 31 +
plugins/terminal/meson.build | 39 ++
plugins/todo/meson.build | 6 +
plugins/xml-pack/meson.build | 21 +
po/meson.build | 48 ++
tests/meson.build | 227 +++++++
tests/test-fuzzy.c | 2 +-
tests/test-ide-buffer-manager.c | 4 +-
tests/test-ide-context.c | 6 +-
tools/meson.build | 6 +
83 files changed, 3353 insertions(+), 25 deletions(-)
---
diff --git a/.buildconfig b/.buildconfig
index ff4d423..e0e9fe3 100644
--- a/.buildconfig
+++ b/.buildconfig
@@ -28,7 +28,7 @@ name=Builder (Host)
device=local
runtime=host
config-opts=--enable-tracing --enable-debug --enable-tests
-prefix=/opt/gnome
+prefix=/home/tingping/.cache/gnome-builder/install/Builder/host
default=true
diff --git a/.editorconfig b/.editorconfig
index 2053f10..615f597 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -39,3 +39,7 @@ tab_size = 4
indent_size = 2
tab_size = 2
indent_style = space
+
+[meson.build]
+indent_size = 2
+indent_style = space
diff --git a/build/meson/meson_post_install.sh b/build/meson/meson_post_install.sh
new file mode 100755
index 0000000..e5e21c2
--- /dev/null
+++ b/build/meson/meson_post_install.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ -z $DESTDIR ]; then
+
+echo 'Compiling GSchema'
+glib-compile-schemas "$MESON_INSTALL_PREFIX/share/glib-2.0/schemas"
+echo 'Updating icon cache'
+gtk-update-icon-cache -qtf "$MESON_INSTALL_PREFIX/share/icons/hicolor"
+echo 'Updating desktop database'
+update-desktop-database -q "$MESON_INSTALL_PREFIX/share/applications"
+
+fi
diff --git a/build/meson/meson_run_locally.sh b/build/meson/meson_run_locally.sh
new file mode 100755
index 0000000..f444393
--- /dev/null
+++ b/build/meson/meson_run_locally.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+if [ -z "$MESON_BUILD_ROOT" ]; then
+ exit 1
+fi
+
+cd "$MESON_BUILD_ROOT" || exit 1
+
+# We have to deal with gschema ourselves...
+tmpdir=$(mktemp -d -p "$MESON_BUILD_ROOT" -t 'schema-tmp.XXXXXXXXXX')
+function cleanup_temp() { rm -rf "$tmpdir"; }
+trap cleanup_temp EXIT
+cp $MESON_SOURCE_ROOT/data/gsettings/*.gschema.xml "$tmpdir"
+cp $MESON_BUILD_ROOT/data/gsettings/*.gschema.xml "$tmpdir"
+cp $MESON_SOURCE_ROOT/plugins/gnome-code-assistance/*.gschema.xml "$tmpdir"
+glib-compile-schemas "$tmpdir" || exit 1
+
+# We have to deal with plugins ourselves...
+pushd plugins
+for plugin in *; do
+ # FIXME: Copy Python plugins
+ cp $MESON_SOURCE_ROOT/plugins/$plugin/*.plugin $MESON_BUILD_ROOT/plugins/$plugin
+done
+popd
+
+env PEAS_DEBUG=1 \
+ GB_IN_TREE_PLUGINS=1 \
+ GB_IN_TREE_FONTS=1 \
+ GB_IN_TREE_STYLE_SCHEMES=1 \
+ GI_TYPELIB_PATH="libide:contrib/egg:contrib/pnl:contrib/tmpl:$GI_TYPELIB_PATH" \
+ GOBJECT_DEBUG=instance-count \
+ GSETTINGS_SCHEMA_DIR="$tmpdir" \
+ PYTHONDONTWRITEBYTECODE=yes \
+ ./gnome-builder -vvvvs
+
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 0000000..e28d97d
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,49 @@
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+#mesondefine ENABLE_NLS
+
+/* GETTEXT package name */
+#mesondefine GETTEXT_PACKAGE
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#mesondefine HAVE_GETTEXT
+
+/* Define to 1 if you have the `sched_getcpu' function. */
+#mesondefine HAVE_SCHED_GETCPU
+
+/* Name of package */
+#mesondefine PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#mesondefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#mesondefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#mesondefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#mesondefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#mesondefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#mesondefine PACKAGE_VERSION
+
+#mesondefine PACKAGE_DATADIR
+
+#mesondefine PACKAGE_LIBDIR
+
+#mesondefine PACKAGE_LIBEXECDIR
+
+#mesondefine PACKAGE_LOCALE_DIR
+
+/* Version number of package */
+#mesondefine VERSION
+
+#mesondefine SRCDIR
+
+#mesondefine BUILDDIR
+
diff --git a/contrib/egg/meson.build b/contrib/egg/meson.build
new file mode 100644
index 0000000..102fcf4
--- /dev/null
+++ b/contrib/egg/meson.build
@@ -0,0 +1,121 @@
+libegg_headers = [
+ 'egg-animation.h',
+ 'egg-binding-group.h',
+ 'egg-box.h',
+ 'egg-centering-bin.h',
+ 'egg-column-layout.h',
+ 'egg-counter.h',
+ 'egg-date-time.h',
+ 'egg-empty-state.h',
+ 'egg-entry-box.h',
+ 'egg-file-chooser-entry.h',
+ 'egg-frame-source.h',
+ 'egg-heap.h',
+ 'egg-list-box.h',
+ 'egg-menu-manager.h',
+ 'egg-pill-box.h',
+ 'egg-priority-box.h',
+ 'egg-private.h',
+ 'egg-radio-box.h',
+ 'egg-scrolled-window.h',
+ 'egg-search-bar.h',
+ 'egg-settings-flag-action.h',
+ 'egg-settings-sandwich.h',
+ 'egg-signal-group.h',
+ 'egg-simple-label.h',
+ 'egg-simple-popover.h',
+ 'egg-slider.h',
+ 'egg-state-machine-buildable.h',
+ 'egg-state-machine.h',
+ 'egg-task-cache.h',
+ 'egg-three-grid.h',
+ 'egg-widget-action-group.h',
+]
+
+install_headers(libegg_headers,
+ subdir: 'gnome-builder-' + meson.project_version() + '/egg'
+)
+
+libegg_resources = gnome.compile_resources('egg-resources', 'egg.gresource.xml',
+ c_name: 'egg',
+)
+
+libegg_sources = [
+ 'egg-animation.c',
+ 'egg-binding-group.c',
+ 'egg-box.c',
+ 'egg-centering-bin.c',
+ 'egg-column-layout.c',
+ 'egg-counter.c',
+ 'egg-date-time.c',
+ 'egg-empty-state.c',
+ 'egg-entry-box.c',
+ 'egg-file-chooser-entry.c',
+ 'egg-frame-source.c',
+ 'egg-heap.c',
+ 'egg-list-box.c',
+ 'egg-menu-manager.c',
+ 'egg-pill-box.c',
+ 'egg-priority-box.c',
+ 'egg-radio-box.c',
+ 'egg-scrolled-window.c',
+ 'egg-search-bar.c',
+ 'egg-settings-flag-action.c',
+ 'egg-settings-sandwich.c',
+ 'egg-signal-group.c',
+ 'egg-simple-label.c',
+ 'egg-simple-popover.c',
+ 'egg-slider.c',
+ 'egg-state-machine-buildable.c',
+ 'egg-state-machine.c',
+ 'egg-task-cache.c',
+ 'egg-three-grid.c',
+ 'egg-widget-action-group.c',
+]
+
+libegg_deps = [
+ libgio_dep,
+ libgtk_dep,
+]
+
+libegg = shared_library('egg-private', libegg_sources + [libegg_resources[0], libegg_resources[1]],
+ dependencies: libegg_deps,
+ version: '0.0.0',
+ install: true,
+ install_dir: pkglibdir,
+)
+
+libegg_dep = declare_dependency(
+ link_with: libegg,
+ dependencies: libegg_deps,
+ include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+ libegg_gir = gnome.generate_gir(libegg,
+ sources: libegg_sources + libegg_headers,
+ nsversion: '1.0',
+ namespace: 'Egg',
+ symbol_prefix: 'egg',
+ identifier_prefix: 'Egg',
+ includes: ['Gdk-3.0', 'Gio-2.0', 'Gtk-3.0'],
+ install: true,
+ install_dir_gir: pkggirdir,
+ install_dir_typelib: pkgtypelibdir,
+ extra_args: [
+ '--c-include=egg-private.h',
+ ]
+ )
+
+ if get_option('with_vapi')
+
+ libegg_vapi = gnome.generate_vapi('egg-private',
+ sources: libegg_gir[0],
+ packages: ['gio-2.0', 'gtk+-3.0'],
+ install: true,
+ install_dir: pkgvapidir,
+ )
+
+ endif
+endif
diff --git a/contrib/gd/meson.build b/contrib/gd/meson.build
new file mode 100644
index 0000000..abb3248
--- /dev/null
+++ b/contrib/gd/meson.build
@@ -0,0 +1,24 @@
+libgd_resources = gnome.compile_resources('gd-resources',
+ 'gd-tagged-entry.gresource.xml',
+ c_name: 'gd',
+)
+
+libgd_sources = [
+ 'gd-tagged-entry.c',
+ libgd_resources,
+]
+
+libgd_deps = [
+ libgio_dep,
+ libgtk_dep,
+]
+
+libgd = static_library('gd', libgd_sources,
+ dependencies: libgd_deps,
+ pic: true,
+)
+
+libgd_dep = declare_dependency(
+ link_with: libgd,
+ include_directories: include_directories('.'),
+)
diff --git a/contrib/gstyle/meson.build b/contrib/gstyle/meson.build
new file mode 100644
index 0000000..1b1d9fa
--- /dev/null
+++ b/contrib/gstyle/meson.build
@@ -0,0 +1,145 @@
+libgstyle_headers = [
+ 'gstyle-animation.h',
+ 'gstyle-cielab.h',
+ 'gstyle-color.h',
+ 'gstyle-color-component.h',
+ 'gstyle-color-convert.h',
+ 'gstyle-color-filter.h',
+ 'gstyle-color-item.h',
+ 'gstyle-color-panel.h',
+ 'gstyle-color-panel-private.h',
+ 'gstyle-color-panel-actions.h',
+ 'gstyle-color-plane.h',
+ 'gstyle-color-predefined.h',
+ 'gstyle-color-scale.h',
+ 'gstyle-color-widget.h',
+ 'gstyle-color-widget-actions.h',
+ 'gstyle-colorlexer.h',
+ 'gstyle-css-provider.h',
+ 'gstyle-eyedropper.h',
+ 'gstyle-hsv.h',
+ 'gstyle-palette.h',
+ 'gstyle-palette-widget.h',
+ 'gstyle-private.h',
+ 'gstyle-rename-popover.h',
+ 'gstyle-revealer.h',
+ 'gstyle-slidein.h',
+ 'gstyle-types.h',
+ 'gstyle-utils.h',
+ 'gstyle-xyz.h',
+]
+
+libgstyle_header_dir = join_paths(get_option('includedir'),
+ 'gnome-builder-' + meson.project_version(), 'gstyle')
+
+install_headers(libgstyle_headers,
+ install_dir: libgstyle_header_dir,
+)
+
+libgstyle_resources = gnome.compile_resources('gstyle-resources',
+ 'gstyle.gresource.xml',
+ c_name: 'gstyle',
+)
+
+libgstyle_sources = [
+ 'gstyle-animation.c',
+ 'gstyle-cielab.c',
+ 'gstyle-color.c',
+ 'gstyle-color-component.c',
+ 'gstyle-color-convert.c',
+ 'gstyle-color-filter.c',
+ 'gstyle-color-item.c',
+ 'gstyle-color-panel.c',
+ 'gstyle-color-panel-actions.c',
+ 'gstyle-color-plane.c',
+ 'gstyle-color-scale.c',
+ 'gstyle-color-widget.c',
+ 'gstyle-color-widget-actions.c',
+ 'gstyle-colorlexer.c',
+ 'gstyle-css-provider.c',
+ 'gstyle-eyedropper.c',
+ 'gstyle-hsv.c',
+ 'gstyle-palette.c',
+ 'gstyle-palette-widget.c',
+ 'gstyle-rename-popover.c',
+ 'gstyle-revealer.c',
+ 'gstyle-slidein.c',
+ 'gstyle-utils.c',
+ 'gstyle-xyz.c',
+ libgstyle_resources[0],
+]
+
+libgstyle_deps = [
+ dependency('gtk+-3.0'),
+ libsearch_dep,
+ libxml_dep,
+]
+
+libgstyle = shared_library('gstyle-private', libgstyle_sources,
+ dependencies: libgstyle_deps,
+ version: '0.0.0',
+ install: true,
+ install_dir: pkglibdir,
+)
+
+libgstyle_dep = declare_dependency(
+ link_with: libgstyle,
+ dependencies: libgstyle_deps,
+ include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+ libgstyle_introspection_sources = [
+ 'gstyle-cielab.h',
+ 'gstyle-cielab.c',
+ 'gstyle-color.h',
+ 'gstyle-color.c',
+ 'gstyle-color-component.h',
+ 'gstyle-color-component.c',
+ 'gstyle-color-convert.h',
+ 'gstyle-color-convert.c',
+ 'gstyle-color-filter.h',
+ 'gstyle-color-filter.c',
+ 'gstyle-color-item.h',
+ 'gstyle-color-item.c',
+ 'gstyle-color-panel.h',
+ 'gstyle-color-panel.c',
+ 'gstyle-color-plane.h',
+ 'gstyle-color-plane.c',
+ 'gstyle-color-scale.h',
+ 'gstyle-color-scale.c',
+ 'gstyle-color-widget.h',
+ 'gstyle-color-widget.c',
+ 'gstyle-eyedropper.h',
+ 'gstyle-eyedropper.c',
+ 'gstyle-hsv.h',
+ 'gstyle-hsv.c',
+ 'gstyle-palette.h',
+ 'gstyle-palette.c',
+ 'gstyle-palette-widget.h',
+ 'gstyle-palette-widget.c',
+ 'gstyle-slidein.h',
+ 'gstyle-slidein.c',
+ 'gstyle-xyz.h',
+ 'gstyle-xyz.c',
+ ]
+
+ gnome.generate_gir(libgstyle,
+ sources: libgstyle_introspection_sources,
+ nsversion: '1.0',
+ namespace: 'Gstyle',
+ symbol_prefix: 'gstyle',
+ identifier_prefix: 'Gstyle',
+ includes: ['Gdk-3.0', 'Gio-2.0', 'Gtk-3.0', 'GtkSource-3.0'],
+ install: true,
+ install_dir_gir: pkggirdir,
+ install_dir_typelib: pkgtypelibdir,
+ extra_args: [
+ '--c-include=gstyle-private.h',
+ ],
+ )
+
+endif
+
+subdir('tests')
diff --git a/contrib/gstyle/tests/Makefile.am b/contrib/gstyle/tests/Makefile.am
index c553ae5..f507cb0 100644
--- a/contrib/gstyle/tests/Makefile.am
+++ b/contrib/gstyle/tests/Makefile.am
@@ -4,7 +4,7 @@ gstyle_cflags = \
$(DEBUG_CFLAGS) \
$(GSTYLE_CFLAGS) \
-I$(top_srcdir)/contrib/gstyle \
- -DTEST_DATA_DIR="\"$(abs_builddir)/data\"" \
+ -DTEST_DATA_DIR="\"$(abs_srcdir)/data\"" \
$(NULL)
gstyle_libs = \
diff --git a/contrib/gstyle/tests/meson.build b/contrib/gstyle/tests/meson.build
new file mode 100644
index 0000000..125c5cc
--- /dev/null
+++ b/contrib/gstyle/tests/meson.build
@@ -0,0 +1,100 @@
+gstyle_test_env = [
+ 'GB_IN_TREE_PLUGINS=1',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ 'G_DEBUG=gc-friendly',
+ 'GSETTINGS_BACKEND=memory',
+ 'MALLOC_CHECK_=2',
+# 'MALLOC_PERTURB_=$((${RANDOM:-256} % 256))',
+]
+gstyle_test_cflags = [
+ '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()),
+]
+
+gstyle_color = executable('test-gstyle-color',
+ 'test-gstyle-color.c',
+ dependencies: libgstyle_dep,
+)
+test('test-gstyle-color', gstyle_color,
+ env: gstyle_test_env
+)
+
+
+gstyle_color_panel = executable('test-gstyle-color-panel',
+ 'test-gstyle-color-panel.c',
+ c_args: gstyle_test_cflags,
+ dependencies: libgstyle_dep,
+)
+test('test-gstyle-color-panel', gstyle_color_panel,
+ env: gstyle_test_env
+)
+
+
+gstyle_color_plane = executable('test-gstyle-color-plane',
+ 'test-gstyle-color-plane.c',
+ c_args: gstyle_test_cflags,
+ dependencies: libgstyle_dep,
+)
+#test('test-gstyle-color-plane', gstyle_color_plane,
+# env: gstyle_test_env
+#)
+
+
+gstyle_color_scale = executable('test-gstyle-color-scale',
+ 'test-gstyle-color-scale.c',
+ c_args: gstyle_test_cflags,
+ dependencies: libgstyle_dep,
+)
+#test('test-gstyle-color-scale', gstyle_color_scale,
+# env: gstyle_test_env
+#)
+
+
+gstyle_color_widget = executable('test-gstyle-color-widget',
+ 'test-gstyle-color-widget.c',
+ c_args: gstyle_test_cflags,
+ dependencies: libgstyle_dep,
+)
+#test('test-gstyle-color-widget', gstyle_color_widget,
+# env: gstyle_test_env
+#)
+
+
+gstyle_filter = executable('test-gstyle-filter',
+ 'test-gstyle-filter.c',
+ c_args: gstyle_test_cflags,
+ dependencies: libgstyle_dep,
+)
+#test('test-gstyle-filter', gstyle_filter,
+# env: gstyle_test_env
+#)
+
+
+gstyle_palette = executable('test-gstyle-palette',
+ 'test-gstyle-palette.c',
+ c_args: gstyle_test_cflags,
+ dependencies: libgstyle_dep,
+)
+test('test-gstyle-palette', gstyle_palette,
+ env: gstyle_test_env
+)
+
+
+gstyle_palette_widget = executable('test-gstyle-palette-widget',
+ 'test-gstyle-palette-widget.c',
+ c_args: gstyle_test_cflags,
+ dependencies: libgstyle_dep,
+)
+test('test-gstyle-color-palette-widget', gstyle_palette_widget,
+ env: gstyle_test_env
+)
+
+
+gstyle_parse = executable('test-gstyle-color-parse',
+ 'test-gstyle-parse.c',
+ c_args: gstyle_test_cflags,
+ dependencies: libgstyle_dep,
+)
+test('test-gstyle-parse', gstyle_parse,
+ env: gstyle_test_env
+)
diff --git a/contrib/libeditorconfig/meson.build b/contrib/libeditorconfig/meson.build
new file mode 100644
index 0000000..0fc0b8c
--- /dev/null
+++ b/contrib/libeditorconfig/meson.build
@@ -0,0 +1,48 @@
+if get_option('with_editorconfig')
+
+libeditorconfig_sources = [
+ 'ec_glob.c',
+ 'ec_glob.h',
+ 'editorconfig.c',
+ 'editorconfig.h',
+ 'editorconfig/editorconfig.h',
+ 'editorconfig/editorconfig_handle.h',
+ 'editorconfig_handle.c',
+ 'editorconfig_handle.h',
+ 'global.h',
+ 'ini.c',
+ 'ini.h',
+ 'misc.c',
+ 'misc.h',
+ 'utarray.h',
+]
+
+libeditorconfig_deps = [
+ dependency('libpcre')
+]
+
+# FIXME: Actually test these
+libeditorconfig_args = [
+ '-DHAVE_STRCASECMP',
+ '-DHAVE_STRICMP',
+ '-DHAVE_STRDUP',
+ '-DHAVE_STRNDUP',
+ '-DUNIX',
+ '-Deditorconfig_VERSION_MAJOR=0',
+ '-Deditorconfig_VERSION_MINOR=0',
+ '-Deditorconfig_VERSION_PATCH=0',
+ '-Deditorconfig_VERSION_SUFFIX=0',
+]
+
+libeditorconfig = static_library('editorconfig',
+ libeditorconfig_sources,
+ dependencies: libeditorconfig_deps,
+ c_args: libeditorconfig_args,
+ pic: true,
+)
+
+libeditorconfig_dep = declare_dependency(
+ link_with: libeditorconfig,
+ include_directories: include_directories('.'),
+)
+endif
diff --git a/contrib/nautilus/meson.build b/contrib/nautilus/meson.build
new file mode 100644
index 0000000..57a9526
--- /dev/null
+++ b/contrib/nautilus/meson.build
@@ -0,0 +1,18 @@
+libnautilus_sources = [
+ 'nautilus-floating-bar.c',
+]
+
+libnautilus_deps = [
+ libgio_dep,
+ libgtk_dep,
+]
+
+libnautilus = static_library('nautilus', libnautilus_sources,
+ dependencies: libnautilus_deps,
+ pic: true,
+)
+
+libnautilus_dep = declare_dependency(
+ link_with: libnautilus,
+ include_directories: include_directories('.'),
+)
diff --git a/contrib/pnl/meson.build b/contrib/pnl/meson.build
new file mode 100644
index 0000000..5b545a5
--- /dev/null
+++ b/contrib/pnl/meson.build
@@ -0,0 +1,123 @@
+libpnl_headers = [
+ 'pnl-animation.h',
+ 'pnl-dock-bin.h',
+ 'pnl-dock-bin-edge.h',
+ 'pnl-dock-item.h',
+ 'pnl-dock-manager.h',
+ 'pnl-dock-overlay.h',
+ 'pnl-dock-paned.h',
+ 'pnl-dock-revealer.h',
+ 'pnl-dock-stack.h',
+ 'pnl-dock-types.h',
+ 'pnl-dock-widget.h',
+ 'pnl-dock-window.h',
+ 'pnl-dock.h',
+ 'pnl-frame-source.h',
+ 'pnl-multi-paned.h',
+ 'pnl-tab-strip.h',
+ 'pnl-tab.h',
+ 'pnl.h',
+]
+
+libpnl_header_dir = get_option('includedir') + '/gnome-builder-' + meson.project_version() + '/pnl'
+
+libpnl_conf = configuration_data()
+libpnl_conf.set('MAJOR_VERSION', MAJOR_VERSION)
+libpnl_conf.set('MINOR_VERSION', MINOR_VERSION)
+libpnl_conf.set('MICRO_VERSION', MICRO_VERSION)
+libpnl_conf.set('VERSION', meson.project_version())
+
+libpnl_version_h = configure_file(
+ input: 'pnl-version.h.in',
+ output: 'pnl-version.h',
+ configuration: libpnl_conf,
+ install: true,
+ install_dir: libpnl_header_dir,
+)
+
+install_headers(libpnl_headers,
+ install_dir: libpnl_header_dir,
+)
+
+libpnl_resources = gnome.compile_resources('pnl-resources',
+ 'pnl.gresource.xml',
+ c_name: 'pnl',
+)
+
+libpnl_sources = [
+ 'pnl-animation.c',
+ 'pnl-dock-bin-edge.c',
+ 'pnl-dock-bin-edge-private.h',
+ 'pnl-dock-bin.c',
+ 'pnl-dock-item.c',
+ 'pnl-dock-manager.c',
+ 'pnl-dock-overlay-edge-private.h',
+ 'pnl-dock-overlay-edge.c',
+ 'pnl-dock-overlay.c',
+ 'pnl-dock-paned-private.h',
+ 'pnl-dock-paned.c',
+ 'pnl-dock-revealer.c',
+ 'pnl-dock-stack.c',
+ 'pnl-dock-tab-strip.c',
+ 'pnl-dock-tab-strip.h',
+ 'pnl-dock-transient-grab.c',
+ 'pnl-dock-transient-grab.h',
+ 'pnl-dock-widget.c',
+ 'pnl-dock-window.c',
+ 'pnl-dock.c',
+ 'pnl-frame-source.c',
+ 'pnl-multi-paned.c',
+ 'pnl-tab-strip.c',
+ 'pnl-tab.c',
+ 'pnl-util-private.h',
+ 'pnl-util.c',
+ libpnl_version_h,
+]
+
+libpnl_deps = [
+ dependency('gtk+-3.0'),
+]
+
+libpnl = shared_library('panel-gtk', libpnl_sources + [libpnl_resources[0],libpnl_resources[1]],
+ dependencies: libpnl_deps,
+ c_args: ['-DPNL_COMPILATION'],
+ version: '0.0.0',
+ install: true,
+ install_dir: pkglibdir,
+)
+
+libpnl_dep = declare_dependency(
+ sources: libpnl_version_h,
+ link_with: libpnl,
+ include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+ libpnl_gir = gnome.generate_gir(libpnl,
+ sources: libpnl_sources + libpnl_headers,
+ nsversion: '1.0',
+ namespace: 'Pnl',
+ symbol_prefix: 'pnl',
+ identifier_prefix: 'Pnl',
+ includes: ['Gdk-3.0', 'Gio-2.0', 'Gtk-3.0'],
+ install: true,
+ install_dir_gir: pkggirdir,
+ install_dir_typelib: pkgtypelibdir,
+ extra_args: [
+ '--c-include=pnl.h',
+ '-DPNL_COMPILATION',
+ ],
+ )
+
+ if get_option('with_vapi')
+
+ libpnl_vapi = gnome.generate_vapi('panel-gtk',
+ sources: libpnl_gir[0],
+ packages: ['gio-2.0', 'gtk+-3.0'],
+ install: true,
+ install_dir: pkgvapidir,
+ )
+
+ endif
+endif
diff --git a/contrib/rg/meson.build b/contrib/rg/meson.build
new file mode 100644
index 0000000..ffe722a
--- /dev/null
+++ b/contrib/rg/meson.build
@@ -0,0 +1,38 @@
+librg_sources = [
+ 'realtime-graphs.h',
+ 'rg-column.c',
+ 'rg-column.h',
+ 'rg-column-private.h',
+ 'rg-cpu-graph.c',
+ 'rg-cpu-graph.h',
+ 'rg-cpu-table.c',
+ 'rg-cpu-table.h',
+ 'rg-graph.c',
+ 'rg-graph.h',
+ 'rg-line-renderer.c',
+ 'rg-line-renderer.h',
+ 'rg-renderer.c',
+ 'rg-renderer.h',
+ 'rg-ring.c',
+ 'rg-ring.h',
+ 'rg-table.c',
+ 'rg-table.h',
+]
+
+librg_deps = [
+ libgio_dep,
+ libgtk_dep,
+ libegg_dep,
+]
+
+librg = shared_library('rg', librg_sources,
+ dependencies: librg_deps,
+ version: '0.0.0',
+ install: true,
+ install_dir: pkglibdir,
+)
+
+librg_dep = declare_dependency(
+ link_with: librg,
+ include_directories: include_directories('.'),
+)
diff --git a/contrib/search/meson.build b/contrib/search/meson.build
new file mode 100644
index 0000000..9991814
--- /dev/null
+++ b/contrib/search/meson.build
@@ -0,0 +1,21 @@
+libsearch_sources = [
+ 'fuzzy.c',
+ 'trie.c',
+]
+
+libsearch_deps = [
+ dependency('gobject-2.0'),
+]
+
+libsearch = shared_library('search', libsearch_sources,
+ dependencies: libsearch_deps,
+ version: '0.0.0',
+ install: true,
+ install_dir: pkglibdir,
+)
+
+libsearch_dep = declare_dependency(
+ link_with: libsearch,
+ dependencies: libsearch_deps,
+ include_directories: include_directories('.'),
+)
diff --git a/contrib/tmpl/Makefile.am b/contrib/tmpl/Makefile.am
index fcc3c83..5699a21 100644
--- a/contrib/tmpl/Makefile.am
+++ b/contrib/tmpl/Makefile.am
@@ -1,6 +1,22 @@
DISTCLEANFILES =
CLEANFILES =
-BUILT_SOURCES =
+
+BUILT_SOURCES = \
+ tmpl-expr-parser.c \
+ tmpl-expr-parser.h \
+ tmpl-expr-scanner.c \
+ tmpl-expr-scanner.h
+
+tmpl-expr-scanner.c tmpl-expr-scanner.h: tmpl-expr-scanner.l
+ $(AM_V_GEN)$(LEX) -o $@ $<
+
+tmpl-expr-scanner.h: tmpl-expr-scanner.c
+
+tmpl-expr-parser.c tmpl-expr-parser.h: tmpl-expr-parser.y tmpl-expr-scanner.h
+ $(AM_V_GEN)$(YACC) $< --defines=tmpl-expr-parser.h --output=$@
+
+tmpl-expr-parser.h: tmpl-expr-parser.c
+
pkglib_LTLIBRARIES = libtemplate-glib-1.0.la
@@ -9,10 +25,7 @@ AM_CPPFLAGS = \
-DTMPL_GLIB_COMPILATION
EXTRA_DIST = \
- tmpl-expr-parser.c \
- tmpl-expr-parser.h \
- tmpl-expr-scanner.c \
- tmpl-expr-scanner.h \
+ $(BUILT_SOURCES) \
$(NULL)
pkgincludedir = $(includedir)/gnome-builder-@VERSION@/template-glib
@@ -41,9 +54,9 @@ libtemplate_glib_1_0_la_SOURCES = \
tmpl-expr-node.c \
tmpl-expr-node.h \
tmpl-expr-parser-private.h \
- tmpl-expr-parser.y \
+ tmpl-expr-parser.c \
tmpl-expr-private.h \
- tmpl-expr-scanner.l \
+ tmpl-expr-scanner.c \
tmpl-expr.c \
tmpl-gi-private.h \
tmpl-gi.c \
diff --git a/contrib/tmpl/meson.build b/contrib/tmpl/meson.build
new file mode 100644
index 0000000..2503018
--- /dev/null
+++ b/contrib/tmpl/meson.build
@@ -0,0 +1,172 @@
+libtmpl_enum_headers = [
+ 'tmpl-error.h',
+ 'tmpl-expr-types.h',
+]
+
+libtmpl_headers_subdir = 'gnome-builder-' + meson.project_version() + '/template-glib'
+libtmpl_headers_dir = join_paths(get_option('includedir'), libtmpl_headers_subdir)
+
+libtmpl_enums = gnome.mkenums('tmpl-enums',
+ h_template: 'tmpl-enums.h.in',
+ c_template: 'tmpl-enums.c.in',
+ sources: libtmpl_enum_headers,
+ install_header: false, # TODO: Shouldn't this be installed?
+ install_dir: libtmpl_headers_dir,
+)
+
+libtmpl_conf = configuration_data()
+libtmpl_conf.set10('ENABLE_TRACING', get_option('enable_tracing'))
+libtmpl_debug = configure_file(
+ input: 'tmpl-debug.h.in',
+ output: 'tmpl-debug.h',
+ configuration: libtmpl_conf,
+)
+
+libtmpl_headers = [
+ 'tmpl-error.h',
+ 'tmpl-expr-types.h',
+ 'tmpl-expr.h',
+ 'tmpl-glib.h',
+ 'tmpl-scope.h',
+ 'tmpl-symbol.h',
+ 'tmpl-template-locator.h',
+ 'tmpl-template.h',
+]
+
+install_headers(libtmpl_headers,
+ subdir: libtmpl_headers_subdir
+)
+
+libtmpl_generated_headers = [
+ libtmpl_debug,
+ libtmpl_enums[1],
+]
+
+libtmpl_sources = libtmpl_generated_headers + libtmpl_headers + [
+ libtmpl_enums[0],
+ 'tmpl-branch-node.c',
+ 'tmpl-branch-node.h',
+ 'tmpl-condition-node.c',
+ 'tmpl-condition-node.h',
+ 'tmpl-error.c',
+ 'tmpl-expr-eval.c',
+ 'tmpl-expr-node.c',
+ 'tmpl-expr-node.h',
+ 'tmpl-expr-parser-private.h',
+ 'tmpl-expr-private.h',
+ 'tmpl-expr.c',
+ 'tmpl-gi-private.h',
+ 'tmpl-gi.c',
+ 'tmpl-iter-node.c',
+ 'tmpl-iter-node.h',
+ 'tmpl-iterator.c',
+ 'tmpl-iterator.h',
+ 'tmpl-lexer.c',
+ 'tmpl-lexer.h',
+ 'tmpl-node.c',
+ 'tmpl-node.h',
+ 'tmpl-parser.c',
+ 'tmpl-parser.h',
+ 'tmpl-scope.c',
+ 'tmpl-symbol.c',
+ 'tmpl-template-locator.c',
+ 'tmpl-template.c',
+ 'tmpl-text-node.c',
+ 'tmpl-text-node.h',
+ 'tmpl-token-input-stream.c',
+ 'tmpl-token-input-stream.h',
+ 'tmpl-token.c',
+ 'tmpl-token.h',
+ 'tmpl-util-private.h',
+ 'tmpl-util.c',
+]
+
+cc = meson.get_compiler('c')
+libm_dep = cc.find_library('m', required: false)
+
+libtmpl_deps = [
+ libgio_dep,
+ dependency('gobject-introspection-1.0'),
+ libm_dep,
+]
+
+flex = find_program('flex')
+bison = find_program('bison')
+
+lgen = generator(flex,
+ output : '@BASENAME@.c',
+ arguments : ['-o', '@OUTPUT@', '@INPUT@']
+)
+
+pgen = generator(bison,
+ output : ['@BASENAME@.c', '@BASENAME@.h'],
+ arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']
+)
+
+libtmpl_sources = libtmpl_sources + [
+ lgen.process('tmpl-expr-scanner.l'),
+ pgen.process('tmpl-expr-parser.y'),
+]
+
+libtmpl_api_version = '1.0'
+
+libtmpl = shared_library('template-glib-' + libtmpl_api_version, libtmpl_sources,
+ dependencies: libtmpl_deps,
+ version: '0.0.0',
+ c_args: ['-DTMPL_GLIB_COMPILATION'],
+ install: true,
+ install_dir: pkglibdir,
+)
+
+libtmpl_dep = declare_dependency(
+ sources: libtmpl_generated_headers,
+ link_with: libtmpl,
+ include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+ libtmpl_introspection_sources = [
+ libtmpl_enums[0],
+ libtmpl_enums[1],
+ 'tmpl-error.c',
+ 'tmpl-error.h',
+ 'tmpl-expr.c',
+ 'tmpl-expr.h',
+ 'tmpl-expr-types.h',
+ 'tmpl-scope.c',
+ 'tmpl-scope.h',
+ 'tmpl-symbol.c',
+ 'tmpl-symbol.h',
+ 'tmpl-template-locator.c',
+ 'tmpl-template-locator.h',
+ 'tmpl-template.c',
+ 'tmpl-template.h',
+ ]
+
+ libtmpl_gir = gnome.generate_gir(libtmpl,
+ sources: libtmpl_introspection_sources,
+ nsversion: libtmpl_api_version,
+ namespace: 'Template',
+ symbol_prefix: 'tmpl',
+ identifier_prefix: 'Tmpl',
+ includes: ['Gio-2.0'],
+ install: true,
+ install_dir_gir: pkggirdir,
+ install_dir_typelib: pkgtypelibdir,
+ extra_args: [
+ '-DTMPL_GLIB_COMPILATION',
+ ]
+ )
+
+ if get_option('with_vapi')
+
+ libtmpl_vapi = gnome.generate_vapi('template-glib-' + libtmpl_api_version,
+ sources: [libtmpl_gir[0], 'Template-1.0.metadata'],
+ packages: 'gio-2.0',
+ install: true,
+ install_dir: pkgvapidir,
+ )
+
+ endif
+endif
diff --git a/contrib/tmpl/tmpl-enums.h.in b/contrib/tmpl/tmpl-enums.h.in
index 3722cdc..1bb67f5 100644
--- a/contrib/tmpl/tmpl-enums.h.in
+++ b/contrib/tmpl/tmpl-enums.h.in
@@ -3,6 +3,7 @@
#define __IDE_ENUMS_H__
#include <glib-object.h>
+#include <gmodule.h>
G_BEGIN_DECLS
/*** END file-header ***/
@@ -13,7 +14,7 @@ G_BEGIN_DECLS
/*** END file-production ***/
/*** BEGIN value-header ***/
-GType @enum_name@_get_type (void);
+GType @enum_name@_get_type (void) G_GNUC_CONST;
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
/*** END value-header ***/
diff --git a/contrib/tmpl/tmpl-expr-scanner.l b/contrib/tmpl/tmpl-expr-scanner.l
index afe2435..9197390 100644
--- a/contrib/tmpl/tmpl-expr-scanner.l
+++ b/contrib/tmpl/tmpl-expr-scanner.l
@@ -5,9 +5,6 @@
%option yylineno
%option nodefault
-%option header-file="tmpl-expr-scanner.h"
-%option outfile="tmpl-expr-scanner.c"
-
%{
# include "tmpl-error.h"
# include "tmpl-expr-private.h"
diff --git a/contrib/xml/meson.build b/contrib/xml/meson.build
new file mode 100644
index 0000000..7332c8a
--- /dev/null
+++ b/contrib/xml/meson.build
@@ -0,0 +1,21 @@
+libxml_sources = [
+ 'xml-reader.c',
+]
+
+libxml2_dep = dependency('libxml-2.0', version: '>=2.9.0')
+
+libxml_deps = [
+ libgio_dep,
+ libxml2_dep,
+]
+
+libxml = static_library('xml', libxml_sources,
+ dependencies: libxml_deps,
+ pic: true,
+)
+
+libxml_dep = declare_dependency(
+ link_with: libxml,
+ dependencies: libxml2_dep,
+ include_directories: include_directories('.'),
+)
diff --git a/data/fonts/meson.build b/data/fonts/meson.build
new file mode 100644
index 0000000..5f30e09
--- /dev/null
+++ b/data/fonts/meson.build
@@ -0,0 +1,3 @@
+install_data([
+ 'BuilderBlocks.ttf',
+], install_dir: join_paths(get_option('datadir'), 'gnome-builder/fonts'))
diff --git a/data/gsettings/meson.build b/data/gsettings/meson.build
new file mode 100644
index 0000000..8ede17f
--- /dev/null
+++ b/data/gsettings/meson.build
@@ -0,0 +1,40 @@
+schema_dir = join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
+
+# Perhaps this should be moved to the plugin
+ctags_path = 'ctags'
+ctags = find_program('ctags-exuberant', required: false)
+if not ctags.found()
+ ctags = find_program('exctags', required: false)
+ if not ctags.found()
+ ctags = find_program('ectags', required: false)
+ if not ctags.found()
+ ctags = find_program('ctags', required: false)
+ endif
+ endif
+endif
+if ctags.found()
+ ctags_path = ctags.path()
+endif
+
+schema_conf = configuration_data()
+schema_conf.set('ECTAGS', ctags_path)
+
+configure_file(
+ input: 'org.gnome.builder.code-insight.gschema.xml.in',
+ output: 'org.gnome.builder.code-insight.gschema.xml',
+ configuration: schema_conf,
+ install: true,
+ install_dir: schema_dir,
+)
+
+install_data([
+ 'org.gnome.builder.build.gschema.xml',
+ 'org.gnome.builder.editor.gschema.xml',
+ 'org.gnome.builder.editor.language.gschema.xml',
+ 'org.gnome.builder.extension-type.gschema.xml',
+ 'org.gnome.builder.gschema.xml',
+ 'org.gnome.builder.plugin.gschema.xml',
+ 'org.gnome.builder.project-tree.gschema.xml',
+ 'org.gnome.builder.terminal.gschema.xml',
+ 'org.gnome.builder.workbench.gschema.xml',
+], install_dir: schema_dir)
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..98bc8e3
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,33 @@
+icondir = join_paths(get_option('datadir'), 'icons/hicolor')
+
+install_subdir('hicolor/16x16',
+ install_dir: icondir,
+)
+
+install_subdir('hicolor/24x24',
+ install_dir: icondir,
+)
+
+install_subdir('hicolor/512x512',
+ install_dir: icondir,
+)
+
+install_subdir('hicolor/symbolic',
+ install_dir: icondir,
+)
+
+# Sadly some of these directories have unrelated files
+# TODO: Make this cleaner upstream
+
+install_data('hicolor/32x32/apps/org.gnome.Builder.png',
+ install_dir: join_paths(icondir, '32x32/apps'),
+)
+
+install_data('hicolor/48x48/apps/org.gnome.Builder.png',
+ install_dir: join_paths(icondir, '48x48/apps'),
+)
+
+install_data('hicolor/256x256/apps/org.gnome.Builder.png',
+ install_dir: join_paths(icondir, '256x256/apps'),
+)
+
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..ec8721e
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,62 @@
+msgfmt = find_program('msgfmt')
+podir = join_paths(meson.source_root(), 'po')
+
+# Desktop launcher and description file.
+custom_target(
+ 'desktop-file',
+ input: 'org.gnome.Builder.desktop.in.in',
+ output: 'org.gnome.Builder.desktop',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'applications'),
+ command: [msgfmt, '--desktop', '--template', '@INPUT@',
+ '-d', podir, '-o', '@OUTPUT@'],
+)
+
+# Appdata file.
+custom_target(
+ 'appdata-file',
+ input: 'org.gnome.Builder.appdata.xml.in',
+ output: 'org.gnome.Builder.appdata.xml',
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'appdata'),
+ command: [msgfmt, '--xml', '--template', '@INPUT@',
+ '-d', podir, '-o', '@OUTPUT@'],
+)
+
+# D-Bus service file.
+dbusconf = configuration_data()
+dbusconf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+configure_file(
+ input: 'org.gnome.Builder.service.in',
+ output: 'org.gnome.Builder.service',
+ configuration: dbusconf,
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'dbus-1', 'services'),
+)
+
+# pkg-config files.
+pkgpkgconfdir = join_paths(get_option('libdir'), 'gnome-builder', 'pkgconfig')
+
+pkgconf = configuration_data()
+pkgconf.set('prefix', get_option('prefix'))
+pkgconf.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
+pkgconf.set('VERSION', meson.project_version())
+
+# TODO: Use the pkgconfig module to generate these
+
+configure_file(
+ input: 'libide-1.0.pc.in',
+ output: 'libide-1.0.pc',
+ configuration: pkgconf,
+ install: true,
+ install_dir: pkgpkgconfdir,
+)
+
+configure_file(
+ input: 'template-glib-1.0.pc.in',
+ output: 'template-glib-1.0.pc',
+ configuration: pkgconf,
+ install: true,
+ install_dir: pkgpkgconfdir,
+)
+
diff --git a/data/style-schemes/meson.build b/data/style-schemes/meson.build
new file mode 100644
index 0000000..64ea414
--- /dev/null
+++ b/data/style-schemes/meson.build
@@ -0,0 +1,4 @@
+install_data([
+ 'builder.xml',
+ 'builder-dark.xml',
+], install_dir: join_paths(get_option('datadir'), 'gtksourceview-3.0/styles'))
diff --git a/doc/reference/libide/meson.build b/doc/reference/libide/meson.build
new file mode 100644
index 0000000..d000d3c
--- /dev/null
+++ b/doc/reference/libide/meson.build
@@ -0,0 +1,46 @@
+if get_option('with_docs')
+
+doc_conf = configuration_data()
+doc_conf.set('LIBIDE_VERSION', libide_api_version)
+
+subdir('xml')
+
+doc_version_xml = configure_file(
+ input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: doc_conf,
+)
+
+# TODO: https://github.com/mesonbuild/meson/pull/910
+pkgconfig = find_program('pkg-config')
+ret = run_command(pkgconfig, 'glib-2.0', '--variable', 'prefix')
+if ret.returncode() != 0
+ error('Failed to get prefix of glib for docs')
+else
+ glib_prefix = ret.stdout().strip()
+ glib_doc_dir = join_paths(glib_prefix, 'share/gtk-doc/html')
+endif
+
+doc_dir_arg = '--extra-dir=' + glib_doc_dir
+
+gnome.gtkdoc('libide',
+ main_sgml: 'libide-docs.sgml',
+ src_dir: join_paths(meson.source_root(), 'libide'),
+ dependencies: libide_dep,
+ install: true,
+ scan_args: [
+ '--ignore-headers=config.h',
+ ],
+ fixxref_args: [
+ '--html-dir=' + join_paths(get_option('prefix'), get_option('datadir'), 'gtk-doc/html'),
+ join_paths(doc_dir_arg, 'glib'),
+ join_paths(doc_dir_arg, 'gmodule'),
+ join_paths(doc_dir_arg, 'gobject'),
+ join_paths(doc_dir_arg, 'gio'),
+ join_paths(doc_dir_arg, 'gtk'),
+ join_paths(doc_dir_arg, 'gtksourceview-3.0'),
+ ],
+ content_files: 'xml/tree_index.sgml',
+)
+
+endif
diff --git a/doc/reference/libide/xml/gtkdocentities.ent.in b/doc/reference/libide/xml/gtkdocentities.ent.in
new file mode 100644
index 0000000..fd86c16
--- /dev/null
+++ b/doc/reference/libide/xml/gtkdocentities.ent.in
@@ -0,0 +1,7 @@
+<!ENTITY package "@PACKAGE@">
+<!ENTITY package_bugreport "@PACKAGE_BUGREPORT@">
+<!ENTITY package_name "@PACKAGE_NAME@">
+<!ENTITY package_string "@PACKAGE_STRING@">
+<!ENTITY package_tarname "@PACKAGE_TARNAME@">
+<!ENTITY package_url "@PACKAGE_URL@">
+<!ENTITY package_version "@PACKAGE_VERSION@">
diff --git a/doc/reference/libide/xml/meson.build b/doc/reference/libide/xml/meson.build
new file mode 100644
index 0000000..732ee70
--- /dev/null
+++ b/doc/reference/libide/xml/meson.build
@@ -0,0 +1,13 @@
+doc_conf.set('PACKAGE', 'gnome-builder')
+doc_conf.set('PACKAGE_NAME', 'gnome-builder')
+doc_conf.set('PACKAGE_BUGREPORT', 'FIXME')
+doc_conf.set('PACKAGE_STRING', 'gnome-builder')
+doc_conf.set('PACKAGE_TARNAME', 'gnome-builder-' + meson.project_version())
+doc_conf.set('PACKAGE_URL', 'FIXME')
+doc_conf.set('PACKAGE_VERSION', meson.project_version())
+
+configure_file(
+ input: 'gtkdocentities.ent.in',
+ output: 'gtkdocentities.ent',
+ configuration: doc_conf,
+)
diff --git a/doc/reference/libide/xml/tree_index.sgml b/doc/reference/libide/xml/tree_index.sgml
new file mode 100644
index 0000000..eb13996
--- /dev/null
+++ b/doc/reference/libide/xml/tree_index.sgml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!DOCTYPE screen PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";
+[
+ <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+ <!ENTITY % gtkdocentities SYSTEM "../xml/gtkdocentities.ent">
+ %gtkdocentities;
+]>
+<screen>
+
+</screen>
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..9eaac1f
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,9 @@
+if get_option('with_help')
+
+gnome.yelp('gnome-builder',
+ sources: ['index.page', 'introduction.page', 'legal.xml'],
+ media: ['figures/icon.png'],
+ languages: ['cs', 'de', 'el', 'es', 'hu', 'pt_BR', 'sv', 'tr'],
+)
+
+endif
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 9aa324e..a9559a9 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -135,15 +135,10 @@ libide_1_0_la_public_headers = \
template/ide-template-base.h \
template/ide-template-provider.h \
threading/ide-thread-pool.h \
- transfers/ide-transfer.c \
transfers/ide-transfer.h \
- transfers/ide-transfer-manager.c \
transfers/ide-transfer-manager.h \
- transfers/ide-transfer-row.c \
transfers/ide-transfer-row.h \
- transfers/ide-transfers-button.c \
transfers/ide-transfers-button.h \
- transfers/ide-transfers-progress-icon.c \
transfers/ide-transfers-progress-icon.h \
tree/ide-tree-builder.h \
tree/ide-tree-node.h \
@@ -301,6 +296,11 @@ libide_1_0_la_public_sources = \
template/ide-template-base.c \
template/ide-template-provider.c \
threading/ide-thread-pool.c \
+ transfers/ide-transfer.c \
+ transfers/ide-transfer-manager.c \
+ transfers/ide-transfer-row.c \
+ transfers/ide-transfers-button.c \
+ transfers/ide-transfers-progress-icon.c \
tree/ide-tree-builder.c \
tree/ide-tree-node.c \
tree/ide-tree.c \
diff --git a/libide/application/ide-application-plugins.c b/libide/application/ide-application-plugins.c
index 510d297..bff4baf 100644
--- a/libide/application/ide-application-plugins.c
+++ b/libide/application/ide-application-plugins.c
@@ -18,6 +18,8 @@
#define G_LOG_DOMAIN "ide-application"
+#include "config.h"
+
#include <libpeas/peas.h>
#include <girepository.h>
diff --git a/libide/editor/ide-editor-map-bin.c b/libide/editor/ide-editor-map-bin.c
index 8a3592c..6f0adbb 100644
--- a/libide/editor/ide-editor-map-bin.c
+++ b/libide/editor/ide-editor-map-bin.c
@@ -18,6 +18,8 @@
#define G_LOG_DOMAIN "ide-editor-map-bin"
+#include "config.h"
+
#include <glib/gi18n.h>
#include <pango/pangofc-fontmap.h>
diff --git a/libide/editorconfig/ide-editorconfig-file-settings.c
b/libide/editorconfig/ide-editorconfig-file-settings.c
index 0e1cae2..c6879b1 100644
--- a/libide/editorconfig/ide-editorconfig-file-settings.c
+++ b/libide/editorconfig/ide-editorconfig-file-settings.c
@@ -18,7 +18,7 @@
#define G_LOG_DOMAIN "editorconfig"
-#include <editorconfig-glib.h>
+#include "editorconfig-glib.h"
#include <glib/gi18n.h>
#include "ide-debug.h"
diff --git a/libide/ide.map b/libide/ide.map
new file mode 100644
index 0000000..8173abb
--- /dev/null
+++ b/libide/ide.map
@@ -0,0 +1,6 @@
+{
+global:
+ ide_*;
+local:
+ *;
+};
diff --git a/libide/meson.build b/libide/meson.build
new file mode 100644
index 0000000..bb5db17
--- /dev/null
+++ b/libide/meson.build
@@ -0,0 +1,656 @@
+libide_enum_headers = [
+ 'buffers/ide-buffer.h',
+ 'buildsystem/ide-build-result.h',
+ 'devices/ide-device.h',
+ 'diagnostics/ide-diagnostic.h',
+ 'doap/ide-doap.h',
+ 'files/ide-indent-style.h',
+ 'highlighting/ide-highlighter.h',
+ 'runtimes/ide-runtime.h',
+ 'sourceview/ide-source-view.h',
+ 'symbols/ide-symbol.h',
+ 'threading/ide-thread-pool.h',
+ 'vcs/ide-vcs-config.h',
+ 'workbench/ide-layout-stack-split.h',
+]
+
+libide_header_subdir = 'gnome-builder-' + meson.project_version() + '/libide'
+libide_header_dir = join_paths(get_option('includedir'), libide_header_subdir)
+
+# https://github.com/mesonbuild/meson/pull/718
+libide_enums = gnome.mkenums('ide-enums',
+ h_template: 'ide-enums.h.in',
+ c_template: 'ide-enums.c.in',
+ sources: libide_enum_headers,
+ install_header: true,
+ install_dir: libide_header_dir,
+)
+
+libide_public_headers = [
+ 'ide-context.h',
+ 'ide-global.h',
+ 'ide-macros.h',
+ 'ide-object.h',
+ 'ide-service.h',
+ 'ide-types.h',
+ 'ide.h',
+ 'application/ide-application-addin.h',
+ 'application/ide-application-credits.h',
+ 'application/ide-application-tool.h',
+ 'application/ide-application.h',
+ 'buffers/ide-buffer-change-monitor.h',
+ 'buffers/ide-buffer-manager.h',
+ 'buffers/ide-buffer.h',
+ 'buffers/ide-unsaved-file.h',
+ 'buffers/ide-unsaved-files.h',
+ 'buildsystem/ide-build-command.h',
+ 'buildsystem/ide-build-command-queue.h',
+ 'buildsystem/ide-build-manager.h',
+ 'buildsystem/ide-build-result-addin.h',
+ 'buildsystem/ide-build-result.h',
+ 'buildsystem/ide-build-system.h',
+ 'buildsystem/ide-build-target.h',
+ 'buildsystem/ide-builder.h',
+ 'buildsystem/ide-configuration-manager.h',
+ 'buildsystem/ide-configuration.h',
+ 'buildsystem/ide-environment-variable.h',
+ 'buildsystem/ide-environment.h',
+ 'devices/ide-device-manager.h',
+ 'devices/ide-device-provider.h',
+ 'devices/ide-device.h',
+ 'diagnostics/ide-diagnostic-provider.h',
+ 'diagnostics/ide-diagnostic.h',
+ 'diagnostics/ide-diagnostician.h',
+ 'diagnostics/ide-diagnostics.h',
+ 'diagnostics/ide-fixit.h',
+ 'diagnostics/ide-source-location.h',
+ 'diagnostics/ide-source-range.h',
+ 'directory/ide-directory-build-system.h',
+ 'directory/ide-directory-vcs.h',
+ 'doap/ide-doap-person.h',
+ 'doap/ide-doap.h',
+ 'editor/ide-editor-perspective.h',
+ 'editor/ide-editor-view-addin.h',
+ 'editor/ide-editor-view.h',
+ 'files/ide-file-settings.defs',
+ 'files/ide-file-settings.h',
+ 'files/ide-file.h',
+ 'files/ide-indent-style.h',
+ 'genesis/ide-genesis-addin.h',
+ 'highlighting/ide-highlight-engine.h',
+ 'highlighting/ide-highlight-index.h',
+ 'highlighting/ide-highlighter.h',
+ 'history/ide-back-forward-item.h',
+ 'history/ide-back-forward-list.h',
+ 'local/ide-local-device.h',
+ 'logging/ide-log.h',
+ 'plugins/ide-extension-adapter.h',
+ 'plugins/ide-extension-set-adapter.h',
+ 'preferences/ide-preferences-addin.h',
+ 'preferences/ide-preferences-bin.h',
+ 'preferences/ide-preferences-entry.h',
+ 'preferences/ide-preferences-file-chooser-button.h',
+ 'preferences/ide-preferences-flow-box.h',
+ 'preferences/ide-preferences-font-button.h',
+ 'preferences/ide-preferences-group.h',
+ 'preferences/ide-preferences-page.h',
+ 'preferences/ide-preferences-spin-button.h',
+ 'preferences/ide-preferences-switch.h',
+ 'preferences/ide-preferences.h',
+ 'projects/ide-project-file.h',
+ 'projects/ide-project-files.h',
+ 'projects/ide-project-info.h',
+ 'projects/ide-project-item.h',
+ 'projects/ide-project-miner.h',
+ 'projects/ide-project.h',
+ 'projects/ide-recent-projects.h',
+ 'runner/ide-run-button.h',
+ 'runner/ide-run-manager.h',
+ 'runner/ide-runner.h',
+ 'runner/ide-runner-addin.h',
+ 'runtimes/ide-runtime-manager.h',
+ 'runtimes/ide-runtime-provider.h',
+ 'runtimes/ide-runtime.h',
+ 'scripting/ide-script-manager.h',
+ 'scripting/ide-script.h',
+ 'search/ide-omni-search-display.h',
+ 'search/ide-omni-search-entry.h',
+ 'search/ide-omni-search-group.h',
+ 'search/ide-omni-search-row.h',
+ 'search/ide-pattern-spec.h',
+ 'search/ide-search-context.h',
+ 'search/ide-search-engine.h',
+ 'search/ide-search-provider.h',
+ 'search/ide-search-reducer.h',
+ 'search/ide-search-result.h',
+ 'snippets/ide-source-snippet-chunk.h',
+ 'snippets/ide-source-snippet-context.h',
+ 'snippets/ide-source-snippet.h',
+ 'snippets/ide-source-snippets-manager.h',
+ 'snippets/ide-source-snippets.h',
+ 'sourceview/ide-completion-item.h',
+ 'sourceview/ide-completion-provider.h',
+ 'sourceview/ide-completion-results.h',
+ 'sourceview/ide-indenter.h',
+ 'sourceview/ide-language.h',
+ 'sourceview/ide-source-map.h',
+ 'sourceview/ide-source-style-scheme.h',
+ 'sourceview/ide-source-view-mode.h',
+ 'sourceview/ide-source-view.h',
+ 'subprocess/ide-subprocess.h',
+ 'subprocess/ide-subprocess-launcher.h',
+ 'symbols/ide-symbol-node.h',
+ 'symbols/ide-symbol-resolver.h',
+ 'symbols/ide-symbol-tree.h',
+ 'symbols/ide-symbol.h',
+ 'symbols/ide-tags-builder.h',
+ 'template/ide-project-template.h',
+ 'template/ide-template-base.h',
+ 'template/ide-template-provider.h',
+ 'threading/ide-thread-pool.h',
+ 'transfers/ide-transfer.h',
+ 'transfers/ide-transfer-manager.h',
+ 'transfers/ide-transfer-row.h',
+ 'transfers/ide-transfers-button.h',
+ 'transfers/ide-transfers-progress-icon.h',
+ 'tree/ide-tree-builder.h',
+ 'tree/ide-tree-node.h',
+ 'tree/ide-tree-types.h',
+ 'tree/ide-tree.h',
+ 'util/ide-cairo.h',
+ 'util/ide-dnd.h',
+ 'util/ide-file-manager.h',
+ 'util/ide-flatpak.h',
+ 'util/ide-glib.h',
+ 'util/ide-gtk.h',
+ 'util/ide-line-reader.h',
+ 'util/ide-list-inline.h',
+ 'util/ide-pango.h',
+ 'util/ide-posix.h',
+ 'util/ide-progress.h',
+ 'util/ide-rgba.h',
+ 'util/ide-settings.h',
+ 'util/ide-uri.h',
+ 'vcs/ide-vcs-config.h',
+ 'vcs/ide-vcs-initializer.h',
+ 'vcs/ide-vcs-uri.h',
+ 'vcs/ide-vcs.h',
+ 'workbench/ide-layout-grid.h',
+ 'workbench/ide-layout-pane.h',
+ 'workbench/ide-layout-stack-split.h',
+ 'workbench/ide-layout-stack.h',
+ 'workbench/ide-layout-stack-addin.h',
+ 'workbench/ide-layout-view.h',
+ 'workbench/ide-layout.h',
+ 'workbench/ide-omni-bar.h',
+ 'workbench/ide-perspective.h',
+ 'workbench/ide-workbench-addin.h',
+ 'workbench/ide-workbench-header-bar.h',
+ 'workbench/ide-workbench.h',
+ 'workers/ide-worker.h',
+]
+
+libide_conf = configuration_data()
+libide_conf.set10('ENABLE_TRACING', get_option('enable_tracing'))
+libide_conf.set('BUGREPORT_URL', 'https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-builder')
+libide_debug_h = configure_file(
+ input: 'ide-debug.h.in',
+ output: 'ide-debug.h',
+ configuration: libide_conf,
+ install: true,
+ install_dir: libide_header_dir,
+)
+
+# FIXME: This is ugly and should be handled upstream
+foreach header: libide_public_headers
+ header_split = header.split('/')
+ if header_split.length() == 2
+ header_path = join_paths(libide_header_subdir, header_split[0])
+ install_headers(header, subdir: header_path)
+ else
+ install_headers(header, subdir: libide_header_subdir)
+ endif
+endforeach
+
+#install_headers(libide_public_headers,
+# subdir: libide_header_subdir,
+#)
+
+subdir('resources')
+
+libide_icons_resources = gnome.compile_resources('ide-icons-resources',
+ join_paths(meson.source_root(), 'data/icons/hicolor/icons.gresource.xml'),
+ source_dir: join_paths(meson.source_root(), 'data/icons/hicolor'),
+ c_name: 'ide_icons',
+)
+
+libide_public_sources = [
+ 'application/ide-application-addin.c',
+ 'application/ide-application-tool.c',
+ 'application/ide-application.c',
+ 'application/ide-application-open.c',
+ 'buffers/ide-buffer-change-monitor.c',
+ 'buffers/ide-buffer-manager.c',
+ 'buffers/ide-buffer.c',
+ 'buffers/ide-unsaved-file.c',
+ 'buffers/ide-unsaved-files.c',
+ 'buildsystem/ide-build-command.c',
+ 'buildsystem/ide-build-command-queue.c',
+ 'buildsystem/ide-build-manager.c',
+ 'buildsystem/ide-build-result-addin.c',
+ 'buildsystem/ide-build-result.c',
+ 'buildsystem/ide-build-system.c',
+ 'buildsystem/ide-build-target.c',
+ 'buildsystem/ide-builder.c',
+ 'buildsystem/ide-configuration-manager.c',
+ 'buildsystem/ide-configuration.c',
+ 'buildsystem/ide-environment-variable.c',
+ 'buildsystem/ide-environment.c',
+ 'devices/ide-device-manager.c',
+ 'devices/ide-device-provider.c',
+ 'devices/ide-device.c',
+ 'diagnostics/ide-diagnostic-provider.c',
+ 'diagnostics/ide-diagnostic.c',
+ 'diagnostics/ide-diagnostician.c',
+ 'diagnostics/ide-diagnostics.c',
+ 'diagnostics/ide-fixit.c',
+ 'diagnostics/ide-source-location.c',
+ 'diagnostics/ide-source-range.c',
+ 'directory/ide-directory-build-system.c',
+ 'directory/ide-directory-plugin.c',
+ 'directory/ide-directory-vcs.c',
+ 'doap/ide-doap-person.c',
+ 'doap/ide-doap.c',
+ 'editor/ide-editor-perspective.c',
+ 'editor/ide-editor-view-addin.c',
+ 'editor/ide-editor-view.c',
+ 'files/ide-file-settings.c',
+ 'files/ide-file.c',
+ 'genesis/ide-genesis-addin.c',
+ 'highlighting/ide-highlight-engine.c',
+ 'highlighting/ide-highlight-index.c',
+ 'highlighting/ide-highlighter.c',
+ 'history/ide-back-forward-item.c',
+ 'history/ide-back-forward-list-load.c',
+ 'history/ide-back-forward-list-save.c',
+ 'history/ide-back-forward-list.c',
+ 'ide-context.c',
+ libide_enums[0],
+ 'ide-object.c',
+ 'ide-service.c',
+ 'ide.c',
+ 'local/ide-local-device.c',
+ 'logging/ide-log.c',
+ 'plugins/ide-extension-adapter.c',
+ 'plugins/ide-extension-set-adapter.c',
+ 'preferences/ide-preferences-addin.c',
+ 'preferences/ide-preferences-entry.c',
+ 'preferences/ide-preferences-file-chooser-button.c',
+ 'preferences/ide-preferences-flow-box.c',
+ 'preferences/ide-preferences-font-button.c',
+ 'preferences/ide-preferences-group.c',
+ 'preferences/ide-preferences-page.c',
+ 'preferences/ide-preferences-spin-button.c',
+ 'preferences/ide-preferences-switch.c',
+ 'preferences/ide-preferences.c',
+ 'projects/ide-project-file.c',
+ 'projects/ide-project-files.c',
+ 'projects/ide-project-info.c',
+ 'projects/ide-project-item.c',
+ 'projects/ide-project-miner.c',
+ 'projects/ide-project.c',
+ 'projects/ide-recent-projects.c',
+ 'runner/ide-run-button.c',
+ 'runner/ide-run-manager.c',
+ 'runner/ide-runner.c',
+ 'runner/ide-runner-addin.c',
+ 'runtimes/ide-runtime-manager.c',
+ 'runtimes/ide-runtime-provider.c',
+ 'runtimes/ide-runtime.c',
+ 'scripting/ide-script-manager.c',
+ 'scripting/ide-script.c',
+ 'search/ide-omni-search-display.c',
+ 'search/ide-omni-search-entry.c',
+ 'search/ide-omni-search-group.c',
+ 'search/ide-omni-search-row.c',
+ 'search/ide-pattern-spec.c',
+ 'search/ide-search-context.c',
+ 'search/ide-search-engine.c',
+ 'search/ide-search-provider.c',
+ 'search/ide-search-result.c',
+ 'snippets/ide-source-snippet-chunk.c',
+ 'snippets/ide-source-snippet-context.c',
+ 'snippets/ide-source-snippet.c',
+ 'snippets/ide-source-snippets-manager.c',
+ 'snippets/ide-source-snippets.c',
+ 'sourceview/ide-completion-item.c',
+ 'sourceview/ide-completion-provider.c',
+ 'sourceview/ide-completion-results.c',
+ 'sourceview/ide-indenter.c',
+ 'sourceview/ide-language.c',
+ 'sourceview/ide-source-map.c',
+ 'sourceview/ide-source-style-scheme.c',
+ 'sourceview/ide-source-view-mode.c',
+ 'sourceview/ide-source-view.c',
+ 'subprocess/ide-subprocess.c',
+ 'subprocess/ide-subprocess-launcher.c',
+ 'symbols/ide-symbol-node.c',
+ 'symbols/ide-symbol-resolver.c',
+ 'symbols/ide-symbol-tree.c',
+ 'symbols/ide-symbol.c',
+ 'symbols/ide-tags-builder.c',
+ 'template/ide-project-template.c',
+ 'template/ide-template-base.c',
+ 'template/ide-template-provider.c',
+ 'threading/ide-thread-pool.c',
+ 'transfers/ide-transfer.c',
+ 'transfers/ide-transfer-manager.c',
+ 'transfers/ide-transfer-row.c',
+ 'transfers/ide-transfers-button.c',
+ 'transfers/ide-transfers-progress-icon.c',
+ 'tree/ide-tree-builder.c',
+ 'tree/ide-tree-node.c',
+ 'tree/ide-tree.c',
+ 'util/ide-cairo.c',
+ 'util/ide-dnd.c',
+ 'util/ide-file-manager.c',
+ 'util/ide-flatpak.c',
+ 'util/ide-glib.c',
+ 'util/ide-gtk.c',
+ 'util/ide-line-reader.c',
+ 'util/ide-pango.c',
+ 'util/ide-posix.c',
+ 'util/ide-progress.c',
+ 'util/ide-rgba.c',
+ 'util/ide-settings.c',
+ 'util/ide-uri.c',
+ 'vcs/ide-vcs-config.c',
+ 'vcs/ide-vcs-initializer.c',
+ 'vcs/ide-vcs-uri.c',
+ 'vcs/ide-vcs.c',
+ 'workbench/ide-layout-grid.c',
+ 'workbench/ide-layout-pane.c',
+ 'workbench/ide-layout-stack.c',
+ 'workbench/ide-layout-stack-addin.c',
+ 'workbench/ide-layout-view.c',
+ 'workbench/ide-layout.c',
+ 'workbench/ide-omni-bar.c',
+ 'workbench/ide-perspective.c',
+ 'workbench/ide-workbench-addin.c',
+ 'workbench/ide-workbench-header-bar.c',
+ 'workbench/ide-workbench-open.c',
+ 'workbench/ide-workbench.c',
+ 'workers/ide-worker.c',
+]
+
+libide_generated_headers = [
+ libide_resources[1],
+ libide_icons_resources[1],
+ libide_enums[1],
+ libide_debug_h,
+]
+
+libide_sources = libide_generated_headers + libide_public_sources + [
+ 'application/ide-application-actions.c',
+ 'application/ide-application-actions.h',
+ 'application/ide-application-command-line.c',
+ 'application/ide-application-plugins.c',
+ 'application/ide-application-private.h',
+ 'application/ide-application-tests.c',
+ 'application/ide-application-tests.h',
+ 'editor/ide-editor-frame-actions.c',
+ 'editor/ide-editor-frame-actions.h',
+ 'editor/ide-editor-frame-private.h',
+ 'editor/ide-editor-frame.c',
+ 'editor/ide-editor-frame.h',
+ 'editor/ide-editor-map-bin.c',
+ 'editor/ide-editor-map-bin.h',
+ 'editor/ide-editor-plugin.c',
+ 'editor/ide-editor-layout-stack-addin.c',
+ 'editor/ide-editor-layout-stack-addin.h',
+ 'editor/ide-editor-layout-stack-controls.c',
+ 'editor/ide-editor-layout-stack-controls.h',
+ 'editor/ide-editor-print-operation.c',
+ 'editor/ide-editor-print-operation.h',
+ 'editor/ide-editor-tweak-widget.c',
+ 'editor/ide-editor-tweak-widget.h',
+ 'editor/ide-editor-view-actions.c',
+ 'editor/ide-editor-view-actions.h',
+ 'editor/ide-editor-view-addin-private.h',
+ 'editor/ide-editor-view-private.h',
+ 'editor/ide-editor-workbench-addin.c',
+ 'editor/ide-editor-workbench-addin.h',
+ 'gconstructor.h',
+ 'greeter/ide-greeter-perspective.c',
+ 'greeter/ide-greeter-perspective.h',
+ 'greeter/ide-greeter-project-row.c',
+ 'greeter/ide-greeter-project-row.h',
+ 'gsettings/ide-gsettings-file-settings.c',
+ 'gsettings/ide-gsettings-file-settings.h',
+ 'gsettings/ide-language-defaults.c',
+ 'gsettings/ide-language-defaults.h',
+ 'history/ide-back-forward-list-private.h',
+ 'ide-internal.h',
+ 'keybindings/ide-keybindings.c',
+ 'keybindings/ide-keybindings.h',
+ 'keybindings/ide-shortcuts-window.c',
+ 'keybindings/ide-shortcuts-window.h',
+ 'modelines/ide-modelines-file-settings.c',
+ 'modelines/ide-modelines-file-settings.h',
+ 'modelines/modeline-parser.c',
+ 'modelines/modeline-parser.h',
+ 'plugins/ide-extension-util.c',
+ 'plugins/ide-extension-util.h',
+ 'preferences/ide-preferences-bin-private.h',
+ 'preferences/ide-preferences-bin.c',
+ 'preferences/ide-preferences-builtin.c',
+ 'preferences/ide-preferences-builtin.h',
+ 'preferences/ide-preferences-group-private.h',
+ 'preferences/ide-preferences-language-row.c',
+ 'preferences/ide-preferences-language-row.h',
+ 'preferences/ide-preferences-page-private.h',
+ 'preferences/ide-preferences-perspective.c',
+ 'preferences/ide-preferences-perspective.h',
+ 'runner/ide-run-manager-private.h',
+ 'search/ide-search-reducer.c',
+ 'snippets/ide-source-snippet-completion-item.c',
+ 'snippets/ide-source-snippet-completion-item.h',
+ 'snippets/ide-source-snippet-completion-provider.c',
+ 'snippets/ide-source-snippet-completion-provider.h',
+ 'snippets/ide-source-snippet-parser.c',
+ 'snippets/ide-source-snippet-parser.h',
+ 'snippets/ide-source-snippet-private.h',
+ 'sourceview/ide-line-change-gutter-renderer.c',
+ 'sourceview/ide-line-change-gutter-renderer.h',
+ 'sourceview/ide-line-diagnostics-gutter-renderer.c',
+ 'sourceview/ide-line-diagnostics-gutter-renderer.h',
+ 'sourceview/ide-source-iter.c',
+ 'sourceview/ide-source-iter.h',
+ 'sourceview/ide-source-view-capture.c',
+ 'sourceview/ide-source-view-capture.h',
+ 'sourceview/ide-source-view-movements.c',
+ 'sourceview/ide-source-view-movements.h',
+ 'sourceview/ide-text-iter.c',
+ 'sourceview/ide-text-iter.h',
+ 'sourceview/ide-text-util.c',
+ 'sourceview/ide-text-util.h',
+ 'subprocess/ide-breakout-subprocess.c',
+ 'subprocess/ide-breakout-subprocess.h',
+ 'subprocess/ide-breakout-subprocess-private.h',
+ 'subprocess/ide-simple-subprocess.c',
+ 'subprocess/ide-simple-subprocess.h',
+ 'theatrics/ide-box-theatric.c',
+ 'theatrics/ide-box-theatric.h',
+ 'theming/ide-css-provider.c',
+ 'theming/ide-css-provider.h',
+ 'theming/ide-theme-manager.c',
+ 'theming/ide-theme-manager.h',
+ 'tree/ide-tree-private.h',
+ 'util/ide-async-helper.c',
+ 'util/ide-async-helper.h',
+ 'util/ide-battery-monitor.c',
+ 'util/ide-battery-monitor.h',
+ 'util/ide-doc-seq.c',
+ 'util/ide-doc-seq.h',
+ 'util/ide-gdk.c',
+ 'util/ide-gdk.h',
+ 'util/ide-ref-ptr.c',
+ 'util/ide-ref-ptr.h',
+ 'util/ide-window-settings.c',
+ 'util/ide-window-settings.h',
+ 'workbench/ide-layout-stack-actions.c',
+ 'workbench/ide-layout-stack-actions.h',
+ 'workbench/ide-layout-stack-private.h',
+ 'workbench/ide-layout-tab-bar.c',
+ 'workbench/ide-layout-tab-bar.h',
+ 'workbench/ide-layout-tab-bar-private.h',
+ 'workbench/ide-layout-tab.c',
+ 'workbench/ide-layout-tab.h',
+ 'workbench/ide-layout-tab-private.h',
+ 'workbench/ide-omni-bar-row.c',
+ 'workbench/ide-omni-bar-row.h',
+ 'workbench/ide-perspective-menu-button.c',
+ 'workbench/ide-perspective-menu-button.h',
+ 'workbench/ide-workbench-actions.c',
+ 'workbench/ide-workbench-private.h',
+ 'workers/ide-worker-manager.c',
+ 'workers/ide-worker-manager.h',
+ 'workers/ide-worker-process.c',
+ 'workers/ide-worker-process.h',
+]
+
+libgtksource_dep = dependency('gtksourceview-3.0', version: '>=3.21.2')
+
+libide_deps = [
+ dependency('gio-unix-2.0'),
+ dependency('pangoft2', version: '>=1.38.0'),
+ libgtksource_dep,
+ libgio_dep,
+ libgtk_dep,
+ libpeas_dep,
+ libegg_dep,
+ libpnl_dep,
+ libtmpl_dep,
+ libxml_dep,
+ libsearch_dep,
+ libgd_dep,
+ libnautilus_dep,
+]
+
+contrib_dir = join_paths(meson.source_root(), 'contrib/')
+
+if get_option('with_webkit')
+ libide_sources += ['webkit/ide-webkit.c']
+ libide_deps += [dependency('webkit2gtk-4.0', version: '>=2.12.0')]
+endif
+
+libide_args = []
+if get_option('with_editorconfig')
+ libide_args += '-DENABLE_EDITORCONFIG'
+ libide_deps += libeditorconfig_dep
+ libide_sources += [
+ 'editorconfig/editorconfig-glib.c',
+ 'editorconfig/ide-editorconfig-file-settings.c',
+ ]
+endif
+
+libide_api_version = '1.0'
+
+# We want to find the subdirectory to install our override into:
+python3 = find_program('python3')
+
+get_overridedir = '''
+import os
+import sysconfig
+
+libdir = sysconfig.get_config_var('LIBDIR')
+if not libdir:
+ libdir = '/usr/lib'
+
+try:
+ import gi
+ overridedir = gi._overridesdir
+except ImportError:
+ purelibdir = sysconfig.get_path('purelib')
+ overridedir = os.path.join(purelibdir, 'gi', 'overrides')
+
+if overridedir.startswith(libdir): # Should always be True..
+ overridedir = overridedir[len(libdir) + 1:]
+
+print(overridedir)
+'''
+
+ret = run_command([python3, '-c', get_overridedir])
+if ret.returncode() != 0
+ error('Failed to determine pygobject overridedir')
+else
+ pygobject_override_dir = join_paths(get_option('libdir'), ret.stdout().strip())
+endif
+
+install_data('Ide.py', install_dir: pygobject_override_dir)
+
+libide = shared_library('ide-' + libide_api_version, [libide_resources[0], libide_icons_resources[0]] +
libide_sources,
+ dependencies: libide_deps,
+ link_depends: 'ide.map',
+ c_args: libide_args,
+ link_args: [
+ '-Wl,--version-script,' + join_paths(meson.current_source_dir(), 'ide.map'),
+ ],
+ install: true,
+ install_dir: pkglibdir,
+)
+
+libide_dep = declare_dependency(
+ sources: libide_generated_headers,
+ dependencies: [
+ libgio_dep,
+ libgtk_dep,
+ libgtksource_dep,
+ libpnl_dep,
+ libegg_dep,
+ ],
+ link_with: libide,
+ include_directories: include_directories('.'),
+)
+
+if get_option('with_introspection')
+
+ libide_gir = gnome.generate_gir(libide,
+ sources: libide_generated_headers + libide_public_headers + libide_public_sources,
+ nsversion: libide_api_version,
+ namespace: 'Ide',
+ symbol_prefix: 'ide',
+ identifier_prefix: 'Ide',
+ link_with: [
+ libegg, libtmpl,
+ ],
+ includes: [
+ libegg_gir[0], 'Gio-2.0', 'GtkSource-3.0',
+ 'Peas-1.0', libpnl_gir[0], libtmpl_gir[0]],
+ install: true,
+ install_dir_gir: pkggirdir,
+ install_dir_typelib: pkgtypelibdir,
+ extra_args: [
+ '--c-include=ide.h',
+ ]
+ )
+
+ if get_option('with_vapi')
+
+ libide_vapi = gnome.generate_vapi('libide-' + libide_api_version,
+ sources: libide_gir[0],
+ packages: [
+ 'gio-2.0',
+ 'gtk+-3.0',
+ 'gtksourceview-3.0',
+ 'libpeas-1.0',
+ libpnl_vapi,
+ libegg_vapi,
+ libtmpl_vapi,
+ ],
+ install: true,
+ install_dir: pkgvapidir,
+ )
+
+ endif
+endif
diff --git a/libide/resources/meson.build b/libide/resources/meson.build
new file mode 100644
index 0000000..2b8b1de
--- /dev/null
+++ b/libide/resources/meson.build
@@ -0,0 +1,5 @@
+libide_resources = gnome.compile_resources('ide-resources',
+ 'libide.gresource.xml',
+ c_name: 'ide',
+)
+
diff --git a/libide/workers/ide-worker-manager.c b/libide/workers/ide-worker-manager.c
index e202d74..68deebd 100644
--- a/libide/workers/ide-worker-manager.c
+++ b/libide/workers/ide-worker-manager.c
@@ -18,6 +18,8 @@
#define G_LOG_DOMAIN "ide-worker-manager"
+#include "config.h"
+
#include <egg-counter.h>
#include <gio/gio.h>
#include <gio/gunixsocketaddress.h>
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..9545aa1
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,181 @@
+project('gnome-builder', 'c',
+ license: 'GPL3+',
+ version: '3.22.1',
+ meson_version: '>=0.36.0',
+ default_options: [
+ 'b_lundef=false', # https://github.com/mesonbuild/meson/pull/834
+ 'c_std=gnu11',
+ 'warning_level=2',
+ ],
+)
+
+version_split = meson.project_version().split('.')
+MAJOR_VERSION = version_split[0]
+MINOR_VERSION = version_split[1]
+MICRO_VERSION = version_split[2]
+
+conf = configuration_data()
+conf.set_quoted('PACKAGE_NAME', 'gnome-builder')
+conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+conf.set_quoted('PACKAGE_STRING', 'gnome-builder-' + meson.project_version())
+conf.set_quoted('PACKAGE_DATADIR', get_option('datadir'))
+conf.set_quoted('PACKAGE_LIBDIR', get_option('datadir'))
+conf.set_quoted('PACKAGE_LOCALE_DIR', join_paths(get_option('datadir'), 'locale'))
+conf.set_quoted('PACKAGE_LIBEXECDIR', get_option('libexecdir'))
+
+conf.set('GETTEXT_PACKAGE', 'PACKAGE_NAME')
+conf.set('LOCALEDIR', 'PACKAGE_LOCALE_DIR')
+
+conf.set10('ENABLE_NLS', true) # Always enabled
+
+# We should probably avoid using these
+conf.set_quoted('SRCDIR', meson.source_root())
+conf.set_quoted('BUILDDIR', meson.build_root())
+
+add_global_arguments([
+ '-DHAVE_CONFIG_H',
+ '-I' + meson.build_root(), # config.h
+ '-D_GNU_SOURCE',
+], language: 'c')
+
+cc = meson.get_compiler('c')
+global_c_args = []
+test_c_args = [
+ '-Wcast-align',
+ '-Wdeclaration-after-statement',
+ '-Werror=format-security',
+ '-Werror=format=2',
+ '-Wextra',
+ '-Wformat-nonliteral',
+ '-Wformat-security',
+ '-Wmissing-include-dirs',
+ '-Wnested-externs',
+ '-Wno-missing-field-initializers',
+ '-Wno-sign-compare',
+ '-Wno-strict-aliasing',
+ '-Wno-uninitialized',
+ '-Wno-unused-parameter',
+ '-Wpointer-arith',
+ '-Wredundant-decls',
+ '-Wshadow',
+ '-Wswitch-default',
+ '-Wswitch-enum',
+ '-fstack-protector-strong',
+]
+foreach arg: test_c_args
+ if cc.has_argument(arg)
+ global_c_args += arg
+ endif
+endforeach
+add_global_arguments(
+ global_c_args,
+ language: 'c'
+)
+
+global_link_args = []
+test_link_args = [
+ '-Wl,-z,relro',
+ '-Wl,-z,now',
+]
+foreach arg: test_link_args
+ if cc.has_argument(arg)
+ global_link_args += arg
+ endif
+endforeach
+add_global_link_arguments(
+ global_link_args,
+ language: 'c'
+)
+
+# TODO: Maybe reuse 'b_ndebug' option
+if not get_option('buildtype').startswith('debug')
+
+ add_global_arguments([
+ '-DG_DISABLE_CAST_CHECKS',
+ '-DG_DISABLE_ASSERT',
+ '-DG_DISABLE_CHECKS',
+ ], language: 'c')
+
+endif
+
+if cc.has_function('sched_getcpu')
+ conf.set('HAVE_SCHED_GETCPU', true)
+endif
+
+configure_file(
+ input: 'config.h.meson',
+ output: 'config.h',
+ configuration: conf
+)
+
+# Commonly used deps
+libgio_dep = dependency('gio-2.0', version: '>= 2.49.0')
+libgtk_dep = dependency('gtk+-3.0', version: '>=3.21.5')
+libpeas_dep = dependency('libpeas-1.0', version: '>=1.18.0')
+
+# We don't use these directly but the build
+# process does so just check ourselves
+find_program('itstool')
+find_program('msgmerge')
+
+
+pkglibdir = join_paths(get_option('libdir'), 'gnome-builder')
+pkggirdir = join_paths(get_option('datadir'),'gnome-builder', 'gir-1.0')
+pkgtypelibdir = join_paths(get_option('libdir'), 'gnome-builder', 'girepository-1.0')
+pkgvapidir = join_paths(get_option('datadir'), 'gnome-builder/vapi')
+gnome = import('gnome')
+
+subdir('data')
+subdir('data/fonts')
+subdir('data/gsettings')
+subdir('data/icons')
+subdir('data/style-schemes')
+subdir('contrib/egg')
+subdir('contrib/gd')
+subdir('contrib/libeditorconfig')
+subdir('contrib/nautilus')
+subdir('contrib/pnl')
+subdir('contrib/rg')
+subdir('contrib/search')
+subdir('contrib/tmpl')
+subdir('contrib/xml')
+subdir('contrib/gstyle') # Depends on libsearch/libxml
+subdir('libide')
+subdir('doc/reference/libide')
+subdir('help')
+subdir('plugins')
+subdir('po')
+subdir('tests')
+subdir('tools')
+
+builder_exe = executable('gnome-builder', 'src/main.c',
+ gui_app: true,
+ install: true,
+ c_args: '-fPIE',
+ link_args: '-pie',
+ dependencies: libide_deps + [libide_dep],
+)
+
+executable('gnome-builder-cli', 'src/main.c',
+ gui_app: false,
+ install: true,
+ c_args: '-fPIE',
+ link_args: '-pie',
+ dependencies: libide_deps + [libide_dep],
+)
+
+executable('gnome-builder-worker', 'src/main.c',
+ gui_app: false,
+ install: true,
+ install_dir: get_option('libexecdir'),
+ c_args: '-fPIE',
+ link_args: '-pie',
+ dependencies: libide_deps + [libide_dep],
+)
+
+meson.add_install_script('build/meson/meson_post_install.sh')
+
+run_target('run',
+ command: 'build/meson/meson_run_locally.sh',
+ depends: builder_exe,
+)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..aa51ec2
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,50 @@
+option('enable_tracing', type: 'boolean', value: false)
+option('enable_profiling', type: 'boolean', value: false)
+
+option('with_editorconfig', type: 'boolean')
+option('with_webkit', type: 'boolean')
+option('with_introspection', type: 'boolean')
+option('with_vapi', type: 'boolean')
+option('with_help', type: 'boolean')
+option('with_docs', type: 'boolean', value: false)
+
+# Plugins
+# Ideally we want many of these to be defined in the plugin dir:
+# https://github.com/mesonbuild/meson/issues/707
+option('with_autotools', type: 'boolean')
+option('with_autotools_templates', type: 'boolean')
+option('with_build_tools', type: 'boolean')
+option('with_c_pack', type: 'boolean')
+option('with_clang', type: 'boolean')
+option('with_color_picker', type: 'boolean')
+option('with_command_bar', type: 'boolean')
+option('with_comment_code', type: 'boolean')
+option('with_contributing', type: 'boolean')
+option('with_create_project', type: 'boolean')
+option('with_ctags', type: 'boolean')
+option('with_devhelp', type: 'boolean')
+option('with_file_search', type: 'boolean')
+option('with_flatpak', type: 'boolean')
+option('with_fpaste', type: 'boolean')
+option('with_gcc', type: 'boolean')
+option('with_gettext', type: 'boolean')
+option('with_git', type: 'boolean')
+option('with_gnome_code_assistance', type: 'boolean')
+option('with_hello_cpp', type: 'boolean')
+option('with_html_completion', type: 'boolean')
+option('with_html_preview', type: 'boolean')
+option('with_jedi', type: 'boolean')
+option('with_jhbuild', type: 'boolean')
+option('with_mingw', type: 'boolean')
+option('with_project_tree', type: 'boolean')
+option('with_python_gi_imports_completion', type: 'boolean')
+option('with_python_pack', type: 'boolean')
+option('with_quick_highlight', type: 'boolean')
+option('with_support', type: 'boolean')
+option('with_symbol_tree', type: 'boolean')
+option('with_sysmon', type: 'boolean')
+option('with_sysprof', type: 'boolean')
+option('with_terminal', type: 'boolean')
+option('with_todo', type: 'boolean')
+option('with_vala_pack', type: 'boolean')
+option('with_xml_pack', type: 'boolean')
diff --git a/plugins/autotools-templates/meson.build b/plugins/autotools-templates/meson.build
new file mode 100644
index 0000000..7b93608
--- /dev/null
+++ b/plugins/autotools-templates/meson.build
@@ -0,0 +1,10 @@
+if get_option('with_autotools_templates')
+
+autotools_template_datadir = join_paths(plugindatadir, 'autotools_templates')
+autotools_template_dir = join_paths(plugindir, 'autotools_templates')
+
+install_data('autotools-templates.plugin', install_dir: plugindir)
+install_data('autotools_templates/__init__.py', install_dir: autotools_template_dir)
+install_subdir('autotools_templates/resources', install_dir: autotools_template_datadir)
+
+endif
diff --git a/plugins/autotools/meson.build b/plugins/autotools/meson.build
new file mode 100644
index 0000000..4b479c8
--- /dev/null
+++ b/plugins/autotools/meson.build
@@ -0,0 +1,37 @@
+if get_option('with_autotools')
+
+autotools_sources = [
+ 'autotools-plugin.c',
+ 'ide-autotools-application-addin.c',
+ 'ide-autotools-application-addin.h',
+ 'ide-autotools-builder.c',
+ 'ide-autotools-builder.h',
+ 'ide-autotools-build-system.c',
+ 'ide-autotools-build-system.h',
+ 'ide-autotools-build-target.c',
+ 'ide-autotools-build-target.h',
+ 'ide-autotools-build-task.c',
+ 'ide-autotools-build-task.h',
+ 'ide-autotools-project-miner.c',
+ 'ide-autotools-project-miner.h',
+ 'ide-makecache.c',
+ 'ide-makecache.h',
+ 'ide-makecache-target.c',
+ 'ide-makecache-target.h',
+]
+
+make_exe_name = 'make'
+if find_program('gmake', required: false).found()
+ make_exe_name = 'gmake'
+endif
+
+shared_library('autotools-plugin', autotools_sources,
+ dependencies: plugin_deps,
+ c_args: ['-DGNU_MAKE_NAME="@0@"'.format(make_exe_name)],
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('autotools.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/build-tools/meson.build b/plugins/build-tools/meson.build
new file mode 100644
index 0000000..70a72c2
--- /dev/null
+++ b/plugins/build-tools/meson.build
@@ -0,0 +1,41 @@
+if get_option('with_build_tools')
+
+build_tools_resources = gnome.compile_resources(
+ 'gbp-build-resources',
+ 'gbp-build-tools.gresource.xml',
+ c_name: 'gbp_build_tools',
+)
+
+build_tools_sources = [
+ 'gbp-build-configuration-row.c',
+ 'gbp-build-configuration-row.h',
+ 'gbp-build-configuration-view.c',
+ 'gbp-build-configuration-view.h',
+ 'gbp-build-log-panel.c',
+ 'gbp-build-log-panel.h',
+ 'gbp-build-panel.c',
+ 'gbp-build-panel.h',
+ 'gbp-build-perspective.c',
+ 'gbp-build-perspective.h',
+ 'gbp-build-plugin.c',
+ 'gbp-build-tool.c',
+ 'gbp-build-tool.h',
+ 'gbp-build-workbench-addin.c',
+ 'gbp-build-workbench-addin.h',
+ 'ide-environment-editor-row.c',
+ 'ide-environment-editor-row.h',
+ 'ide-environment-editor.c',
+ 'ide-environment-editor.h',
+ build_tools_resources[0],
+]
+
+shared_library('build-tools-plugin', build_tools_sources,
+ dependencies: plugin_deps,
+ c_args: ['-DG_LOG_DOMAIN="build-tools"'],
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('build-tools.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/c-pack/meson.build b/plugins/c-pack/meson.build
new file mode 100644
index 0000000..057ce98
--- /dev/null
+++ b/plugins/c-pack/meson.build
@@ -0,0 +1,21 @@
+if get_option('with_c_pack')
+
+c_pack_sources = [
+ 'c-pack-plugin.c',
+ 'c-parse-helper.c',
+ 'c-parse-helper.h',
+ 'ide-c-indenter.c',
+ 'ide-c-indenter.h',
+ 'ide-c-format-provider.c',
+ 'ide-c-format-provider.h',
+]
+
+shared_library('c-pack-plugin', c_pack_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('c-pack.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/clang/meson.build b/plugins/clang/meson.build
new file mode 100644
index 0000000..4af8124
--- /dev/null
+++ b/plugins/clang/meson.build
@@ -0,0 +1,44 @@
+if get_option('with_clang')
+
+clang_sources = [
+ 'ide-clang-completion-item.c',
+ 'ide-clang-completion-item.h',
+ 'ide-clang-completion-item-private.h',
+ 'ide-clang-completion-provider.c',
+ 'ide-clang-completion-provider.h',
+ 'ide-clang-diagnostic-provider.c',
+ 'ide-clang-diagnostic-provider.h',
+ 'ide-clang-highlighter.c',
+ 'ide-clang-highlighter.h',
+ 'ide-clang-preferences-addin.c',
+ 'ide-clang-preferences-addin.h',
+ 'ide-clang-private.h',
+ 'ide-clang-service.c',
+ 'ide-clang-service.h',
+ 'ide-clang-symbol-node.c',
+ 'ide-clang-symbol-node.h',
+ 'ide-clang-symbol-resolver.c',
+ 'ide-clang-symbol-resolver.h',
+ 'ide-clang-symbol-tree.c',
+ 'ide-clang-symbol-tree.h',
+ 'ide-clang-translation-unit.c',
+ 'ide-clang-translation-unit.h',
+ 'clang-plugin.c',
+]
+
+cc = meson.get_compiler('c')
+libclang = cc.find_library('libclang')
+
+clang_deps = plugin_deps + [
+ libclang,
+]
+
+shared_library('clang-plugin', clang_sources,
+ dependencies: clang_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('clang.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/color-picker/meson.build b/plugins/color-picker/meson.build
new file mode 100644
index 0000000..e69a6cc
--- /dev/null
+++ b/plugins/color-picker/meson.build
@@ -0,0 +1,45 @@
+if get_option('with_color_picker')
+
+color_picker_resources = gnome.compile_resources(
+ 'gb-color-picker-resources',
+ 'gb-color-picker.gresource.xml',
+ c_name: 'gb_color_picker',
+)
+
+color_picker_sources = [
+ 'gb-color-picker-helper.c',
+ 'gb-color-picker-helper.h',
+ 'gb-color-picker-plugin.c',
+ 'gb-color-picker-document-monitor.c',
+ 'gb-color-picker-document-monitor.h',
+ 'gb-color-picker-prefs.c',
+ 'gb-color-picker-prefs.h',
+ 'gb-color-picker-prefs-list.c',
+ 'gb-color-picker-prefs-palette-list.h',
+ 'gb-color-picker-prefs-palette-list.c',
+ 'gb-color-picker-prefs-list.h',
+ 'gb-color-picker-prefs-palette-row.c',
+ 'gb-color-picker-prefs-palette-row.h',
+ 'gb-color-picker-private.h',
+ 'gb-color-picker-workbench-addin.c',
+ 'gb-color-picker-workbench-addin.h',
+ 'gb-color-picker-workbench-addin-private.h',
+ color_picker_resources[0],
+]
+
+color_picker_deps = plugin_deps + [
+ libgstyle_dep,
+]
+
+shared_library('color-picker-plugin', color_picker_sources,
+ dependencies: color_picker_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('color-picker.plugin', install_dir: plugindir)
+install_data('gsettings/org.gnome.builder.plugins.color_picker_plugin.gschema.xml',
+ install_dir: schema_dir,
+)
+
+endif
diff --git a/plugins/command-bar/meson.build b/plugins/command-bar/meson.build
new file mode 100644
index 0000000..ec72bf4
--- /dev/null
+++ b/plugins/command-bar/meson.build
@@ -0,0 +1,47 @@
+if get_option('with_command_bar')
+
+command_bar_resources = gnome.compile_resources(
+ 'gb-command-bar-resources',
+ 'gb-command-bar.gresource.xml',
+ c_name: 'gb_command_bar',
+)
+
+command_bar_sources = [
+ command_bar_resources[0],
+ command_bar_resources[1],
+ 'gb-command-bar.c',
+ 'gb-command-bar.h',
+ 'gb-command-gaction-provider.c',
+ 'gb-command-gaction-provider.h',
+ 'gb-command-gaction.c',
+ 'gb-command-gaction.h',
+ 'gb-command-manager.c',
+ 'gb-command-manager.h',
+ 'gb-command-provider.c',
+ 'gb-command-provider.h',
+ 'gb-command-result.c',
+ 'gb-command-result.h',
+ 'gb-command-vim-provider.c',
+ 'gb-command-vim-provider.h',
+ 'gb-command-vim.c',
+ 'gb-command-vim.h',
+ 'gb-command.c',
+ 'gb-command.h',
+ 'gb-vim.c',
+ 'gb-vim.h',
+]
+
+command_bar_deps = plugin_deps + [
+ libgd_dep,
+ libnautilus_dep,
+]
+
+shared_library('command-bar-plugin', command_bar_sources,
+ dependencies: command_bar_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('command-bar.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/comment-code/meson.build b/plugins/comment-code/meson.build
new file mode 100644
index 0000000..fcd683b
--- /dev/null
+++ b/plugins/comment-code/meson.build
@@ -0,0 +1,24 @@
+if get_option('with_comment_code')
+
+comment_code_resources = gnome.compile_resources(
+ 'gbp-comment-code-resources',
+ 'gbp-comment-code.gresource.xml',
+ c_name: 'gbp_comment_code',
+)
+
+comment_code_sources = [
+ 'gbp-comment-code-plugin.c',
+ 'gbp-comment-code-view-addin.c',
+ 'gbp-comment-code-view-addin.h',
+ comment_code_resources[0],
+]
+
+shared_library('comment-code-plugin', comment_code_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('comment-code.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/contributing/meson.build b/plugins/contributing/meson.build
new file mode 100644
index 0000000..d31bd96
--- /dev/null
+++ b/plugins/contributing/meson.build
@@ -0,0 +1,6 @@
+if get_option('with_contributing')
+
+install_data('contributing.plugin', install_dir: plugindir)
+install_subdir('contributing_plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/create-project/meson.build b/plugins/create-project/meson.build
new file mode 100644
index 0000000..07132b7
--- /dev/null
+++ b/plugins/create-project/meson.build
@@ -0,0 +1,30 @@
+if get_option('with_create_project')
+
+create_project_resources = gnome.compile_resources(
+ 'gbp-create-project-resources',
+ 'gbp-create-project.gresource.xml',
+ c_name: 'gbp_create_project',
+)
+
+create_project_sources = [
+ 'gbp-create-project-genesis-addin.c',
+ 'gbp-create-project-genesis-addin.h',
+ 'gbp-create-project-plugin.c',
+ 'gbp-create-project-template-icon.c',
+ 'gbp-create-project-template-icon.h',
+ 'gbp-create-project-tool.c',
+ 'gbp-create-project-tool.h',
+ 'gbp-create-project-widget.c',
+ 'gbp-create-project-widget.h',
+ create_project_resources[0],
+]
+
+shared_library('create-project-plugin', create_project_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('create-project.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/ctags/meson.build b/plugins/ctags/meson.build
new file mode 100644
index 0000000..91f8a2f
--- /dev/null
+++ b/plugins/ctags/meson.build
@@ -0,0 +1,32 @@
+if get_option('with_ctags')
+
+ctags_sources = [
+ 'ide-ctags-builder.c',
+ 'ide-ctags-builder.h',
+ 'ide-ctags-completion-item.c',
+ 'ide-ctags-completion-item.h',
+ 'ide-ctags-completion-provider.c',
+ 'ide-ctags-completion-provider.h',
+ 'ide-ctags-completion-provider-private.h',
+ 'ide-ctags-highlighter.c',
+ 'ide-ctags-highlighter.h',
+ 'ide-ctags-index.c',
+ 'ide-ctags-index.h',
+ 'ide-ctags-service.c',
+ 'ide-ctags-service.h',
+ 'ide-ctags-symbol-resolver.c',
+ 'ide-ctags-symbol-resolver.h',
+ 'ide-ctags-util.c',
+ 'ide-ctags-util.h',
+ 'ctags-plugin.c',
+]
+
+shared_library('ctags-plugin', ctags_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('ctags.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/devhelp/meson.build b/plugins/devhelp/meson.build
new file mode 100644
index 0000000..e760990
--- /dev/null
+++ b/plugins/devhelp/meson.build
@@ -0,0 +1,34 @@
+if get_option('with_devhelp')
+
+devhelp_resources = gnome.compile_resources(
+ 'gbp-devhelp-resources',
+ 'gbp-devhelp-resources.gresource.xml',
+ c_name: 'gbp_devhelp',
+)
+
+devhelp_sources = [
+ 'gbp-devhelp-editor-view-addin.c',
+ 'gbp-devhelp-editor-view-addin.h',
+ 'gbp-devhelp-panel.c',
+ 'gbp-devhelp-panel.h',
+ 'gbp-devhelp-plugin.c',
+ 'gbp-devhelp-view.c',
+ 'gbp-devhelp-view.h',
+ 'gbp-devhelp-workbench-addin.c',
+ 'gbp-devhelp-workbench-addin.h',
+ devhelp_resources[0],
+]
+
+devhelp_deps = plugin_deps + [
+ dependency('libdevhelp-3.0', version: '>=3.20.0'),
+]
+
+shared_library('devhelp-plugin', devhelp_sources,
+ dependencies: devhelp_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('devhelp.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/file-search/meson.build b/plugins/file-search/meson.build
new file mode 100644
index 0000000..294478b
--- /dev/null
+++ b/plugins/file-search/meson.build
@@ -0,0 +1,24 @@
+if get_option('with_file_search')
+
+file_search_sources = [
+ 'gb-file-search-provider.c',
+ 'gb-file-search-provider.h',
+ 'gb-file-search-result.c',
+ 'gb-file-search-result.h',
+ 'gb-file-search-index.c',
+ 'gb-file-search-index.h',
+]
+
+file_search_deps = plugin_deps + [
+ libsearch_dep,
+]
+
+shared_library('file-search', file_search_sources,
+ dependencies: file_search_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('file-search.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/flatpak/meson.build b/plugins/flatpak/meson.build
new file mode 100644
index 0000000..fe9f70c
--- /dev/null
+++ b/plugins/flatpak/meson.build
@@ -0,0 +1,23 @@
+if get_option('with_flatpak')
+
+flatpak_sources = [
+ 'gbp-flatpak-runtime-provider.c',
+ 'gbp-flatpak-runtime-provider.h',
+ 'gbp-flatpak-runtime.c',
+ 'gbp-flatpak-runtime.h',
+ 'gbp-flatpak-plugin.c',
+]
+
+flatpak_deps = plugin_deps + [
+ dependency('flatpak', version: '>=0.6.0'),
+]
+
+shared_library('flatpak-plugin', flatpak_sources,
+ dependencies: flatpak_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('flatpak.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/fpaste/meson.build b/plugins/fpaste/meson.build
new file mode 100644
index 0000000..6d9a3be
--- /dev/null
+++ b/plugins/fpaste/meson.build
@@ -0,0 +1,10 @@
+if get_option('with_fpaste')
+
+fpaste_datadir = join_paths(plugindatadir, 'fpaste_plugin')
+fpaste_dir = join_paths(plugindir, 'fpaste_plugin')
+
+install_data('fpaste.plugin', install_dir: plugindir)
+install_data('fpaste_plugin/__init__.py', install_dir: fpaste_dir)
+install_subdir('fpaste_plugin/gtk', install_dir: fpaste_datadir)
+
+endif
diff --git a/plugins/gcc/meson.build b/plugins/gcc/meson.build
new file mode 100644
index 0000000..da55783
--- /dev/null
+++ b/plugins/gcc/meson.build
@@ -0,0 +1,17 @@
+if get_option('with_gcc')
+
+gcc_sources = [
+ 'gbp-gcc-build-result-addin.c',
+ 'gbp-gcc-build-result-addin.h',
+ 'gbp-gcc-plugin.c',
+]
+
+shared_library('gcc-plugin', gcc_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('gcc.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/gettext/meson.build b/plugins/gettext/meson.build
new file mode 100644
index 0000000..18924c2
--- /dev/null
+++ b/plugins/gettext/meson.build
@@ -0,0 +1,17 @@
+if get_option('with_gettext')
+
+gettext_sources = [
+ 'ide-gettext-diagnostic-provider.c',
+ 'ide-gettext-diagnostic-provider.h',
+ 'gettext-plugin.c',
+]
+
+shared_library('gettext-plugin', gettext_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('gettext.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/git/meson.build b/plugins/git/meson.build
new file mode 100644
index 0000000..f056c06
--- /dev/null
+++ b/plugins/git/meson.build
@@ -0,0 +1,76 @@
+if get_option('with_git')
+
+libgit_dep = dependency('libgit2-glib-1.0', version: '>=0.24.0')
+cc = meson.get_compiler('c')
+
+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
+
+git_resources = gnome.compile_resources(
+ 'ide-git-resources',
+ 'ide-git-resources.gresource.xml',
+ c_name: 'ide_git',
+)
+
+git_sources = [
+ 'ide-git-buffer-change-monitor.c',
+ 'ide-git-buffer-change-monitor.h',
+ 'ide-git-clone-widget.c',
+ 'ide-git-clone-widget.h',
+ 'ide-git-genesis-addin.c',
+ 'ide-git-genesis-addin.h',
+ 'ide-git-plugin.c',
+ 'ide-git-remote-callbacks.c',
+ 'ide-git-remote-callbacks.h',
+ 'ide-git-vcs.c',
+ 'ide-git-vcs.h',
+ 'ide-git-vcs-config.c',
+ 'ide-git-vcs-config.h',
+ 'ide-git-vcs-initializer.c',
+ 'ide-git-vcs-initializer.h',
+ git_resources[0],
+]
+
+git_deps = plugin_deps + [
+ libgit_dep,
+]
+
+shared_library('git-plugin', git_sources,
+ dependencies: git_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('git.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/gnome-code-assistance/meson.build b/plugins/gnome-code-assistance/meson.build
new file mode 100644
index 0000000..bc051a6
--- /dev/null
+++ b/plugins/gnome-code-assistance/meson.build
@@ -0,0 +1,30 @@
+if get_option('with_gnome_code_assistance')
+
+gnome_code_assistance_sources = [
+ 'gca-diagnostics.c',
+ 'gca-diagnostics.h',
+ 'gca-service.c',
+ 'gca-service.h',
+ 'gca-structs.c',
+ 'gca-structs.h',
+ 'gca-plugin.c',
+ 'ide-gca-diagnostic-provider.c',
+ 'ide-gca-diagnostic-provider.h',
+ 'ide-gca-preferences-addin.c',
+ 'ide-gca-preferences-addin.h',
+ 'ide-gca-service.c',
+ 'ide-gca-service.h',
+]
+
+shared_library('gnome-code-assistance-plugin', gnome_code_assistance_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('gnome-code-assistance.plugin', install_dir: plugindir)
+
+install_data('org.gnome.builder.gnome-code-assistance.gschema.xml',
+ install_dir: schema_dir)
+
+endif
diff --git a/plugins/hello-cpp/meson.build b/plugins/hello-cpp/meson.build
new file mode 100644
index 0000000..f74fd21
--- /dev/null
+++ b/plugins/hello-cpp/meson.build
@@ -0,0 +1,19 @@
+if get_option('with_hello_cpp')
+
+add_languages('cpp')
+
+hello_cpp_sources = [
+ 'hellocppapplicationaddin.cc',
+ 'hellocppapplicationaddin.h',
+ 'hellocppplugin.cc',
+]
+
+shared_library('hello-cpp-plugin', hello_cpp_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('hello-cpp.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/html-completion/meson.build b/plugins/html-completion/meson.build
new file mode 100644
index 0000000..8f05e23
--- /dev/null
+++ b/plugins/html-completion/meson.build
@@ -0,0 +1,20 @@
+if get_option('with_html_completion')
+
+html_completion_sources = [
+ 'ide-html-completion-provider.c',
+ 'ide-html-completion-provider.h',
+]
+
+html_completion_deps = plugin_deps + [
+ libsearch_dep,
+]
+
+shared_library('html-completion-plugin', html_completion_sources,
+ dependencies: html_completion_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('html-completion.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/html-preview/meson.build b/plugins/html-preview/meson.build
new file mode 100644
index 0000000..b3444c3
--- /dev/null
+++ b/plugins/html-preview/meson.build
@@ -0,0 +1,15 @@
+if get_option('with_html_preview')
+
+html_preview_datadir = join_paths(plugindatadir, 'html_preview_plugin')
+html_preview_dir = join_paths(plugindir, 'html_preview_plugin')
+
+install_data('html-preview.plugin', install_dir: plugindir)
+install_data('html_preview_plugin/__init__.py', install_dir: html_preview_dir)
+install_data([
+ 'html_preview_plugin/markdown-view.js',
+ 'html_preview_plugin/markdown.css',
+ 'html_preview_plugin/marked.js',
+], install_dir: html_preview_datadir)
+install_subdir('html_preview_plugin/gtk', install_dir: html_preview_datadir)
+
+endif
diff --git a/plugins/jedi/meson.build b/plugins/jedi/meson.build
new file mode 100644
index 0000000..6729699
--- /dev/null
+++ b/plugins/jedi/meson.build
@@ -0,0 +1,5 @@
+if get_option('with_jedi')
+
+install_data(['jedi.plugin', 'jedi_plugin.py'], install_dir: plugindir)
+
+endif
diff --git a/plugins/jhbuild/meson.build b/plugins/jhbuild/meson.build
new file mode 100644
index 0000000..400e3e0
--- /dev/null
+++ b/plugins/jhbuild/meson.build
@@ -0,0 +1,5 @@
+if get_option('with_jhbuild')
+
+install_data(['jhbuild.plugin', 'jhbuild_plugin.py'], install_dir: plugindir)
+
+endif
diff --git a/plugins/meson.build b/plugins/meson.build
new file mode 100644
index 0000000..6e33cdb
--- /dev/null
+++ b/plugins/meson.build
@@ -0,0 +1,44 @@
+plugindir = join_paths(get_option('libdir'), 'gnome-builder/plugins')
+plugindatadir = join_paths(get_option('datadir'), 'gnome-builder/plugins')
+plugin_deps = [
+ libpeas_dep,
+ libide_dep,
+]
+
+subdir('autotools')
+subdir('autotools-templates')
+subdir('build-tools')
+subdir('c-pack')
+subdir('clang')
+subdir('color-picker')
+subdir('command-bar')
+subdir('comment-code')
+subdir('contributing')
+subdir('create-project')
+subdir('ctags')
+subdir('devhelp')
+subdir('file-search')
+subdir('flatpak')
+subdir('fpaste')
+subdir('gcc')
+subdir('gettext')
+subdir('git')
+subdir('gnome-code-assistance')
+#subdir('hello-cpp') # needs libidemm (impossible)
+subdir('html-completion')
+subdir('html-preview')
+subdir('jedi')
+subdir('jhbuild')
+subdir('mingw')
+subdir('project-tree')
+subdir('python-gi-imports-completion')
+subdir('python-pack')
+subdir('quick-highlight')
+subdir('support')
+subdir('symbol-tree')
+subdir('sysmon')
+subdir('sysprof')
+subdir('terminal')
+subdir('todo')
+#subdir('vala-pack') # needs vapi files (trivial)
+subdir('xml-pack')
diff --git a/plugins/mingw/meson.build b/plugins/mingw/meson.build
new file mode 100644
index 0000000..3096650
--- /dev/null
+++ b/plugins/mingw/meson.build
@@ -0,0 +1,19 @@
+if get_option('with_mingw')
+
+mingw_sources = [
+ 'mingw-plugin.c',
+ 'ide-mingw-device.c',
+ 'ide-mingw-device.h',
+ 'ide-mingw-device-provider.c',
+ 'ide-mingw-device-provider.h',
+]
+
+shared_library('mingw-plugin', mingw_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('mingw.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/project-tree/meson.build b/plugins/project-tree/meson.build
new file mode 100644
index 0000000..cbd75fc
--- /dev/null
+++ b/plugins/project-tree/meson.build
@@ -0,0 +1,51 @@
+if get_option('with_project_tree')
+
+project_tree_resources = gnome.compile_resources(
+ 'gb-project-tree-resources',
+ 'gb-project-tree.gresource.xml',
+ c_name: 'gb_project_tree',
+)
+
+project_tree_sources = [
+ project_tree_resources[0],
+ project_tree_resources[1],
+ 'gb-new-file-popover.c',
+ 'gb-new-file-popover.h',
+ 'gb-project-file.c',
+ 'gb-project-file.h',
+ 'gb-project-tree-actions.c',
+ 'gb-project-tree-actions.h',
+ 'gb-project-tree-builder.c',
+ 'gb-project-tree-builder.h',
+ 'gb-project-tree.c',
+ 'gb-project-tree.h',
+ 'gb-project-tree-editor-addin.c',
+ 'gb-project-tree-editor-addin.h',
+ 'gb-project-tree-private.h',
+ 'gb-rename-file-popover.c',
+ 'gb-rename-file-popover.h',
+ 'gb-project-tree-addin.c',
+ 'gb-project-tree-addin.h',
+ 'project-tree-plugin.c',
+]
+
+project_tree_deps = plugin_deps
+project_tree_cflags = []
+
+if get_option('with_terminal')
+
+project_tree_deps += dependency('vte-2.91', version: '>=0.40.2')
+project_tree_cflags += '-DHAVE_VTE'
+
+endif
+
+shared_library('project-tree-plugin', project_tree_sources,
+ dependencies: project_tree_deps,
+ c_args: project_tree_cflags,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('project-tree.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/python-gi-imports-completion/meson.build
b/plugins/python-gi-imports-completion/meson.build
new file mode 100644
index 0000000..25b7e08
--- /dev/null
+++ b/plugins/python-gi-imports-completion/meson.build
@@ -0,0 +1,8 @@
+if get_option('with_python_gi_imports_completion')
+
+install_data([
+ 'python-gi-imports-completion.plugin',
+ 'python_gi_imports_completion.py'
+], install_dir: plugindir)
+
+endif
diff --git a/plugins/python-pack/meson.build b/plugins/python-pack/meson.build
new file mode 100644
index 0000000..35716cc
--- /dev/null
+++ b/plugins/python-pack/meson.build
@@ -0,0 +1,19 @@
+if get_option('with_python_pack')
+
+python_pack_sources = [
+ 'ide-python-indenter.c',
+ 'ide-python-indenter.h',
+ 'ide-python-format-provider.c',
+ 'ide-python-format-provider.h',
+ 'python-pack-plugin.c',
+]
+
+shared_library('python-pack-plugin', python_pack_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('python-pack.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/quick-highlight/meson.build b/plugins/quick-highlight/meson.build
new file mode 100644
index 0000000..736291a
--- /dev/null
+++ b/plugins/quick-highlight/meson.build
@@ -0,0 +1,19 @@
+if get_option('with_quick_highlight')
+
+quick_highlight_sources = [
+ 'gbp-quick-highlight-plugin.c',
+ 'gbp-quick-highlight-view-addin.c',
+ 'gbp-quick-highlight-view-addin.h',
+ 'gbp-quick-highlight-preferences.c',
+ 'gbp-quick-highlight-preferences.h',
+]
+
+shared_library('quick-highlight-plugin', quick_highlight_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('quick-highlight.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/support/meson.build b/plugins/support/meson.build
new file mode 100644
index 0000000..b587759
--- /dev/null
+++ b/plugins/support/meson.build
@@ -0,0 +1,26 @@
+if get_option('with_support')
+
+support_resources = gnome.compile_resources(
+ 'ide-support-resources',
+ 'ide-support-resources.gresource.xml',
+ c_name: 'ide_support',
+)
+
+support_sources = [
+ 'ide-support-application-addin.c',
+ 'ide-support-application-addin.h',
+ 'ide-support.c',
+ 'ide-support.h',
+ 'ide-support-plugin.c',
+ support_resources[0],
+]
+
+shared_library('support-plugin', support_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('support.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/symbol-tree/meson.build b/plugins/symbol-tree/meson.build
new file mode 100644
index 0000000..2a8f6de
--- /dev/null
+++ b/plugins/symbol-tree/meson.build
@@ -0,0 +1,28 @@
+if get_option('with_symbol_tree')
+
+symbol_tree_resources = gnome.compile_resources(
+ 'symbol-tree-resources',
+ 'symbol-tree.gresource.xml',
+ c_name: 'symbol_tree',
+)
+
+symbol_tree_sources = [
+ symbol_tree_resources[0],
+ symbol_tree_resources[1],
+ 'symbol-tree-builder.c',
+ 'symbol-tree-builder.h',
+ 'symbol-tree-panel.c',
+ 'symbol-tree-panel.h',
+ 'symbol-tree.c',
+ 'symbol-tree.h',
+]
+
+shared_library('symbol-tree', symbol_tree_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('symbol-tree.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/sysmon/meson.build b/plugins/sysmon/meson.build
new file mode 100644
index 0000000..4e4ab4c
--- /dev/null
+++ b/plugins/sysmon/meson.build
@@ -0,0 +1,30 @@
+if get_option('with_sysmon')
+
+sysmon_resources = gnome.compile_resources(
+ 'gb-sysmon-resources',
+ 'gb-sysmon.gresource.xml',
+ c_name: 'gb_sysmon',
+)
+
+sysmon_sources = [
+ sysmon_resources[0],
+ sysmon_resources[1],
+ 'gb-sysmon-panel.c',
+ 'gb-sysmon-panel.h',
+ 'gb-sysmon-addin.c',
+ 'gb-sysmon-addin.h',
+]
+
+sysmon_deps = plugin_deps + [
+ librg_dep,
+]
+
+shared_library('sysmon-plugin', sysmon_sources,
+ dependencies: sysmon_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('sysmon.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/sysprof/meson.build b/plugins/sysprof/meson.build
new file mode 100644
index 0000000..9f78dc6
--- /dev/null
+++ b/plugins/sysprof/meson.build
@@ -0,0 +1,31 @@
+if get_option('with_sysprof')
+
+sysprof_resources = gnome.compile_resources(
+ 'gbp-sysprof-resources',
+ 'sysprof.gresource.xml',
+ c_name: 'gbp_sysprof',
+)
+
+sysprof_sources = [
+ sysprof_resources[0],
+ sysprof_resources[1],
+ 'gbp-sysprof-plugin.c',
+ 'gbp-sysprof-perspective.c',
+ 'gbp-sysprof-perspective.h',
+ 'gbp-sysprof-workbench-addin.c',
+ 'gbp-sysprof-workbench-addin.h',
+]
+
+sysprof_deps = plugin_deps + [
+ dependency('sysprof-ui-2', version: '>=3.21.90'),
+]
+
+shared_library('sysprof-plugin', sysprof_sources,
+ dependencies: sysprof_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('sysprof.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/terminal/meson.build b/plugins/terminal/meson.build
new file mode 100644
index 0000000..0172b88
--- /dev/null
+++ b/plugins/terminal/meson.build
@@ -0,0 +1,39 @@
+if get_option('with_terminal')
+
+terminal_resources = gnome.compile_resources(
+ 'gb-terminal-resources',
+ 'gb-terminal.gresource.xml',
+ c_name: 'gb_terminal',
+)
+
+terminal_sources = [
+ terminal_resources[0],
+ terminal_resources[1],
+ 'gb-terminal.c',
+ 'gb-terminal.h',
+ 'gb-terminal-application-addin.c',
+ 'gb-terminal-application-addin.h',
+ 'gb-terminal-plugin.c',
+ 'gb-terminal-private.h',
+ 'gb-terminal-view.c',
+ 'gb-terminal-view.h',
+ 'gb-terminal-view-private.h',
+ 'gb-terminal-view-actions.c',
+ 'gb-terminal-view-actions.h',
+ 'gb-terminal-workbench-addin.c',
+ 'gb-terminal-workbench-addin.h',
+]
+
+terminal_deps = plugin_deps + [
+ dependency('vte-2.91', version: '>=0.40.2'),
+]
+
+shared_library('terminal', terminal_sources,
+ dependencies: terminal_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('terminal.plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/todo/meson.build b/plugins/todo/meson.build
new file mode 100644
index 0000000..5e3ae89
--- /dev/null
+++ b/plugins/todo/meson.build
@@ -0,0 +1,6 @@
+if get_option('with_todo')
+
+install_data('todo.plugin', install_dir: plugindir)
+install_subdir('todo_plugin', install_dir: plugindir)
+
+endif
diff --git a/plugins/xml-pack/meson.build b/plugins/xml-pack/meson.build
new file mode 100644
index 0000000..38c2054
--- /dev/null
+++ b/plugins/xml-pack/meson.build
@@ -0,0 +1,21 @@
+if get_option('with_xml_pack')
+
+xml_pack_sources = [
+ 'ide-xml-highlighter.c',
+ 'ide-xml-highlighter.h',
+ 'ide-xml-indenter.c',
+ 'ide-xml-indenter.h',
+ 'ide-xml.c',
+ 'ide-xml.h',
+ 'xml-pack-plugin.c',
+]
+
+shared_library('xml-pack-plugin', xml_pack_sources,
+ dependencies: plugin_deps,
+ install: true,
+ install_dir: plugindir,
+)
+
+install_data('xml-pack.plugin', install_dir: plugindir)
+
+endif
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..e546924
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,48 @@
+i18n = import('i18n')
+
+langs = [
+ 'bs',
+ 'ca',
+ 'cs',
+ 'da',
+ 'de',
+ 'el',
+ 'en_GB',
+ 'eo',
+ 'es',
+ 'fr',
+ 'gl',
+ 'he',
+ 'hu',
+ 'id',
+ 'it',
+ 'kk',
+ 'ko',
+ 'lt',
+ 'lv',
+ 'nb',
+ 'nl',
+ 'oc',
+ 'pl',
+ 'pt',
+ 'pt_BR',
+ 'sk',
+ 'sl',
+ 'sr',
+ 'sr@latin',
+ 'sv',
+ 'tr',
+ 'uk',
+ 'zh_TW',
+]
+
+i18n.gettext('gnome-builder',
+ languages: langs,
+ args: [
+ '--from-code=UTF-8',
+ '--keyword=g_dngettext:2,3',
+ '--add-comments',
+
'--msgid-bugs-address=https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-builder&keywords=I18N+L10N&component=general',
+ ],
+ data_dirs: [join_paths(meson.source_root(), 'contrib/gstyle/data')],
+)
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..5e89bf4
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,227 @@
+ide_test_env = [
+
'GI_TYPELIB_PATH="@0@/libide:@0@/contrib/tmpl:@0@/contrib/egg:@0@/contrib/pnl:$(GI_TYPELIB_PATH)"'.format(meson.build_root()),
+ 'GB_IN_TREE_PLUGINS=1',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ 'G_DEBUG=gc-friendly',
+ 'GSETTINGS_BACKEND=memory',
+ 'PYTHONDONTWRITEBYTECODE=yes',
+ 'MALLOC_CHECK_=2',
+# 'MALLOC_PERTURB_=$((${RANDOM:-256} % 256))',
+]
+ide_test_cflags = [
+ '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()),
+]
+
+ide_context = executable('test-ide-context',
+ 'test-ide-context.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-ide-context', ide_context,
+ env: ide_test_env,
+)
+
+
+ide_back_forward_list = executable('test-ide-back-forward-list',
+ 'test-ide-back-forward-list.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-ide-back-forward-list', ide_back_forward_list,
+ env: ide_test_env,
+)
+
+
+ide_buffer_manager = executable('test-ide-buffer-manager',
+ 'test-ide-buffer-manager.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-ide-buffer-manager', ide_buffer_manager,
+ env: ide_test_env,
+)
+
+
+ide_buffer = executable('test-ide-buffer',
+ 'test-ide-buffer.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-ide-buffer', ide_buffer,
+ env: ide_test_env,
+)
+
+
+ide_doap = executable('test-ide-doap',
+ 'test-ide-doap.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-ide-doap', ide_doap,
+ env: ide_test_env,
+)
+
+
+ide_file_settings = executable('test-ide-file-settings',
+ 'test-ide-file-settings.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-ide-file-settings', ide_file_settings,
+ env: ide_test_env,
+)
+
+
+ide_indenter = executable('test-ide-indenter',
+ 'test-ide-indenter.c',
+ c_args: ide_test_cflags,
+ dependencies: [
+ libide_dep,
+ libpeas_dep,
+ ],
+)
+test('test-ide-indenter', ide_indenter,
+ env: ide_test_env,
+)
+
+
+ide_vcs_uri = executable('test-ide-vcs-uri',
+ 'test-ide-vcs-uri.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-ide-vcs-uri', ide_vcs_uri,
+ env: ide_test_env,
+)
+
+
+ide_uri = executable('test-ide-uri',
+ 'test-ide-uri.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-ide-uri', ide_uri,
+ env: ide_test_env,
+)
+
+
+test_vim = executable('test-vim',
+ 'test-vim.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+test('test-vim', test_vim,
+ env: ide_test_env,
+)
+
+
+test_cpu_graph = executable('test-cpu-graph',
+ 'test-cpu-graph.c',
+ c_args: ide_test_cflags,
+ dependencies: [libide_dep, librg_dep],
+)
+#test('test-cpu-graph', test_cpu_graph,
+# env: ide_test_env,
+#)
+
+
+test_fuzzy = executable('test-fuzzy',
+ 'test-fuzzy.c',
+ c_args: ide_test_cflags,
+ dependencies: [libide_dep, libsearch_dep],
+)
+#test('test-fuzzy', test_fuzzy,
+# env: ide_test_env,
+#)
+
+
+test_egg_slider = executable('test-egg-slider',
+ 'test-egg-slider.c',
+ c_args: ide_test_cflags,
+ dependencies: libegg_dep,
+)
+#test('test-egg-slider', test_egg_slider,
+# env: ide_test_env,
+#)
+
+
+test_snippet_parser = executable('test-snippet-parser',
+ 'test-snippet-parser.c',
+ c_args: ide_test_cflags,
+ dependencies: libide_dep,
+)
+#test('test-snippet-parser', test_snippet_parser,
+# env: ide_test_env,
+#)
+
+
+test_egg_binding_group = executable('test-egg-binding-group',
+ 'test-egg-binding-group.c',
+ c_args: ide_test_cflags,
+ dependencies: libegg_dep,
+)
+test('test-egg-binding-group', test_egg_binding_group,
+ env: ide_test_env,
+)
+
+
+test_egg_menu_manager = executable('test-egg-menu-manager',
+ 'test-egg-menu-manager.c',
+ c_args: ide_test_cflags,
+ dependencies: libegg_dep,
+)
+#test('test-egg-menu-manager', test_egg_menu_manager,
+# env: ide_test_env,
+#)
+
+
+test_egg_state_machine = executable('test-egg-state-machine',
+ 'test-egg-state-machine.c',
+ c_args: ide_test_cflags,
+ dependencies: libegg_dep,
+)
+test('test-egg-state-machine', test_egg_state_machine,
+ env: ide_test_env,
+)
+
+
+test_egg_radio_box = executable('test-egg-radio-box',
+ 'test-egg-radio-box.c',
+ c_args: ide_test_cflags,
+ dependencies: libegg_dep,
+)
+#test('test-egg-radio-box', test_egg_radio_box,
+# env: ide_test_env,
+#)
+
+
+test_egg_file_chooser_entry = executable('test-egg-file-chooser-entry',
+ 'test-egg-file-chooser-entry.c',
+ c_args: ide_test_cflags,
+ dependencies: libegg_dep,
+)
+#test('test-egg-file-chooser-entry', test_egg_file_chooser_entry,
+# env: ide_test_env,
+#)
+
+
+test_egg_cache = executable('test-egg-cache',
+ 'test-egg-cache.c',
+ c_args: ide_test_cflags,
+ dependencies: libegg_dep,
+)
+test('test-egg-cache', test_egg_cache,
+ env: ide_test_env,
+)
+
+
+test_egg_heap = executable('test-egg-heap',
+ 'test-egg-heap.c',
+ c_args: ide_test_cflags,
+ dependencies: libegg_dep,
+)
+test('test-egg-heap', test_egg_heap,
+ env: ide_test_env,
+)
+
diff --git a/tests/test-fuzzy.c b/tests/test-fuzzy.c
index 1e21884..e656264 100644
--- a/tests/test-fuzzy.c
+++ b/tests/test-fuzzy.c
@@ -1,5 +1,5 @@
#include <fuzzy.h>
-#include <ide-line-reader.h>
+#include <ide.h>
#include <stdlib.h>
#include <string.h>
diff --git a/tests/test-ide-buffer-manager.c b/tests/test-ide-buffer-manager.c
index 3a6d275..e202cfd 100644
--- a/tests/test-ide-buffer-manager.c
+++ b/tests/test-ide-buffer-manager.c
@@ -155,12 +155,12 @@ test_buffer_manager_basic (GCancellable *cancellable,
{
g_autoptr(GFile) project_file = NULL;
g_autofree gchar *path = NULL;
- const gchar *builddir = g_getenv ("G_TEST_BUILDDIR");
+ const gchar *srcdir = g_getenv ("G_TEST_SRCDIR");
g_autoptr(GTask) task = NULL;
task = g_task_new (NULL, cancellable, callback, user_data);
- path = g_build_filename (builddir, "data", "project1", "configure.ac", NULL);
+ path = g_build_filename (srcdir, "data", "project1", "configure.ac", NULL);
project_file = g_file_new_for_path (path);
ide_context_new_async (project_file,
diff --git a/tests/test-ide-context.c b/tests/test-ide-context.c
index dc25d41..080f0e1 100644
--- a/tests/test-ide-context.c
+++ b/tests/test-ide-context.c
@@ -55,13 +55,13 @@ test_new_async (GCancellable *cancellable,
{
g_autofree gchar *path = NULL;
g_autoptr(GFile) project_file = NULL;
- const gchar *builddir;
+ const gchar *srcdir;
GTask *task;
- builddir = g_getenv ("G_TEST_BUILDDIR");
+ srcdir = g_getenv ("G_TEST_SRCDIR");
task = g_task_new (NULL, cancellable, callback, user_data);
- path = g_build_filename (builddir, "data", "project1", "configure.ac", NULL);
+ path = g_build_filename (srcdir, "data", "project1", "configure.ac", NULL);
project_file = g_file_new_for_path (path);
ide_context_new_async (project_file,
diff --git a/tools/meson.build b/tools/meson.build
new file mode 100644
index 0000000..cc0fe34
--- /dev/null
+++ b/tools/meson.build
@@ -0,0 +1,6 @@
+ide_list_counters = executable('ide-list-counters',
+ 'ide-list-counters.c',
+ dependencies: libegg_dep,
+ install: true,
+ install_dir: join_paths(get_option('libexecdir'), 'gnome-builder'),
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]