diff options
author | Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com> | 2022-04-21 21:11:50 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-04-21 22:57:01 +0100 |
commit | 0479ba8351119cc528869546d64d7439d3bc90f2 (patch) | |
tree | 1cdf53801a29ab5e8794df32c239a140fcc34076 /media-video/wireplumber | |
parent | media-video/wireplumber: backport two minor fixes (diff) | |
download | gentoo-0479ba8351119cc528869546d64d7439d3bc90f2.tar.gz gentoo-0479ba8351119cc528869546d64d7439d3bc90f2.tar.bz2 gentoo-0479ba8351119cc528869546d64d7439d3bc90f2.zip |
media-video/wireplumber: clean up 0.4.8-r3
It so happened that WirePlumber 0.4.9 ended up being stabilized, and
it's hard to imagine what we'd still need 0.4.8 for. Therefore let's
clean it up now.
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-video/wireplumber')
6 files changed, 0 insertions, 437 deletions
diff --git a/media-video/wireplumber/Manifest b/media-video/wireplumber/Manifest index 3c57ec31c440..0a2dee8196dd 100644 --- a/media-video/wireplumber/Manifest +++ b/media-video/wireplumber/Manifest @@ -1,2 +1 @@ -DIST wireplumber-0.4.8.tar.gz 374824 BLAKE2B 7b5c8492d58be8b40c4c98bc807d031c453904a7df51c9b0d96c353c93018ba8cbd699b2c3c885defe7b5360df4256ad5e175015dc0102e5007853f6e0132cb7 SHA512 cb96b1d55be7e9d1433fc4a4fb4accce63f5f318a9a2b5cffc51a9f052765df777a0ba4ac73579771084295a73e6f05ed3a16a5fb9d0f5da4e183cfd74483c2c DIST wireplumber-0.4.9.tar.gz 376170 BLAKE2B 50f552c730ac543fc2e8b0e054c861bcd22ed281a62f2921fb956f39b917cce6eb53287dfcfc81db240476f82f5cf1d7556fa34be8bf507ff847089536b81f44 SHA512 39b9e9be014489042fe480219b99d7591e0b68dd44b889bd5c6aeee73e771adb807bc21f48d031217f097182827bd2f48b68d52291036d52e95d4fa75e7f9929 diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch b/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch deleted file mode 100644 index 364f8df195cf..000000000000 --- a/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch +++ /dev/null @@ -1,28 +0,0 @@ -https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/c4c5ca8e2215e5fc295b39af4504c43ed3fe176f - -From c4c5ca8e2215e5fc295b39af4504c43ed3fe176f Mon Sep 17 00:00:00 2001 -From: George Kiagiadakis <george.kiagiadakis@collabora.com> -Date: Mon, 14 Feb 2022 10:38:51 +0200 -Subject: [PATCH] policy-bluetooth: fix string.find crash with nil string - -Fixes #193 ---- - src/scripts/policy-bluetooth.lua | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/scripts/policy-bluetooth.lua b/src/scripts/policy-bluetooth.lua -index 24fbffbb..f8f69a14 100644 ---- a/src/scripts/policy-bluetooth.lua -+++ b/src/scripts/policy-bluetooth.lua -@@ -118,7 +118,7 @@ local function isSwitched(device) - end - - local function isBluez5AudioSink(sink_name) -- if string.find(sink_name, "bluez_output.") ~= nil then -+ if sink_name and string.find(sink_name, "bluez_output.") ~= nil then - return true - end - return false --- -GitLab - diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch b/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch deleted file mode 100644 index 5f4a838c36a6..000000000000 --- a/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch +++ /dev/null @@ -1,27 +0,0 @@ -https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/5f96f69218273573e625475846269b3914cfcecf - -From 5f96f69218273573e625475846269b3914cfcecf Mon Sep 17 00:00:00 2001 -From: George Kiagiadakis <george.kiagiadakis@collabora.com> -Date: Wed, 9 Feb 2022 13:35:13 +0200 -Subject: [PATCH] restore-stream: do not crash if config.properties is nil - -Fixes #190 ---- - src/scripts/restore-stream.lua | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/scripts/restore-stream.lua b/src/scripts/restore-stream.lua -index 404eede5..0c17bdd7 100644 ---- a/src/scripts/restore-stream.lua -+++ b/src/scripts/restore-stream.lua -@@ -10,6 +10,7 @@ - - -- Receive script arguments from config.lua - local config = ... or {} -+config.properties = config.properties or {} - config_restore_props = config.properties["restore-props"] or false - config_restore_target = config.properties["restore-target"] or false - --- -GitLab - diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-si-audio-adapter-relax-format-parsing.patch b/media-video/wireplumber/files/wireplumber-0.4.8-si-audio-adapter-relax-format-parsing.patch deleted file mode 100644 index 93225b02d88b..000000000000 --- a/media-video/wireplumber/files/wireplumber-0.4.8-si-audio-adapter-relax-format-parsing.patch +++ /dev/null @@ -1,44 +0,0 @@ -https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/afbc0ce57aac7aee8dc1651de4620f15c73dbace - -From afbc0ce57aac7aee8dc1651de4620f15c73dbace Mon Sep 17 00:00:00 2001 -From: Wim Taymans <wtaymans@redhat.com> -Date: Mon, 21 Feb 2022 15:21:36 +0100 -Subject: [PATCH] si-audio-adapter: relax format parsing - -Some nodes can omit the format/rate/channels to indicate that they can -deal with all possibilities and adapt to what they are linked to. - -See pipewire#876 ---- - modules/module-si-audio-adapter.c | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -diff --git a/modules/module-si-audio-adapter.c b/modules/module-si-audio-adapter.c -index f1f6218..84e393f 100644 ---- a/modules/module-si-audio-adapter.c -+++ b/modules/module-si-audio-adapter.c -@@ -158,19 +158,12 @@ si_audio_adapter_find_format (WpSiAudioAdapter * self, WpNode * node) - struct spa_pod *position = NULL; - wp_spa_pod_fixate (pod); - -- /* defaults */ - spa_zero(raw_format); -- raw_format.format = SPA_AUDIO_FORMAT_F32; -- raw_format.rate = si_audio_adapter_get_default_clock_rate (self); -- raw_format.channels = 2; -- raw_format.position[0] = SPA_AUDIO_CHANNEL_FL; -- raw_format.position[1] = SPA_AUDIO_CHANNEL_FR; -- - if (spa_pod_parse_object(wp_spa_pod_get_spa_pod (pod), - SPA_TYPE_OBJECT_Format, NULL, -- SPA_FORMAT_AUDIO_format, SPA_POD_Id(&raw_format.format), -+ SPA_FORMAT_AUDIO_format, SPA_POD_OPT_Id(&raw_format.format), - SPA_FORMAT_AUDIO_rate, SPA_POD_OPT_Int(&raw_format.rate), -- SPA_FORMAT_AUDIO_channels, SPA_POD_Int(&raw_format.channels), -+ SPA_FORMAT_AUDIO_channels, SPA_POD_OPT_Int(&raw_format.channels), - SPA_FORMAT_AUDIO_position, SPA_POD_OPT_Pod(&position)) < 0) - continue; - --- -2.35.1 - diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch b/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch deleted file mode 100644 index b77cfa3c3c6f..000000000000 --- a/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch +++ /dev/null @@ -1,214 +0,0 @@ -https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/e429db7e8c266045aee25e153fb2308bd61fe233 - -From e429db7e8c266045aee25e153fb2308bd61fe233 Mon Sep 17 00:00:00 2001 -From: Julian Bouzas <julian.bouzas@collabora.com> -Date: Wed, 9 Feb 2022 07:59:59 -0500 -Subject: [PATCH] spa-json: fix va_list APIs for different architectures - -The va_list type might not always be a pointer in some architectures, so we -cannot guarantee it will be modified after using it for a second time in another -function. This fixes the issue by using macros so args does not get copied, and -always gets modified when using it more than once. ---- - lib/wp/spa-json.c | 156 ++++++++++++++++++++++++---------------------- - 1 file changed, 80 insertions(+), 76 deletions(-) - -diff --git a/lib/wp/spa-json.c b/lib/wp/spa-json.c -index f14f395d..c5e59a3e 100644 ---- a/lib/wp/spa-json.c -+++ b/lib/wp/spa-json.c -@@ -363,33 +363,33 @@ wp_spa_json_new_string (const gchar *value) - wp_spa_json_builder_new_formatted ("\"%s\"", value)); - } - --static void --wp_spa_json_builder_add_value (WpSpaJsonBuilder *self, const gchar *fmt, -- va_list args) --{ -- switch (*fmt) { -- case 'n': -- wp_spa_json_builder_add_null (self); -- break; -- case 'b': -- wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean)); -- break; -- case 'i': -- wp_spa_json_builder_add_int (self, va_arg(args, gint)); -- break; -- case 'f': -- wp_spa_json_builder_add_float (self, (float)va_arg(args, double)); -- break; -- case 's': -- wp_spa_json_builder_add_string (self, va_arg(args, const gchar *)); -- break; -- case 'J': -- wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *)); -- break; -- default: -- return; -- } --} -+/* Args is not a pointer in some architectures, so this needs to be a macro to -+ * avoid args being copied */ -+#define wp_spa_json_builder_add_value(self,fmt,args) \ -+do { \ -+ switch (*fmt) { \ -+ case 'n': \ -+ wp_spa_json_builder_add_null (self); \ -+ break; \ -+ case 'b': \ -+ wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean)); \ -+ break; \ -+ case 'i': \ -+ wp_spa_json_builder_add_int (self, va_arg(args, gint)); \ -+ break; \ -+ case 'f': \ -+ wp_spa_json_builder_add_float (self, (float)va_arg(args, double)); \ -+ break; \ -+ case 's': \ -+ wp_spa_json_builder_add_string (self, va_arg(args, const gchar *)); \ -+ break; \ -+ case 'J': \ -+ wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *)); \ -+ break; \ -+ default: \ -+ break; \ -+ } \ -+} while(false) - - /*! - * \brief Creates a spa json of type array -@@ -724,48 +724,46 @@ wp_spa_json_parse_object_valist (WpSpaJson *self, va_list args) - return res; - } - --static gboolean --wp_spa_json_parse_value (const gchar *data, int len, const gchar *fmt, -- va_list args) --{ -- switch (*fmt) { -- case 'n': -- if (!spa_json_is_null (data, len)) -- return FALSE; -- break; -- case 'b': -- if (!wp_spa_json_parse_boolean_internal (data, len, -- va_arg(args, gboolean *))) -- return FALSE; -- break; -- case 'i': -- if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0) -- return FALSE; -- break; -- case 'f': -- if (spa_json_parse_float (data, len, -- (float *)va_arg(args, double *)) < 0) -- return FALSE; -- break; -- case 's': { -- gchar *str = wp_spa_json_parse_string_internal (data, len); -- if (!str) -- return FALSE; -- *va_arg(args, gchar **) = str; -- break; -- } -- case 'J': { -- WpSpaJson *j = wp_spa_json_new (data, len); -- if (!j) -- return FALSE; -- *va_arg(args, WpSpaJson **) = j; -- break; -- } -- default: -- return FALSE; -- } -- return TRUE; --} -+/* Args is not a pointer in some architectures, so this needs to be a macro to -+ * avoid args being copied */ -+#define wp_spa_json_parse_value(data,len,fmt,args) \ -+do { \ -+ switch (*fmt) { \ -+ case 'n': \ -+ if (!spa_json_is_null (data, len)) \ -+ return FALSE; \ -+ break; \ -+ case 'b': \ -+ if (!wp_spa_json_parse_boolean_internal (data, len, \ -+ va_arg(args, gboolean *))) \ -+ return FALSE; \ -+ break; \ -+ case 'i': \ -+ if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0) \ -+ return FALSE; \ -+ break; \ -+ case 'f': \ -+ if (spa_json_parse_float (data, len, va_arg(args, float *)) < 0) \ -+ return FALSE; \ -+ break; \ -+ case 's': { \ -+ gchar *str = wp_spa_json_parse_string_internal (data, len); \ -+ if (!str) \ -+ return FALSE; \ -+ *va_arg(args, gchar **) = str; \ -+ break; \ -+ } \ -+ case 'J': { \ -+ WpSpaJson *j = wp_spa_json_new (data, len); \ -+ if (!j) \ -+ return FALSE; \ -+ *va_arg(args, WpSpaJson **) = j; \ -+ break; \ -+ } \ -+ default: \ -+ return FALSE; \ -+ } \ -+} while(false) - - /*! - * \brief Parses the object property values of a spa json object -@@ -827,8 +825,7 @@ wp_spa_json_object_get_valist (WpSpaJson *self, va_list args) - value = g_value_get_boxed (&item); - - if (g_strcmp0 (key_str, lookup_key) == 0) { -- if (!wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args)) -- return FALSE; -+ wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args); - lookup_key = va_arg(args, const gchar *); - if (!lookup_key) - return TRUE; -@@ -1366,9 +1363,12 @@ gboolean - wp_spa_json_parser_get_value (WpSpaJsonParser *self, const gchar *fmt, - va_list args) - { -- return wp_spa_json_parser_advance (self) && -- wp_spa_json_parse_value (self->curr.cur, -- self->curr.end - self->curr.cur, fmt, args); -+ if (wp_spa_json_parser_advance (self)) { -+ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur, -+ fmt, args); -+ return TRUE; -+ } -+ return FALSE; - } - - /*! -@@ -1419,9 +1419,13 @@ wp_spa_json_parser_get_valist (WpSpaJsonParser *self, va_list args) - if (!format) - return TRUE; - -- /* parse value */ -- if (!wp_spa_json_parser_get_value (self, format, args)) -+ /* advance */ -+ if (!wp_spa_json_parser_advance (self)) - return FALSE; -+ -+ /* parse value */ -+ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur, -+ format, args); - } while (TRUE); - - return FALSE; --- -GitLab - diff --git a/media-video/wireplumber/wireplumber-0.4.8-r3.ebuild b/media-video/wireplumber/wireplumber-0.4.8-r3.ebuild deleted file mode 100644 index 5bd6d87c04e8..000000000000 --- a/media-video/wireplumber/wireplumber-0.4.8-r3.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LUA_COMPAT=( lua5-{3,4} ) - -inherit lua-single meson systemd - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git" - EGIT_BRANCH="master" - inherit git-r3 -else - SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" -fi - -DESCRIPTION="Replacement for pipewire-media-session" -HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber" - -LICENSE="MIT" -SLOT="0/0.4" -IUSE="elogind system-service systemd test" - -REQUIRED_USE=" - ${LUA_REQUIRED_USE} - ?? ( elogind systemd ) - system-service? ( systemd ) -" - -RESTRICT="!test? ( test )" - -# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building -BDEPEND=" - dev-libs/glib - dev-util/gdbus-codegen - dev-util/glib-utils -" - -DEPEND=" - ${LUA_DEPS} - >=dev-libs/glib-2.62 - >=media-video/pipewire-0.3.45:= - virtual/libc - elogind? ( sys-auth/elogind ) - systemd? ( sys-apps/systemd ) -" - -# Any dev-lua/* deps get declared like this inside RDEPEND: -# $(lua_gen_cond_dep ' -# dev-lua/<NAME>[${LUA_USEDEP}] -# ') -RDEPEND="${DEPEND} - system-service? ( - acct-user/pipewire - acct-group/pipewire - ) -" - -DOCS=( {NEWS,README}.rst ) - -PATCHES=( - "${FILESDIR}"/${P}-restore-stream-do-not-crash-if-config.properties-is-.patch - "${FILESDIR}"/${P}-spa-json-fix-va-list-APIs-for-different-architecture.patch - "${FILESDIR}"/${P}-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch - "${FILESDIR}"/${P}-si-audio-adapter-relax-format-parsing.patch -) - -src_configure() { - local emesonargs=( - -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?) - -Dintrospection=disabled # Only used for Sphinx doc generation - -Dsystem-lua=true # We always unbundle everything we can - -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version)) - $(meson_feature elogind) - $(meson_feature systemd) - $(meson_use system-service systemd-system-service) - $(meson_use systemd systemd-user-service) - -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir) - -Dsystemd-user-unit-dir=$(systemd_get_userunitdir) - $(meson_use test tests) - ) - - meson_src_configure -} - -src_install() { - meson_src_install - - # We copy the default config, so that Gentoo tools can pick up on any - # updates and /etc does not end up with stale overrides. - # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files - # will not actually get stored twice until modified. - insinto /etc - doins -r ${ED}/usr/share/wireplumber -} - -pkg_postinst() { - if systemd_is_booted ; then - ewarn "pipewire-media-session.service is no longer installed. You must switch" - ewarn "to wireplumber.service user unit before your next logout/reboot:" - ewarn "systemctl --user disable pipewire-media-session.service" - ewarn "systemctl --user --force enable wireplumber.service" - else - ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher" - ewarn "is started (a replacement for directly calling pipewire binary)." - ewarn - ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist" - ewarn "or, if it does exist, that any reference to" - ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)." - fi - if use system-service; then - ewarn - ewarn "WARNING: you have enabled the system-service USE flag, which installs" - ewarn "the system-wide systemd units that enable WirePlumber to run as a system" - ewarn "service. This is more than likely NOT what you want. You are strongly" - ewarn "advised not to enable this mode and instead stick with systemd user" - ewarn "units. The default configuration files will likely not work out of" - ewarn "box, and you are on your own with configuration." - ewarn - fi -} |