--- /dev/null
+diff --git a/BUILD_NOTES.md b/BUILD_NOTES.md
+index c146cbc..2d8c8b2 100644
+--- a/BUILD_NOTES.md
++++ b/BUILD_NOTES.md
+@@ -34,7 +34,7 @@ From inside the Peek source folder run:
+ ### Debian package
+
+ #### Build requirements
+- - meson (>= 0.37.0)
++ - meson (>= 0.47.0)
+ - valac (>= 0.22)
+ - libgtk-3-dev (>= 3.20)
+ - libkeybinder-3.0-dev
+diff --git a/README.md b/README.md
+index 71574b1..6faeb85 100644
+--- a/README.md
++++ b/README.md
+@@ -79,7 +79,7 @@ Support for more Wayland desktops might be added in the future (see FAQs below).
+ ### Development
+
+ - Vala compiler >= 0.22
+-- Meson >= 0.37.0
++- Meson >= 0.47.0
+ - Gettext (>= 0.19 for localized .desktop entry)
+ - txt2man (optional for building man page)
+
+diff --git a/meson.build b/meson.build
+index b0d57d7..5db2a39 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1,6 +1,6 @@
+ project('peek', ['c', 'vala'],
+ version: '1.4.0',
+- meson_version: '>= 0.37.0',
++ meson_version: '>= 0.47.0',
+ )
+
+ add_project_arguments([
+diff --git a/meson_options.txt b/meson_options.txt
+index f88ceaa..526ccc9 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,4 +1,5 @@
+ option('build-tests', type : 'boolean', value : true)
++option('enable-keybinder', type : 'feature', value : 'auto')
+ option('enable-filechoosernative', type : 'boolean', value : false)
+ option('enable-gnome-shell', type : 'boolean', value : true)
+ option('enable-open-file-manager', type : 'boolean', value : true)
+diff --git a/src/meson.build b/src/meson.build
+index cf2c45a..5282148 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -48,7 +48,7 @@ enable_open_file_manager = get_option('enable-open-file-manager')
+
+ # Dependencies
+ gtk = dependency('gtk+-3.0', version: '>= 3.20')
+-keybinder = dependency('keybinder-3.0', required: false)
++keybinder = dependency('keybinder-3.0', required: get_option('enable-keybinder'))
+
+ peek_deps = [
+ dependency('cairo'),
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+VALA_MIN_API_VERSION="0.22"
+
+inherit gnome2 meson vala
+
+DESCRIPTION="Simple animated Gif screen recorder"
+HOMEPAGE="https://github.com/phw/peek"
+SRC_URI="https://github.com/phw/peek/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="keybinder test"
+
+RDEPEND=">=dev-libs/glib-2.38:2
+ media-video/ffmpeg[X,encode,vpx,xcb]
+ virtual/imagemagick-tools
+ >=x11-libs/gtk+-3.20:3
+ keybinder? ( dev-libs/keybinder:3 )"
+DEPEND="${RDEPEND}
+ $(vala_depend)
+ app-text/txt2man
+ >=sys-devel/gettext-0.19
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-meson.patch )
+
+src_prepare() {
+ vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature keybinder enable-keybinder)
+ $(meson_use test build-tests)
+ )
+
+ meson_src_configure
+}