--- /dev/null
+From 72efa486222cde6094c217efc6085f49af1cca85 Mon Sep 17 00:00:00 2001
+From: Sobhan Mohammadpour <sobhan@gentoo.org>
+Date: Sun, 26 May 2019 14:19:17 -0400
+Subject: [PATCH] make spell optional
+
+---
+ meson.build | 4 +++-
+ meson_options.txt | 4 ++++
+ plugins/meson.build | 4 +++-
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 2f4d7e5..f67e320 100644
+--- a/meson.build
++++ b/meson.build
+@@ -86,7 +86,8 @@ libxml_dep = dependency('libxml-2.0', version: libxml_req)
+ libgd_dep = libgd_sp.get_variable('libgd_dep')
+
+ libsoup_dep = dependency('libsoup-2.4', version: libsoup_req, required: true)
+-gspell_dep = dependency('gspell-1', version: gspell_req, required: true)
++with_gspell = get_option('spell')
++gspell_dep = dependency('gspell-1', version: gspell_req, required: false)
+ x11_dep = dependency('x11', required: false)
+
+ introspection_dep = dependency('gobject-introspection-1.0', version: introspection_req, required: false)
+@@ -189,6 +190,7 @@ summary = [
+ ' Introspection: @0@'.format(generate_gir),
+ ' Plugins: @0@'.format(build_plugins),
+ ' Vala API: @0@'.format(generate_vapi),
++ ' Spell: @0@'.format(with_gspell),
+ ' Gvfs metadata: @0@'.format(enable_gvfs_metadata),
+ '',
+ 'Directories:',
+diff --git a/meson_options.txt b/meson_options.txt
+index 90803fa..e1f7349 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -16,3 +16,7 @@ option('documentation',
+ option('enable-gvfs-metadata',
+ type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
+ description: 'Enable using gvfs to store metadata')
++
++option('spell',
++ type:'boolean', value: true,
++ description: 'Build spell support')
+diff --git a/plugins/meson.build b/plugins/meson.build
+index af94ab7..abeeac5 100644
+--- a/plugins/meson.build
++++ b/plugins/meson.build
+@@ -21,5 +21,7 @@ subdir('quickhighlight')
+ subdir('quickopen')
+ subdir('snippets')
+ subdir('sort')
+-subdir('spell')
++if with_gspell
++ subdir('spell')
++endif
+ subdir('time')
+--
+2.21.0
+
LICENSE="GPL-2+ CC-BY-SA-3.0"
SLOT="0"
-IUSE="+introspection +python gtk-doc vala"
-REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} )"
+IUSE="+introspection +python gtk-doc spell vala"
+REQUIRED_USE="python? ( introspection ${PYTHON_REQUIRED_USE} ) spell? ( python )"
-KEYWORDS="~amd64"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
# X libs are not needed for OSX (aqua)
COMMON_DEPEND="
dev-python/pycairo[${PYTHON_USEDEP}]
>=dev-python/pygobject-3:3[cairo,${PYTHON_USEDEP}]
dev-libs/libpeas[python,${PYTHON_USEDEP}] )
- >=app-text/gspell-0.2.5:0=
+ spell? ( >=app-text/gspell-0.2.5:0= )
"
RDEPEND="${COMMON_DEPEND}
x11-themes/adwaita-icon-theme
>=sys-devel/gettext-0.18
virtual/pkgconfig
"
+PATCHES=( "${FILESDIR}/${PV}-make-spell-optional.patch" )
pkg_setup() {
use python && python-single-r1_pkg_setup
$(meson_use gtk-doc documentation)
$(meson_use introspection)
$(meson_use python plugins)
+ $(meson_use spell)
$(meson_use vala vapi)
+ -Denable-gvfs-metadata=yes
)
meson_src_configure
}