summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/pipewire/pipewire/0012-Miscellanous-changes-to-account-for-lower-version-of.patch
blob: 69731a4f1092441157d73a2d418bea67d5ecb875 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
From b781a4dbb45191a4b2746d5fe12d6f907681441c Mon Sep 17 00:00:00 2001
From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
Date: Thu, 24 Feb 2022 12:28:59 +0530
Subject: [PATCH 12/12] Miscellanous changes to account for lower version of
 meson in agl

Upstream-Status: Inappropriate[meson version dependent]
---
 meson.build                           | 30 ++++++++++++++-------------
 spa/plugins/audioconvert/meson.build  |  4 ++--
 spa/tests/meson.build                 |  2 +-
 src/daemon/systemd/system/meson.build |  5 +----
 src/modules/meson.build               | 18 +++-------------
 src/tests/meson.build                 |  6 +++---
 6 files changed, 26 insertions(+), 39 deletions(-)

diff --git a/meson.build b/meson.build
index af60472f8..7106eeaad 100644
--- a/meson.build
+++ b/meson.build
@@ -440,25 +440,27 @@ run_target('pw-uninstalled',
              '-v@0@'.format(pipewire_version)]
 )
 
-devenv = environment()
+if meson.version().version_compare('>=0.58.0')
+  devenv = environment()
 
-builddir = meson.project_build_root()
-srcdir = meson.project_source_root()
+  builddir = meson.build_root()
+  srcdir = meson.source_root()
 
-devenv.set('PIPEWIRE_CONFIG_DIR', pipewire_dep.get_variable(internal: 'confdatadir'))
-devenv.set('PIPEWIRE_MODULE_DIR', pipewire_dep.get_variable(internal: 'moduledir'))
+  devenv.set('PIPEWIRE_CONFIG_DIR', pipewire_dep.get_variable(internal: 'confdatadir'))
+  devenv.set('PIPEWIRE_MODULE_DIR', pipewire_dep.get_variable(internal: 'moduledir'))
 
-  devenv.set('SPA_PLUGIN_DIR', builddir / 'spa' / 'plugins')
-  devenv.set('SPA_DATA_DIR', srcdir / 'spa' / 'plugins')
+    devenv.set('SPA_PLUGIN_DIR', builddir / 'spa' / 'plugins')
+    devenv.set('SPA_DATA_DIR', srcdir / 'spa' / 'plugins')
 
-devenv.set('GST_PLUGIN_PATH', builddir / 'src'/ 'gst')
+  devenv.set('GST_PLUGIN_PATH', builddir / 'src'/ 'gst')
 
-devenv.set('ALSA_PLUGIN_DIR', builddir / 'pipewire-alsa' / 'alsa-plugins')
-devenv.set('ACP_PATHS_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'paths')
-devenv.set('ACP_PROFILES_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'profile-sets')
+  devenv.set('ALSA_PLUGIN_DIR', builddir / 'pipewire-alsa' / 'alsa-plugins')
+  devenv.set('ACP_PATHS_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'paths')
+  devenv.set('ACP_PROFILES_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'profile-sets')
 
-devenv.set('LD_LIBRARY_PATH', builddir / 'pipewire-jack' / 'src')
+  devenv.set('LD_LIBRARY_PATH', builddir / 'pipewire-jack' / 'src')
 
-devenv.set('PW_UNINSTALLED', '1')
+  devenv.set('PW_UNINSTALLED', '1')
 
-meson.add_devenv(devenv)
+  meson.add_devenv(devenv)
+endif
diff --git a/spa/plugins/audioconvert/meson.build b/spa/plugins/audioconvert/meson.build
index 3aa0f3846..6f4fd968b 100644
--- a/spa/plugins/audioconvert/meson.build
+++ b/spa/plugins/audioconvert/meson.build
@@ -140,7 +140,7 @@ foreach a : test_apps
       install : installed_tests_enabled,
       install_dir : installed_tests_execdir / 'audioconvert'),
       env : [
-        'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
+        'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
         ])
 
     if installed_tests_enabled
@@ -170,7 +170,7 @@ foreach a : benchmark_apps
       install : installed_tests_enabled,
       install_dir : installed_tests_execdir / 'audioconvert'),
       env : [
-        'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
+        'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
         ])
 
     if installed_tests_enabled
diff --git a/spa/tests/meson.build b/spa/tests/meson.build
index d995cfaa4..ea00a2cfe 100644
--- a/spa/tests/meson.build
+++ b/spa/tests/meson.build
@@ -42,7 +42,7 @@ foreach a : benchmark_apps
       install_dir : installed_tests_execdir,
     ),
     env : [
-      'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
+      'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
     ]
   )
 
diff --git a/src/daemon/systemd/system/meson.build b/src/daemon/systemd/system/meson.build
index b3e5f1f41..4d942c1ab 100644
--- a/src/daemon/systemd/system/meson.build
+++ b/src/daemon/systemd/system/meson.build
@@ -1,7 +1,4 @@
-systemd_system_services_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir', pkgconfig_define : [ 'rootprefix', prefix])
-if get_option('systemd-system-unit-dir') != ''
-  systemd_system_services_dir = get_option('systemd-system-unit-dir')
-endif
+systemd_system_services_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir', pkgconfig_define : [ 'prefix', prefix])
 
 install_data(sources : 'pipewire.socket',
              install_dir : systemd_system_services_dir)
diff --git a/src/modules/meson.build b/src/modules/meson.build
index 568b32c50..8cf4f781d 100644
--- a/src/modules/meson.build
+++ b/src/modules/meson.build
@@ -150,18 +150,6 @@ pipewire_module_rt = shared_library('pipewire-module-rt', [ 'module-rt.c' ],
 endif
 summary({'rt': build_module_rt}, bool_yn: true, section: 'Optional Modules')
 
-build_module_rtkit = dbus_dep.found()
-if build_module_rtkit
-pipewire_module_rtkit = shared_library('pipewire-module-rtkit', [ 'module-rtkit.c' ],
-  include_directories : [configinc, spa_inc],
-  install : true,
-  install_dir : modules_install_dir,
-  install_rpath: modules_install_dir,
-  dependencies : [dbus_dep, mathlib, dl_lib, pipewire_dep],
-)
-endif
-summary({'rt': build_module_rt}, bool_yn: true, section: 'Optional Modules')
-
 build_module_portal = dbus_dep.found()
 if build_module_portal
 pipewire_module_portal = shared_library('pipewire-module-portal', [ 'module-portal.c' ],
@@ -372,9 +360,9 @@ test('pw-test-protocol-native',
     install_dir : installed_tests_execdir,
   ),
   env : [
-    'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
-    'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.project_build_root()),
-    'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.project_build_root())
+    'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
+    'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.build_root()),
+    'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.build_root())
   ]
 )
 
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 9a595d431..1b03967fb 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -13,9 +13,9 @@ foreach a : test_apps
       install : installed_tests_enabled,
       install_dir : installed_tests_execdir),
     env : [
-      'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.project_build_root()),
-      'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.project_build_root()),
-      'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.project_build_root())
+      'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
+      'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.build_root()),
+      'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.build_root())
       ])
 
   if installed_tests_enabled
-- 
2.35.1