1 From 6dec8c7faf57a1bd0162a4e790ed031945588d98 Mon Sep 17 00:00:00 2001
2 From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
3 Date: Thu, 24 Feb 2022 11:22:34 +0530
4 Subject: [PATCH 02/12] Revert "treewide: meson.build: use feature.allowed()"
6 This reverts commit cc7305351202424a2800425d86ae9c9b72aefa15.
7 Upstream-Status: Inappropriate[meson version dependent]
10 meson.build | 14 +++++++-------
11 spa/meson.build | 4 ++--
12 spa/plugins/bluez5/meson.build | 18 +++++++++---------
13 spa/plugins/meson.build | 18 +++++++++---------
14 spa/plugins/support/meson.build | 2 +-
15 src/daemon/systemd/meson.build | 4 ++--
16 src/gst/meson.build | 2 +-
17 src/meson.build | 4 ++--
18 src/tools/meson.build | 2 +-
19 10 files changed, 35 insertions(+), 35 deletions(-)
21 diff --git a/man/meson.build b/man/meson.build
22 index 54d1c5eca..8e6e7dbe4 100644
25 @@ -19,7 +19,7 @@ manpages = [
26 'pw-profiler.1.rst.in',
29 -if get_option('pipewire-jack').allowed()
30 +if not get_option('pipewire-jack').disabled()
31 manpages += 'pw-jack.1.rst.in'
34 diff --git a/meson.build b/meson.build
35 index 338192073..9d806198a 100644
38 @@ -336,7 +336,7 @@ endforeach
39 gst_dp_found = gst_dep.length() > 0
40 summary({'gstreamer-device-provider': gst_dp_found}, bool_yn: true, section: 'Backend')
42 -cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', get_option('gstreamer-device-provider').allowed())
43 +cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', not get_option('gstreamer-device-provider').disabled())
45 webrtc_dep = dependency('webrtc-audio-processing',
46 version : ['>= 0.2', '< 1.0'],
47 @@ -382,10 +382,10 @@ cdata.set('HAVE_LILV', lilv_lib.found())
49 installed_tests_metadir = pipewire_datadir / 'installed-tests' / pipewire_name
50 installed_tests_execdir = pipewire_libexecdir / 'installed-tests' / pipewire_name
51 -installed_tests_enabled = get_option('installed_tests').allowed()
52 +installed_tests_enabled = not get_option('installed_tests').disabled()
53 installed_tests_template = files('template.test.in')
55 -if get_option('tests').allowed()
56 +if not get_option('tests').disabled()
57 gstack = find_program('gstack', required : false)
58 cdata.set('HAVE_GSTACK', gstack.found())
60 @@ -394,17 +394,17 @@ subdir('po')
64 -if get_option('tests').allowed()
65 +if not get_option('tests').disabled()
69 configure_file(output : 'config.h',
70 configuration : cdata)
72 -if get_option('pipewire-jack').allowed()
73 +if not get_option('pipewire-jack').disabled()
74 subdir('pipewire-jack')
76 -if get_option('pipewire-v4l2').allowed()
77 +if not get_option('pipewire-v4l2').disabled()
78 subdir('pipewire-v4l2')
81 @@ -415,7 +415,7 @@ if alsa_dep.found()
84 generate_manpages = false
85 -if get_option('man').allowed()
86 +if not get_option('man').disabled()
87 rst2man = find_program('rst2man', required: false)
88 if not rst2man.found()
89 rst2man = find_program('rst2man.py', required: get_option('man'))
90 diff --git a/spa/meson.build b/spa/meson.build
91 index 1931d35b1..2404748df 100644
94 @@ -31,7 +31,7 @@ pkgconfig.generate(filebase : 'lib@0@'.format(spa_name),
98 -if get_option('spa-plugins').allowed()
99 +if not get_option('spa-plugins').disabled()
100 udevrulesdir = get_option('udevrulesdir')
101 if udevrulesdir == ''
102 # absolute path, otherwise meson prepends the prefix
103 @@ -74,6 +74,6 @@ endif
107 -if get_option('examples').allowed()
108 +if not get_option('examples').disabled()
111 diff --git a/spa/plugins/bluez5/meson.build b/spa/plugins/bluez5/meson.build
112 index 4567b67dd..7a1e12ec7 100644
113 --- a/spa/plugins/bluez5/meson.build
114 +++ b/spa/plugins/bluez5/meson.build
115 @@ -6,12 +6,12 @@ foreach dep: bluez5_deps
118 cdata.set('HAVE_BLUEZ_5_BACKEND_NATIVE',
119 - get_option('bluez5-backend-hsp-native').allowed() or
120 - get_option('bluez5-backend-hfp-native').allowed())
121 -cdata.set('HAVE_BLUEZ_5_BACKEND_HSP_NATIVE', get_option('bluez5-backend-hsp-native').allowed())
122 -cdata.set('HAVE_BLUEZ_5_BACKEND_HFP_NATIVE', get_option('bluez5-backend-hfp-native').allowed())
123 -cdata.set('HAVE_BLUEZ_5_BACKEND_OFONO', get_option('bluez5-backend-ofono').allowed())
124 -cdata.set('HAVE_BLUEZ_5_BACKEND_HSPHFPD', get_option('bluez5-backend-hsphfpd').allowed())
125 + not get_option('bluez5-backend-hsp-native').disabled() or
126 + not get_option('bluez5-backend-hfp-native').disabled())
127 +cdata.set('HAVE_BLUEZ_5_BACKEND_HSP_NATIVE', not get_option('bluez5-backend-hsp-native').disabled())
128 +cdata.set('HAVE_BLUEZ_5_BACKEND_HFP_NATIVE', not get_option('bluez5-backend-hfp-native').disabled())
129 +cdata.set('HAVE_BLUEZ_5_BACKEND_OFONO', not get_option('bluez5-backend-ofono').disabled())
130 +cdata.set('HAVE_BLUEZ_5_BACKEND_HSPHFPD', not get_option('bluez5-backend-hsphfpd').disabled())
131 cdata.set('HAVE_BLUEZ_5_HCI', dependency('bluez', version: '< 6', required: false).found())
134 @@ -34,18 +34,18 @@ bluez5_data = ['bluez-hardware.conf']
136 install_data(bluez5_data, install_dir : spa_datadir / 'bluez5')
138 -if get_option('bluez5-backend-hsp-native').allowed() or get_option('bluez5-backend-hfp-native').allowed()
139 +if not get_option('bluez5-backend-hsp-native').disabled() or not get_option('bluez5-backend-hfp-native').disabled()
140 if libusb_dep.found()
141 bluez5_deps += libusb_dep
143 bluez5_sources += ['backend-native.c']
146 -if get_option('bluez5-backend-ofono').allowed()
147 +if not get_option('bluez5-backend-ofono').disabled()
148 bluez5_sources += ['backend-ofono.c']
151 -if get_option('bluez5-backend-hsphfpd').allowed()
152 +if not get_option('bluez5-backend-hsphfpd').disabled()
153 bluez5_sources += ['backend-hsphfpd.c']
156 diff --git a/spa/plugins/meson.build b/spa/plugins/meson.build
157 index fcf007aa9..0b581b29b 100644
158 --- a/spa/plugins/meson.build
159 +++ b/spa/plugins/meson.build
164 -if get_option('audioconvert').allowed()
165 +if not get_option('audioconvert').disabled()
166 subdir('audioconvert')
168 -if get_option('audiomixer').allowed()
169 +if not get_option('audiomixer').disabled()
172 -if get_option('control').allowed()
173 +if not get_option('control').disabled()
176 -if get_option('audiotestsrc').allowed()
177 +if not get_option('audiotestsrc').disabled()
178 subdir('audiotestsrc')
181 @@ -22,19 +22,19 @@ endif
185 -if get_option('support').allowed()
186 +if not get_option('support').disabled()
189 -if get_option('test').allowed()
190 +if not get_option('test').disabled()
193 -if get_option('videoconvert').allowed()
194 +if not get_option('videoconvert').disabled()
195 subdir('videoconvert')
197 -if get_option('videotestsrc').allowed()
198 +if not get_option('videotestsrc').disabled()
199 subdir('videotestsrc')
201 -if get_option('volume').allowed()
202 +if not get_option('volume').disabled()
206 diff --git a/spa/plugins/support/meson.build b/spa/plugins/support/meson.build
207 index 1672d38df..b810b283c 100644
208 --- a/spa/plugins/support/meson.build
209 +++ b/spa/plugins/support/meson.build
210 @@ -23,7 +23,7 @@ spa_support_lib = shared_library('spa-support',
211 install_dir : spa_plugindir / 'support')
212 spa_support_dep = declare_dependency(link_with: spa_support_lib)
214 -if get_option('evl').allowed()
215 +if not get_option('evl').disabled()
216 evl_inc = include_directories('/usr/evl/include')
217 evl_lib = cc.find_library('evl',
218 dirs: ['/usr/evl/lib/'],
219 diff --git a/src/daemon/systemd/meson.build b/src/daemon/systemd/meson.build
220 index 482a44c4b..89ad2f6dc 100644
221 --- a/src/daemon/systemd/meson.build
222 +++ b/src/daemon/systemd/meson.build
224 -if get_option('systemd-system-service').allowed()
225 +if not get_option('systemd-system-service').disabled()
228 -if get_option('systemd-user-service').allowed()
229 +if not get_option('systemd-user-service').disabled()
232 diff --git a/src/gst/meson.build b/src/gst/meson.build
233 index fd552f6cb..709dc0f1c 100644
234 --- a/src/gst/meson.build
235 +++ b/src/gst/meson.build
236 @@ -8,7 +8,7 @@ pipewire_gst_sources = [
240 -if get_option('gstreamer-device-provider').allowed()
241 +if not get_option('gstreamer-device-provider').disabled()
242 pipewire_gst_sources += [ 'gstpipewiredeviceprovider.c' ]
245 diff --git a/src/meson.build b/src/meson.build
246 index cefc329eb..2fb73fd59 100644
247 --- a/src/meson.build
248 +++ b/src/meson.build
249 @@ -3,10 +3,10 @@ subdir('pipewire')
253 -if get_option('examples').allowed()
254 +if not get_option('examples').disabled()
257 -if get_option('tests').allowed()
258 +if not get_option('tests').disabled()
262 diff --git a/src/tools/meson.build b/src/tools/meson.build
263 index 02514c253..038231fcd 100644
264 --- a/src/tools/meson.build
265 +++ b/src/tools/meson.build
266 @@ -34,7 +34,7 @@ if ncurses_dep.found()
270 -if get_option('pw-cat').allowed() and sndfile_dep.found()
271 +if not get_option('pw-cat').disabled() and sndfile_dep.found()