mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/2] media-session: new package
Date: Thu, 25 Nov 2021 17:11:12 +0100	[thread overview]
Message-ID: <YZ+1oIhnsOF6bLcB@pengutronix.de> (raw)
In-Reply-To: <20211122133355.1685566-2-p.zabel@pengutronix.de>

On Mon, Nov 22, 2021 at 02:33:55PM +0100, Philipp Zabel wrote:
> Starting from PipeWire 0.3.39, pipewire-media-session was split out into
> its own standalone package. Include a backported patch to fix build with
> systemd system service enabled.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>  ...remove-session-managers-option-check.patch |  32 +++++
>  patches/media-session-0.4.1/series            |   1 +
>  rules/media-session.in                        |  38 ++++++
>  rules/media-session.make                      | 126 ++++++++++++++++++
>  4 files changed, 197 insertions(+)
>  create mode 100644 patches/media-session-0.4.1/0001-meson-remove-session-managers-option-check.patch
>  create mode 100644 patches/media-session-0.4.1/series
>  create mode 100644 rules/media-session.in
>  create mode 100644 rules/media-session.make
> 
> diff --git a/patches/media-session-0.4.1/0001-meson-remove-session-managers-option-check.patch b/patches/media-session-0.4.1/0001-meson-remove-session-managers-option-check.patch
> new file mode 100644
> index 000000000000..7def21649b0f
> --- /dev/null
> +++ b/patches/media-session-0.4.1/0001-meson-remove-session-managers-option-check.patch
> @@ -0,0 +1,32 @@
> +From dfa740175c83e1cd0d815ad423f90872de566437 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.
> +---
> + 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 ab0d49064986..0e9885b0f39f 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.30.2
> +
> diff --git a/patches/media-session-0.4.1/series b/patches/media-session-0.4.1/series
> new file mode 100644
> index 000000000000..fef1ad945fb8
> --- /dev/null
> +++ b/patches/media-session-0.4.1/series
> @@ -0,0 +1 @@
> +0001-meson-remove-session-managers-option-check.patch
> diff --git a/rules/media-session.in b/rules/media-session.in
> new file mode 100644
> index 000000000000..24a9012dec8c
> --- /dev/null
> +++ b/rules/media-session.in
> @@ -0,0 +1,38 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig MEDIA_SESSION
> +	tristate
> +	select HOST_MESON
> +	select DBUS
> +	select ALSA_LIB
> +	select ALSA_LIB_PCM
> +	select ALSA_LIB_UCM
> +	select ALSA_LIB_SEQ
> +	select PIPEWIRE
> +	select PIPEWIRE_SYSTEMD_UNIT		if MEDIA_SESSION_SYSTEMD_UNIT
> +	select PIPEWIRE_SYSTEMD_UNIT_USER	if MEDIA_SESSION_SYSTEMD_UNIT_USER
> +	select SYSTEMD				if MEDIA_SESSION_SYSTEMD
> +	prompt "media-session                 "
> +	help
> +	  Example session manager for PipeWire
> +
> +if MEDIA_SESSION
> +
> +config MEDIA_SESSION_SYSTEMD
> +	bool
> +
> +config MEDIA_SESSION_SYSTEMD_UNIT
> +	bool
> +	default y
> +	depends on INITMETHOD_SYSTEMD
> +	select MEDIA_SESSION_SYSTEMD
> +	prompt "install systemd system unit file for media-session"
> +
> +config MEDIA_SESSION_SYSTEMD_UNIT_USER
> +	bool
> +	default y
> +	depends on INITMETHOD_SYSTEMD

		&& SYSTEMD_UNITS_USER

> +	select MEDIA_SESSION_SYSTEMD
> +	prompt "install systemd user unit file for media-session"
> +
> +endif
> diff --git a/rules/media-session.make b/rules/media-session.make
> new file mode 100644
> index 000000000000..2fac07834e25
> --- /dev/null
> +++ b/rules/media-session.make
> @@ -0,0 +1,126 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2021 by Philipp Zabel <p.zabel@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_MEDIA_SESSION) += media-session
> +
> +#
> +# Paths and names
> +#
> +MEDIA_SESSION_VERSION	:= 0.4.1
> +MEDIA_SESSION_MD5	:= 5f6d9e82330c8102f97b099f5269286f
> +MEDIA_SESSION		:= media-session-$(MEDIA_SESSION_VERSION)
> +MEDIA_SESSION_SUFFIX	:= tar.bz2
> +MEDIA_SESSION_URL	:= \
> +	https://gitlab.freedesktop.org/pipewire/media-session/-/archive/$(MEDIA_SESSION_VERSION)/$(MEDIA_SESSION).$(MEDIA_SESSION_SUFFIX)
> +MEDIA_SESSION_SOURCE	:= $(SRCDIR)/$(MEDIA_SESSION).$(MEDIA_SESSION_SUFFIX)
> +MEDIA_SESSION_DIR	:= $(BUILDDIR)/$(MEDIA_SESSION)
> +MEDIA_SESSION_LICENSE	:= MIT AND LGPL-2.1-or-later AND GPL-2.0-only
> +MEDIA_SESSION_LICENSE_FILES := \
> +	file://LICENSE;md5=647cfa0f759d97b208bfb5c1eb912071 \
> +	file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +MEDIA_SESSION_CONF_ENV := \
> +	PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT=systemdsystemunitdir
> +
> +#
> +# meson
> +#
> +MEDIA_SESSION_CONF_TOOL	:= meson
> +MEDIA_SESSION_CONF_OPT	:= \
> +	$(CROSS_MESON_USR) \
> +	-Ddocdir= \
> +	-Ddocs=disabled \
> +	-Dinstalled_tests=disabled \
> +	-Dsystemd-system-service=$(call ptx/endis,PTXCONF_MEDIA_SESSION_SYSTEMD_UNIT)d \
> +	-Dsystemd-user-service=$(call ptx/endis,PTXCONF_MEDIA_SESSION_SYSTEMD_UNIT_USER)d \
> +	-Dsystemd-user-unit-dir= \
> +	-Dsystemd=$(call ptx/endis,PTXCONF_MEDIA_SESSION_SYSTEMD)d \
> +	-Dtests=disabled \
> +	-Dwith-module-sets=
> +
> +MEDIA_SESSION_CPPFLAGS = -isystem $(KERNEL_HEADERS_INCLUDE_DIR)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +MEDIA_SESSION_MODULES := \

