summaryrefslogtreecommitdiff
blob: 4812fb621ddc93a45b6c1a2c8e5b203e51bc8a48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
From 0851f6b41aec97e633743ffc2c552fc89597b532 Mon Sep 17 00:00:00 2001
From: Bernard Cafarelli <bernard.cafarelli@gmail.com>
Date: Tue, 24 Sep 2019 15:45:10 +0200
Subject: [PATCH] Add meson build option for keybinder

This uses the feature type from meson >=0.47 to force enable/disbable
keybinder support (helpful for packaging)
---
 BUILD_NOTES.md    | 2 +-
 README.md         | 2 +-
 meson.build       | 2 +-
 meson_options.txt | 1 +
 src/meson.build   | 2 +-
 5 files changed, 5 insertions(+), 4 deletions(-)

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 8a45e02..10c7e45 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 2a2a2eb..88adc0c 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project('peek', ['c', 'vala'],
   version: '1.5.1',
-  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 455f3ba..406af03 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -49,7 +49,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'),
-- 
2.25.1