[gnome-build-meta/alatiera/wireplumber: 4/4] vm/common-deps: add pipewire to the deps




commit a10359b084eda9eea3ceea1ff61a83cbc1ec7d19
Author: Jordan Petridis <jordan centricular com>
Date:   Fri Aug 12 04:23:39 2022 +0300

    vm/common-deps: add pipewire to the deps
    
    Explicitly add pipewire, wireplumber and the xdg-desktop-portals
    to the common deps so they will always be included, rather than
    relying on transient dependencies.
    
    Also patch wireplumber so it doesn't crash.
    
    https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/9427
    
    Close #535 #536

 elements/core-deps/pipewire-daemon.bst            |  4 ++
 elements/freedesktop-sdk.bst                      |  2 +
 elements/vm/common-deps.bst                       |  7 +++
 elements/vm/wireplumber.bst                       |  8 +++
 files/0001-wireplumber-fix-alsa-enumeration.patch | 70 +++++++++++++++++++++++
 5 files changed, 91 insertions(+)
---
diff --git a/elements/core-deps/pipewire-daemon.bst b/elements/core-deps/pipewire-daemon.bst
index 405f4bc53..12946dde7 100644
--- a/elements/core-deps/pipewire-daemon.bst
+++ b/elements/core-deps/pipewire-daemon.bst
@@ -5,6 +5,10 @@ build-depends:
 
 runtime-depends:
 - sdk/pipewire.bst
+- vm/wireplumber.bst
+- freedesktop-sdk.bst:components/avahi.bst
 - freedesktop-sdk.bst:components/sbc.bst
 - freedesktop-sdk.bst:components/bluez.bst
+- freedesktop-sdk.bst:components/bluez-libs.bst
 - freedesktop-sdk.bst:components/rtkit.bst
+- freedesktop-sdk.bst:components/webrtc-audio-processing.bst
diff --git a/elements/freedesktop-sdk.bst b/elements/freedesktop-sdk.bst
index 0d30a27f1..d91cd2cdf 100644
--- a/elements/freedesktop-sdk.bst
+++ b/elements/freedesktop-sdk.bst
@@ -4,6 +4,8 @@ sources:
   url: gitlab:freedesktop-sdk/freedesktop-sdk.git
   track: master
   track-tags: true
+- kind: patch
+  path: files/0001-wireplumber-fix-alsa-enumeration.patch
 config:
   options:
     target_arch: '%{arch}'
diff --git a/elements/vm/common-deps.bst b/elements/vm/common-deps.bst
index 74d4d7179..272bb96cd 100644
--- a/elements/vm/common-deps.bst
+++ b/elements/vm/common-deps.bst
@@ -7,6 +7,10 @@ depends:
 - core/systemd-presets.bst
 - sdk-platform.bst
 
+- core-deps/xdg-desktop-portal.bst
+- core-deps/xdg-desktop-portal-gnome.bst
+- core-deps/xdg-desktop-portal-gtk.bst
+
 - vm/dev-repo-script.bst
 - vm/flathub-config.bst
 - vm/gnome-nightly-config.bst
@@ -33,6 +37,9 @@ depends:
 - vm/NetworkManager-fortisslvpn.bst
 - vm/NetworkManager-vpnc.bst
 
+- core-deps/pipewire-daemon.bst
+- vm/wireplumber.bst
+
 - freedesktop-sdk.bst:vm/config/sudo.bst
 - freedesktop-sdk.bst:vm/config/useradd-ostree.bst
 - freedesktop-sdk.bst:vm/mesa-default.bst
