meta-agl-core: remove backported gstreamer patch
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / pipewire / pipewire / 0012-Miscellanous-changes-to-account-for-lower-version-of.patch
1 From b781a4dbb45191a4b2746d5fe12d6f907681441c Mon Sep 17 00:00:00 2001
2 From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
3 Date: Thu, 24 Feb 2022 12:28:59 +0530
4 Subject: [PATCH 12/12] Miscellanous changes to account for lower version of
5  meson in agl
6
7 Upstream-Status: Inappropriate[meson version dependent]
8 ---
9  meson.build                           | 30 ++++++++++++++-------------
10  spa/plugins/audioconvert/meson.build  |  4 ++--
11  spa/tests/meson.build                 |  2 +-
12  src/daemon/systemd/system/meson.build |  5 +----
13  src/modules/meson.build               | 18 +++-------------
14  src/tests/meson.build                 |  6 +++---
15  6 files changed, 26 insertions(+), 39 deletions(-)
16
17 diff --git a/meson.build b/meson.build
18 index af60472f8..7106eeaad 100644
19 --- a/meson.build
20 +++ b/meson.build
21 @@ -440,25 +440,27 @@ run_target('pw-uninstalled',
22               '-v@0@'.format(pipewire_version)]
23  )
24  
25 -devenv = environment()
26 +if meson.version().version_compare('>=0.58.0')
27 +  devenv = environment()
28  
29 -builddir = meson.project_build_root()
30 -srcdir = meson.project_source_root()
31 +  builddir = meson.build_root()
32 +  srcdir = meson.source_root()
33  
34 -devenv.set('PIPEWIRE_CONFIG_DIR', pipewire_dep.get_variable(internal: 'confdatadir'))
35 -devenv.set('PIPEWIRE_MODULE_DIR', pipewire_dep.get_variable(internal: 'moduledir'))
36 +  devenv.set('PIPEWIRE_CONFIG_DIR', pipewire_dep.get_variable(internal: 'confdatadir'))
37 +  devenv.set('PIPEWIRE_MODULE_DIR', pipewire_dep.get_variable(internal: 'moduledir'))
38  
39 -  devenv.set('SPA_PLUGIN_DIR', builddir / 'spa' / 'plugins')
40 -  devenv.set('SPA_DATA_DIR', srcdir / 'spa' / 'plugins')
41 +    devenv.set('SPA_PLUGIN_DIR', builddir / 'spa' / 'plugins')
42 +    devenv.set('SPA_DATA_DIR', srcdir / 'spa' / 'plugins')
43  
44 -devenv.set('GST_PLUGIN_PATH', builddir / 'src'/ 'gst')
45 +  devenv.set('GST_PLUGIN_PATH', builddir / 'src'/ 'gst')
46  
47 -devenv.set('ALSA_PLUGIN_DIR', builddir / 'pipewire-alsa' / 'alsa-plugins')
48 -devenv.set('ACP_PATHS_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'paths')
49 -devenv.set('ACP_PROFILES_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'profile-sets')
50 +  devenv.set('ALSA_PLUGIN_DIR', builddir / 'pipewire-alsa' / 'alsa-plugins')
51 +  devenv.set('ACP_PATHS_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'paths')
52 +  devenv.set('ACP_PROFILES_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'profile-sets')
53  
54 -devenv.set('LD_LIBRARY_PATH', builddir / 'pipewire-jack' / 'src')
55 +  devenv.set('LD_LIBRARY_PATH', builddir / 'pipewire-jack' / 'src')
56  
57 -devenv.set('PW_UNINSTALLED', '1')
58 +  devenv.set('PW_UNINSTALLED', '1')
59  
60 -meson.add_devenv(devenv)
61 +  meson.add_devenv(devenv)
62 +endif
63 diff --git a/spa/plugins/audioconvert/meson.build b/spa/plugins/audioconvert/meson.build
64 index 3aa0f3846..6f4fd968b 100644
65 --- a/spa/plugins/audioconvert/meson.build
66 +++ b/spa/plugins/audioconvert/meson.build
67 @@ -140,7 +140,7 @@ foreach a : test_apps
68        install : installed_tests_enabled,
69        install_dir : installed_tests_execdir / 'audioconvert'),
70        env : [
71 -        'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
72 +        'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
73          ])
74  
75      if installed_tests_enabled
76 @@ -170,7 +170,7 @@ foreach a : benchmark_apps
77        install : installed_tests_enabled,
78        install_dir : installed_tests_execdir / 'audioconvert'),
79        env : [
80 -        'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
81 +        'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
82          ])
83  
84      if installed_tests_enabled
85 diff --git a/spa/tests/meson.build b/spa/tests/meson.build
86 index d995cfaa4..ea00a2cfe 100644
87 --- a/spa/tests/meson.build
88 +++ b/spa/tests/meson.build
89 @@ -42,7 +42,7 @@ foreach a : benchmark_apps
90        install_dir : installed_tests_execdir,
91      ),
92      env : [
93 -      'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
94 +      'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
95      ]
96    )
97  
98 diff --git a/src/daemon/systemd/system/meson.build b/src/daemon/systemd/system/meson.build
99 index b3e5f1f41..4d942c1ab 100644
100 --- a/src/daemon/systemd/system/meson.build
101 +++ b/src/daemon/systemd/system/meson.build
102 @@ -1,7 +1,4 @@
103 -systemd_system_services_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir', pkgconfig_define : [ 'rootprefix', prefix])
104 -if get_option('systemd-system-unit-dir') != ''
105 -  systemd_system_services_dir = get_option('systemd-system-unit-dir')
106 -endif
107 +systemd_system_services_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir', pkgconfig_define : [ 'prefix', prefix])
108  
109  install_data(sources : 'pipewire.socket',
110               install_dir : systemd_system_services_dir)
111 diff --git a/src/modules/meson.build b/src/modules/meson.build
112 index 568b32c50..8cf4f781d 100644
113 --- a/src/modules/meson.build
114 +++ b/src/modules/meson.build
115 @@ -150,18 +150,6 @@ pipewire_module_rt = shared_library('pipewire-module-rt', [ 'module-rt.c' ],
116  endif
117  summary({'rt': build_module_rt}, bool_yn: true, section: 'Optional Modules')
118  
119 -build_module_rtkit = dbus_dep.found()
120 -if build_module_rtkit
121 -pipewire_module_rtkit = shared_library('pipewire-module-rtkit', [ 'module-rtkit.c' ],
122 -  include_directories : [configinc, spa_inc],
123 -  install : true,
124 -  install_dir : modules_install_dir,
125 -  install_rpath: modules_install_dir,
126 -  dependencies : [dbus_dep, mathlib, dl_lib, pipewire_dep],
127 -)
128 -endif
129 -summary({'rt': build_module_rt}, bool_yn: true, section: 'Optional Modules')
130 -
131  build_module_portal = dbus_dep.found()
132  if build_module_portal
133  pipewire_module_portal = shared_library('pipewire-module-portal', [ 'module-portal.c' ],
134 @@ -372,9 +360,9 @@ test('pw-test-protocol-native',
135      install_dir : installed_tests_execdir,
136    ),
137    env : [
138 -    'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
139 -    'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.project_build_root()),
140 -    'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.project_build_root())
141 +    'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
142 +    'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.build_root()),
143 +    'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.build_root())
144    ]
145  )
146  
147 diff --git a/src/tests/meson.build b/src/tests/meson.build
148 index 9a595d431..1b03967fb 100644
149 --- a/src/tests/meson.build
150 +++ b/src/tests/meson.build
151 @@ -13,9 +13,9 @@ foreach a : test_apps
152        install : installed_tests_enabled,
153        install_dir : installed_tests_execdir),
154      env : [
155 -      'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
156 -      'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.project_build_root()),
157 -      'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.project_build_root())
158 +      'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
159 +      'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.build_root()),
160 +      'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.build_root())
161        ])
162  
163    if installed_tests_enabled
164 -- 
165 2.35.1
166