package/pipewire-media-session: new package

The pipewire-media-session has been moved into a separate package
which pipewire attempts to download via meson wraps if
session-managers are enabled, since we don't support meson wraps
we need to disable session-managers in the pipewire package and
create a new pipewire-media-session package.

We also need to add a patch removing an invalid session-managers
option check from pipewire-media-session.

There is an alsa with-module-sets option in pipewire-media-session,
however at the moment alsa is an unconditional dependency so
we need to always enable it and select alsa-lib.

Note: it was previously an option of the pipewire package, named
media-session, so the symbol was BR2_PACKAGE_PIPEWIRE_MEDIA_SESSION.
Now it is a package name pipewire-media-session, so the symbol is still
BR2_PACKAGE_PIPEWIRE_MEDIA_SESSION. So there is no legacy entry needed,
and users previously using that option will now get the package. Sneaky.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[yann.morin.1998@free.fr:
  - extend commit log with legacy handling
  - first unconditional CONF_OPTS uses =, not +=; fits on one line
  - slight reorder in variables assignments
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
James Hilliard 2021-11-10 09:44:28 -07:00 committed by Yann E. MORIN
parent a3c1ba68f4
commit 51f30f47cd
7 changed files with 101 additions and 13 deletions

View File

@ -1539,6 +1539,7 @@ menu "Graphics"
source "package/pango/Config.in"
source "package/pangomm/Config.in"
source "package/pipewire/Config.in"
source "package/pipewire-media-session/Config.in"
source "package/pixman/Config.in"
source "package/poppler/Config.in"
source "package/powervr/Config.in"

View File

@ -0,0 +1,36 @@
From 1923c97fbd0b3d8cacdb72386886f860c818bccf Mon Sep 17 00:00:00 2001
From: James Hilliard <james.hilliard1@gmail.com>
Date: Wed, 10 Nov 2021 08:54:06 -0700
Subject: [PATCH] meson: remove session-managers option check.
This option no longer exists and causes a build failure if building
with the systemd system service enabled.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[Upstream status:
https://gitlab.freedesktop.org/pipewire/media-session/-/merge_requests/24]
---
systemd/system/meson.build | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/systemd/system/meson.build b/systemd/system/meson.build
index ab0d49064..0e9885b0f 100644
--- a/systemd/system/meson.build
+++ b/systemd/system/meson.build
@@ -4,9 +4,7 @@ systemd_system_services_dir = systemd.get_variable(pkgconfig: 'systemdsystemunit
systemd_config = configuration_data()
systemd_config.set('PW_MEDIA_SESSION_BINARY', media_session_bindir / 'pipewire-media-session')
-if get_option('session-managers').contains('media-session')
- configure_file(input : 'pipewire-media-session.service.in',
- output : 'pipewire-media-session.service',
- configuration : systemd_config,
- install_dir : systemd_system_services_dir)
-endif
+configure_file(input : 'pipewire-media-session.service.in',
+ output : 'pipewire-media-session.service',
+ configuration : systemd_config,
+ install_dir : systemd_system_services_dir)
--
2.25.1

View File

@ -0,0 +1,9 @@
config BR2_PACKAGE_PIPEWIRE_MEDIA_SESSION
bool "pipewire media-session"
depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib, dbus
depends on BR2_USE_MMU # dbus
depends on BR2_PACKAGE_PIPEWIRE
select BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_DBUS
help
Build pipewire media-session support

View File

@ -0,0 +1,4 @@
# Locally calculated
sha256 ebdf9f8e389896fdc4b58da5f909afce18441b4b53d5b4f2104dd53586ea8681 media-session-0.4.1.tar.bz2
sha256 8909c319a7e27dbb33a15b9035f89ab3b7b2f6a12f8bcddc755206a8db1ada44 COPYING
sha256 77b9c867237ef919e33c0fdbcf22ab84b1cf24a63f9431ec68759026b658c994 LICENSE

View File

@ -0,0 +1,49 @@
################################################################################
#
# pipewire-media-session
#
################################################################################
PIPEWIRE_MEDIA_SESSION_VERSION = 0.4.1
PIPEWIRE_MEDIA_SESSION_SOURCE = media-session-$(PIPEWIRE_MEDIA_SESSION_VERSION).tar.bz2
PIPEWIRE_MEDIA_SESSION_SITE = https://gitlab.freedesktop.org/pipewire/media-session/-/archive/$(PIPEWIRE_MEDIA_SESSION_VERSION)
PIPEWIRE_MEDIA_SESSION_LICENSE = MIT
PIPEWIRE_MEDIA_SESSION_LICENSE_FILES = COPYING LICENSE
PIPEWIRE_MEDIA_SESSION_INSTALL_STAGING = YES
PIPEWIRE_MEDIA_SESSION_DEPENDENCIES = \
host-pkgconf \
alsa-lib \
dbus \
pipewire \
$(TARGET_NLS_DEPENDENCIES)
PIPEWIRE_MEDIA_SESSION_CONF_OPTS = -Ddocs=disabled -Dtests=disabled
PIPEWIRE_MEDIA_SESSION_MODULE_SETS_LIST = alsa
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
PIPEWIRE_MEDIA_SESSION_DEPENDENCIES += systemd
PIPEWIRE_MEDIA_SESSION_CONF_OPTS += \
-Dsystemd=enabled \
-Dsystemd-system-service=enabled \
-Dsystemd-user-service=enabled
else
PIPEWIRE_MEDIA_SESSION_CONF_OPTS += \
-Dsystemd=disabled \
-Dsystemd-system-service=disabled \
-Dsystemd-user-service=disabled
endif
ifeq ($(BR2_PACKAGE_JACK2),y)
PIPEWIRE_MEDIA_SESSION_DEPENDENCIES += jack2
PIPEWIRE_MEDIA_SESSION_MODULE_SETS_LIST += jack
endif
ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
PIPEWIRE_MEDIA_SESSION_DEPENDENCIES += pulseaudio
PIPEWIRE_MEDIA_SESSION_MODULE_SETS_LIST += pulseaudio
endif
PIPEWIRE_MEDIA_SESSION_CONF_OPTS += -Dwith-module-sets='$(subst $(space),$(comma),$(PIPEWIRE_MEDIA_SESSION_MODULE_SETS_LIST))'
$(eval $(meson-package))

View File

@ -18,12 +18,6 @@ config BR2_PACKAGE_PIPEWIRE_EXAMPLES
help
Build pipewire examples
config BR2_PACKAGE_PIPEWIRE_MEDIA_SESSION
bool "pipewire media-session"
depends on BR2_PACKAGE_PIPEWIRE_EXAMPLES
help
Build pipewire media-session support
config BR2_PACKAGE_PIPEWIRE_GSTREAMER
bool "pipewire gstreamer plugins"
depends on BR2_USE_WCHAR # libglib2

View File

@ -26,7 +26,8 @@ PIPEWIRE_CONF_OPTS += \
-Dtest=disabled \
-Dvideoconvert=enabled \
-Dvideotestsrc=enabled \
-Dvolume=enabled
-Dvolume=enabled \
-Dsession-managers=[]
ifeq ($(BR2_PACKAGE_DBUS),y)
PIPEWIRE_CONF_OPTS += -Ddbus=enabled
@ -171,12 +172,6 @@ else
PIPEWIRE_CONF_OPTS += -Decho-cancel-webrtc=disabled
endif
ifeq ($(BR2_PACKAGE_PIPEWIRE_MEDIA_SESSION),y)
PIPEWIRE_SESSION_MANAGERS_LIST = media-session
endif
PIPEWIRE_CONF_OPTS += -Dsession-managers='$(subst $(space),$(comma),$(PIPEWIRE_SESSION_MANAGERS_LIST))'
define PIPEWIRE_USERS
pipewire -1 pipewire -1 * - - audio,video PipeWire System Daemon
endef