--- /dev/null
+From 5ac7272bba9635234fc08ab526b80a9f259d0fc6 Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Tue, 12 Feb 2019 11:44:10 +0200
+Subject: [PATCH] build-sys: Support disabling vapi generation independent of
+ introspection
+
+---
+ libgcab/meson.build | 12 +++++++-----
+ meson_options.txt | 1 +
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/libgcab/meson.build b/libgcab/meson.build
+index f939617..3c4ac68 100644
+--- a/libgcab/meson.build
++++ b/libgcab/meson.build
+@@ -93,9 +93,11 @@ if get_option('introspection')
+ ],
+ install : true
+ )
+- gnome.generate_vapi('libgcab-1.0',
+- sources: gir[0],
+- packages : ['gio-2.0'],
+- install : true,
+- )
++ if get_option('vapi')
++ gnome.generate_vapi('libgcab-1.0',
++ sources: gir[0],
++ packages : ['gio-2.0'],
++ install : true,
++ )
++ endif
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index bbcbbea..b7ade3f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,4 @@
+ option('docs', type : 'boolean', value : true, description : 'enable developer documentation')
+ option('introspection', type : 'boolean', value : true, description : 'generate GObject Introspection data')
++option('vapi', type : 'boolean', value : true, description: 'generate Vala bindings (requires introspection)')
+ option('tests', type : 'boolean', value : true, description : 'enable tests')
+--
+2.17.0
+
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome.org meson vala
+
+DESCRIPTION="Library and tool for working with Microsoft Cabinet (CAB) files"
+HOMEPAGE="https://wiki.gnome.org/msitools"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+IUSE="gtk-doc +introspection test vala"
+REQUIRED_USE="vala? ( introspection )"
+
+RDEPEND="
+ >=dev-libs/glib-2.44:2
+ sys-libs/zlib
+ introspection? ( >=dev-libs/gobject-introspection-1.54:= )
+"
+DEPEND="${RDEPEND}
+ dev-util/glib-utils
+ gtk-doc? ( >=dev-util/gtk-doc-1.14
+ app-text/docbook-xml-dtd:4.3 )
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=( "${FILESDIR}"/${PV}-optional-vapi.patch ) # https://gitlab.gnome.org/GNOME/gcab/merge_requests/1
+
+src_prepare() {
+ use vala && vala_src_prepare
+ default
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_use gtk-doc docs)
+ $(meson_use introspection)
+ $(meson_use vala vapi)
+ $(meson_use test tests)
+ )
+ meson_src_configure
+}