eaef35c2e44df3befe7468ba65ac8012dd3ade22
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / pipewire / pipewire / 0002-Revert-treewide-meson.build-use-feature.allowed.patch
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()"
5
6 This reverts commit cc7305351202424a2800425d86ae9c9b72aefa15.
7 Upstream-Status: Inappropriate[meson version dependent]
8 ---
9  man/meson.build                 |  2 +-
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(-)
20
21 diff --git a/man/meson.build b/man/meson.build
22 index 54d1c5eca..8e6e7dbe4 100644
23 --- a/man/meson.build
24 +++ b/man/meson.build
25 @@ -19,7 +19,7 @@ manpages = [
26    'pw-profiler.1.rst.in',
27  ]
28  
29 -if get_option('pipewire-jack').allowed()
30 +if not get_option('pipewire-jack').disabled()
31    manpages += 'pw-jack.1.rst.in'
32  endif
33  
34 diff --git a/meson.build b/meson.build
35 index 338192073..9d806198a 100644
36 --- a/meson.build
37 +++ b/meson.build
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')
41  
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())
44  
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())
48  
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')
54  
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())
59  endif
60 @@ -394,17 +394,17 @@ subdir('po')
61  subdir('spa')
62  subdir('src')
63  
64 -if get_option('tests').allowed()
65 +if not get_option('tests').disabled()
66    subdir('test')
67  endif
68  
69  configure_file(output : 'config.h',
70                 configuration : cdata)
71  
72 -if get_option('pipewire-jack').allowed()
73 +if not get_option('pipewire-jack').disabled()
74    subdir('pipewire-jack')
75  endif
76 -if get_option('pipewire-v4l2').allowed()
77 +if not get_option('pipewire-v4l2').disabled()
78    subdir('pipewire-v4l2')
79  endif
80  
81 @@ -415,7 +415,7 @@ if alsa_dep.found()
82  endif
83  
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
92 --- a/spa/meson.build
93 +++ b/spa/meson.build
94 @@ -31,7 +31,7 @@ pkgconfig.generate(filebase : 'lib@0@'.format(spa_name),
95  
96  subdir('include')
97  
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
104  
105  subdir('tools')
106  subdir('tests')
107 -if get_option('examples').allowed()
108 +if not get_option('examples').disabled()
109    subdir('examples')
110  endif
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
116  endforeach
117  
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())
132  
133  bluez5_sources = [
134 @@ -34,18 +34,18 @@ bluez5_data = ['bluez-hardware.conf']
135  
136  install_data(bluez5_data, install_dir : spa_datadir / 'bluez5')
137  
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
142    endif
143    bluez5_sources += ['backend-native.c']
144  endif
145  
146 -if get_option('bluez5-backend-ofono').allowed()
147 +if not get_option('bluez5-backend-ofono').disabled()
148    bluez5_sources += ['backend-ofono.c']
149  endif
150  
151 -if get_option('bluez5-backend-hsphfpd').allowed()
152 +if not get_option('bluez5-backend-hsphfpd').disabled()
153    bluez5_sources += ['backend-hsphfpd.c']
154  endif
155  
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
160 @@ -1,16 +1,16 @@
161  if alsa_dep.found()
162    subdir('alsa')
163  endif
164 -if get_option('audioconvert').allowed()
165 +if not get_option('audioconvert').disabled()
166    subdir('audioconvert')
167  endif
168 -if get_option('audiomixer').allowed()
169 +if not get_option('audiomixer').disabled()
170    subdir('audiomixer')
171  endif
172 -if get_option('control').allowed()
173 +if not get_option('control').disabled()
174    subdir('control')
175  endif
176 -if get_option('audiotestsrc').allowed()
177 +if not get_option('audiotestsrc').disabled()
178    subdir('audiotestsrc')
179  endif
180  if bluez_dep.found()
181 @@ -22,19 +22,19 @@ endif
182  if jack_dep.found()
183    subdir('jack')
184  endif
185 -if get_option('support').allowed()
186 +if not get_option('support').disabled()
187    subdir('support')
188  endif
189 -if get_option('test').allowed()
190 +if not get_option('test').disabled()
191    subdir('test')
192  endif
193 -if get_option('videoconvert').allowed()
194 +if not get_option('videoconvert').disabled()
195    subdir('videoconvert')
196  endif
197 -if get_option('videotestsrc').allowed()
198 +if not get_option('videotestsrc').disabled()
199    subdir('videotestsrc')
200  endif
201 -if get_option('volume').allowed()
202 +if not get_option('volume').disabled()
203    subdir('volume')
204  endif
205  if vulkan_headers
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)
213  
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
223 @@ -1,6 +1,6 @@
224 -if get_option('systemd-system-service').allowed()
225 +if not get_option('systemd-system-service').disabled()
226    subdir('system')
227  endif
228 -if get_option('systemd-user-service').allowed()
229 +if not get_option('systemd-user-service').disabled()
230    subdir('user')
231  endif
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 = [
237    'gstpipewiresrc.c',
238  ]
239  
240 -if get_option('gstreamer-device-provider').allowed()
241 +if not get_option('gstreamer-device-provider').disabled()
242    pipewire_gst_sources += [ 'gstpipewiredeviceprovider.c' ]
243  endif
244  
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')
250  subdir('daemon')
251  subdir('tools')
252  subdir('modules')
253 -if get_option('examples').allowed()
254 +if not get_option('examples').disabled()
255    subdir('examples')
256  endif
257 -if get_option('tests').allowed()
258 +if not get_option('tests').disabled()
259    subdir('tests')
260  endif
261  
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()
267  endif
268  
269  build_pw_cat = false
270 -if get_option('pw-cat').allowed() and sndfile_dep.found()
271 +if not get_option('pw-cat').disabled() and sndfile_dep.found()
272    build_pw_cat = true
273  
274    pwcat_sources = [
275 -- 
276 2.35.1
277