summaryrefslogtreecommitdiff
path: root/media-video/pipewire/files/0.3.72/001-opus-meson.patch
blob: a505336e0a312c4363ca440e40f833033e2dffcc (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
From 14ebb9a568f3d8e1351181300dda93099b52742c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikl=C4=81vs=20Ko=C4=BCes=C5=86ikovs?=
 <89q1r14hd@relay.firefox.com>
Date: Mon, 26 Jun 2023 17:07:04 +0300
Subject: [PATCH 1/2] spa/plugins/bluez5/meson: removed some unneeded redefines
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

As far as I can tell, the code in question was not doing anything there
and was also breaking the new code elsewhere, so it was put on the
chopping block. Don't mind the squirming tentacles.

Signed-off-by: NiklÄvs Koļesņikovs <89q1r14hd@relay.firefox.com>
---
 spa/plugins/bluez5/meson.build | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/spa/plugins/bluez5/meson.build b/spa/plugins/bluez5/meson.build
index e6c52ccc57..80493cfe61 100644
--- a/spa/plugins/bluez5/meson.build
+++ b/spa/plugins/bluez5/meson.build
@@ -118,16 +118,14 @@ endif
 
 if ldac_dep.found()
   ldac_args = codec_args
-  ldac_dep = [ ldac_dep ]
   if ldac_abr_dep.found()
     ldac_args += [ '-DENABLE_LDAC_ABR' ]
-    ldac_dep += ldac_abr_dep
   endif
   bluez_codec_ldac = shared_library('spa-codec-bluez5-ldac',
     [ 'a2dp-codec-ldac.c', 'media-codecs.c' ],
     include_directories : [ configinc ],
     c_args : ldac_args,
-    dependencies : [ spa_dep, ldac_dep ],
+    dependencies : [ spa_dep, ldac_dep, ldac_abr_dep ],
     install : true,
     install_dir : spa_plugindir / 'bluez5')
 endif
@@ -144,7 +142,6 @@ endif
 
 if get_option('bluez5-codec-opus').allowed() and opus_dep.found()
   opus_args = codec_args
-  opus_dep = [ opus_dep ]
   bluez_codec_opus = shared_library('spa-codec-bluez5-opus',
     [ 'a2dp-codec-opus.c', 'media-codecs.c' ],
     include_directories : [ configinc ],
-- 
GitLab


From 23a10a8abb324809d1ebc5d33e36cdfa570390ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikl=C4=81vs=20Ko=C4=BCes=C5=86ikovs?=
 <89q1r14hd@relay.firefox.com>
Date: Mon, 26 Jun 2023 16:35:01 +0300
Subject: [PATCH 2/2] src/modules/meson: ensure Opus libs were actually found,
 too
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The old way fails, if a distro has the header but not the library,
which can happen on at least Gentoo with multilib deployments,
where the shared header is present but non-native libraries might not.

This could still fail, if a distro had some but not all libraries for
some architectures but hopefully no one did that. In that case, a compile
test would likely be required via cc.check_header() instead but let's try
the faster fix first.

Reported-by: Sam James <sam@gentoo.org>
Thanks-to: Barnabás Pőcze <pobrn@protonmail.com>
Thanks-to: Xavier Claessens <xavier.claessens@collabora.com>
Signed-off-by: NiklÄvs Koļesņikovs <89q1r14hd@relay.firefox.com>
---
 src/modules/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/modules/meson.build b/src/modules/meson.build
index 342bd697b1..970e04db98 100644
--- a/src/modules/meson.build
+++ b/src/modules/meson.build
@@ -203,7 +203,8 @@ endif
 summary({'ffado-driver': build_module_ffado_driver}, bool_yn: true, section: 'Optional Modules')
 
 opus_custom_h = cc.has_header('opus/opus_custom.h', dependencies: opus_dep)
-if opus_custom_h
+# One would imagine that opus_dep is a requirement but for some reason it's not, so we need to manually check that
+if opus_dep.found() and opus_custom_h
   opus_custom_dep = declare_dependency(compile_args: ['-DHAVE_OPUS_CUSTOM'], dependencies: opus_dep)
 else
   opus_custom_dep = dependency('', required: false)
-- 
GitLab