diff --git a/elements/vm/wireplumber.bst b/elements/vm/wireplumber.bst
new file mode 100644
index 000000000..a43ef5fd0
--- /dev/null
+++ b/elements/vm/wireplumber.bst
@@ -0,0 +1,8 @@
+kind: filter
+
+build-depends:
+- freedesktop-sdk.bst:components/wireplumber.bst
+runtime-depends:
+- sdk/glib.bst
+- sdk/pygobject.bst
+- freedesktop-sdk.bst:components/systemd-libs.bst
diff --git a/files/0001-wireplumber-fix-alsa-enumeration.patch 
b/files/0001-wireplumber-fix-alsa-enumeration.patch
new file mode 100644
index 000000000..622326458
--- /dev/null
+++ b/files/0001-wireplumber-fix-alsa-enumeration.patch
@@ -0,0 +1,70 @@
+From 2ab34929a52d8cbf95d2a0650863970bc9e24e65 Mon Sep 17 00:00:00 2001
+From: Jordan Petridis <jordan centricular com>
+Date: Wed, 17 Aug 2022 13:29:21 +0300
+Subject: [PATCH] wireplumber: fix alsa enumeration
+
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/303
+---
+ elements/components/wireplumber.bst           |  2 +
+ ...637c329bc9dda8544b18f5bd47a8d63ee253.patch | 39 +++++++++++++++++++
+ 2 files changed, 41 insertions(+)
+ create mode 100644 files/wireplumber/c16e637c329bc9dda8544b18f5bd47a8d63ee253.patch
+
+diff --git a/elements/components/wireplumber.bst b/elements/components/wireplumber.bst
+index e35e7b2f4..e8230f895 100644
+--- a/elements/components/wireplumber.bst
++++ b/elements/components/wireplumber.bst
+@@ -32,3 +32,5 @@ sources:
+   directory: subprojects/cpptoml
+   track: master
+   ref: v0.1.1-0-gfededad7169e538ca47e11a9ee9251bc361a9a65
++- kind: patch
++  path: files/wireplumber/c16e637c329bc9dda8544b18f5bd47a8d63ee253.patch
+diff --git a/files/wireplumber/c16e637c329bc9dda8544b18f5bd47a8d63ee253.patch 
b/files/wireplumber/c16e637c329bc9dda8544b18f5bd47a8d63ee253.patch
+new file mode 100644
+index 000000000..b4ec56300
+--- /dev/null
++++ b/files/wireplumber/c16e637c329bc9dda8544b18f5bd47a8d63ee253.patch
+@@ -0,0 +1,39 @@
++From c16e637c329bc9dda8544b18f5bd47a8d63ee253 Mon Sep 17 00:00:00 2001
++From: George Kiagiadakis <george kiagiadakis collabora com>
++Date: Thu, 7 Jul 2022 20:58:36 +0300
++Subject: [PATCH] alsa: use "obj_type" as a variable name to avoid shadowing
++ lua's "type" function
++
++This causes a crash when running in a VM because the code tries to
++execute lua's "type()" and ends up executing the local string variable...
++
++Fixes: #303
++---
++ src/scripts/monitors/alsa.lua | 4 ++--
++ 1 file changed, 2 insertions(+), 2 deletions(-)
++
++diff --git a/src/scripts/monitors/alsa.lua b/src/scripts/monitors/alsa.lua
++index 43fab943..38f847f7 100644
++--- a/src/scripts/monitors/alsa.lua
+++++ b/src/scripts/monitors/alsa.lua
++@@ -49,7 +49,7 @@ function nonempty(str)
++   return str ~= "" and str or nil
++ end
++ 
++-function createNode(parent, id, type, factory, properties)
+++function createNode(parent, id, obj_type, factory, properties)
++   local dev_props = parent.properties
++ 
++   -- set the device id and spa factory name; REQUIRED, do not change
++@@ -199,7 +199,7 @@ function createDevice(parent, id, factory, properties)
++   end
++ end
++ 
++-function prepareDevice(parent, id, type, factory, properties)
+++function prepareDevice(parent, id, obj_type, factory, properties)
++   -- ensure the device has an appropriate name
++   local name = "alsa_card." ..
++     (properties["device.name"] or
++-- 
++GitLab
++
+-- 
+2.37.2
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]