[gedit] Make gspell and python optional
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Make gspell and python optional
- Date: Mon, 3 May 2021 16:29:50 +0000 (UTC)
commit 470893ed068969e5276dfe7a4f7135afa5aedd92
Author: Matt Turner <mattst88 gmail com>
Date: Mon May 3 16:29:49 2021 +0000
Make gspell and python optional
gedit/meson.build | 10 ++++++----
meson.build | 7 +++++--
meson_options.txt | 8 ++++++++
plugins/meson.build | 17 +++++++++++------
4 files changed, 30 insertions(+), 12 deletions(-)
---
diff --git a/gedit/meson.build b/gedit/meson.build
index 844b6bac8..a8683e61a 100644
--- a/gedit/meson.build
+++ b/gedit/meson.build
@@ -214,10 +214,12 @@ libgedit_gir = gnome.generate_gir(
install_dir_typelib: get_option('libdir') / 'gedit/girepository-1.0',
)
-python3.install_sources(
- 'Gedit.py',
- subdir: 'gi/overrides',
-)
+if get_option('python')
+ python3.install_sources(
+ 'Gedit.py',
+ subdir: 'gi/overrides',
+ )
+endif
# Vala API
libgedit_vapi = gnome.generate_vapi(
diff --git a/meson.build b/meson.build
index a208afe32..128521ac1 100644
--- a/meson.build
+++ b/meson.build
@@ -50,9 +50,11 @@ pygobject_req = '>= 3.0.0'
gio_dep = dependency('gio-2.0', version: glib_req)
libxml_dep = dependency('libxml-2.0', version: libxml_req)
-gspell_dep = dependency('gspell-1', version: gspell_req)
+gspell_dep = dependency('gspell-1', version: gspell_req, required: get_option('spell'))
-python3 = python.find_installation('python3')
+if get_option('python')
+ python3 = python.find_installation('python3')
+endif
libgedit_public_deps = [
gio_dep,
@@ -114,3 +116,4 @@ summary('Prefix', get_option('prefix'))
summary('API documentation', get_option('gtk_doc'))
summary('User documentation', get_option('user_documentation'))
summary('Require all tests', get_option('require_all_tests'))
+summary('Spell checker plugin', get_option('spell').enabled().to_string())
diff --git a/meson_options.txt b/meson_options.txt
index 33d03cb14..5bfd9a119 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -14,6 +14,14 @@ option(
description: 'Require that all tests can be run, even those that depend on third party programs'
)
+option('python',
+ type: 'boolean', value: true,
+ description: 'Install GIR python overrides and python plugins')
+
+option('spell',
+ type: 'feature', value: 'enabled',
+ description: 'Build spell checking plugin')
+
# This option exists for the developers, to speed up the install.
option(
'user_documentation',
diff --git a/plugins/meson.build b/plugins/meson.build
index 39cc5362d..90139fe1e 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -19,14 +19,19 @@ subdir('docinfo')
subdir('filebrowser')
subdir('modelines')
subdir('openlinks')
-subdir('pythonconsole')
subdir('quickhighlight')
-subdir('quickopen')
-subdir('snippets')
subdir('sort')
-subdir('spell')
+if gspell_dep.found()
+ subdir('spell')
+endif
subdir('time')
-if get_option('plugin_externaltools')
- subdir('externaltools')
+if get_option('python')
+ if get_option('plugin_externaltools')
+ subdir('externaltools')
+ endif
+
+ subdir('pythonconsole')
+ subdir('quickopen')
+ subdir('snippets')
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]