unused?

> +	access \
> +	adapter \
> +	client-device \
> +	client-node \
> +	echo-cancel \
> +	filter-chain \
> +	link-factory \
> +	loopback \
> +	metadata \
> +	portal \
> +	profiler \
> +	protocol-native \
> +	protocol-pulse \
> +	rt \
> +	rtkit \
> +	session-manager \
> +	spa-device \
> +	spa-device-factory \
> +	spa-node \
> +	spa-node-factory
> +
> +MEDIA_SESSION_SPA_MODULES := \

unused?

> +	alsa/libspa-alsa \
> +	audiomixer/libspa-audiomixer \
> +	audiotestsrc/libspa-audiotestsrc \
> +	control/libspa-control \
> +	support/libspa-dbus \
> +	$(call ptx/ifdef,PTXCONF_MEDIA_SESSION_SYSTEMD,support/libspa-journal) \
> +	support/libspa-support \
> +	v4l2/libspa-v4l2 \
> +	videotestsrc/libspa-videotestsrc \
> +	volume/libspa-volume
> +
> +$(STATEDIR)/media-session.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, media-session)
> +	@$(call install_fixup, media-session,PRIORITY,optional)
> +	@$(call install_fixup, media-session,SECTION,base)
> +	@$(call install_fixup, media-session,AUTHOR,"Philipp Zabel <p.zabel@pengutronix.de>")
> +	@$(call install_fixup, media-session,DESCRIPTION,missing)
> +
> +	@$(call install_copy, media-session, 0, 0, 755, -, /usr/bin/pipewire-media-session)
> +
> +ifdef PTXCONF_MEDIA_SESSION_SYSTEMD_UNIT
> +	@$(call install_alternative, media-session, 0, 0, 0644, \
> +		/usr/lib/systemd/system/pipewire-media-session.service)
> +	@$(call install_link, media-session, ../pipewire-media-session.service, \
> +		/usr/lib/systemd/system/pipewire.service.wants/pipewire-media-session.service)
> +endif
> +ifdef PTXCONF_MEDIA_SESSION_SYSTEMD_UNIT_USER
> +	@$(call install_alternative, media-session, 0, 0, 0644, \
> +		/usr/lib/systemd/user/pipewire-media-session.service)
> +	@$(call install_link, media-session, ../pipewire-media-session.service, \
> +		/usr/lib/systemd/user/pipewire.service.wants/pipewire-media-session.service)
> +endif
> +
> +	@$(call install_copy, media-session, 0, 0, 644, -, /usr/share/pipewire/media-session.d/alsa-monitor.conf)
> +	@$(call install_copy, media-session, 0, 0, 644, -, /usr/share/pipewire/media-session.d/bluez-monitor.conf)
> +	@$(call install_copy, media-session, 0, 0, 644, -, /usr/share/pipewire/media-session.d/media-session.conf)
> +	@$(call install_copy, media-session, 0, 0, 644, -, /usr/share/pipewire/media-session.d/v4l2-monitor.conf)

break the lines.

Michael

> +
> +	@$(call install_finish, media-session)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  reply	other threads:[~2021-11-25 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 13:33 [ptxdist] [PATCH 1/2] pipewire: version bump 0.3.37 -> 0.3.40 Philipp Zabel
2021-11-22 13:33 ` [ptxdist] [PATCH 2/2] media-session: new package Philipp Zabel
2021-11-25 16:11   ` Michael Olbrich [this message]
2021-11-26  9:36     ` Philipp Zabel
2021-11-26 14:27       ` Michael Olbrich
2021-11-25 15:57 ` [ptxdist] [PATCH 1/2] pipewire: version bump 0.3.37 -> 0.3.40 Michael Olbrich
2021-11-26  9:38   ` Philipp Zabel
2021-11-26 14:29     ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YZ+1oIhnsOF6bLcB@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=p.zabel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox