[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2024-07-01 Thread Sam James
commit: a7ff87b07c894cdfce5c6b041d4aff5dd353b889
Author: Eli Schwartz  gmail  com>
AuthorDate: Sun Jun 30 15:30:06 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jul  1 08:19:12 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7ff87b0

media-video/pipewire: backport patch to fix automagic webrtc dependency

 * VDB: detected possibly incorrect RDEPEND (media-video/pipewire-1.0.7)
 *  > media-libs/libpulse
 *  > media-libs/webrtc-audio-processing

The build system was simply ignoring the option which controlled this.

Closes: https://bugs.gentoo.org/933218
Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 ...e-1.0.7-automagic-webrtc-audio-processing.patch | 95 ++
 media-video/pipewire/pipewire-1.0.7.ebuild |  3 +
 2 files changed, 98 insertions(+)

diff --git 
a/media-video/pipewire/files/pipewire-1.0.7-automagic-webrtc-audio-processing.patch
 
b/media-video/pipewire/files/pipewire-1.0.7-automagic-webrtc-audio-processing.patch
new file mode 100644
index ..ac245dd7cc15
--- /dev/null
+++ 
b/media-video/pipewire/files/pipewire-1.0.7-automagic-webrtc-audio-processing.patch
@@ -0,0 +1,95 @@
+From acd5bf60b9d4a35d00c90bfdca7f89e4ff4a4ff7 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz 
+Date: Thu, 30 May 2024 19:44:38 -0400
+Subject: [PATCH] meson: fix webrtc-audio-processing dependency ignoring
+ configure args
+
+Most dependencies use meson "feature" options for optional
+functionality. This allows people to disable them, if they don't want
+them, through the power of tristate decision-making.
+
+This particular dependency does something a bit more complicated than
+can be described by simply passing feature options to the required
+kwarg. It:
+
+- tries to look for two different names of the dependency
+- selects different version ranges, depending on the dependency name
+- has a hole in the middle of the versions
+
+Unfortunately, `required: false` for the first dependency isn't
+equivalent to a tristate decision-making process. We have to manually
+code the logic ourselves.
+
+The problem is that when we look up the first name, we cannot pass the
+feature option in because if the option is force enabled, then the
+dependency lookup fails and configuration never tries to find the older
+version instead.
+
+But also, we can't just say it *isn't* required, because if the option
+is force *disabled* but it is installed on the system, we still find it
+and build against it.
+
+One solution would be using meson 0.60's support for multiple dependency
+names:
+
+```
+dependency('webrtc-audio-processing-1', 'webrtc-audio-processing',
+version : ['>= 0.2'],
+required: get_option('echo-cancel-webrtc'),
+)
+```
+
+Unfortunately, this too doesn't work since we could end up detecting 1.1
+(the hole in the middle) which is invalid.
+
+Instead, we do a bit of checking for tristate values before deciding to
+invoke `dependency()`. This lets us guarantee that disabled dependencies
+are well and truly disabled.
+
+Bug: https://bugs.gentoo.org/933218
+Fixes: #3678
+---
+ meson.build | 25 +++--
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index cda60112f..72d275086 100644
+--- a/meson.build
 b/meson.build
+@@ -393,18 +393,23 @@ cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', 
get_option('gstreamer-device-provide
+ summary({'gstreamer DMA_DRM support': gst_dma_drm_found}, bool_yn: true, 
section: 'Backend')
+ cdata.set('HAVE_GSTREAMER_DMA_DRM', gst_dma_drm_found)
+ 
+-webrtc_dep = dependency('webrtc-audio-processing-1',
+-  version : ['>= 1.2' ],
+-  required : false)
+-cdata.set('HAVE_WEBRTC1', webrtc_dep.found())
+-if webrtc_dep.found()
++if get_option('echo-cancel-webrtc').disabled()
++  webrtc_dep = dependency('', required: false)
+   summary({'WebRTC Echo Canceling >= 1.2': webrtc_dep.found()}, bool_yn: 
true, section: 'Misc dependencies')
+ else
+-  webrtc_dep = dependency('webrtc-audio-processing',
+-version : ['>= 0.2', '< 1.0'],
+-required : get_option('echo-cancel-webrtc'))
+-  cdata.set('HAVE_WEBRTC', webrtc_dep.found())
+-  summary({'WebRTC Echo Canceling < 1.0': webrtc_dep.found()}, bool_yn: true, 
section: 'Misc dependencies')
++  webrtc_dep = dependency('webrtc-audio-processing-1',
++version : ['>= 1.2' ],
++required : false)
++  cdata.set('HAVE_WEBRTC1', webrtc_dep.found())
++  if webrtc_dep.found()
++summary({'WebRTC Echo Canceling >= 1.2': webrtc_dep.found()}, bool_yn: 
true, section: 'Misc dependencies')
++  else
++webrtc_dep = dependency('webrtc-audio-processing',
++  version : ['>= 0.2', '< 1.0'],
++  required : get_option('echo-cancel-webrtc'))
++cdata.set('HAVE_WEBRTC', webrtc_dep.found())
++summary({'WebRTC Echo Canceling < 1.0': webrtc_dep.found()}, bool_yn: 
true, section: 'Misc dependencies')
++  endif
+ endif
+ 
+ # On FreeBSD and 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2024-03-18 Thread Sam James
commit: bdd56b3bcecf86106aaf77a79b3d369ea6d45f9a
Author: Igor V. Kovalenko  gmail  com>
AuthorDate: Sat Feb  3 06:42:44 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Mar 19 05:47:57 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdd56b3b

media-video/pipewire: Add another sound-server part for updated wireplumber 
conf syntax

Bug: https://bugs.gentoo.org/921393
Signed-off-by: Igor V. Kovalenko  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35155
Signed-off-by: Sam James  gentoo.org>

 .../pipewire/files/gentoo-sound-server-enable-audio-bluetooth.conf  | 6 ++
 media-video/pipewire/pipewire-1.0.4.ebuild  | 6 ++
 media-video/pipewire/pipewire-.ebuild   | 6 ++
 3 files changed, 18 insertions(+)

diff --git 
a/media-video/pipewire/files/gentoo-sound-server-enable-audio-bluetooth.conf 
b/media-video/pipewire/files/gentoo-sound-server-enable-audio-bluetooth.conf
new file mode 100644
index ..c5b4f8036b54
--- /dev/null
+++ b/media-video/pipewire/files/gentoo-sound-server-enable-audio-bluetooth.conf
@@ -0,0 +1,6 @@
+wireplumber.profiles = {
+  main = {
+hardware.audio = required
+hardware.bluetooth = required
+  }
+}

diff --git a/media-video/pipewire/pipewire-1.0.4.ebuild 
b/media-video/pipewire/pipewire-1.0.4.ebuild
index 1bdcaea902f0..88312367a689 100644
--- a/media-video/pipewire/pipewire-1.0.4.ebuild
+++ b/media-video/pipewire/pipewire-1.0.4.ebuild
@@ -313,11 +313,17 @@ multilib_src_install_all() {
 
# Enable required wireplumber alsa and bluez monitors
if use sound-server; then
+   # Install sound-server enabler, alsa part, wireplumber 0.4.15 
syntax, clean this up with wireplumber dep bump
dodir /etc/wireplumber/main.lua.d
echo "alsa_monitor.enabled = true" > 
"${ED}"/etc/wireplumber/main.lua.d/89-gentoo-sound-server-enable-alsa-monitor.lua
 || die
 
+   # Install sound-server enabler, bluetooth part, wireplumber 
0.4.15 syntax, clean this up with wireplumber dep bump
dodir /etc/wireplumber/bluetooth.lua.d
echo "bluez_monitor.enabled = true" > 
"${ED}"/etc/wireplumber/bluetooth.lua.d/89-gentoo-sound-server-enable-bluez-monitor.lua
 || die
+
+   # Install sound-server enabler for wireplumber 0.4.81+ conf 
syntax
+   insinto /etc/pipewire/wireplumber.conf.d
+   doins 
"${FILESDIR}"/gentoo-sound-server-enable-audio-bluetooth.conf
fi
 
if use system-service; then

diff --git a/media-video/pipewire/pipewire-.ebuild 
b/media-video/pipewire/pipewire-.ebuild
index 1faa8aec874a..b792e5bf1639 100644
--- a/media-video/pipewire/pipewire-.ebuild
+++ b/media-video/pipewire/pipewire-.ebuild
@@ -313,11 +313,17 @@ multilib_src_install_all() {
 
# Enable required wireplumber alsa and bluez monitors
if use sound-server; then
+   # Install sound-server enabler, alsa part, wireplumber 0.4.15 
syntax, clean this up with wireplumber dep bump
dodir /etc/wireplumber/main.lua.d
echo "alsa_monitor.enabled = true" > 
"${ED}"/etc/wireplumber/main.lua.d/89-gentoo-sound-server-enable-alsa-monitor.lua
 || die
 
+   # Install sound-server enabler, bluetooth part, wireplumber 
0.4.15 syntax, clean this up with wireplumber dep bump
dodir /etc/wireplumber/bluetooth.lua.d
echo "bluez_monitor.enabled = true" > 
"${ED}"/etc/wireplumber/bluetooth.lua.d/89-gentoo-sound-server-enable-bluez-monitor.lua
 || die
+
+   # Install sound-server enabler for wireplumber 0.4.81+ conf 
syntax
+   insinto /etc/pipewire/wireplumber.conf.d
+   doins 
"${FILESDIR}"/gentoo-sound-server-enable-audio-bluetooth.conf
fi
 
if use system-service; then



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.80/

2024-02-01 Thread Sam James
commit: dc07fcf7d05ac3ff5abf9888e9ad5976383ab6a2
Author: Sam James  gentoo  org>
AuthorDate: Fri Feb  2 03:46:53 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Feb  2 03:46:53 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc07fcf7

media-video/pipewire: drop 0.3.80

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   1 -
 .../0001-aes-support-both-webrtc-versions.patch| 233 --
 media-video/pipewire/pipewire-0.3.80.ebuild| 475 -
 3 files changed, 709 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 61baf2e7e19b..098787e061b1 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,4 +1,3 @@
-DIST pipewire-0.3.80.tar.bz2 1655137 BLAKE2B 
cf55e01b6fff29e7ef1f40e9a8f28788b9f538380232821b334359844b33b12b913375ae14e4589d7ae9cd26d22bc841d8103d41c7eb3ea1a9f0c1db1abc6507
 SHA512 
77e26b6cbefc091ea703b53d147accbd9495f97ba57618a21366b0747074de3ed1060c03e91362f5cf9dc5c256da6d541eccaff8de306b369730400c7b7f46b2
 DIST pipewire-1.0.0-docs.tar.xz 33632 BLAKE2B 
be06aa7242f7d2f8627b3bf2a2ae491dbda456a24811a767218eb89b1fd5961a461697e5d8ae2782323fdb927985fa4fd5dd40c21268b1c7939f4cd3c9e1a9ab
 SHA512 
14f794c4152d7d9a4a7d9d4d5c2ff381c2a8262deaff034f993c4d28629fca8cc3d71d3a7c02982703e449fae5f58257fea0c20db02bf95b5aed88a4d99d2c58
 DIST pipewire-1.0.0.tar.bz2 1682155 BLAKE2B 
de48de0f486a530ee060acdc6d35e27bf298e195e2c3d21a9444da7459ef02b44d97147b3bd3a820bdf28ebffbee910f77306a28ffb1b12eeaf8ce37f8d97a6f
 SHA512 
8955bd16ba8508d5838e960ae8c089efaeb9dab0c08719baea8f8f8047cd53b84a46b2459ecd7f000f21b0025a52e93f052025e71c07dc4a2aef89237c5c87f1
 DIST pipewire-1.0.1.tar.bz2 1681917 BLAKE2B 
8d0aacf55e6adf9aee4e5fcb5995939db3f901bfe2b9c43d5690df58a2186c4790b89e53c358a532a95627022ef5ff9b4b97a99acea562d3ceda68ee88dd8bb7
 SHA512 
434ff80ca99aa68553b6b404cb756c3bf11231654f9dde0d4a971dd0876489468df45be9275794746682c73bb03c51e1112e6d9b8aafe12468a4c5b0be16ac4d

diff --git 
a/media-video/pipewire/files/0.3.80/0001-aes-support-both-webrtc-versions.patch 
b/media-video/pipewire/files/0.3.80/0001-aes-support-both-webrtc-versions.patch
deleted file mode 100644
index f2afdde4f4be..
--- 
a/media-video/pipewire/files/0.3.80/0001-aes-support-both-webrtc-versions.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-https://bugs.gentoo.org/913693
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/1f1c308c9766312e684f0b53fc2d1422c7414d31
-
-From 1f1c308c9766312e684f0b53fc2d1422c7414d31 Mon Sep 17 00:00:00 2001
-From: Wim Taymans 
-Date: Thu, 14 Sep 2023 15:35:40 +0200
-Subject: [PATCH] aec: support both webrtc versions
-
-Version 1 does not seem to be packaged in many distros and so they would
-need to revert the patch or disable AEC. Enabling both allows for things
-to move forwards gracefully.
 a/meson.build
-+++ b/meson.build
-@@ -377,9 +377,17 @@ cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', 
get_option('gstreamer-device-provide
- 
- webrtc_dep = dependency('webrtc-audio-processing-1',
-   version : ['>= 1.2' ],
--  required : get_option('echo-cancel-webrtc'))
--summary({'WebRTC Echo Canceling': webrtc_dep.found()}, bool_yn: true, 
section: 'Misc dependencies')
--cdata.set('HAVE_WEBRTC', webrtc_dep.found())
-+  required : false)
-+cdata.set('HAVE_WEBRTC1', webrtc_dep.found())
-+if webrtc_dep.found()
-+  summary({'WebRTC Echo Canceling >= 1.2': webrtc_dep.found()}, bool_yn: 
true, section: 'Misc dependencies')
-+else
-+  webrtc_dep = dependency('webrtc-audio-processing',
-+version : ['>= 0.2', '< 1.0'],
-+required : get_option('echo-cancel-webrtc'))
-+  cdata.set('HAVE_WEBRTC', webrtc_dep.found())
-+  summary({'WebRTC Echo Canceling < 1.0': webrtc_dep.found()}, bool_yn: true, 
section: 'Misc dependencies')
-+endif
- 
- # On FreeBSD and MidnightBSD, epoll-shim library is required for eventfd() 
and timerfd()
- epoll_shim_dep = (host_machine.system() == 'freebsd' or host_machine.system() 
== 'midnightbsd'
 a/spa/plugins/aec/aec-webrtc.cpp
-+++ b/spa/plugins/aec/aec-webrtc.cpp
-@@ -3,6 +3,8 @@
- /* SPDX-FileCopyrightText: Copyright © 2021 Arun Raghavan 
 */
- /* SPDX-License-Identifier: MIT */
- 
-+#include "config.h"
-+
- #include 
- #include 
- 
-@@ -13,7 +15,13 @@
- #include 
- #include 
- 
-+#ifdef HAVE_WEBRTC
-+#include 
-+#include 
-+#include 
-+#else
- #include 
-+#endif
- 
- struct impl_data {
-   struct spa_handle handle;
-@@ -39,6 +47,54 @@ static bool webrtc_get_spa_bool(const struct spa_dict 
*args, const char *key, bo
-   return default_value;
- }
- 
-+#ifdef HAVE_WEBRTC
-+/* [ f0 f1 f2 ] */
-+static int parse_point(struct spa_json *it, float ()[3])
-+{
-+  struct spa_json arr;
-+  int i, res;
-+
-+  if (spa_json_enter_array(it, ) <= 0)
-+  return -EINVAL;
-+
-+  for (i = 0; i < 3; i++) {
-+  if ((res = spa_json_get_float(, [i])) <= 0)
-+  return 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.75/

2023-11-24 Thread Sam James
commit: a01b0c9af9a439b2f426cd295c8f06613a988ca8
Author: Sam James  gentoo  org>
AuthorDate: Sat Nov 25 05:33:27 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Nov 25 05:33:27 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a01b0c9a

media-video/pipewire: drop 0.3.75-r3

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   1 -
 .../0001-module-rt-error-out-on-load-no-bus.patch  |  83 
 ...2-thread-loop-only-signal-when-option-set.patch |  68 ---
 .../0.3.75/0003-missing-include-version.h.patch|  21 -
 media-video/pipewire/pipewire-0.3.75-r3.ebuild | 473 -
 5 files changed, 646 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 26a2e1b43cfc..e092a0c05d17 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,4 +1,3 @@
-DIST pipewire-0.3.75.tar.bz2 1629466 BLAKE2B 
e69dbb93ebe50f037bc602aa86733c8ba9ccbe57db520cd34ea025c9bf153dbd848882dbb4c2a4e830785a302a7cb7d4b7c1856c9a4be6f1c5ada92f70d1729b
 SHA512 
19bf292f951f68de19cdfd3c76ee0e538a2ad3022e2669a4a19b40d26c2b16938799470b85def4b74b27b8c8137d03a05780d6bab0f38fb0835b528f2cd34f5d
 DIST pipewire-0.3.77.tar.bz2 1643767 BLAKE2B 
3a2df9cdedf77d5b4927e115ddd7da0d1eecc85322ce7995a49945d41cc83b9a543c1382ad304bdb549f67ac444f7bca6871248654fb4d2e21b25eb55411940c
 SHA512 
422c8504f608d6845b94351a336ab528f51195551418d0d245064972ed784817cacafc6afaad74eb0e0ea80474a9da33ef6917c1f60d3f8f45d70c54971f0760
 DIST pipewire-0.3.80.tar.bz2 1655137 BLAKE2B 
cf55e01b6fff29e7ef1f40e9a8f28788b9f538380232821b334359844b33b12b913375ae14e4589d7ae9cd26d22bc841d8103d41c7eb3ea1a9f0c1db1abc6507
 SHA512 
77e26b6cbefc091ea703b53d147accbd9495f97ba57618a21366b0747074de3ed1060c03e91362f5cf9dc5c256da6d541eccaff8de306b369730400c7b7f46b2
 DIST pipewire-0.3.85.tar.bz2 1675916 BLAKE2B 
a245ebeebdb283ce920d85a2d877ce27756a5fd5505ca6f4d5df1b83120272dfb1be36233a3b2a2cbe96dcc9fc06fae42198108c4e0dbe866836449b422e320c
 SHA512 
5613b41a98db45305aad8f9a84ef0a11b858815f45c6242bb648630e41a3ae5805bb605a543585b46e60d472086919d64e7d8c396ab6cc126d9889f92320f375

diff --git 
a/media-video/pipewire/files/0.3.75/0001-module-rt-error-out-on-load-no-bus.patch
 
b/media-video/pipewire/files/0.3.75/0001-module-rt-error-out-on-load-no-bus.patch
deleted file mode 100644
index 8885eb8a564f..
--- 
a/media-video/pipewire/files/0.3.75/0001-module-rt-error-out-on-load-no-bus.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-https://bugs.gentoo.org/910714
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/55812195ce3b77317e7a2dc642b78271f3a45c8e
-
-From 55812195ce3b77317e7a2dc642b78271f3a45c8e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= 
-Date: Sat, 22 Jul 2023 01:20:58 +
-Subject: [PATCH] module-rt: error out on load if no bus is available
-
-Since the recent changes to the RT module in Pipewire 0.3.75, some
-applications such as those using OpenAL-Soft crash on startup if
-neither the session nor the system bus is available. For example:
-
-bwrap --dev-bind / / \
-  --bind /dev/null /run/dbus/system_bus_socket \
-  --bind /dev/null $XDG_RUNTIME_DIR/bus \
-  openal-info
-
-Will result in a crash with the following error message:
-
-dbus[1626147]: arguments to dbus_message_new_method_call() were
-incorrect, assertion "path != NULL" failed in file dbus-message.c
-line 1373.
-This is normally a bug in some application using the D-Bus library.
-
-The RT module previously failed to load if no bus was available, but
-after the recent changes, the init. logic runs in a thread, and failing
-to obtain the bus no longer causes the module to fail to load.
-
-Then, functions called later such as `pw_rtkit_make_realtime` assume
-the bus is available and try to use it, causing the error above.
-
-Put the logic for obtaining and checking the bus back to `module_init`,
-so the module fails to load again if no bus is available.
 a/src/modules/module-rt.c
-+++ b/src/modules/module-rt.c
-@@ -923,14 +923,11 @@ static int check_rtkit(struct impl *impl, struct 
pw_context *context, bool *can_
-   return 0;
- }
- 
--static int do_rtkit_setup(struct spa_loop *loop, bool async, uint32_t seq,
--  const void *data, size_t size, void *user_data)
-+static int rtkit_get_bus(struct impl *impl)
- {
--  struct impl *impl = user_data;
-   int res;
--  long long retval;
- 
--  pw_log_debug("enter rtkit setup");
-+  pw_log_debug("enter rtkit get bus");
- 
-   /* Checking xdg-desktop-portal. It works fine in all situations. */
-   if (impl->rtportal_enabled)
-@@ -967,6 +964,18 @@ static int do_rtkit_setup(struct spa_loop *loop, bool 
async, uint32_t seq,
-   return res;
-   }
-   }
-+
-+  return 0;
-+}
-+
-+static int do_rtkit_setup(struct spa_loop *loop, bool async, uint32_t seq,
-+  const 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.82/

2023-10-18 Thread Sam James
commit: 36f2827dbaa21b512ad6df48a1bdebe467482b22
Author: Sam James  gentoo  org>
AuthorDate: Wed Oct 18 18:24:37 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Oct 18 18:24:37 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36f2827d

media-video/pipewire: backport upstream fixes to 0.3.82

Signed-off-by: Sam James  gentoo.org>

 ...nore-PCM-devices-with-udev-env-ACP_IGNORE.patch | 69 ++
 ...alsa-don-t-try-to-link-when-prepare-fails.patch | 27 +
 ...3-context-relax-quantum-change-conditions.patch | 37 
 ...ire-0.3.82.ebuild => pipewire-0.3.82-r1.ebuild} |  0
 4 files changed, 133 insertions(+)

diff --git 
a/media-video/pipewire/files/0.3.82/0001-alsa-Ignore-PCM-devices-with-udev-env-ACP_IGNORE.patch
 
b/media-video/pipewire/files/0.3.82/0001-alsa-Ignore-PCM-devices-with-udev-env-ACP_IGNORE.patch
new file mode 100644
index ..12192fc8678a
--- /dev/null
+++ 
b/media-video/pipewire/files/0.3.82/0001-alsa-Ignore-PCM-devices-with-udev-env-ACP_IGNORE.patch
@@ -0,0 +1,69 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/fd969dab2878836fd8e9ac7d8fb92d1ede594f37
+
+From fd969dab2878836fd8e9ac7d8fb92d1ede594f37 Mon Sep 17 00:00:00 2001
+From: Hector Martin 
+Date: Sat, 14 Oct 2023 14:11:15 +0900
+Subject: [PATCH] alsa: Ignore PCM devices with udev env ACP_IGNORE
+
+When checking that a card has all of its PCM devices available, ignore
+any specific device with the ACP_IGNORE udev environment variable. This
+mirrors how we ignore whole cards, but specifically allows non-PipeWire
+software to own specific PCM devices.
+
+Note that this does not actually stop PipeWire from using those
+subdevices right now, we assume UCM configs take care of that. This
+should probably be implemented later to ensure PipeWire always stays
+away from them, but for now this fixes the issue where it refuses to
+probe the entire card.
+
+Fixes: #3570
+
+Signed-off-by: Hector Martin 
+---
+ spa/plugins/alsa/alsa-udev.c | 24 
+ 1 file changed, 24 insertions(+)
+
+diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
+index 3048d7363..58ff5032d 100644
+--- a/spa/plugins/alsa/alsa-udev.c
 b/spa/plugins/alsa/alsa-udev.c
+@@ -329,6 +329,27 @@ static int get_num_compress_offload_devices(unsigned int 
card_nr)
+   return errno != 0 ? -errno : num_dev;
+ }
+ 
++static int check_udev_environment(struct udev *udev, const char *devname)
++{
++  char path[PATH_MAX];
++  struct udev_device *dev;
++  int ret = 0;
++
++  /* Check for ACP_IGNORE on a specific PCM device (not the whole card) */
++  spa_scnprintf(path, sizeof(path), "/sys/class/sound/%s", devname);
++
++  dev = udev_device_new_from_syspath(udev, path);
++  if (dev == NULL)
++  return 0;
++
++  if (udev_device_get_property_value(dev, "ACP_IGNORE"))
++  ret = -ENXIO;
++
++  udev_device_unref(dev);
++
++  return ret;
++}
++
+ static int check_pcm_device_availability(struct impl *this, struct card *card,
+  int *num_pcm_devices)
+ {
+@@ -376,6 +397,9 @@ static int check_pcm_device_availability(struct impl 
*this, struct card *card,
+   card->card_nr, entry->d_name+3);
+   if (check_device_pcm_class(path) < 0)
+   continue;
++  /* Check udev environment */
++  if (check_udev_environment(this->udev, path) < 0)
++  continue;
+ 
+   /* Check busy status */
+   spa_scnprintf(path, sizeof(path), "/proc/asound/card%u/%s",
+-- 
+GitLab

diff --git 
a/media-video/pipewire/files/0.3.82/0002-alsa-don-t-try-to-link-when-prepare-fails.patch
 
b/media-video/pipewire/files/0.3.82/0002-alsa-don-t-try-to-link-when-prepare-fails.patch
new file mode 100644
index ..c24b63036315
--- /dev/null
+++ 
b/media-video/pipewire/files/0.3.82/0002-alsa-don-t-try-to-link-when-prepare-fails.patch
@@ -0,0 +1,27 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/840a9487a404916b18bf945662720e8a6d5b3716
+
+From 840a9487a404916b18bf945662720e8a6d5b3716 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Mon, 16 Oct 2023 10:32:51 +0200
+Subject: [PATCH] alsa: don't try to link when prepare fails
+
+---
+ spa/plugins/alsa/alsa-pcm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
+index fbd67cf86..df40ea9e5 100644
+--- a/spa/plugins/alsa/alsa-pcm.c
 b/spa/plugins/alsa/alsa-pcm.c
+@@ -3042,7 +3042,8 @@ int spa_alsa_prepare(struct state *state)
+ 
+   spa_list_for_each(follower, >followers, driver_link) {
+   if (follower != state && !follower->matching) {
+-  spa_alsa_prepare(follower);
++  if (spa_alsa_prepare(follower) < 0)
++  continue;
+  

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2023-09-11 Thread Sam James
commit: 8b6eb8028f4a0ff0457b47ea418dbce617d05d9f
Author: Sam James  gentoo  org>
AuthorDate: Tue Sep 12 00:43:02 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Sep 12 00:43:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b6eb802

media-video/pipewire: handle procps-4 rename of pwait->pidwait

Closes: https://bugs.gentoo.org/914030
Signed-off-by: Sam James  gentoo.org>

 .../pipewire/files/gentoo-pipewire-launcher.in-r3  | 84 ++
 ...ewire-.ebuild => pipewire-0.3.79-r3.ebuild} |  2 +-
 media-video/pipewire/pipewire-.ebuild  |  2 +-
 3 files changed, 86 insertions(+), 2 deletions(-)

diff --git a/media-video/pipewire/files/gentoo-pipewire-launcher.in-r3 
b/media-video/pipewire/files/gentoo-pipewire-launcher.in-r3
new file mode 100644
index ..abe9174c4253
--- /dev/null
+++ b/media-video/pipewire/files/gentoo-pipewire-launcher.in-r3
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# PipeWire launcher script for XDG compliant desktops on OpenRC.
+#
+# systemd users are very _STRONGLY_ advised to use the much
+# more reliable and predictable user units instead.
+
+# WARNING: This script assumes being run inside XDG compliant session,
+# which means D-Bus session instance is expected to be correctly set up
+# prior to this script starting. If that is not true, things may break!
+
+DATE_FORMAT='+%Y-%m-%dT%H:%M:%S%Z'
+
+CONF="${XDG_CONFIG_HOME:-${HOME}/.config}/gentoo-pipewire-launcher.conf"
+if [ -f "${CONF}" ]
+then
+. "${CONF}"
+else
+GENTOO_PIPEWIRE_LOG='/dev/null'
+GENTOO_PIPEWIRE_PULSE_LOG='/dev/null'
+GENTOO_WIREPLUMBER_LOG='/dev/null'
+fi
+for L in \
+"${GENTOO_PIPEWIRE_LOG}" \
+"${GENTOO_PIPEWIRE_PULSE_LOG}" \
+"${GENTOO_WIREPLUMBER_LOG}"
+do
+   if [ ! -e "${L}" ]
+   then
+   touch "${L}"
+   fi
+done
+
+restart () {
+echo "Terminating PipeWire processes ..."
+pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
+
+# pidwait was renamed to pwait w/ procps-4 (bug #914030)
+if command -v pidwait > /dev/null ; then
+pidwait -u "${USER}" -x pipewire\|wireplumber
+elif command -v pwait > /dev/null ; then
+pwait -u "${USER}" -x pipewire\|wireplumber
+fi
+
+echo "PipeWire terminated."
+}
+
+if [ "${#}" -gt 0 ]
+then
+if [ "${1}" = 'restart' ]
+then
+   restart
+else
+echo "Unrecognised argument." >&2
+echo "Usage: gentoo-pipewire-launcher [restart]" >&2
+   exit 1
+fi
+fi
+
+if pgrep -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
+then
+echo "PipeWire already running, exiting." >&2
+echo "(Use 'gentoo-pipewire-launcher restart' to restart PipeWire and 
WirePlumber.)" >&2
+exit 1
+fi
+
+# The core daemon which by itself does probably nothing.
+echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting 
PipeWire." 1>>"${GENTOO_PIPEWIRE_LOG}"
+@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire 1>>"${GENTOO_PIPEWIRE_LOG}" 2>&1 &
+
+# The so called pipewire-pulse daemon used for PulseAudio compatibility.
+# Commenting this out will stop the PA proxying daemon from starting,
+# however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using
+# clients will still have access to audio and may end up clashing with
+# non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon).
+echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting 
PipeWire-Pulse." 1>>"${GENTOO_PIPEWIRE_PULSE_LOG}"
+@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf 
1>>"${GENTOO_PIPEWIRE_PULSE_LOG}" 2>&1 &
+
+# Hack for bug #822498
+sleep 1
+
+# Finally a session manager is required for PipeWire to do anything.
+echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting 
WirePlumber." 1>>"${GENTOO_WIREPLUMBER_LOG}"
+exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber 
1>>"${GENTOO_WIREPLUMBER_LOG}" 2>&1

diff --git a/media-video/pipewire/pipewire-.ebuild 
b/media-video/pipewire/pipewire-0.3.79-r3.ebuild
similarity index 99%
copy from media-video/pipewire/pipewire-.ebuild
copy to media-video/pipewire/pipewire-0.3.79-r3.ebuild
index 9ae26c068a6e..7a471fb632bf 100644
--- a/media-video/pipewire/pipewire-.ebuild
+++ b/media-video/pipewire/pipewire-0.3.79-r3.ebuild
@@ -300,7 +300,7 @@ multilib_src_install_all() {
newins "${FILESDIR}"/pipewire.desktop-r2 pipewire.desktop
 
exeinto /usr/bin
-   newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r2 
gentoo-pipewire-launcher
+   newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r3 
gentoo-pipewire-launcher
 
doman "${FILESDIR}"/gentoo-pipewire-launcher.1
 

diff --git a/media-video/pipewire/pipewire-.ebuild 
b/media-video/pipewire/pipewire-.ebuild
index 9ae26c068a6e..7a471fb632bf 100644
--- a/media-video/pipewire/pipewire-.ebuild
+++ b/media-video/pipewire/pipewire-.ebuild
@@ -300,7 +300,7 @@ multilib_src_install_all() {
  

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.77/

2023-08-12 Thread Sam James
commit: 68d9b4d3cb0fe800f1baba462ce4f0a00f4bdfa3
Author: Sam James  gentoo  org>
AuthorDate: Sun Aug 13 03:26:11 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Aug 13 03:26:11 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68d9b4d3

media-video/pipewire: backport recommended patch for pulse duplicates

Bug: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3414
Signed-off-by: Sam James  gentoo.org>

 .../0.3.77/0002-pulse-prevent-duplicates.patch | 28 ++
 ...ire-0.3.77.ebuild => pipewire-0.3.77-r1.ebuild} |  0
 2 files changed, 28 insertions(+)

diff --git 
a/media-video/pipewire/files/0.3.77/0002-pulse-prevent-duplicates.patch 
b/media-video/pipewire/files/0.3.77/0002-pulse-prevent-duplicates.patch
new file mode 100644
index ..5a0fcde67fed
--- /dev/null
+++ b/media-video/pipewire/files/0.3.77/0002-pulse-prevent-duplicates.patch
@@ -0,0 +1,28 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/820ca90705ae78124958f1b96de3bdc7889c2d1e
+https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3414
+
+From 820ca90705ae78124958f1b96de3bdc7889c2d1e Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Tue, 8 Aug 2023 13:01:30 +0200
+Subject: [PATCH] pulse-server: set all change_mask flags when removing
+
+So that the logic to emit events will select sink and source objects.
+
+Fixes #3414
+--- a/src/modules/module-protocol-pulse/manager.c
 b/src/modules/module-protocol-pulse/manager.c
+@@ -641,9 +641,10 @@ static void registry_event_global_remove(void *data, 
uint32_t id)
+ 
+   o->this.removing = true;
+ 
+-  if (!o->this.creating)
++  if (!o->this.creating) {
++  o->this.change_mask = ~0;
+   manager_emit_removed(m, >this);
+-
++  }
+   object_destroy(o);
+ }
+ 
+-- 
+GitLab

diff --git a/media-video/pipewire/pipewire-0.3.77.ebuild 
b/media-video/pipewire/pipewire-0.3.77-r1.ebuild
similarity index 100%
rename from media-video/pipewire/pipewire-0.3.77.ebuild
rename to media-video/pipewire/pipewire-0.3.77-r1.ebuild



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.73/

2023-07-12 Thread Sam James
commit: 57b9002ccc84312b5c356827eb91a5d1e9ed3277
Author: Sam James  gentoo  org>
AuthorDate: Wed Jul 12 08:38:54 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jul 12 08:45:50 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57b9002c

media-video/pipewire: backport recommended patch to 0.3.73

Bug: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3316
Bug: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3345
Signed-off-by: Sam James  gentoo.org>

 .../0001-impl-node-remove-node-target-peers.patch  |  30 ++
 media-video/pipewire/pipewire-0.3.73-r1.ebuild | 466 +
 2 files changed, 496 insertions(+)

diff --git 
a/media-video/pipewire/files/0.3.73/0001-impl-node-remove-node-target-peers.patch
 
b/media-video/pipewire/files/0.3.73/0001-impl-node-remove-node-target-peers.patch
new file mode 100644
index ..fac8233ee916
--- /dev/null
+++ 
b/media-video/pipewire/files/0.3.73/0001-impl-node-remove-node-target-peers.patch
@@ -0,0 +1,30 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/4456f2efd16d6190989a903f70f4419c2ca4c819
+https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3316
+https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3345
+
+From 4456f2efd16d6190989a903f70f4419c2ca4c819 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Mon, 10 Jul 2023 16:59:17 +0200
+Subject: [PATCH] impl-node: remove the node from the target peers
+
+When we destroy a node, we need to remove the node as a current
+driver peer.
+
+Not doing this has 2 problems:
+- remote drivers still trigger our node
+- the client-node does not clean up the memid for the activation and
+  we might reuse it later for a new node with the same fd.
+
+See #3316
+--- a/src/pipewire/impl-node.c
 b/src/pipewire/impl-node.c
+@@ -1983,6 +1983,7 @@ void pw_impl_node_destroy(struct pw_impl_node *node)
+ 
+   /* remove ourself as a follower from the driver node */
+   spa_list_remove(>follower_link);
++  pw_impl_node_emit_peer_removed(node->driver_node, node);
+   remove_segment_owner(node->driver_node, node->info.id);
+ 
+   spa_list_consume(follower, >follower_list, follower_link) {
+-- 
+GitLab

diff --git a/media-video/pipewire/pipewire-0.3.73-r1.ebuild 
b/media-video/pipewire/pipewire-0.3.73-r1.ebuild
new file mode 100644
index ..f4759dc2e89a
--- /dev/null
+++ b/media-video/pipewire/pipewire-0.3.73-r1.ebuild
@@ -0,0 +1,466 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# 1. Please regularly check (even at the point of bumping) Fedora's packaging
+# for needed backports at 
https://src.fedoraproject.org/rpms/pipewire/tree/rawhide.
+#
+# 2. Upstream also sometimes amend release notes for the previous release to 
mention
+# needed patches, e.g. 
https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros
+#
+# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# continue to move quickly. It's not uncommon for fixes to be made shortly
+# after releases.
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit flag-o-matic meson-multilib optfeature prefix python-any-r1 systemd 
tmpfiles udev
+
+if [[ ${PV} ==  ]]; then
+   EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git;
+   inherit git-r3
+else
+   if [[ ${PV} == *_p* ]] ; then
+   MY_COMMIT=""
+   
SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2
 -> ${P}.tar.bz2"
+   S="${WORKDIR}"/${PN}-${MY_COMMIT}
+   else
+   
SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2;
+   fi
+
+   KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Multimedia processing graphs"
+HOMEPAGE="https://pipewire.org/;
+
+LICENSE="MIT LGPL-2.1+ GPL-2"
+# ABI was broken in 0.3.42 for 
https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49
+SLOT="0/0.4"
+IUSE="bluetooth dbus doc echo-cancel extra ffmpeg flatpak gstreamer gsettings 
ieee1394 jack-client jack-sdk liblc3 lv2"
+IUSE+=" modemmanager pipewire-alsa readline sound-server ssl system-service 
systemd test v4l X zeroconf"
+
+# Once replacing system JACK libraries is possible, it's likely that
+# jack-client IUSE will need blocking to avoid users accidentally
+# configuring their systems to send PW sink output to the emulated
+# JACK's sink - doing so is likely to yield no audio, cause a CPU
+# cycles consuming loop (and may even cause GUI crashes)!
+
+# - TODO: There should be "sound-server? ( || ( alsa bluetooth ) )" here, but 
ALSA is always enabled
+# - TODO: Pulseaudio alsa plugin performs runtime check that pulseaudio server 
connection will work
+#   which provides adequate guarantee that alsa-lib will be able to provide 
audio services.
+#   If that works, pulseaudio defaults are 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.69/

2023-06-07 Thread Sam James
commit: d52a25388f5ba33f35ad27bbf8264d7bab3d6fa3
Author: Sam James  gentoo  org>
AuthorDate: Wed Jun  7 09:47:22 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jun  7 09:47:22 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d52a2538

media-video/pipewire: drop 0.3.67, 0.3.69-r1, 0.3.70

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   2 -
 .../0001-context-improve-state-calculations.patch  |  59 ---
 .../0002-revert-alsa-mixer-control-element.patch   |  38 --
 .../files/0.3.69/0003-filter-chain-biquads.patch   |  21 -
 media-video/pipewire/pipewire-0.3.67.ebuild| 473 
 media-video/pipewire/pipewire-0.3.69-r1.ebuild | 474 -
 media-video/pipewire/pipewire-0.3.70.ebuild| 474 -
 7 files changed, 1541 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index f917330d3204..c042e20afb9c 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,4 +1,2 @@
-DIST pipewire-0.3.67.tar.bz2 1531871 BLAKE2B 
59ea184ae11ad2999f37f0ded785551894ce6fbf478146c53f1dc6cdfeae7aa50cf6151b1e5e9c63c4f288682e5da7fde523251096af7da9d79bf96dd9d94809
 SHA512 
538b8ee905760775a0522dd3883d5db9bcaafe93d80eb5b588e21e73de22637a49cd139d3ed4dcfd1a5822af85e4cede624eee899c1e51a115f1ba0a6966c7a5
-DIST pipewire-0.3.69.tar.bz2 1567927 BLAKE2B 
1b62e7cd359a4b1ee75793939026eef2c09d87cf7f0537fe77c081cd1b029463681b8838c9e4c0b82686ba628d74316e38d6471dbfab21ebb4d159fd052f2d6d
 SHA512 
95e91006928b9596b47a1becfcd975dfa6bcfb2286fc6007a5bed4f127d2fd2b7477573facdb73f3ebd5cb6b77b8e9ef714e5c0c2aec97ef9d3a768b477b6477
 DIST pipewire-0.3.70.tar.bz2 1573378 BLAKE2B 
3824106cba9c1b0a82c6d8889b2b1473f4bfc5d0994ee9dd8b46a454c287bbd4e0ad5dc508df5d4a9b7c5f683898ed756947788e561f2bf51a3116b12e46d075
 SHA512 
8b25d90232d07d5b1e210bd8f24240438a7dcece23a5be59a4e49fc3daf51ebf659f2cc343a0d913310a4659792590ef981ab7a59890506557f9510d902a0cff
 DIST pipewire-0.3.71.tar.bz2 1592332 BLAKE2B 
ff6483a040285cd7a7cc10878cc88b61a0e01c0376ab64ef84f753b300b61da23211bc1b50208da7f1054d6ddf08092e81cbf29df508aad3bc93f20742a2f735
 SHA512 
465388faaf0f7fcce21fdbcd7a1705ef524c35e267c3f123b1025c34133fc418194abb9e22d89e60c9acc1417b25d655112fd9ef342e26ca9b8bc26013b09cb3

diff --git 
a/media-video/pipewire/files/0.3.69/0001-context-improve-state-calculations.patch
 
b/media-video/pipewire/files/0.3.69/0001-context-improve-state-calculations.patch
deleted file mode 100644
index 29469205cf48..
--- 
a/media-video/pipewire/files/0.3.69/0001-context-improve-state-calculations.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/a275e825c75c93775baaeb17479e38d035d9b79a
-
-From a275e825c75c93775baaeb17479e38d035d9b79a Mon Sep 17 00:00:00 2001
-From: Wim Taymans 
-Date: Fri, 14 Apr 2023 12:01:03 +0200
-Subject: [PATCH] context: improve state calculations
-
-Always make peers of non-passive links runnable, even if we already
-visited the peer node. This makes non-passive links between drivers set the
-drivers to runnable. (midi-bridge, source to sink). It also makes nodes
-collected from the (link-)group runnable when they are linked together.
-
-To calculate the runnable state of the other nodes, only start from
-non-driver runnable nodes (like we already did when following links).
-
-This makes a link from echo-cancel-source to echo-cancel-sink activate
-the echo-canceler chain instead of staying idle.
 a/src/pipewire/context.c
-+++ b/src/pipewire/context.c
-@@ -788,9 +788,6 @@ static inline int run_nodes(struct pw_context *context, 
struct pw_impl_node *nod
-   struct pw_impl_port *p;
-   struct pw_impl_link *l;
- 
--  if (!node->runnable)
--  return 0;
--
-   pw_log_debug("node %p: '%s'", node, node->name);
- 
-   spa_list_for_each(p, >input_ports, link) {
-@@ -885,7 +882,7 @@ static int collect_nodes(struct pw_context *context, 
struct pw_impl_node *node,
- 
-   pw_impl_link_prepare(l);
- 
--  if (!l->prepared || (t != n && t->visited))
-+  if (!l->prepared)
-   continue;
- 
-   if (!l->passive)
-@@ -906,7 +903,7 @@ static int collect_nodes(struct pw_context *context, 
struct pw_impl_node *node,
- 
-   pw_impl_link_prepare(l);
- 
--  if (!l->prepared || (t != n && t->visited))
-+  if (!l->prepared)
-   continue;
- 
-   if (!l->passive)
-@@ -936,7 +933,8 @@ static int collect_nodes(struct pw_context *context, 
struct pw_impl_node *node,
-   pw_log_debug(" next node %p: '%s' runnable:%u", n, n->name, 
n->runnable);
-   }
-   spa_list_for_each(n, collect, sort_link)
-- 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.71/

2023-05-18 Thread Sam James
commit: bdf35f42b82cb025d8003dc4b9c6feafab1c8e99
Author: Sam James  gentoo  org>
AuthorDate: Fri May 19 04:14:33 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 19 04:14:40 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdf35f42

media-video/pipewire: backport recommended JACK patch

Signed-off-by: Sam James  gentoo.org>

 .../0.3.71/jack-update-bufsize-samplerate.patch| 46 ++
 ...ire-0.3.71.ebuild => pipewire-0.3.71-r1.ebuild} |  0
 2 files changed, 46 insertions(+)

diff --git 
a/media-video/pipewire/files/0.3.71/jack-update-bufsize-samplerate.patch 
b/media-video/pipewire/files/0.3.71/jack-update-bufsize-samplerate.patch
new file mode 100644
index ..59fb89a3e017
--- /dev/null
+++ b/media-video/pipewire/files/0.3.71/jack-update-bufsize-samplerate.patch
@@ -0,0 +1,46 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3226
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/ce71b37b58d5e251ae7acda0799f696688df11c2
+
+From ce71b37b58d5e251ae7acda0799f696688df11c2 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Thu, 18 May 2023 09:59:26 +0200
+Subject: [PATCH] jack: update bufsize and samplerate when skipping notify
+
+When we skip the notify because we are not active or we don't have a
+callback, still update the buffer_size and sample_rate fields or else
+we will keep on trying forever.
+
+Fixes #3226
+--- a/pipewire-jack/src/pipewire-jack.c
 b/pipewire-jack/src/pipewire-jack.c
+@@ -1027,8 +1027,6 @@ static int queue_notify(struct client *c, int type, 
struct object *o, int arg1,
+   struct notify *notify;
+   bool emit = false;;
+ 
+-  if ((type & NOTIFY_ACTIVE_FLAG) && !c->active)
+-  return 0;
+   switch (type) {
+   case NOTIFY_TYPE_REGISTRATION:
+   emit = c->registration_callback != NULL && o != NULL;
+@@ -1060,8 +1058,18 @@ static int queue_notify(struct client *c, int type, 
struct object *o, int arg1,
+   default:
+   break;
+   }
++  if ((type & NOTIFY_ACTIVE_FLAG) && !c->active)
++  emit = false;
+   if (!emit) {
+-  pw_log_debug("%p: skip notify %d", c, type);
++  switch (type) {
++  case NOTIFY_TYPE_BUFFER_FRAMES:
++  c->buffer_frames = arg1;
++  break;
++  case NOTIFY_TYPE_SAMPLE_RATE:
++  c->sample_rate = arg1;
++  break;
++  }
++  pw_log_debug("%p: skip notify %08x active:%d", c, type, 
c->active);
+   if (o != NULL && arg1 == 0 && o->removing) {
+   o->removing = false;
+   free_object(c, o);
+-- 
+GitLab

diff --git a/media-video/pipewire/pipewire-0.3.71.ebuild 
b/media-video/pipewire/pipewire-0.3.71-r1.ebuild
similarity index 100%
rename from media-video/pipewire/pipewire-0.3.71.ebuild
rename to media-video/pipewire/pipewire-0.3.71-r1.ebuild



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2023-05-10 Thread Sam James
commit: 5fa782429b4f607f8a1dc0e41e5cbe1bd94b35c3
Author: Sam James  gentoo  org>
AuthorDate: Thu May 11 00:48:00 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu May 11 00:48:00 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fa78242

media-video/pipewire: write error messages from gentoo-pipewire-launcher to 
stderr

Thanks to Andrei Slavoiu and flexibeast.

Bug: https://bugs.gentoo.org/904851
Closes: https://bugs.gentoo.org/906070
Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/files/gentoo-pipewire-launcher.in-r1 | 8 
 .../{pipewire-0.3.70-r1.ebuild => pipewire-0.3.70-r2.ebuild}  | 0
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/media-video/pipewire/files/gentoo-pipewire-launcher.in-r1 
b/media-video/pipewire/files/gentoo-pipewire-launcher.in-r1
index 345298c0b6ae..51f70293c383 100644
--- a/media-video/pipewire/files/gentoo-pipewire-launcher.in-r1
+++ b/media-video/pipewire/files/gentoo-pipewire-launcher.in-r1
@@ -22,16 +22,16 @@ then
 then
restart
 else
-echo "Unrecognised argument."
-   echo "Usage: gentoo-pipewire-launcher [restart]"
+echo "Unrecognised argument." >&2
+echo "Usage: gentoo-pipewire-launcher [restart]" >&2
exit 1
 fi
 fi
 
 if pgrep -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
 then
-echo "PipeWire already running, exiting."
-echo "(Use 'gentoo-pipewire-launcher restart' to restart PipeWire and 
WirePlumber.)"
+echo "PipeWire already running, exiting." >&2
+echo "(Use 'gentoo-pipewire-launcher restart' to restart PipeWire and 
WirePlumber.)" >&2
 exit 1
 fi
 

diff --git a/media-video/pipewire/pipewire-0.3.70-r1.ebuild 
b/media-video/pipewire/pipewire-0.3.70-r2.ebuild
similarity index 100%
rename from media-video/pipewire/pipewire-0.3.70-r1.ebuild
rename to media-video/pipewire/pipewire-0.3.70-r2.ebuild



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.70/

2023-04-20 Thread Sam James
commit: 0368b8bd78695a4ed78e7a5ff0cf1399269d20c9
Author: Sam James  gentoo  org>
AuthorDate: Thu Apr 20 12:49:58 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Apr 20 12:59:15 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0368b8bd

media-video/pipewire: add 0.3.70

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   1 +
 .../files/0.3.70/parser-check-pointer.patch|  21 +
 media-video/pipewire/pipewire-0.3.70.ebuild| 474 +
 3 files changed, 496 insertions(+)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index cb341d56dad6..f1e1ce6ff7ac 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,2 +1,3 @@
 DIST pipewire-0.3.67.tar.bz2 1531871 BLAKE2B 
59ea184ae11ad2999f37f0ded785551894ce6fbf478146c53f1dc6cdfeae7aa50cf6151b1e5e9c63c4f288682e5da7fde523251096af7da9d79bf96dd9d94809
 SHA512 
538b8ee905760775a0522dd3883d5db9bcaafe93d80eb5b588e21e73de22637a49cd139d3ed4dcfd1a5822af85e4cede624eee899c1e51a115f1ba0a6966c7a5
 DIST pipewire-0.3.69.tar.bz2 1567927 BLAKE2B 
1b62e7cd359a4b1ee75793939026eef2c09d87cf7f0537fe77c081cd1b029463681b8838c9e4c0b82686ba628d74316e38d6471dbfab21ebb4d159fd052f2d6d
 SHA512 
95e91006928b9596b47a1becfcd975dfa6bcfb2286fc6007a5bed4f127d2fd2b7477573facdb73f3ebd5cb6b77b8e9ef714e5c0c2aec97ef9d3a768b477b6477
+DIST pipewire-0.3.70.tar.bz2 1573378 BLAKE2B 
3824106cba9c1b0a82c6d8889b2b1473f4bfc5d0994ee9dd8b46a454c287bbd4e0ad5dc508df5d4a9b7c5f683898ed756947788e561f2bf51a3116b12e46d075
 SHA512 
8b25d90232d07d5b1e210bd8f24240438a7dcece23a5be59a4e49fc3daf51ebf659f2cc343a0d913310a4659792590ef981ab7a59890506557f9510d902a0cff

diff --git a/media-video/pipewire/files/0.3.70/parser-check-pointer.patch 
b/media-video/pipewire/files/0.3.70/parser-check-pointer.patch
new file mode 100644
index ..7409d83e7ebb
--- /dev/null
+++ b/media-video/pipewire/files/0.3.70/parser-check-pointer.patch
@@ -0,0 +1,21 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/83d2e85f490ea97e4ae94b95f20dd06566a14c31
+
+From 83d2e85f490ea97e4ae94b95f20dd06566a14c31 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Thu, 20 Apr 2023 12:32:07 +0200
+Subject: [PATCH] parser: add extra check to make coverity happy
+
+Fixes !1473
+--- a/spa/include/spa/pod/parser.h
 b/spa/include/spa/pod/parser.h
+@@ -455,7 +455,7 @@ static inline int spa_pod_parser_getv(struct 
spa_pod_parser *parser, va_list arg
+   const struct spa_pod *pod = NULL;
+   const char *format;
+ 
+-  if (ftype == SPA_TYPE_Object) {
++  if (f && ftype == SPA_TYPE_Object) {
+   uint32_t key = va_arg(args, uint32_t);
+   const struct spa_pod_object *object;
+ 
+-- 
+GitLab

diff --git a/media-video/pipewire/pipewire-0.3.70.ebuild 
b/media-video/pipewire/pipewire-0.3.70.ebuild
new file mode 100644
index ..a54b5c2d65dd
--- /dev/null
+++ b/media-video/pipewire/pipewire-0.3.70.ebuild
@@ -0,0 +1,474 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# 1. Please regularly check (even at the point of bumping) Fedora's packaging
+# for needed backports at 
https://src.fedoraproject.org/rpms/pipewire/tree/rawhide.
+#
+# 2. Upstream also sometimes amend release notes for the previous release to 
mention
+# needed patches, e.g. 
https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros
+#
+# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# continue to move quickly. It's not uncommon for fixes to be made shortly
+# after releases.
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit flag-o-matic meson-multilib optfeature prefix python-any-r1 systemd 
tmpfiles udev
+
+if [[ ${PV} ==  ]]; then
+   EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git;
+   inherit git-r3
+else
+   if [[ ${PV} == *_p* ]] ; then
+   MY_COMMIT=""
+   
SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2
 -> ${P}.tar.bz2"
+   S="${WORKDIR}"/${PN}-${MY_COMMIT}
+   else
+   
SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2;
+   fi
+
+   KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Multimedia processing graphs"
+HOMEPAGE="https://pipewire.org/;
+
+LICENSE="MIT LGPL-2.1+ GPL-2"
+# ABI was broken in 0.3.42 for 
https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49
+SLOT="0/0.4"
+IUSE="bluetooth dbus doc echo-cancel extra ffmpeg flatpak gstreamer gsettings 
jack-client jack-sdk lv2
+modemmanager pipewire-alsa readline sound-server ssl system-service systemd 
test v4l X zeroconf"
+
+# Once replacing system JACK libraries is possible, it's likely that
+# jack-client IUSE will need 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.69/

2023-04-18 Thread Sam James
commit: 0ae1d3c9175e02ef29cbc72113ccb6b09db12afb
Author: Sam James  gentoo  org>
AuthorDate: Tue Apr 18 11:10:30 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Apr 18 11:10:30 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ae1d3c9

media-video/pipewire: backport recommended aptches to 0.3.69

Closes: https://bugs.gentoo.org/904507
Signed-off-by: Sam James  gentoo.org>

 .../0001-context-improve-state-calculations.patch  | 59 ++
 .../0002-revert-alsa-mixer-control-element.patch   | 38 ++
 .../files/0.3.69/0003-filter-chain-biquads.patch   | 21 
 ...ire-0.3.69.ebuild => pipewire-0.3.69-r1.ebuild} |  0
 4 files changed, 118 insertions(+)

diff --git 
a/media-video/pipewire/files/0.3.69/0001-context-improve-state-calculations.patch
 
b/media-video/pipewire/files/0.3.69/0001-context-improve-state-calculations.patch
new file mode 100644
index ..29469205cf48
--- /dev/null
+++ 
b/media-video/pipewire/files/0.3.69/0001-context-improve-state-calculations.patch
@@ -0,0 +1,59 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/a275e825c75c93775baaeb17479e38d035d9b79a
+
+From a275e825c75c93775baaeb17479e38d035d9b79a Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Fri, 14 Apr 2023 12:01:03 +0200
+Subject: [PATCH] context: improve state calculations
+
+Always make peers of non-passive links runnable, even if we already
+visited the peer node. This makes non-passive links between drivers set the
+drivers to runnable. (midi-bridge, source to sink). It also makes nodes
+collected from the (link-)group runnable when they are linked together.
+
+To calculate the runnable state of the other nodes, only start from
+non-driver runnable nodes (like we already did when following links).
+
+This makes a link from echo-cancel-source to echo-cancel-sink activate
+the echo-canceler chain instead of staying idle.
+--- a/src/pipewire/context.c
 b/src/pipewire/context.c
+@@ -788,9 +788,6 @@ static inline int run_nodes(struct pw_context *context, 
struct pw_impl_node *nod
+   struct pw_impl_port *p;
+   struct pw_impl_link *l;
+ 
+-  if (!node->runnable)
+-  return 0;
+-
+   pw_log_debug("node %p: '%s'", node, node->name);
+ 
+   spa_list_for_each(p, >input_ports, link) {
+@@ -885,7 +882,7 @@ static int collect_nodes(struct pw_context *context, 
struct pw_impl_node *node,
+ 
+   pw_impl_link_prepare(l);
+ 
+-  if (!l->prepared || (t != n && t->visited))
++  if (!l->prepared)
+   continue;
+ 
+   if (!l->passive)
+@@ -906,7 +903,7 @@ static int collect_nodes(struct pw_context *context, 
struct pw_impl_node *node,
+ 
+   pw_impl_link_prepare(l);
+ 
+-  if (!l->prepared || (t != n && t->visited))
++  if (!l->prepared)
+   continue;
+ 
+   if (!l->passive)
+@@ -936,7 +933,8 @@ static int collect_nodes(struct pw_context *context, 
struct pw_impl_node *node,
+   pw_log_debug(" next node %p: '%s' runnable:%u", n, n->name, 
n->runnable);
+   }
+   spa_list_for_each(n, collect, sort_link)
+-  run_nodes(context, n, collect);
++  if (!n->driver && n->runnable)
++  run_nodes(context, n, collect);
+ 
+   return 0;
+ }
+-- 
+GitLab

diff --git 
a/media-video/pipewire/files/0.3.69/0002-revert-alsa-mixer-control-element.patch
 
b/media-video/pipewire/files/0.3.69/0002-revert-alsa-mixer-control-element.patch
new file mode 100644
index ..1076ad101d0f
--- /dev/null
+++ 
b/media-video/pipewire/files/0.3.69/0002-revert-alsa-mixer-control-element.patch
@@ -0,0 +1,38 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/916f1cdfbfdc414d83031aef941a9909d1e603bd
+
+From 916f1cdfbfdc414d83031aef941a9909d1e603bd Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Fri, 14 Apr 2023 16:32:18 +0200
+Subject: [PATCH] Revert "alsa-mixer: allow to re-attach the mixer control
+ element"
+
+This reverts commit b554fc20e9ff97064721c89eb15b1b45870584e5.
+--- a/spa/plugins/alsa/acp/alsa-util.c
 b/spa/plugins/alsa/acp/alsa-util.c
+@@ -1648,20 +1648,12 @@ static int mixer_class_event(snd_mixer_class_t *class, 
unsigned int mask,
+ } else if (mask & SND_CTL_EVENT_MASK_ADD) {
+ snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem);
+ if (iface == SND_CTL_ELEM_IFACE_CARD || iface == 
SND_CTL_ELEM_IFACE_PCM) {
+-snd_mixer_t *mixer = snd_mixer_class_get_mixer(class);
+-snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem);
+-const char *name = snd_hctl_elem_get_name(helem);
+-const int index = snd_hctl_elem_get_index(helem);
+-const int device = 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.64/, ...

2023-03-14 Thread Sam James
commit: 173b22c1694f6202d4621c7a3c6cc2ac1a4914e0
Author: Sam James  gentoo  org>
AuthorDate: Wed Mar 15 05:49:46 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Mar 15 05:49:46 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=173b22c1

media-video/pipewire: drop 0.3.63-r3, 0.3.64-r2

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   2 -
 ...pa-Fix-audioconvert-overflow-when-scaling.patch |  65 ---
 ...ter-chain-fix-AVX-dsp_sum-index-increment.patch |  22 -
 ...on-t-remove-deprecated-symbols-by-default.patch |  61 ---
 .../files/pipewire-0.3.63-alsa-node-target.patch   |  28 --
 .../files/pipewire-0.3.63-bluetooth-typo.patch |  21 -
 .../files/pipewire-0.3.63-bluez-ldac_abr.patch |  22 -
 .../files/pipewire-0.3.63-rate-update.patch|  39 --
 media-video/pipewire/pipewire-0.3.63-r3.ebuild | 454 -
 media-video/pipewire/pipewire-0.3.64-r2.ebuild | 449 
 10 files changed, 1163 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 7ad7e1d2b95d..0bfca7036486 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,5 +1,3 @@
-DIST pipewire-0.3.63.tar.bz2 1485423 BLAKE2B 
8629bce6d11959d4b3930d7db4e0ad201981002d52c6b73b3ee2b0ac141518f553f7b0e47aef4157b3c3ef71c6b544889f60f4be0fadb01b8a35c1d457edb1aa
 SHA512 
0a45e9017bbcd74f21c6a1f388c5b58123deec083bbc9a9e695948ea95e67b6384acfff6e5ab685ea7287b4696e01176e257b73286ecd03c2d2e43d80fd60805
-DIST pipewire-0.3.64.tar.bz2 1490475 BLAKE2B 
9a4d9e23a5d60da7c5788ce5145ce083f13fe771f3f5bcb3dfd1e9560d982f20415f32f756b875081464e1b175ef80af56d7babb3bbbd7a5eaf034c9c43b810a
 SHA512 
4dff77cf1ab9fefffad1b6f7182115dbb5e4f0339f052dcfcc34b62687b461d25a6f891d1ad0246dab5a8cb80ca190d97d358a6494da8c6a8cc64e0b38452093
 DIST pipewire-0.3.65.tar.bz2 1522095 BLAKE2B 
d991820e8780773ccf1cd68baa3156428eb099703b82c3e3ad24a86bc634ad43fb474fe362de5e5704ee8b35832b75995fd56096b6539835e8b1f31710450d08
 SHA512 
0c2402044a04ab6ba724b0808279498e2126dd567920f3241d7d3d5e13ea676e353fc85a73634cf4cae5429454250dfce5cd18ba4a5444a7ed1a5ca2e0ae1eef
 DIST pipewire-0.3.66.tar.bz2 1532022 BLAKE2B 
aa0db6426a04728b633ce9a40aa1b10eca69423925b1a06b70cc65e4b8466b9de23c4f16ebdc5bd6c14d41866deec66ed166053299b9bc6f5b9e81fcc06010e2
 SHA512 
9e43159fec81dddad618be6ea44304aba4013be14992476e54cbb01e8699c9d6291012879e1c6717e1095be2d73390f900f6d54d8d9c689b50baf93c820c2129
 DIST pipewire-0.3.67.tar.bz2 1531871 BLAKE2B 
59ea184ae11ad2999f37f0ded785551894ce6fbf478146c53f1dc6cdfeae7aa50cf6151b1e5e9c63c4f288682e5da7fde523251096af7da9d79bf96dd9d94809
 SHA512 
538b8ee905760775a0522dd3883d5db9bcaafe93d80eb5b588e21e73de22637a49cd139d3ed4dcfd1a5822af85e4cede624eee899c1e51a115f1ba0a6966c7a5

diff --git 
a/media-video/pipewire/files/0.3.64/0001-spa-Fix-audioconvert-overflow-when-scaling.patch
 
b/media-video/pipewire/files/0.3.64/0001-spa-Fix-audioconvert-overflow-when-scaling.patch
deleted file mode 100644
index e24b8153ef6d..
--- 
a/media-video/pipewire/files/0.3.64/0001-spa-Fix-audioconvert-overflow-when-scaling.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/1d9640af5a7906620f214aa0a39c63128c8506a6.
-
-From 1d9640af5a7906620f214aa0a39c63128c8506a6 Mon Sep 17 00:00:00 2001
-From: Wim Taymans 
-Date: Mon, 16 Jan 2023 18:28:31 +0100
-Subject: [PATCH] spa: Fix audioconvert overflow when scaling
-
-Add SPA_SCALE32_UP that scales a uint32 without overflow.
-Use this for scaling the threshold in ALSA.
-Fix the scaling in audioconvert of the buffer size, the scaling was
-wrong and it was also causing an overflow resulting in choppy sound in
-some cases.
-
-See #2680
 a/spa/include/spa/utils/defs.h
-+++ b/spa/include/spa/utils/defs.h
-@@ -274,6 +274,14 @@ struct spa_fraction {
- #define SPA_ROUND_DOWN_N(num,align)   ((num) & ~SPA_ROUND_MASK(num, align))
- #define SPA_ROUND_UP_N(num,align) num)-1) | SPA_ROUND_MASK(num, 
align))+1)
- 
-+#define SPA_SCALE32_UP(val,num,denom) \
-+({\
-+  uint64_t _val = (val);  \
-+  uint64_t _denom = (denom);  \
-+  (uint32_t)(((_val) * (num) + (_denom)-1) / (_denom));   \
-+})
-+
-+
- #define SPA_PTR_ALIGNMENT(p,align)((intptr_t)(p) & ((align)-1))
- #define SPA_IS_ALIGNED(p,align)   (SPA_PTR_ALIGNMENT(p,align) == 
0)
- #define SPA_PTR_ALIGN(p,align,type)   ((type*)SPA_ROUND_UP_N((intptr_t)(p), 
(intptr_t)(align)))
 a/spa/plugins/alsa/alsa-pcm.c
-+++ b/spa/plugins/alsa/alsa-pcm.c
-@@ -1999,7 +1999,7 @@ static inline void check_position_config(struct state 
*state)
-   (state->rate_denom != state->position->clock.rate.denom))) {
-   state->duration = state->position->clock.duration;
-   state->rate_denom = 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.65/

2023-01-26 Thread Sam James
commit: cdcf177f1d83ef1515b98dc0bbb29b6f01bf993c
Author: Sam James  gentoo  org>
AuthorDate: Fri Jan 27 06:05:52 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jan 27 06:07:23 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdcf177f

media-video/pipewire: add module-combine-stream patch

I'd meant to include this originally but got distracted.

Signed-off-by: Sam James  gentoo.org>

 ...modules-also-install-module-combine-stream.patch | 21 +
 ...wire-0.3.65.ebuild => pipewire-0.3.65-r1.ebuild} |  0
 2 files changed, 21 insertions(+)

diff --git 
a/media-video/pipewire/files/0.3.65/0001-modules-also-install-module-combine-stream.patch
 
b/media-video/pipewire/files/0.3.65/0001-modules-also-install-module-combine-stream.patch
new file mode 100644
index ..6e7dc42c2704
--- /dev/null
+++ 
b/media-video/pipewire/files/0.3.65/0001-modules-also-install-module-combine-stream.patch
@@ -0,0 +1,21 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/fba7083f8ceb210c7c20aceafeb5c9a8767cf705
+
+From fba7083f8ceb210c7c20aceafeb5c9a8767cf705 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Thu, 26 Jan 2023 11:57:45 +0100
+Subject: [PATCH] modules: also install module-combine-stream
+
+--- a/src/modules/meson.build
 b/src/modules/meson.build
+@@ -139,7 +139,7 @@ pipewire_module_echo_cancel_sources = [
+ pipewire_module_combine_stream = 
shared_library('pipewire-module-combine-stream',
+   [ 'module-combine-stream.c' ],
+   include_directories : [configinc],
+-  install : false,
++  install : true,
+   install_dir : modules_install_dir,
+   install_rpath: modules_install_dir,
+   dependencies : [spa_dep, dl_lib, pipewire_dep],
+-- 
+2.39.1
+

diff --git a/media-video/pipewire/pipewire-0.3.65.ebuild 
b/media-video/pipewire/pipewire-0.3.65-r1.ebuild
similarity index 100%
rename from media-video/pipewire/pipewire-0.3.65.ebuild
rename to media-video/pipewire/pipewire-0.3.65-r1.ebuild



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2023-01-15 Thread Sam James
commit: 41c8205b6c45e8ea8f11a02ab8d9c424139c72e2
Author: Sam James  gentoo  org>
AuthorDate: Sun Jan 15 22:31:52 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jan 15 22:31:52 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41c8205b

media-video/pipewire: drop 0.3.59-r2, 0.3.61

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   2 -
 3.59-filter-chain-alloc-port-data-handle.patch |  87 -
 media-video/pipewire/pipewire-0.3.59-r2.ebuild | 431 
 media-video/pipewire/pipewire-0.3.61.ebuild| 435 -
 4 files changed, 955 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 647243e2ecff..efc0b7003e96 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,4 +1,2 @@
-DIST pipewire-0.3.59.tar.bz2 1443372 BLAKE2B 
5e2d82c0bfdb7c030d8be525152c38115438caeb990afd7757424efcf2a7391a6a4891b0f58347ab0b7446707e8ad88baffa0c11c5acc42e086f23c9de3cb354
 SHA512 
f42bfab6e1bb227431119b44887af818a25eb0cdbcca917433162af87c942eb105a2b6e100de877d188941a24f1c8e2e9ae79f499fc20f0a32e2f7cc5de54162
-DIST pipewire-0.3.61.tar.bz2 1480364 BLAKE2B 
df940896189b986e1d63ce6d5ec6cb554ae030ef2ed217a5310f06d959b8c28bff12bc48d847ce5bc6ff007b3652f9ae6e35fd15ef39283348c010cd341bcea6
 SHA512 
8fe5b6ce0fd1ef2a20b1253436fb97aab9da168ce243400b0291051e97809d75793d9446fd4aafc835f82fd257009ec6df9e181d375b492ee72d7f90275ab917
 DIST pipewire-0.3.63.tar.bz2 1485423 BLAKE2B 
8629bce6d11959d4b3930d7db4e0ad201981002d52c6b73b3ee2b0ac141518f553f7b0e47aef4157b3c3ef71c6b544889f60f4be0fadb01b8a35c1d457edb1aa
 SHA512 
0a45e9017bbcd74f21c6a1f388c5b58123deec083bbc9a9e695948ea95e67b6384acfff6e5ab685ea7287b4696e01176e257b73286ecd03c2d2e43d80fd60805
 DIST pipewire-0.3.64.tar.bz2 1490475 BLAKE2B 
9a4d9e23a5d60da7c5788ce5145ce083f13fe771f3f5bcb3dfd1e9560d982f20415f32f756b875081464e1b175ef80af56d7babb3bbbd7a5eaf034c9c43b810a
 SHA512 
4dff77cf1ab9fefffad1b6f7182115dbb5e4f0339f052dcfcc34b62687b461d25a6f891d1ad0246dab5a8cb80ca190d97d358a6494da8c6a8cc64e0b38452093

diff --git 
a/media-video/pipewire/files/pipewire-0.3.59-filter-chain-alloc-port-data-handle.patch
 
b/media-video/pipewire/files/pipewire-0.3.59-filter-chain-alloc-port-data-handle.patch
deleted file mode 100644
index bd066e31af09..
--- 
a/media-video/pipewire/files/pipewire-0.3.59-filter-chain-alloc-port-data-handle.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/94a857550b566472e5ab51191e1b34098e5a9506
-
-From 94a857550b566472e5ab51191e1b34098e5a9506 Mon Sep 17 00:00:00 2001
-From: Wim Taymans 
-Date: Mon, 3 Oct 2022 09:44:32 +0200
-Subject: [PATCH] filter-chain: alloc port data per handle.
-
 a/src/modules/module-filter-chain.c
-+++ b/src/modules/module-filter-chain.c
-@@ -1501,7 +1501,6 @@ static int load_node(struct graph *graph, struct 
spa_json *json)
-   bool have_config = false;
-   uint32_t i;
-   int res;
--  float *data;
- 
-   while (spa_json_get_string(json, key, sizeof(key)) > 0) {
-   if (spa_streq("type", key)) {
-@@ -1576,14 +1575,6 @@ static int load_node(struct graph *graph, struct 
spa_json *json)
-   port->idx = i;
-   port->external = SPA_ID_INVALID;
-   port->p = desc->output[i];
--  if ((data = port->audio_data[i]) == NULL) {
--  data = calloc(1, MAX_SAMPLES * sizeof(float));
--  if (data == NULL) {
--  pw_log_error("cannot create port data: %m");
--  return -errno;
--  }
--  }
--  port->audio_data[i] = data;
-   spa_list_init(>link_list);
-   }
-   for (i = 0; i < desc->n_control; i++) {
-@@ -1629,6 +1620,26 @@ static void node_cleanup(struct node *node)
-   }
- }
- 
-+static int port_ensure_data(struct port *port, uint32_t i)
-+{
-+  float *data;
-+  if ((data = port->audio_data[i]) == NULL) {
-+  data = calloc(1, MAX_SAMPLES * sizeof(float));
-+  if (data == NULL) {
-+  pw_log_error("cannot create port data: %m");
-+  return -errno;
-+  }
-+  }
-+  port->audio_data[i] = data;
-+  return 0;
-+}
-+
-+static void port_free_data(struct port *port, uint32_t i)
-+{
-+  free(port->audio_data[i]);
-+  port->audio_data[i] = NULL;
-+}
-+
- static void node_free(struct node *node)
- {
-   uint32_t i, j;
-@@ -1636,7 +1647,7 @@ static void node_free(struct node *node)
-   spa_list_remove(>link);
-   for (i = 0; i < node->n_hndl; i++) {
-   for (j = 0; j < node->desc->n_output; j++)
--  free(node->output_port[j].audio_data[i]);
-+  port_free_data(>output_port[j], i);
-   }
-   node_cleanup(node);
-   

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-12-15 Thread Sam James
commit: 71975c663f966834437cef5823b2e9d44f2bcefd
Author: Sam James  gentoo  org>
AuthorDate: Fri Dec 16 04:54:31 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Dec 16 04:54:31 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71975c66

media-video/pipewire: add 0.3.63

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   1 +
 .../files/pipewire-0.3.63-bluez-ldac_abr.patch |  22 ++
 media-video/pipewire/pipewire-0.3.63.ebuild| 440 +
 3 files changed, 463 insertions(+)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 9e785ebba91f..d48a4c4d3804 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -2,3 +2,4 @@ DIST pipewire-0.3.59.tar.bz2 1443372 BLAKE2B 
5e2d82c0bfdb7c030d8be525152c3811543
 DIST pipewire-0.3.60.tar.bz2 1478952 BLAKE2B 
a7cda37a35ea58079b5297949239fd05b895b59d397f36a68c75c9392c65ad060926caf2e61c5511ab27f02da6c1c2044e4e86009f9c5f18d2744cad63585900
 SHA512 
8a1c022a283f3cbe7488658563440ff6b426f0b894f519ccd5c7d73bdb5437902fbd4d7d572d5840d48bd7a2f037f0f14dd244fe36b8be891a2d2843f4a99b5c
 DIST pipewire-0.3.61.tar.bz2 1480364 BLAKE2B 
df940896189b986e1d63ce6d5ec6cb554ae030ef2ed217a5310f06d959b8c28bff12bc48d847ce5bc6ff007b3652f9ae6e35fd15ef39283348c010cd341bcea6
 SHA512 
8fe5b6ce0fd1ef2a20b1253436fb97aab9da168ce243400b0291051e97809d75793d9446fd4aafc835f82fd257009ec6df9e181d375b492ee72d7f90275ab917
 DIST pipewire-0.3.62.tar.bz2 1482986 BLAKE2B 
008f57e0e01971aa27af7a7c1e4ddcc72326845534fd8c9257b14078acdde1abf44629b93532ba340c5d446ef47b402bfa22ffbfc28cd44a75131b05e06ce3c8
 SHA512 
3132b18fc3d1269587216301a9e5a87ee74c1583f17da466a82e9446b57a8a9b77e7dfdea84f04320940c637ea6ce5c1c9caca6a449fb1e55e946259820b2084
+DIST pipewire-0.3.63.tar.bz2 1485423 BLAKE2B 
8629bce6d11959d4b3930d7db4e0ad201981002d52c6b73b3ee2b0ac141518f553f7b0e47aef4157b3c3ef71c6b544889f60f4be0fadb01b8a35c1d457edb1aa
 SHA512 
0a45e9017bbcd74f21c6a1f388c5b58123deec083bbc9a9e695948ea95e67b6384acfff6e5ab685ea7287b4696e01176e257b73286ecd03c2d2e43d80fd60805

diff --git a/media-video/pipewire/files/pipewire-0.3.63-bluez-ldac_abr.patch 
b/media-video/pipewire/files/pipewire-0.3.63-bluez-ldac_abr.patch
new file mode 100644
index ..a6e237ddd7c7
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.63-bluez-ldac_abr.patch
@@ -0,0 +1,22 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/7758240c79a3ed15459da5d150a0b1c3612e3f79
+
+From 7758240c79a3ed15459da5d150a0b1c3612e3f79 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Thu, 15 Dec 2022 12:20:40 +0100
+Subject: [PATCH] bluez: fix compilation without ldac_abr
+
+The define for this constant was removed but it was LDACBT_EQMID_MQ
+before.
+--- a/spa/plugins/bluez5/a2dp-codec-ldac.c
 b/spa/plugins/bluez5/a2dp-codec-ldac.c
+@@ -243,7 +243,7 @@ static int codec_reduce_bitpool(void *data)
+ #else
+   struct impl *this = data;
+   int res;
+-  if (this->eqmid == LDACBT_EQMID_BITRATE_33 || !this->enable_abr)
++  if (this->eqmid == LDACBT_EQMID_MQ || !this->enable_abr)
+   return this->eqmid;
+   res = ldacBT_alter_eqmid_priority(this->ldac, 
LDACBT_EQMID_INC_CONNECTION);
+   return res;
+-- 
+GitLab

diff --git a/media-video/pipewire/pipewire-0.3.63.ebuild 
b/media-video/pipewire/pipewire-0.3.63.ebuild
new file mode 100644
index ..1372ecbeb898
--- /dev/null
+++ b/media-video/pipewire/pipewire-0.3.63.ebuild
@@ -0,0 +1,440 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# 1. Please regularly check (even at the point of bumping) Fedora's packaging
+# for needed backports at 
https://src.fedoraproject.org/rpms/pipewire/tree/rawhide.
+#
+# 2. Upstream also sometimes amend release notes for the previous release to 
mention
+# needed patches, e.g. 
https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros
+#
+# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# continue to move quickly. It's not uncommon for fixes to be made shortly
+# after releases.
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit flag-o-matic meson-multilib optfeature prefix python-any-r1 systemd 
udev
+
+if [[ ${PV} ==  ]]; then
+   EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git;
+   inherit git-r3
+else
+   if [[ ${PV} == *_p* ]] ; then
+   MY_COMMIT=""
+   
SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2
 -> ${P}.tar.bz2"
+   S="${WORKDIR}"/${PN}-${MY_COMMIT}
+   else
+   
SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2;
+   fi
+
+   KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Multimedia processing graphs"

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-12-14 Thread Sam James
commit: 268993841b3919124331916ebd125c6015d9f962
Author: Sam James  gentoo  org>
AuthorDate: Wed Dec 14 08:35:49 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 14 08:35:49 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26899384

media-video/pipewire: backport upstream fixes

Signed-off-by: Sam James  gentoo.org>

 .../files/pipewire-0.3.62-distorted-avx2.patch |  41 ++
 .../files/pipewire-0.3.62-use-after-free.patch | 185 +
 media-video/pipewire/pipewire-0.3.62-r1.ebuild | 442 +
 3 files changed, 668 insertions(+)

diff --git a/media-video/pipewire/files/pipewire-0.3.62-distorted-avx2.patch 
b/media-video/pipewire/files/pipewire-0.3.62-distorted-avx2.patch
new file mode 100644
index ..5b2f0817d048
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.62-distorted-avx2.patch
@@ -0,0 +1,41 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/b927063b89b791c5fc5485ce4d9eac2cd17a4ad6
+
+From b927063b89b791c5fc5485ce4d9eac2cd17a4ad6 Mon Sep 17 00:00:00 2001
+From: Sefa Eyeoglu 
+Date: Sun, 11 Dec 2022 20:14:09 +0100
+Subject: [PATCH] audioconvert: fix distorted audio on AVX2
+
+Closes pipewire/pipewire#2885
+
+Signed-off-by: Sefa Eyeoglu 
+--- a/spa/plugins/audioconvert/fmt-ops-avx2.c
 b/spa/plugins/audioconvert/fmt-ops-avx2.c
+@@ -339,7 +339,7 @@ conv_s32_to_f32d_4s_avx2(void *data, void * SPA_RESTRICT 
dst[], const void * SPA
+   __m256i in[4];
+   __m256 out[4], factor = _mm256_set1_ps(1.0f / S24_SCALE);
+   __m256i mask1 = _mm256_setr_epi32(0*n_channels, 1*n_channels, 
2*n_channels, 3*n_channels,
+-3*n_channels, 5*n_channels, 
6*n_channels, 7*n_channels);
++4*n_channels, 5*n_channels, 
6*n_channels, 7*n_channels);
+ 
+   if (SPA_IS_ALIGNED(d0, 32) &&
+   SPA_IS_ALIGNED(d1, 32) &&
+@@ -405,7 +405,7 @@ conv_s32_to_f32d_2s_avx2(void *data, void * SPA_RESTRICT 
dst[], const void * SPA
+   __m256i in[4];
+   __m256 out[4], factor = _mm256_set1_ps(1.0f / S24_SCALE);
+   __m256i mask1 = _mm256_setr_epi32(0*n_channels, 1*n_channels, 
2*n_channels, 3*n_channels,
+-3*n_channels, 5*n_channels, 
6*n_channels, 7*n_channels);
++4*n_channels, 5*n_channels, 
6*n_channels, 7*n_channels);
+ 
+   if (SPA_IS_ALIGNED(d0, 32) &&
+   SPA_IS_ALIGNED(d1, 32))
+@@ -453,7 +453,7 @@ conv_s32_to_f32d_1s_avx2(void *data, void * SPA_RESTRICT 
dst[], const void * SPA
+   __m256i in[2];
+   __m256 out[2], factor = _mm256_set1_ps(1.0f / S24_SCALE);
+   __m256i mask1 = _mm256_setr_epi32(0*n_channels, 1*n_channels, 
2*n_channels, 3*n_channels,
+-3*n_channels, 5*n_channels, 
6*n_channels, 7*n_channels);
++4*n_channels, 5*n_channels, 
6*n_channels, 7*n_channels);
+ 
+   if (SPA_IS_ALIGNED(d0, 32))
+   unrolled = n_samples & ~15;
+-- 
+GitLab

diff --git a/media-video/pipewire/files/pipewire-0.3.62-use-after-free.patch 
b/media-video/pipewire/files/pipewire-0.3.62-use-after-free.patch
new file mode 100644
index ..66d21caf3195
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.62-use-after-free.patch
@@ -0,0 +1,185 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/3bdd2e01c56ec13179340ecdce0b766f72e4339e
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/8c892443eb5989ea3e660dedc6a506a9bfb42eac
+
+From 3bdd2e01c56ec13179340ecdce0b766f72e4339e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= 
+Date: Sat, 10 Dec 2022 00:40:21 +0100
+Subject: [PATCH] pipewire: store SPA handles in a global list by age
+
+Operating on the assumption that every SPA handle
+can reference any other older SPA handle, the only
+safe destruction order is from youngest to oldest.
+
+To achieve this, store all handles across all plugins
+sorted by age (youngest first), and use that as the
+order of destruction in `pw_deinit()`.
+
+This line of thinking does not account for what happens
+when a handle that is referenced by others is unloaded,
+but it does not make that case worse either.
+
+See #2881
+--- a/src/pipewire/pipewire.c
 b/src/pipewire/pipewire.c
+@@ -64,7 +64,6 @@ struct plugin {
+   char *filename;
+   void *hnd;
+   spa_handle_factory_enum_func_t enum_func;
+-  struct spa_list handles;
+   int ref;
+ };
+ 
+@@ -78,6 +77,7 @@ struct handle {
+ 
+ struct registry {
+   struct spa_list plugins;
++  struct spa_list handles; /* all handles across all plugins by age 
(youngest first) */
+ };
+ 
+ struct support {
+@@ -149,7 +149,6 @@ open_plugin(struct registry *registry,
+   plugin->filename = strdup(filename);
+   plugin->hnd = hnd;
+   plugin->enum_func = enum_func;
+-  spa_list_init(>handles);
+ 
+   

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-11-17 Thread Sam James
commit: 928787e04cecede2d3bd6347a077e282f21f4109
Author: Sam James  gentoo  org>
AuthorDate: Thu Nov 17 19:19:10 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Nov 17 19:19:32 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=928787e0

media-video/pipewire: backport upstream-recommended patches for 0.3.60

- Fixes profile switch crashing
- Fixes use of pipewire in VMs

Signed-off-by: Sam James  gentoo.org>

 .../pipewire-0.3.60-profile-switch-crash.patch |  28 ++
 .../pipewire/files/pipewire-0.3.60-qemu.patch  |  22 ++
 media-video/pipewire/pipewire-0.3.60-r1.ebuild | 438 +
 3 files changed, 488 insertions(+)

diff --git 
a/media-video/pipewire/files/pipewire-0.3.60-profile-switch-crash.patch 
b/media-video/pipewire/files/pipewire-0.3.60-profile-switch-crash.patch
new file mode 100644
index ..cd126d627d20
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.60-profile-switch-crash.patch
@@ -0,0 +1,28 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/bf3516ba0496b644b3944b114253f23964178897
+
+From bf3516ba0496b644b3944b114253f23964178897 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Tue, 15 Nov 2022 15:40:47 +0100
+Subject: [PATCH] audioadapter: perform setup again after a PortConfig
+
+After the ports are reconfigured, we need to perform the setup again so
+that buffers and processing can happen with the right settings.
+
+This fixes an issue when autoswitching between A2DP and HFP with
+bluetooth headsets when there is also a stereo capture device available.
+The input stream of the browser is quickly reconfigured between stereo
+and mono with only a Pause command in between, clearing the setup state
+is enough to redo the setup when going back to Playing.
+
+Fixes #2764
+--- a/spa/plugins/audioconvert/audioconvert.c
 b/spa/plugins/audioconvert/audioconvert.c
+@@ -979,6 +979,7 @@ static int reconfigure_mode(struct impl *this, enum 
spa_param_port_config_mode m
+   }
+ 
+   this->monitor = monitor;
++  this->setup = false;
+   dir->control = control;
+   dir->have_profile = true;
+   dir->mode = mode;
+GitLab

diff --git a/media-video/pipewire/files/pipewire-0.3.60-qemu.patch 
b/media-video/pipewire/files/pipewire-0.3.60-qemu.patch
new file mode 100644
index ..87d34ec609cf
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.60-qemu.patch
@@ -0,0 +1,22 @@
+From b46d8a8c921a8da6883610ad4b68da95bf59b59e Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Wed, 16 Nov 2022 20:45:38 +0100
+Subject: [PATCH] alsa: force playback start when buffer is full
+
+When we try to play data but the ringbuffer is full, we need to start
+the device or else we will stay in this situation forever and stay
+silent.
+
+Fixes #2830
+--- a/spa/plugins/alsa/alsa-pcm.c
 b/spa/plugins/alsa/alsa-pcm.c
+@@ -2128,7 +2128,7 @@ again:
+ 
+   state->sample_count += total_written;
+ 
+-  if (SPA_UNLIKELY(!state->alsa_started && total_written > 0))
++  if (SPA_UNLIKELY(!state->alsa_started && (total_written > 0 || frames 
== 0)))
+   do_start(state);
+ 
+   return 0;
+GitLab

diff --git a/media-video/pipewire/pipewire-0.3.60-r1.ebuild 
b/media-video/pipewire/pipewire-0.3.60-r1.ebuild
new file mode 100644
index ..0acb65629783
--- /dev/null
+++ b/media-video/pipewire/pipewire-0.3.60-r1.ebuild
@@ -0,0 +1,438 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# 1. Please regularly check (even at the point of bumping) Fedora's packaging
+# for needed backports at 
https://src.fedoraproject.org/rpms/pipewire/tree/rawhide.
+#
+# 2. Upstream also sometimes amend release notes for the previous release to 
mention
+# needed patches, e.g. 
https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros
+#
+# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# continue to move quickly. It's not uncommon for fixes to be made shortly
+# after releases.
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit flag-o-matic meson-multilib optfeature prefix python-any-r1 systemd 
udev
+
+if [[ ${PV} ==  ]]; then
+   EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git;
+   inherit git-r3
+else
+   if [[ ${PV} == *_p* ]] ; then
+   MY_COMMIT=""
+   
SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2
 -> ${P}.tar.bz2"
+   S="${WORKDIR}"/${PN}-${MY_COMMIT}
+   else
+   
SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2;
+   fi
+
+   KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Multimedia processing graphs"
+HOMEPAGE="https://pipewire.org/;
+
+LICENSE="MIT LGPL-2.1+ GPL-2"
+# ABI was broken in 0.3.42 for 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-10-14 Thread Sam James
commit: bf9a2ed186a3ce71b4c776379bfca7fe8b11432e
Author: Sam James  gentoo  org>
AuthorDate: Fri Oct 14 19:32:31 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Oct 14 19:33:09 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf9a2ed1

media-video/pipewire: backport filter chain corruption fix

filter-chain may crash with multiple filters in a chain as it
mixes up the buffers.

Reported-by: Arsen Arsenović  aarsen.me>
Signed-off-by: Sam James  gentoo.org>

 3.59-filter-chain-alloc-port-data-handle.patch |  87 +
 media-video/pipewire/pipewire-0.3.59-r1.ebuild | 431 +
 2 files changed, 518 insertions(+)

diff --git 
a/media-video/pipewire/files/pipewire-0.3.59-filter-chain-alloc-port-data-handle.patch
 
b/media-video/pipewire/files/pipewire-0.3.59-filter-chain-alloc-port-data-handle.patch
new file mode 100644
index ..bd066e31af09
--- /dev/null
+++ 
b/media-video/pipewire/files/pipewire-0.3.59-filter-chain-alloc-port-data-handle.patch
@@ -0,0 +1,87 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/94a857550b566472e5ab51191e1b34098e5a9506
+
+From 94a857550b566472e5ab51191e1b34098e5a9506 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Mon, 3 Oct 2022 09:44:32 +0200
+Subject: [PATCH] filter-chain: alloc port data per handle.
+
+--- a/src/modules/module-filter-chain.c
 b/src/modules/module-filter-chain.c
+@@ -1501,7 +1501,6 @@ static int load_node(struct graph *graph, struct 
spa_json *json)
+   bool have_config = false;
+   uint32_t i;
+   int res;
+-  float *data;
+ 
+   while (spa_json_get_string(json, key, sizeof(key)) > 0) {
+   if (spa_streq("type", key)) {
+@@ -1576,14 +1575,6 @@ static int load_node(struct graph *graph, struct 
spa_json *json)
+   port->idx = i;
+   port->external = SPA_ID_INVALID;
+   port->p = desc->output[i];
+-  if ((data = port->audio_data[i]) == NULL) {
+-  data = calloc(1, MAX_SAMPLES * sizeof(float));
+-  if (data == NULL) {
+-  pw_log_error("cannot create port data: %m");
+-  return -errno;
+-  }
+-  }
+-  port->audio_data[i] = data;
+   spa_list_init(>link_list);
+   }
+   for (i = 0; i < desc->n_control; i++) {
+@@ -1629,6 +1620,26 @@ static void node_cleanup(struct node *node)
+   }
+ }
+ 
++static int port_ensure_data(struct port *port, uint32_t i)
++{
++  float *data;
++  if ((data = port->audio_data[i]) == NULL) {
++  data = calloc(1, MAX_SAMPLES * sizeof(float));
++  if (data == NULL) {
++  pw_log_error("cannot create port data: %m");
++  return -errno;
++  }
++  }
++  port->audio_data[i] = data;
++  return 0;
++}
++
++static void port_free_data(struct port *port, uint32_t i)
++{
++  free(port->audio_data[i]);
++  port->audio_data[i] = NULL;
++}
++
+ static void node_free(struct node *node)
+ {
+   uint32_t i, j;
+@@ -1636,7 +1647,7 @@ static void node_free(struct node *node)
+   spa_list_remove(>link);
+   for (i = 0; i < node->n_hndl; i++) {
+   for (j = 0; j < node->desc->n_output; j++)
+-  free(node->output_port[j].audio_data[i]);
++  port_free_data(>output_port[j], i);
+   }
+   node_cleanup(node);
+   descriptor_unref(node->desc);
+@@ -1688,6 +1699,8 @@ static int graph_instantiate(struct graph *graph)
+ 
+   spa_list_for_each(link, >link_list, 
input_link) {
+   struct port *peer = link->output;
++  if ((res = port_ensure_data(peer, i)) < 
0)
++  goto error;
+   pw_log_info("connect input port 
%s[%d]:%s %p",
+   node->name, i, 
d->ports[port->p].name,
+   peer->audio_data[i]);
+@@ -1696,6 +1709,8 @@ static int graph_instantiate(struct graph *graph)
+   }
+   for (j = 0; j < desc->n_output; j++) {
+   port = >output_port[j];
++  if ((res = port_ensure_data(port, i)) < 0)
++  goto error;
+   pw_log_info("connect output port %s[%d]:%s %p",
+   node->name, i, 
d->ports[port->p].name,
+   port->audio_data[i]);
+GitLab

diff --git a/media-video/pipewire/pipewire-0.3.59-r1.ebuild 
b/media-video/pipewire/pipewire-0.3.59-r1.ebuild
new file mode 100644
index ..da8ad2640541
--- /dev/null
+++ 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-07-30 Thread Sam James
commit: 9fce003dab4f3b0086c49adc06d2717564aa4499
Author: Sam James  gentoo  org>
AuthorDate: Sun Jul 31 03:32:57 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jul 31 03:32:57 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fce003d

media-video/pipewire: drop 0.3.52-r1, 0.3.53_p20220705-r1, 0.3.55-r1

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   3 -
 .../files/pipewire-0.3.52-pulse-path.patch |  78 
 .../pipewire/files/pipewire-0.3.55-jack-mix.patch  |  20 -
 media-video/pipewire/pipewire-0.3.52-r1.ebuild | 366 --
 .../pipewire/pipewire-0.3.53_p20220705-r1.ebuild   | 413 
 media-video/pipewire/pipewire-0.3.55-r1.ebuild | 424 -
 6 files changed, 1304 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 5e3c5005ee95..456202c6afb0 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,5 +1,2 @@
 DIST pipewire-0.3.51.tar.gz 1789070 BLAKE2B 
8538eb9f2178efa26365f30b324b707826e580caa1fd9c09b62c561c140c14186e0d2b04808fa78eb5642ddccf1a347def19934ecd654be06b215a693075b6fc
 SHA512 
a762fd260b4b14ad9ef142be11ab1c22268da6726e2179559ffb254f0ce7daf7a502779e33c64313a9c6a9fc1bd15150b76be04ec81aa27c35dbb4333cecdb4a
-DIST pipewire-0.3.52.tar.gz 1810238 BLAKE2B 
bb75eff5fe7700d0a303fbfed7910aebd82346a5a21c4a0d17c06e6991bc90bb6d4f6b9559c25788494cb11faff957523dcd7f0c4c8a40be11b81c63a5a9e5ef
 SHA512 
30e9cf74c92babafe386f02a03bb5c41a8ee5591a02f15845cca1ee44f091ce68eb14d48943d43b680cb525026a19e0290997670f9a82156eaa72e974fe6d01a
-DIST pipewire-0.3.53_p20220705.tar.bz2 1358645 BLAKE2B 
365e81ab114fb9b4abbd5351145d0558c7c00bdbccefc2f7bacb965018c1e7009b7b26b8e95baf35534b74cf9ce49483604841aa7ba949d6a94e720e8ec4233c
 SHA512 
631e737e3517cb4d4c3f84e9540acde2cf94bde472626c61e0223ff4ac5cc2118a35dae79d009558384e24b955cf002d209db1bcf1465056757234725213f152
-DIST pipewire-0.3.55.tar.gz 1801857 BLAKE2B 
ee8d75bffba5f6b2e6ccd4da518339aa8e00e6afd8a4e8b6839bc0e4422b587f7543916ef161c9995bb7bfdf20032af984ac2fe9238ac9ad6160ab5d5942f700
 SHA512 
a139e51bc0d4144ae3bd3511962e541ae5c8a76d344d472805819e5bda6e62ec9807489c2a9e9f42bd9a25eff243f8a794b71d629438bf732a5cd92b85eaa9fc
 DIST pipewire-0.3.56.tar.gz 1856321 BLAKE2B 
62fb5d5a83b3cfc0555f09da42c8d4fbe69f34432add57f91a9c001535340a84f54572af4a5ba138251888cba9be0c038317dfe929d2e2ef36ff62f4679c6ea0
 SHA512 
a1ba598c56130a30e573d3ce3ac5879d800d3005a47075c45353d968c97c12f74d85802cd171b61558c06c474a03bbe4885396ca430a0af6c5672ed00f43d108

diff --git a/media-video/pipewire/files/pipewire-0.3.52-pulse-path.patch 
b/media-video/pipewire/files/pipewire-0.3.52-pulse-path.patch
deleted file mode 100644
index 09d8699f..
--- a/media-video/pipewire/files/pipewire-0.3.52-pulse-path.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/4821c7ca2fe5e25ba018e9f5d4967f08d6bb816f
-
-From: Wim Taymans 
-Date: Thu, 9 Jun 2022 17:06:07 +0200
-Subject: [PATCH] pulse-server: don't append "/pulse" to PULSE_RUNTIME_PATH
-
-Fixes #2431
 a/src/modules/module-protocol-pulse/server.c
-+++ b/src/modules/module-protocol-pulse/server.c
-@@ -460,7 +460,7 @@ static int parse_unix_address(const char *address, struct 
sockaddr_storage *addr
-   if (address[0] != '/') {
-   char runtime_dir[PATH_MAX];
- 
--  if ((res = get_runtime_dir(runtime_dir, sizeof(runtime_dir), 
"pulse")) < 0)
-+  if ((res = get_runtime_dir(runtime_dir, sizeof(runtime_dir))) < 
0)
-   return res;
- 
-   res = snprintf(addr.sun_path, sizeof(addr.sun_path),
 a/src/modules/module-protocol-pulse/utils.c
-+++ b/src/modules/module-protocol-pulse/utils.c
-@@ -50,27 +50,30 @@
- #include "log.h"
- #include "utils.h"
- 
--int get_runtime_dir(char *buf, size_t buflen, const char *dir)
-+int get_runtime_dir(char *buf, size_t buflen)
- {
--  const char *runtime_dir;
-+  const char *runtime_dir, *dir = NULL;
-   struct stat stat_buf;
-   int res, size;
- 
-   runtime_dir = getenv("PULSE_RUNTIME_PATH");
--  if (runtime_dir == NULL)
-+  if (runtime_dir == NULL) {
-   runtime_dir = getenv("XDG_RUNTIME_DIR");
--
-+  dir = "pulse";
-+  }
-   if (runtime_dir == NULL) {
-   pw_log_error("could not find a suitable runtime directory in"
-   "$PULSE_RUNTIME_PATH and $XDG_RUNTIME_DIR");
-   return -ENOENT;
-   }
- 
--  size = snprintf(buf, buflen, "%s/%s", runtime_dir, dir);
-+  size = snprintf(buf, buflen, "%s%s%s", runtime_dir,
-+  dir ? "/" : "", dir ? dir : "");
-   if (size < 0)
-   return -errno;
-   if ((size_t) size >= buflen) {
--  pw_log_error("path %s/%s too long", runtime_dir, dir);
-+  pw_log_error("path %s%s%s 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-07-12 Thread Sam James
commit: b44d0353dbf3af2cb4cd50e0c186eb5e06ce5014
Author: Sam James  gentoo  org>
AuthorDate: Tue Jul 12 23:22:04 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jul 12 23:22:22 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b44d0353

media-video/pipewire: backport JACK mix patch

Noted by upstream in release notes update.

Signed-off-by: Sam James  gentoo.org>

 .../pipewire/files/pipewire-0.3.55-jack-mix.patch| 20 
 ...ipewire-.ebuild => pipewire-0.3.55-r1.ebuild} |  6 +-
 media-video/pipewire/pipewire-.ebuild|  5 -
 3 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/media-video/pipewire/files/pipewire-0.3.55-jack-mix.patch 
b/media-video/pipewire/files/pipewire-0.3.55-jack-mix.patch
new file mode 100644
index ..8667b3a6d167
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.55-jack-mix.patch
@@ -0,0 +1,20 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/40552a0e914c3aef48ce59ce1bfb9d80516aa893
+
+From 40552a0e914c3aef48ce59ce1bfb9d80516aa893 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Tue, 12 Jul 2022 15:10:02 +0200
+Subject: [PATCH] jack: only mix when we have input to mix
+
+Avoids a crash when starting ardour6.
+--- a/pipewire-jack/src/pipewire-jack.c
 b/pipewire-jack/src/pipewire-jack.c
+@@ -4449,7 +4449,7 @@ static void *get_buffer_input_float(struct port *p, 
jack_nframes_t frames)
+   }
+   if (n_ptr == 1) {
+   ptr = mix_ptr[0];
+-  } else {
++  } else if (n_ptr > 1) {
+   ptr = p->emptyptr;
+   mix_function(ptr, mix_ptr, n_ptr, ptr_aligned, frames);
+   p->zeroed = false;
+GitLab

diff --git a/media-video/pipewire/pipewire-.ebuild 
b/media-video/pipewire/pipewire-0.3.55-r1.ebuild
similarity index 98%
copy from media-video/pipewire/pipewire-.ebuild
copy to media-video/pipewire/pipewire-0.3.55-r1.ebuild
index 449554e6270c..bf9ff497fa05 100644
--- a/media-video/pipewire/pipewire-.ebuild
+++ b/media-video/pipewire/pipewire-0.3.55-r1.ebuild
@@ -6,7 +6,10 @@ EAPI=8
 # 1. Please regularly check (even at the point of bumping) Fedora's packaging
 # for needed backports at 
https://src.fedoraproject.org/rpms/pipewire/tree/rawhide.
 #
-# 2. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# 2. Upstream also sometimes amend release notes for the previous release to 
mention
+# needed patches, e.g. 
https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros
+#
+# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things
 # continue to move quickly. It's not uncommon for fixes to be made shortly
 # after releases.
 
@@ -141,6 +144,7 @@ DOCS=( {README,INSTALL}.md NEWS )
 
 PATCHES=(
"${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch
+   "${FILESDIR}"/${P}-jack-mix.patch
 )
 
 # limitsdfile related code taken from =sys-auth/realtime-base-0.1

diff --git a/media-video/pipewire/pipewire-.ebuild 
b/media-video/pipewire/pipewire-.ebuild
index 449554e6270c..f4d3db600214 100644
--- a/media-video/pipewire/pipewire-.ebuild
+++ b/media-video/pipewire/pipewire-.ebuild
@@ -6,7 +6,10 @@ EAPI=8
 # 1. Please regularly check (even at the point of bumping) Fedora's packaging
 # for needed backports at 
https://src.fedoraproject.org/rpms/pipewire/tree/rawhide.
 #
-# 2. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# 2. Upstream also sometimes amend release notes for the previous release to 
mention
+# needed patches, e.g. 
https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros
+#
+# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things
 # continue to move quickly. It's not uncommon for fixes to be made shortly
 # after releases.
 



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-07-12 Thread Sam James
commit: 2deef683233ea5ae0b855da925d4b935ae0e626c
Author: Sam James  gentoo  org>
AuthorDate: Tue Jul 12 23:23:03 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jul 12 23:23:32 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2deef683

media-video/pipewire: drop versions

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   3 -
 .../pipewire-0.3.54-audioconvert-samples.patch |  23 --
 .../files/pipewire-0.3.54-fortify-source.patch |  33 --
 media-video/pipewire/pipewire-0.3.53-r1.ebuild | 404 
 .../pipewire/pipewire-0.3.53_p20220704-r1.ebuild   | 407 
 media-video/pipewire/pipewire-0.3.54-r1.ebuild | 421 
 media-video/pipewire/pipewire-0.3.54-r2.ebuild | 422 -
 media-video/pipewire/pipewire-0.3.54.ebuild| 420 
 media-video/pipewire/pipewire-0.3.55.ebuild| 420 
 9 files changed, 2553 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index a5fadce6ba2e..3d5272fb98b5 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,7 +1,4 @@
 DIST pipewire-0.3.51.tar.gz 1789070 BLAKE2B 
8538eb9f2178efa26365f30b324b707826e580caa1fd9c09b62c561c140c14186e0d2b04808fa78eb5642ddccf1a347def19934ecd654be06b215a693075b6fc
 SHA512 
a762fd260b4b14ad9ef142be11ab1c22268da6726e2179559ffb254f0ce7daf7a502779e33c64313a9c6a9fc1bd15150b76be04ec81aa27c35dbb4333cecdb4a
 DIST pipewire-0.3.52.tar.gz 1810238 BLAKE2B 
bb75eff5fe7700d0a303fbfed7910aebd82346a5a21c4a0d17c06e6991bc90bb6d4f6b9559c25788494cb11faff957523dcd7f0c4c8a40be11b81c63a5a9e5ef
 SHA512 
30e9cf74c92babafe386f02a03bb5c41a8ee5591a02f15845cca1ee44f091ce68eb14d48943d43b680cb525026a19e0290997670f9a82156eaa72e974fe6d01a
-DIST pipewire-0.3.53.tar.gz 1783505 BLAKE2B 
269466c6ba78cb85516dc714f3aa5d71cdf72a859b6e1a11c60062da6dcd56eefc78958fe026b9fd11d61fd6fbe6f2aac54a2a9fd77d4ee474687f5d54628c38
 SHA512 
50f23a7b71f3eb20657ff75de54a9f3056270bf05a5472ec9c7dea1c9d0ed391b6b09496d58b065c3cbc40f9be8088b6737cbf0731973498bcd5a8176c42d443
-DIST pipewire-0.3.53_p20220704.tar.bz2 1351516 BLAKE2B 
3d4e4859c66e9cbe47adc0f1c0e2e512632793d70853e0105984c06d2e66744b68d1c01dc7a85784ca2007a96aa5fd1c62c7f47ea6360df58ff76b87de4d3ee2
 SHA512 
87819aa5bdd3caa685c0fc93b0ddcf8212f115cecc130155918876c10883bd98ce923fef3f9716b2562ef5ae2b5465d9e39816f4b6e0c48cf9f28303755584b6
 DIST pipewire-0.3.53_p20220705.tar.bz2 1358645 BLAKE2B 
365e81ab114fb9b4abbd5351145d0558c7c00bdbccefc2f7bacb965018c1e7009b7b26b8e95baf35534b74cf9ce49483604841aa7ba949d6a94e720e8ec4233c
 SHA512 
631e737e3517cb4d4c3f84e9540acde2cf94bde472626c61e0223ff4ac5cc2118a35dae79d009558384e24b955cf002d209db1bcf1465056757234725213f152
-DIST pipewire-0.3.54.tar.gz 1789544 BLAKE2B 
66b28b36aee0672a1bc8059beb18bf0868d8c01f01823151a732ca8e616860beb1ff4c8eb611f6f17bc99e4201bd1ba8ef44fb8968cedd56be3370e279c75bed
 SHA512 
affb8b4fefd8c1cd3064df0987117931a03e967461d6b8125e3f390b83f6dda1a11d6b30e81590f4780f607b763061dd7a26a7686816dd2801f03d64d43ab8f2
 DIST pipewire-0.3.55.tar.gz 1801857 BLAKE2B 
ee8d75bffba5f6b2e6ccd4da518339aa8e00e6afd8a4e8b6839bc0e4422b587f7543916ef161c9995bb7bfdf20032af984ac2fe9238ac9ad6160ab5d5942f700
 SHA512 
a139e51bc0d4144ae3bd3511962e541ae5c8a76d344d472805819e5bda6e62ec9807489c2a9e9f42bd9a25eff243f8a794b71d629438bf732a5cd92b85eaa9fc

diff --git 
a/media-video/pipewire/files/pipewire-0.3.54-audioconvert-samples.patch 
b/media-video/pipewire/files/pipewire-0.3.54-audioconvert-samples.patch
deleted file mode 100644
index 9c231a9f28f5..
--- a/media-video/pipewire/files/pipewire-0.3.54-audioconvert-samples.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/7b0106883716cb0fa72a2b3c4715175607ec658a
-
-From: Wim Taymans 
-Date: Fri, 8 Jul 2022 09:23:31 +0200
-Subject: [PATCH] audioconvert: consume right amount of input samples
-
-When we are not using the resampler, we consume the same amount of
-input samples as output samples.
-
-Fixes #2519
 a/spa/plugins/audioconvert/audioconvert.c
-+++ b/spa/plugins/audioconvert/audioconvert.c
-@@ -2542,8 +2542,8 @@ static int impl_node_process(void *object)
-   this->in_offset += in_len;
-   n_samples = out_len;
-   } else {
--  this->in_offset += n_samples;
-   n_samples = SPA_MIN(n_samples, n_out);
-+  this->in_offset += n_samples;
-   }
-   this->out_offset += n_samples;
- 
-GitLab

diff --git a/media-video/pipewire/files/pipewire-0.3.54-fortify-source.patch 
b/media-video/pipewire/files/pipewire-0.3.54-fortify-source.patch
deleted file mode 100644
index 0c93f105375a..
--- a/media-video/pipewire/files/pipewire-0.3.54-fortify-source.patch
+++ /dev/null
@@ -1,33 +0,0 @@

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-07-04 Thread Sam James
commit: 83048813c27caef3b8d3e0ba27acdab663ebc2a8
Author: Sam James  gentoo  org>
AuthorDate: Mon Jul  4 23:35:16 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jul  4 23:36:33 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83048813

media-video/pipewire: drop 0.3.30-r2, 0.3.36

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   2 -
 .../pipewire-0.3.25-non-systemd-integration.patch  |  18 --
 ...pewire-0.3.29-revert-openaptx-restriction.patch |  30 ---
 .../pipewire-0.3.35-non-systemd-integration.patch  |  20 --
 ...pewire-0.3.36-fix-crash-uaf-media-session.patch |  36 ---
 .../files/pipewire-0.3.36-fix-version.patch|  25 --
 .../pipewire-0.3.36-missing-limits-include.patch   |  17 --
 media-video/pipewire/pipewire-0.3.30-r2.ebuild | 274 
 media-video/pipewire/pipewire-0.3.36.ebuild| 284 -
 9 files changed, 706 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index d473d3c32798..4d01a2bceef0 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,5 +1,3 @@
-DIST pipewire-0.3.30.tar.gz 1540950 BLAKE2B 
69b35743e3ad9a8caf68d9bb16cf395203efed6c3046b3f4ea33bbcdd6649f5d425d813042c12396a7cd5ff4e8ed91dbc395a96fe55935ad50f9c3f3918b0407
 SHA512 
ec525e0fb7e5c5313245fcc745b971fd7d4a1caa7ab9fe1fa38dc20d50f03e5969197e86b60659971676bec0f79aa7b7951c8209bfe9565a3fd1dcac1b8535b3
-DIST pipewire-0.3.36.tar.gz 1708209 BLAKE2B 
20fce0d7f88347fe594491d4fae7b6a8edee67ff7749f1a40b807a5d5094d792e61e3efd05dca2221f781c263e34ff0a50ad3c162231911d4b1d87704df6c775
 SHA512 
f0fc68ea005018b420a4f65a24dc9c85eb6263c24e66852a7ce2b03f966990d62487b388c7d73ff5adfc10c80c439b1200ae876e41d78f91db190036a1799a14
 DIST pipewire-0.3.49.tar.gz 1769037 BLAKE2B 
2567bc98933bfbb295358886e8f97db2af2f0a6ee3c2586c1718e39f7eedaed8528a4663753ba56d3295e42576da015ce9278f22aff9bbd9ca43d883bff5a2f6
 SHA512 
36398872f7d7b31193d7a8885bbdfb415a122bd779874107a0642202dfd8408f39fddf769bfbae4533c2cc99fe9ef67903d50cc721e936aa4802229f1c46d809
 DIST pipewire-0.3.51.tar.gz 1789070 BLAKE2B 
8538eb9f2178efa26365f30b324b707826e580caa1fd9c09b62c561c140c14186e0d2b04808fa78eb5642ddccf1a347def19934ecd654be06b215a693075b6fc
 SHA512 
a762fd260b4b14ad9ef142be11ab1c22268da6726e2179559ffb254f0ce7daf7a502779e33c64313a9c6a9fc1bd15150b76be04ec81aa27c35dbb4333cecdb4a
 DIST pipewire-0.3.52.tar.gz 1810238 BLAKE2B 
bb75eff5fe7700d0a303fbfed7910aebd82346a5a21c4a0d17c06e6991bc90bb6d4f6b9559c25788494cb11faff957523dcd7f0c4c8a40be11b81c63a5a9e5ef
 SHA512 
30e9cf74c92babafe386f02a03bb5c41a8ee5591a02f15845cca1ee44f091ce68eb14d48943d43b680cb525026a19e0290997670f9a82156eaa72e974fe6d01a

diff --git 
a/media-video/pipewire/files/pipewire-0.3.25-non-systemd-integration.patch 
b/media-video/pipewire/files/pipewire-0.3.25-non-systemd-integration.patch
deleted file mode 100644
index 51455a3b84b8..
--- a/media-video/pipewire/files/pipewire-0.3.25-non-systemd-integration.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
 a/src/daemon/pipewire.conf.in
-+++ b/src/daemon/pipewire.conf.in
-@@ -204,12 +204,12 @@ context.exec = [
- # but it is better to start it as a systemd service.
- # Run the session manager with -h for options.
- #
--@comment@{ path = "@media_session_path@"  args = "" }
-+{ path = "@media_session_path@"  args = "" }
- #
- # You can optionally start the pulseaudio-server here as well
- # but it is better to start it as a systemd service.
- # It can be interesting to start another daemon here that listens
- # on another address with the -a option (eg. -a tcp:4713).
- #
--@comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
-+{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
- ]

diff --git 
a/media-video/pipewire/files/pipewire-0.3.29-revert-openaptx-restriction.patch 
b/media-video/pipewire/files/pipewire-0.3.29-revert-openaptx-restriction.patch
deleted file mode 100644
index 9da495f12d0d..
--- 
a/media-video/pipewire/files/pipewire-0.3.29-revert-openaptx-restriction.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6d2e45a67cadd9498b24e8e4ea7adc6cf627333d Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann 
-Date: Thu, 3 Jun 2021 14:15:44 +0200
-Subject: [PATCH] Revert "openaptx: Blacklist >= 0.2.1 due to license change"
-
-This reverts commit d08b6fac6bec0d334ee9fc785d551a67832f95fe.
-
-Doesn't apply to us.
-
-Bug: https://bugs.gentoo.org/785634

- spa/meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/spa/meson.build b/spa/meson.build
-index 263af4c2..7671c74b 100644
 a/spa/meson.build
-+++ b/spa/meson.build
-@@ -23,7 +23,7 @@ if not get_option('spa-plugins').disabled()
- sbc_dep = dependency('sbc', required: get_option('bluez5'))
- ldac_dep = 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-05-01 Thread Sam James
commit: 431a2f1ce462c3b915184beac83eb73181fcf2cd
Author: Igor V. Kovalenko  gmail  com>
AuthorDate: Sat Apr 30 16:18:09 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sun May  1 19:48:53 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=431a2f1c

media-video/pipewire: Drop alsa-plugins[pulseaudio] blocker

Currently alsa-plugins[pulseaudio] installs pulse plugin which is only enabled
in alsa lib configuration if plugin can access pulseaudio server in runtime.
This is implemented using a runtime conf hook in 51-pulseaudio-probe.conf

Alsa lib runtime conf hooks are run after all static configuration is applied.
This causes a problem to coexistence of pipewire-alsa and pulse plugin:
- normally, pipewire-pulse is enabled which provides pulseaudio server
  connection to libpulse users
- since pulseaudio server is accessible, pulse conf hook will override alsa
  pcm.!default and ctl.!default to use pulse plugin.

To work around this, change pipewire-alsa plugin configuration from static conf
to conf hook which will run after pulse conf hook. To make sure user can still
override default device, make sure this new conf hook will also load
/etc/asound.conf and ~/.asoundrc again like it is done by pulse conf hook.

Since pipewire plugin will take precedence now if pipewire-alsa is installed,
drop the blocker with media-sound/alsa-plugins[pulseaudio]

Closes: https://bugs.gentoo.org/799881
Closes: https://bugs.gentoo.org/791499
Signed-off-by: Igor V. Kovalenko  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/25269
Signed-off-by: Sam James  gentoo.org>

 .../pipewire/files/99-pipewire-default-hook.conf| 17 +
 ...pipewire-0.3.51.ebuild => pipewire-0.3.51-r1.ebuild} |  8 ++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/media-video/pipewire/files/99-pipewire-default-hook.conf 
b/media-video/pipewire/files/99-pipewire-default-hook.conf
new file mode 100644
index ..172de5c27f60
--- /dev/null
+++ b/media-video/pipewire/files/99-pipewire-default-hook.conf
@@ -0,0 +1,17 @@
+# Load pipewire configuration at conf hook processing time. This allows to
+# override pulseaudio defaults configuration which is also applied via hook.
+#
+# Note since hooks are run after /etc/asound.conf and ~/.asoundrc are applied,
+# we load these again here make sure that user configuration takes precedence.
+
+@hooks [
+   {
+   func load
+   files [
+   "/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf"
+   "/etc/asound.conf"
+   "~/.asoundrc"
+   ]
+   errors false
+   }
+]

diff --git a/media-video/pipewire/pipewire-0.3.51.ebuild 
b/media-video/pipewire/pipewire-0.3.51-r1.ebuild
similarity index 98%
rename from media-video/pipewire/pipewire-0.3.51.ebuild
rename to media-video/pipewire/pipewire-0.3.51-r1.ebuild
index e60bb1f87151..b22860800f14 100644
--- a/media-video/pipewire/pipewire-0.3.51.ebuild
+++ b/media-video/pipewire/pipewire-0.3.51-r1.ebuild
@@ -85,7 +85,6 @@ RDEPEND="
lv2? ( media-libs/lilv )
pipewire-alsa? (
>=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}]
-   !media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio]
)
!pipewire-alsa? ( 
media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] )
ssl? ( dev-libs/openssl:= )
@@ -237,10 +236,15 @@ multilib_src_install_all() {
 
if use pipewire-alsa; then
dodir /etc/alsa/conf.d
+
+   # Install pipewire conf loader hook
+   insinto /usr/share/alsa/alsa.conf.d
+   doins "${FILESDIR}"/99-pipewire-default-hook.conf
+
# These will break if someone has /etc that is a symbolic link 
to a subfolder! See #724222
# And the current dosym8 -r implementation is likely affected 
by the same issue, too.
dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf 
/etc/alsa/conf.d/50-pipewire.conf
-   dosym 
../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf 
/etc/alsa/conf.d/99-pipewire-default.conf
+   dosym 
../../../usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf 
/etc/alsa/conf.d/99-pipewire-default-hook.conf
fi
 
if ! use systemd; then



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-05-01 Thread Sam James
commit: 8505ba6d4d94a2aa5e6358edb32f31d5f8098401
Author: Sam James  gentoo  org>
AuthorDate: Sun May  1 19:52:42 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sun May  1 19:52:42 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8505ba6d

media-video/pipewire: respect prefix for 99-pipewire-default-hook.conf

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/files/99-pipewire-default-hook.conf | 6 +++---
 media-video/pipewire/pipewire-0.3.51-r1.ebuild   | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/media-video/pipewire/files/99-pipewire-default-hook.conf 
b/media-video/pipewire/files/99-pipewire-default-hook.conf
index 172de5c27f60..7145accea809 100644
--- a/media-video/pipewire/files/99-pipewire-default-hook.conf
+++ b/media-video/pipewire/files/99-pipewire-default-hook.conf
@@ -1,15 +1,15 @@
 # Load pipewire configuration at conf hook processing time. This allows to
 # override pulseaudio defaults configuration which is also applied via hook.
 #
-# Note since hooks are run after /etc/asound.conf and ~/.asoundrc are applied,
+# Note since hooks are run after @GENTOO_PORTAGE_EPREFIX@/etc/asound.conf and 
~/.asoundrc are applied,
 # we load these again here make sure that user configuration takes precedence.
 
 @hooks [
{
func load
files [
-   "/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf"
-   "/etc/asound.conf"
+   
"@GENTOO_PORTAGE_EPREFIX@/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf"
+   "@GENTOO_PORTAGE_EPREFIX@/etc/asound.conf"
"~/.asoundrc"
]
errors false

diff --git a/media-video/pipewire/pipewire-0.3.51-r1.ebuild 
b/media-video/pipewire/pipewire-0.3.51-r1.ebuild
index b22860800f14..c28ecc739f33 100644
--- a/media-video/pipewire/pipewire-0.3.51-r1.ebuild
+++ b/media-video/pipewire/pipewire-0.3.51-r1.ebuild
@@ -240,6 +240,7 @@ multilib_src_install_all() {
# Install pipewire conf loader hook
insinto /usr/share/alsa/alsa.conf.d
doins "${FILESDIR}"/99-pipewire-default-hook.conf
+   eprefixify 
"${ED}"/usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf
 
# These will break if someone has /etc that is a symbolic link 
to a subfolder! See #724222
# And the current dosym8 -r implementation is likely affected 
by the same issue, too.



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2022-02-20 Thread Sam James
commit: 3f09ddaa0cb5529f43f290d663ab2267d67b2a6c
Author: Sam James  gentoo  org>
AuthorDate: Mon Feb 21 03:27:05 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Feb 21 03:30:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f09ddaa

media-video/pipewire: backport 2 crash fixes

- backport mpd crash fix
- backport "fast volume change" fix

Signed-off-by: Sam James  gentoo.org>

 ...7-pulse-server-pending-sample-reply-crash.patch | 101 +++
 3.47-revert-loop-remove-destroy-list-mpd.patch | 187 +
 ...ire-0.3.47.ebuild => pipewire-0.3.47-r1.ebuild} |   3 +
 3 files changed, 291 insertions(+)

diff --git 
a/media-video/pipewire/files/pipewire-0.3.47-pulse-server-pending-sample-reply-crash.patch
 
b/media-video/pipewire/files/pipewire-0.3.47-pulse-server-pending-sample-reply-crash.patch
new file mode 100644
index ..d4f74a5abcc5
--- /dev/null
+++ 
b/media-video/pipewire/files/pipewire-0.3.47-pulse-server-pending-sample-reply-crash.patch
@@ -0,0 +1,101 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/d7793501fd012de37fcc8bf09003c60bc4624341.patch
+
+From d7793501fd012de37fcc8bf09003c60bc4624341 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Sun, 20 Feb 2022 21:34:53 +0100
+Subject: [PATCH] pulse-server: free pending sample reply
+
+If the sample finished playing before we finished the roundtrip to
+get the sink_index, it will be destroyed. When the roundtrip completes,
+it will try to use invalid memoryy and crash.
+
+Make sure we destroy all pending replies before destroying the sample
+to avoid this problem.
+
+Fixes #2151
+---
+ src/modules/module-protocol-pulse/operation.c  | 10 ++
+ src/modules/module-protocol-pulse/operation.h  |  1 +
+ src/modules/module-protocol-pulse/pending-sample.c |  5 +
+ src/modules/module-protocol-pulse/pulse-server.c   |  4 
+ 4 files changed, 20 insertions(+)
+
+diff --git a/src/modules/module-protocol-pulse/operation.c 
b/src/modules/module-protocol-pulse/operation.c
+index e0e67b374..b1e0eb08d 100644
+--- a/src/modules/module-protocol-pulse/operation.c
 b/src/modules/module-protocol-pulse/operation.c
+@@ -66,6 +66,16 @@ void operation_free(struct operation *o)
+   free(o);
+ }
+ 
++struct operation *operation_find(struct client *client, uint32_t tag)
++{
++  struct operation *o;
++  spa_list_for_each(o, >operations, link) {
++  if (o->tag == tag)
++  return o;
++  }
++  return NULL;
++}
++
+ void operation_complete(struct operation *o)
+ {
+   struct client *client = o->client;
+diff --git a/src/modules/module-protocol-pulse/operation.h 
b/src/modules/module-protocol-pulse/operation.h
+index d282ee5e5..1fa07cc7b 100644
+--- a/src/modules/module-protocol-pulse/operation.h
 b/src/modules/module-protocol-pulse/operation.h
+@@ -43,6 +43,7 @@ int operation_new(struct client *client, uint32_t tag);
+ int operation_new_cb(struct client *client, uint32_t tag,
+   void (*callback) (void *data, struct client *client, uint32_t 
tag),
+   void *data);
++struct operation *operation_find(struct client *client, uint32_t tag);
+ void operation_free(struct operation *o);
+ void operation_complete(struct operation *o);
+ 
+diff --git a/src/modules/module-protocol-pulse/pending-sample.c 
b/src/modules/module-protocol-pulse/pending-sample.c
+index 6e5d04fbb..399fc3b54 100644
+--- a/src/modules/module-protocol-pulse/pending-sample.c
 b/src/modules/module-protocol-pulse/pending-sample.c
+@@ -29,6 +29,7 @@
+ #include "client.h"
+ #include "internal.h"
+ #include "log.h"
++#include "operation.h"
+ #include "pending-sample.h"
+ #include "sample-play.h"
+ 
+@@ -36,10 +37,14 @@ void pending_sample_free(struct pending_sample *ps)
+ {
+   struct client * const client = ps->client;
+   struct impl * const impl = client->impl;
++  struct operation *o;
+ 
+   spa_list_remove(>link);
+   spa_hook_remove(>listener);
+   pw_work_queue_cancel(impl->work_queue, ps, SPA_ID_INVALID);
+ 
++  if ((o = operation_find(client, ps->tag)) != NULL)
++  operation_free(o);
++
+   sample_play_destroy(ps->play);
+ }
+diff --git a/src/modules/module-protocol-pulse/pulse-server.c 
b/src/modules/module-protocol-pulse/pulse-server.c
+index 182c3db99..c035840d1 100644
+--- a/src/modules/module-protocol-pulse/pulse-server.c
 b/src/modules/module-protocol-pulse/pulse-server.c
+@@ -2353,6 +2353,10 @@ static void on_sample_done(void *obj, void *data, int 
res, uint32_t id)
+ {
+   struct pending_sample *ps = obj;
+   struct client *client = ps->client;
++  struct operation *o;
++
++  if ((o = operation_find(client, ps->tag)) != NULL)
++  operation_complete(o);
+ 
+   pending_sample_free(ps);
+   client_unref(client);
+-- 
+GitLab
+
+

diff --git 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2021-11-26 Thread Andreas Sturmlechner
commit: ad21e71688d89d1b2f663b38bb9856a8df291614
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Fri Nov 26 18:57:48 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Fri Nov 26 19:37:32 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad21e716

media-video/pipewire: Drop 0.3.39-r4

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 media-video/pipewire/Manifest  |   1 -
 .../files/pipewire-0.3.39-endian-test-fix.patch| 112 
 .../pipewire-0.3.39-fix-build-some-arches.patch|  35 ---
 media-video/pipewire/pipewire-0.3.39-r4.ebuild | 296 -
 4 files changed, 444 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 5d065d2f1818..e94a104be026 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,5 +1,4 @@
 DIST pipewire-0.3.30.tar.gz 1540950 BLAKE2B 
69b35743e3ad9a8caf68d9bb16cf395203efed6c3046b3f4ea33bbcdd6649f5d425d813042c12396a7cd5ff4e8ed91dbc395a96fe55935ad50f9c3f3918b0407
 SHA512 
ec525e0fb7e5c5313245fcc745b971fd7d4a1caa7ab9fe1fa38dc20d50f03e5969197e86b60659971676bec0f79aa7b7951c8209bfe9565a3fd1dcac1b8535b3
 DIST pipewire-0.3.36.tar.gz 1708209 BLAKE2B 
20fce0d7f88347fe594491d4fae7b6a8edee67ff7749f1a40b807a5d5094d792e61e3efd05dca2221f781c263e34ff0a50ad3c162231911d4b1d87704df6c775
 SHA512 
f0fc68ea005018b420a4f65a24dc9c85eb6263c24e66852a7ce2b03f966990d62487b388c7d73ff5adfc10c80c439b1200ae876e41d78f91db190036a1799a14
 DIST pipewire-0.3.38.tar.gz 1727371 BLAKE2B 
dac7f3e1992b9690195df1dbc04575d386d21d06d1727b004b851e300709b3707806b7b20d36c1e74225d91a2df5428c913376903b286592f87083857347e53e
 SHA512 
c3c6c822bf4e5e77fed8d6ef09059d3e43195957692ab7baddc349af3d759d892a9af0e7802d389e2a9a15e5fece4c08ec963ac42df931233eec6057bad67eb6
-DIST pipewire-0.3.39.tar.gz 1671751 BLAKE2B 
6ed56d43a45244c29a29f714eba1dbf911997f91d3e3df2cc1547051d52a2853f4d4c745aaf866ae18b63668f3fb9b7d3338deaad90d229c5fab1641482c6761
 SHA512 
75ed35177577efe7559341394605777be21d0f3952b9379a23c8d4c71d35ed88ec45c3e9ad58832099c8f370753d8b47a5767f47453a599c4f4a4b641b2b0d9d
 DIST pipewire-0.3.40.tar.gz 1675384 BLAKE2B 
b7df4f1ca363b764a5230099d32dd5ba5dceaadc8ca2d4ce55f42810a91628b4e32891757b22fd5eb7a7f497163936c63b86330ab2d5efa261a82d450660c371
 SHA512 
63109b87d50be160a6cde632470849564d4743f4cb469f5e3713bb1cbefc08f80416210ddedc09439555b702193c0266a1b9724e366a3b850bdf1a346c5e80cb

diff --git a/media-video/pipewire/files/pipewire-0.3.39-endian-test-fix.patch 
b/media-video/pipewire/files/pipewire-0.3.39-endian-test-fix.patch
deleted file mode 100644
index 2687299b235d..
--- a/media-video/pipewire/files/pipewire-0.3.39-endian-test-fix.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/5dfc3494dc4635918e74b9f3d717a39a74b28554.patch
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/c07f0ccb71a9d95944ce3e4d7e453cb50a26b0a2.patch
-
-From 5dfc3494dc4635918e74b9f3d717a39a74b28554 Mon Sep 17 00:00:00 2001
-From: Wim Taymans 
-Date: Mon, 25 Oct 2021 16:15:17 +0200
-Subject: [PATCH] map: use uintptr_t for the next pointer
-
-This aligns the low bits of the next field with the low bits of the
-pointer on big endian cpus.
-
-Fixes #1747

- src/pipewire/map.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/pipewire/map.h b/src/pipewire/map.h
-index f47dfa6b3..1867fa4d3 100644
 a/src/pipewire/map.h
-+++ b/src/pipewire/map.h
-@@ -74,7 +74,7 @@ extern "C" {
-  * first item to get re-used on the next insert.
-  */
- union pw_map_item {
--  uint32_t next;  /* next free index */
-+  uintptr_t next; /* next free index */
-   void *data; /* data of this item, must be an even address */
- };
- 
--- 
-GitLab
-
-From c07f0ccb71a9d95944ce3e4d7e453cb50a26b0a2 Mon Sep 17 00:00:00 2001
-From: Wim Taymans 
-Date: Mon, 25 Oct 2021 16:11:56 +0200
-Subject: [PATCH] map: make _insert_at() fail on a removed item
-
-You are only supposed to use _insert_new()/_remove() or _insert_at()
-on the map, If we detect a _insert_at() to a removed item,
-return an error because else we might corrupt the free list.
-
-Update unit test accordingly.

- src/pipewire/map.h | 15 ++-
- test/test-map.c| 17 +
- 2 files changed, 3 insertions(+), 29 deletions(-)
-
-diff --git a/src/pipewire/map.h b/src/pipewire/map.h
-index fd57f7f7c..f47dfa6b3 100644
 a/src/pipewire/map.h
-+++ b/src/pipewire/map.h
-@@ -182,20 +182,9 @@ static inline int pw_map_insert_at(struct pw_map *map, 
uint32_t id, void *data)
-   if (item == NULL)
-   return -errno;
-   } else {
--  if (pw_map_id_is_free(map, id)) {
--  uint32_t *current = >free_list;
--  while (*current != SPA_ID_INVALID) {
--  uint32_t current_id = (*current) 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2021-10-23 Thread Sam James
commit: e4a4227c737503f7145ad76dea878f96f25688ca
Author: Niklāvs Koļesņikovs <89q1r14hd  relay  firefox  com>
AuthorDate: Mon Oct 18 20:16:19 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Oct 24 01:57:49 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4a4227c

media-video/pipewire: adds WirePlumber support for OpenRC

As an added bonus the launcher script now starts all the daemons
itself, which means we no longer need to carry and conditionally
apply a patch, which has proven to require recurrent updates.

The instructions for disabling PulseAudio compatibility are pretty
narly and the approach is best reworked (or given up on entirely),
since those instructions have never been the whole story.

Thanks-to: Sam James  gentoo.org> (reviewing & eprefix hint)
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd  relay.firefox.com>
Signed-off-by: Sam James  gentoo.org>

 .../pipewire/files/gentoo-pipewire-launcher.in | 26 +++
 media-video/pipewire/pipewire-.ebuild  | 52 --
 2 files changed, 55 insertions(+), 23 deletions(-)

diff --git a/media-video/pipewire/files/gentoo-pipewire-launcher.in 
b/media-video/pipewire/files/gentoo-pipewire-launcher.in
new file mode 100644
index 000..4e66e2fe317
--- /dev/null
+++ b/media-video/pipewire/files/gentoo-pipewire-launcher.in
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# PipeWire launcher script for XDG compliant desktops on OpenRC.
+#
+# systemd users are very _STRONGLY_ advised to use the much
+# more reliable and predictable user units instead.
+
+# WARNING: This script assumes being run inside XDG compliant session,
+# which means D-Bus session instance is expected to be correctly set up
+# prior to this script starting. If that is not true, things may break!
+
+# Best to reap any existing daemons and only then try to start a new set.
+pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
+
+# The core daemon which by itself does probably nothing.
+@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire &
+
+# The so called pipewire-pulse daemon used for PulseAudio compatibility.
+# Commenting this out will stop the PA proxying daemon from starting,
+# however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using
+# clients will still have access to audio and may end up clashing with
+# non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon).
+@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf &
+
+# Finally a session manager is required for PipeWire to do anything.
+exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber

diff --git a/media-video/pipewire/pipewire-.ebuild 
b/media-video/pipewire/pipewire-.ebuild
index eaa51173cfc..360882c6ea6 100644
--- a/media-video/pipewire/pipewire-.ebuild
+++ b/media-video/pipewire/pipewire-.ebuild
@@ -5,7 +5,7 @@ EAPI="7"
 
 PYTHON_COMPAT=( python3_{8..10} )
 
-inherit meson-multilib optfeature python-any-r1 systemd udev
+inherit meson-multilib optfeature prefix python-any-r1 systemd udev
 
 if [[ ${PV} ==  ]]; then
EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git;
@@ -113,12 +113,6 @@ python_check_deps() {
 src_prepare() {
default
 
-   if ! use systemd; then
-   # This can be applied non-conditionally but would make for a
-   # significantly worse user experience on systemd then.
-   eapply "${FILESDIR}"/${PN}-0.3.36-non-systemd-integration.patch
-   fi
-
einfo "Generating ${limitsdfile}"
cat > ${limitsdfile} <<- EOF || die
# Start of ${limitsdfile} from ${P}
@@ -206,8 +200,9 @@ multilib_src_install_all() {
insinto /etc/xdg/autostart
newins "${FILESDIR}"/pipewire.desktop pipewire.desktop
 
-   exeinto /usr/libexec
-   newexe "${FILESDIR}"/pipewire-launcher.sh pipewire-launcher
+   exeinto /usr/bin
+   newexe "${FILESDIR}"/gentoo-pipewire-launcher.in 
gentoo-pipewire-launcher
+   eprefixify "${ED}"/usr/bin/gentoo-pipewire-launcher
fi
 }
 
@@ -247,20 +242,31 @@ pkg_postinst() {
elog "  systemctl --user enable --now wireplumber.service"
elog
else
-   elog "This ebuild auto-enables PulseAudio replacement. Because 
of that, users"
-   elog "are recommended to edit: ${EROOT}/etc/pulse/client.conf 
and disable"
-   elog "autospawning of the original daemon by setting:"
-   elog
-   elog "  autospawn = no"
-   elog
-   elog "Please note that the semicolon (;) must _NOT_ be at the 
beginning of the line!"
-   elog
-   elog "Alternatively, if replacing PulseAudio daemon is not 
desired, edit"
-   elog "${EROOT}/etc/pipewire/pipewire.conf by commenting out the 
relevant"
-   elog "command near the end of the file:"
-   elog

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2021-10-13 Thread Andreas Sturmlechner
commit: c800486441999e00c2e17300e7af2fe1e844dbc0
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Wed Oct 13 21:00:23 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Wed Oct 13 21:11:40 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8004864

media-video/pipewire: Drop old

Overshadowed by multiple newer versions.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 media-video/pipewire/Manifest  |   4 -
 .../pipewire-0.3.31-non-systemd-integration.patch  |  17 --
 ...pewire-0.3.31-revert-openaptx-restriction.patch |  30 ---
 ...pipewire-0.3.33-revert-libfreeaptx-switch.patch |  38 ---
 media-video/pipewire/pipewire-0.3.32.ebuild| 272 
 media-video/pipewire/pipewire-0.3.33-r1.ebuild | 275 
 media-video/pipewire/pipewire-0.3.34.ebuild| 276 
 media-video/pipewire/pipewire-0.3.35.ebuild| 281 -
 8 files changed, 1193 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index a76808c0197..b4f40211f2c 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,8 +1,4 @@
 DIST pipewire-0.3.30.tar.gz 1540950 BLAKE2B 
69b35743e3ad9a8caf68d9bb16cf395203efed6c3046b3f4ea33bbcdd6649f5d425d813042c12396a7cd5ff4e8ed91dbc395a96fe55935ad50f9c3f3918b0407
 SHA512 
ec525e0fb7e5c5313245fcc745b971fd7d4a1caa7ab9fe1fa38dc20d50f03e5969197e86b60659971676bec0f79aa7b7951c8209bfe9565a3fd1dcac1b8535b3
-DIST pipewire-0.3.32.tar.gz 1604622 BLAKE2B 
cab83a17a2b27f710e1377a2ad2ad7003053ef3e8b55423362f0b428e22d52c2ce564da00aab71cc93262d4cb21f239fffea195d05937fdf3489dc540b77d58d
 SHA512 
8a7fe26a78071fdd8d4c9e2d9bf3791af8e0cb53b976b45d39dcab4ad08196808f416911fb1b366cc85e3fa80592ec79c4e4556bb3a390f4a10229b4bf9893f7
-DIST pipewire-0.3.33.tar.gz 1629559 BLAKE2B 
de48956ac87ed6d63a08dd354b1e4abf81b9db99825ca65cbb5b522e71eb6920b35173e1c3abd9a710c28709e2b0a459db67654cfeac42149cdfa91c84833a8b
 SHA512 
bc3d5658d6fda11dd55f22ba5293b4ff6c3e9a8d083b0cf7b3356bc18f4f65967557602a0d6603a2a2a548ecb42c6b7fbb9d315ed0fce435f4bb884ab4dd263b
-DIST pipewire-0.3.34.tar.gz 1682396 BLAKE2B 
1a3524a833bde6facf637071f905bb0237f3fc53a86d6160083f36c7a42fb7c71c873a0dc9eea04cfb08cbec08807557c2b83efc1ac403adf6a9998d83441338
 SHA512 
cbf8eb410d2cd1923e67ac9ee9eca0e74567bb7e8ea407a536e64b3ec27b5bbb1e7fdd74a5a7cbffbac3f9996d8a08f8c723401fb44cb2920f044a3a2f3a6c18
-DIST pipewire-0.3.35.tar.gz 1704419 BLAKE2B 
5c0debd19b29a9488be26125794f04e57e8b3cd3842654cb935decae18ffefc4137927d969448f60f1c1c2985d54db139fc3dcf07e36e81014021d63490096d8
 SHA512 
08a2e305fe4e9d3c3f4533c163b725dd32d26513e51a9f476bd18d6157ebf67e97e48b8df9595d45c81599f416e6b3f76e90df575dd460a8d26fe951db30e0f6
 DIST pipewire-0.3.36.tar.gz 1708209 BLAKE2B 
20fce0d7f88347fe594491d4fae7b6a8edee67ff7749f1a40b807a5d5094d792e61e3efd05dca2221f781c263e34ff0a50ad3c162231911d4b1d87704df6c775
 SHA512 
f0fc68ea005018b420a4f65a24dc9c85eb6263c24e66852a7ce2b03f966990d62487b388c7d73ff5adfc10c80c439b1200ae876e41d78f91db190036a1799a14
 DIST pipewire-0.3.37.tar.gz 1716320 BLAKE2B 
ce98b28015de69a0c91953a4839d5f86a29cfa19e2058ba0a2476a75a03b782ae67239b418306e4ed7dab81fe7e77928a417b966ff3c72ac552006cea66e3218
 SHA512 
3f4cf1ac66117a56a7a264262e2e238a54060457da6a986bd9227f51cc7e8d1a8fd282aef8462c096819282c5baec22779d2025c2e1918bbfb3d6ff75829aea6
 DIST pipewire-0.3.38.tar.gz 1727371 BLAKE2B 
dac7f3e1992b9690195df1dbc04575d386d21d06d1727b004b851e300709b3707806b7b20d36c1e74225d91a2df5428c913376903b286592f87083857347e53e
 SHA512 
c3c6c822bf4e5e77fed8d6ef09059d3e43195957692ab7baddc349af3d759d892a9af0e7802d389e2a9a15e5fece4c08ec963ac42df931233eec6057bad67eb6

diff --git 
a/media-video/pipewire/files/pipewire-0.3.31-non-systemd-integration.patch 
b/media-video/pipewire/files/pipewire-0.3.31-non-systemd-integration.patch
deleted file mode 100644
index ccc89f1310b..000
--- a/media-video/pipewire/files/pipewire-0.3.31-non-systemd-integration.patch
+++ /dev/null
@@ -1,17 +0,0 @@
 a/src/daemon/pipewire.conf.in  2021-06-30 22:22:09.520402459 +0200
-+++ b/src/daemon/pipewire.conf.in  2021-06-30 22:22:30.620404999 +0200
-@@ -234,12 +234,12 @@
- # but it is better to start it as a systemd service.
- # Run the session manager with -h for options.
- #
--@comment@{ path = "@session_manager_path@"  args = 
"@session_manager_args@" }
-+{ path = "@session_manager_path@"  args = "@session_manager_args@" }
- #
- # You can optionally start the pulseaudio-server here as well
- # but it is better to start it as a systemd service.
- # It can be interesting to start another daemon here that listens
- # on another address with the -a option (eg. -a tcp:4713).
- #
--@comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
-+{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
- ]


[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2021-09-30 Thread Sam James
commit: 95839274ef7c289570c1c7c7549f3ed5439b9b98
Author: Sam James  gentoo  org>
AuthorDate: Fri Oct  1 00:00:18 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Oct  1 00:00:39 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95839274

media-video/pipewire: add 0.3.38

Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |  1 +
 .../files/pipewire-0.3.38-find-readline.patch  | 36 +++
 .../files/pipewire-0.3.38-fix-arm-build.patch  | 18 ++
 .../pipewire-0.3.38-libcamera-null-deref.patch | 70 ++
 ...pipewire-.ebuild => pipewire-0.3.38.ebuild} |  5 ++
 media-video/pipewire/pipewire-.ebuild  |  1 +
 6 files changed, 131 insertions(+)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 3e2400ff6d7..a76808c0197 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -5,3 +5,4 @@ DIST pipewire-0.3.34.tar.gz 1682396 BLAKE2B 
1a3524a833bde6facf637071f905bb0237f3
 DIST pipewire-0.3.35.tar.gz 1704419 BLAKE2B 
5c0debd19b29a9488be26125794f04e57e8b3cd3842654cb935decae18ffefc4137927d969448f60f1c1c2985d54db139fc3dcf07e36e81014021d63490096d8
 SHA512 
08a2e305fe4e9d3c3f4533c163b725dd32d26513e51a9f476bd18d6157ebf67e97e48b8df9595d45c81599f416e6b3f76e90df575dd460a8d26fe951db30e0f6
 DIST pipewire-0.3.36.tar.gz 1708209 BLAKE2B 
20fce0d7f88347fe594491d4fae7b6a8edee67ff7749f1a40b807a5d5094d792e61e3efd05dca2221f781c263e34ff0a50ad3c162231911d4b1d87704df6c775
 SHA512 
f0fc68ea005018b420a4f65a24dc9c85eb6263c24e66852a7ce2b03f966990d62487b388c7d73ff5adfc10c80c439b1200ae876e41d78f91db190036a1799a14
 DIST pipewire-0.3.37.tar.gz 1716320 BLAKE2B 
ce98b28015de69a0c91953a4839d5f86a29cfa19e2058ba0a2476a75a03b782ae67239b418306e4ed7dab81fe7e77928a417b966ff3c72ac552006cea66e3218
 SHA512 
3f4cf1ac66117a56a7a264262e2e238a54060457da6a986bd9227f51cc7e8d1a8fd282aef8462c096819282c5baec22779d2025c2e1918bbfb3d6ff75829aea6
+DIST pipewire-0.3.38.tar.gz 1727371 BLAKE2B 
dac7f3e1992b9690195df1dbc04575d386d21d06d1727b004b851e300709b3707806b7b20d36c1e74225d91a2df5428c913376903b286592f87083857347e53e
 SHA512 
c3c6c822bf4e5e77fed8d6ef09059d3e43195957692ab7baddc349af3d759d892a9af0e7802d389e2a9a15e5fece4c08ec963ac42df931233eec6057bad67eb6

diff --git a/media-video/pipewire/files/pipewire-0.3.38-find-readline.patch 
b/media-video/pipewire/files/pipewire-0.3.38-find-readline.patch
new file mode 100644
index 000..6b56304f5d1
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.38-find-readline.patch
@@ -0,0 +1,36 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/ddfbd684e78e2b8b9ad40bedb4612ea0197d231a.patch
+
+From: Joshua Strobl 
+Date: Thu, 30 Sep 2021 23:11:50 +0300
+Subject: [PATCH] Fix readline detection by allowing fallback to cc
+ find_library
+
+--- a/meson.build
 b/meson.build
+@@ -326,6 +326,11 @@ dbus_dep = dependency('dbus-1')
+ sdl_dep = dependency('sdl2', required : get_option('sdl2'))
+ summary({'SDL 2': sdl_dep.found()}, bool_yn: true, section: 'Misc 
dependencies')
+ readline_dep = dependency('readline', required : false)
++
++if not readline_dep.found()
++  readline_dep = cc.find_library('readline', required: false)
++endif
++
+ summary({'readline (for pw-cli)': readline_dep.found()}, bool_yn: true, 
section: 'Misc dependencies')
+ ncurses_dep = dependency('ncursesw', required : false)
+ sndfile_dep = dependency('sndfile', version : '>= 1.0.20', required : 
get_option('sndfile'))
+@@ -406,7 +411,12 @@ libinotify_dep = (build_machine.system() == 'freebsd'
+ : dependency('', required: false))
+ 
+ # On FreeBSD, libintl library is required for gettext
+-libintl_dep = cc.find_library('intl', required: false)
++libintl_dep = dependency('intl', required: false)
++
++if not libintl_dep.found()
++libintl_dep = cc.find_library('intl', required: false)
++endif
++summary({'intl support': libintl_dep.found()}, bool_yn: true)
+ 
+ need_alsa = get_option('pipewire-alsa').enabled() or 
get_option('session-managers').contains('media-session')
+ alsa_dep = dependency('alsa', version : '>=1.1.7', required: need_alsa)
+GitLab

diff --git a/media-video/pipewire/files/pipewire-0.3.38-fix-arm-build.patch 
b/media-video/pipewire/files/pipewire-0.3.38-fix-arm-build.patch
new file mode 100644
index 000..222aa58cce1
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.38-fix-arm-build.patch
@@ -0,0 +1,18 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/f8817b439433798bd7217dc4ae72197887b0fc96.patch
+
+From: Wim Taymans 
+Date: Thu, 30 Sep 2021 11:12:27 +0200
+Subject: [PATCH] cpu: fix compilation on ARM
+
+--- a/spa/plugins/support/cpu-arm.c
 b/spa/plugins/support/cpu-arm.c
+@@ -80,7 +80,7 @@ arm_init(struct impl *impl)
+   int arch;
+ 
+   if (!(cpuinfo = get_cpuinfo())) {
+-  spa_log_warn(impl->log, NAME " %p: Can't read cpuinfo", impl);
++  spa_log_warn(impl->log, "%p: 

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2021-09-16 Thread Sam James
commit: 7d32da171523679474240d62b5dc7be927a6b218
Author: Sam James  gentoo  org>
AuthorDate: Thu Sep 16 21:54:50 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Sep 16 21:55:36 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d32da17

media-video/pipewire: add 0.3.36

Bug: https://bugs.gentoo.org/791499
Bug: https://bugs.gentoo.org/813099
Fixes: bb2267c8c9f435c2623e924e3ae2ad4e444642b9
Signed-off-by: Sam James  gentoo.org>

 ...pewire-0.3.36-fix-crash-uaf-media-session.patch | 36 ++
 .../files/pipewire-0.3.36-fix-version.patch| 25 +++
 ...pipewire-.ebuild => pipewire-0.3.36.ebuild} |  4 ++-
 media-video/pipewire/pipewire-.ebuild  |  2 +-
 4 files changed, 65 insertions(+), 2 deletions(-)

diff --git 
a/media-video/pipewire/files/pipewire-0.3.36-fix-crash-uaf-media-session.patch 
b/media-video/pipewire/files/pipewire-0.3.36-fix-crash-uaf-media-session.patch
new file mode 100644
index 000..6080ff4fd7a
--- /dev/null
+++ 
b/media-video/pipewire/files/pipewire-0.3.36-fix-crash-uaf-media-session.patch
@@ -0,0 +1,36 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/39c8ed4f62172026036281691cd3b67b469a8629
+
+From 39c8ed4f62172026036281691cd3b67b469a8629 Mon Sep 17 00:00:00 2001
+From: Pauli Virtanen 
+Date: Thu, 16 Sep 2021 19:18:52 +0300
+Subject: [PATCH] media-session: don't use-after-free if linking node removed
+
+Should fix an ASAN crash.
+---
+ src/examples/media-session/policy-node.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/examples/media-session/policy-node.c 
b/src/examples/media-session/policy-node.c
+index d83613d0b..e273434fa 100644
+--- a/src/examples/media-session/policy-node.c
 b/src/examples/media-session/policy-node.c
+@@ -869,6 +869,7 @@ static int link_nodes(struct node *node, struct node *peer)
+   struct pw_properties *props;
+   struct node *output, *input;
+   int res;
++  uint32_t node_id = node->id;
+ 
+   pw_log_debug(NAME " %p: link nodes %d %d remix:%d", impl,
+   node->id, peer->id, !node->dont_remix);
+@@ -902,7 +903,7 @@ static int link_nodes(struct node *node, struct node *peer)
+ 
+   if (impl->linking_node_removed) {
+   impl->linking_node_removed = false;
+-  pw_log_info("linking node %d was removed", node->id);
++  pw_log_info("linking node %d was removed", node_id);
+   return -ENOENT;
+   }
+   node->linking = false;
+-- 
+GitLab
+

diff --git a/media-video/pipewire/files/pipewire-0.3.36-fix-version.patch 
b/media-video/pipewire/files/pipewire-0.3.36-fix-version.patch
new file mode 100644
index 000..ace05b9e4a1
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.36-fix-version.patch
@@ -0,0 +1,25 @@
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/10abcd92d76ddd02b690ff06d67c013bfc5fa5c2
+
+From 10abcd92d76ddd02b690ff06d67c013bfc5fa5c2 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Thu, 16 Sep 2021 17:57:47 +0200
+Subject: [PATCH] update version number as well
+
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index c9b98c8ba..ea35ac674 100644
+--- a/meson.build
 b/meson.build
+@@ -1,5 +1,5 @@
+ project('pipewire', ['c' ],
+-  version : '0.3.35',
++  version : '0.3.36',
+   license : [ 'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' ],
+   meson_version : '>= 0.54.0',
+   default_options : [ 'warning_level=3',
+-- 
+GitLab
+

diff --git a/media-video/pipewire/pipewire-.ebuild 
b/media-video/pipewire/pipewire-0.3.36.ebuild
similarity index 98%
copy from media-video/pipewire/pipewire-.ebuild
copy to media-video/pipewire/pipewire-0.3.36.ebuild
index a19e1c690b3..727450ab578 100644
--- a/media-video/pipewire/pipewire-.ebuild
+++ b/media-video/pipewire/pipewire-0.3.36.ebuild
@@ -73,7 +73,7 @@ RDEPEND="
)
pipewire-alsa? (
>=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}]
-   !media-plugins/alsa-plugins[pulseaudio]
+   !media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio]
)
!pipewire-alsa? ( 
media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] )
systemd? ( sys-apps/systemd )
@@ -96,6 +96,8 @@ DOCS=( {README,INSTALL}.md NEWS )
 
 PATCHES=(
"${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch
+   "${FILESDIR}"/${P}-fix-crash-uaf-media-session.patch
+   "${FILESDIR}"/${P}-fix-version.patch
 )
 
 # limitsdfile related code taken from =sys-auth/realtime-base-0.1

diff --git a/media-video/pipewire/pipewire-.ebuild 
b/media-video/pipewire/pipewire-.ebuild
index a19e1c690b3..0fa096afe77 100644
--- a/media-video/pipewire/pipewire-.ebuild
+++ b/media-video/pipewire/pipewire-.ebuild
@@ -73,7 +73,7 @@ RDEPEND="
)
pipewire-alsa? (

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2021-09-13 Thread Sam James
commit: 121747cd3cfd88744c0f6beae5cc86d4aee858f5
Author: Sam James  gentoo  org>
AuthorDate: Mon Sep 13 23:02:01 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Sep 13 23:06:50 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=121747cd

media-video/pipewire: add 0.3.35

Switches to libfreeaptx as per upstream.

Waiting for now re wireplumber default
integration, but it's not strictly
needed right now anyway.

Bug: https://bugs.gentoo.org/791259
Bug: https://bugs.gentoo.org/807616
Closes: https://bugs.gentoo.org/812809
Signed-off-by: Sam James  gentoo.org>

 media-video/pipewire/Manifest  |   1 +
 .../pipewire-0.3.35-non-systemd-integration.patch  |  20 ++
 media-video/pipewire/pipewire-0.3.35.ebuild| 276 +
 3 files changed, 297 insertions(+)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index b07df37bbb4..c64467c1592 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -2,3 +2,4 @@ DIST pipewire-0.3.30.tar.gz 1540950 BLAKE2B 
69b35743e3ad9a8caf68d9bb16cf395203ef
 DIST pipewire-0.3.32.tar.gz 1604622 BLAKE2B 
cab83a17a2b27f710e1377a2ad2ad7003053ef3e8b55423362f0b428e22d52c2ce564da00aab71cc93262d4cb21f239fffea195d05937fdf3489dc540b77d58d
 SHA512 
8a7fe26a78071fdd8d4c9e2d9bf3791af8e0cb53b976b45d39dcab4ad08196808f416911fb1b366cc85e3fa80592ec79c4e4556bb3a390f4a10229b4bf9893f7
 DIST pipewire-0.3.33.tar.gz 1629559 BLAKE2B 
de48956ac87ed6d63a08dd354b1e4abf81b9db99825ca65cbb5b522e71eb6920b35173e1c3abd9a710c28709e2b0a459db67654cfeac42149cdfa91c84833a8b
 SHA512 
bc3d5658d6fda11dd55f22ba5293b4ff6c3e9a8d083b0cf7b3356bc18f4f65967557602a0d6603a2a2a548ecb42c6b7fbb9d315ed0fce435f4bb884ab4dd263b
 DIST pipewire-0.3.34.tar.gz 1682396 BLAKE2B 
1a3524a833bde6facf637071f905bb0237f3fc53a86d6160083f36c7a42fb7c71c873a0dc9eea04cfb08cbec08807557c2b83efc1ac403adf6a9998d83441338
 SHA512 
cbf8eb410d2cd1923e67ac9ee9eca0e74567bb7e8ea407a536e64b3ec27b5bbb1e7fdd74a5a7cbffbac3f9996d8a08f8c723401fb44cb2920f044a3a2f3a6c18
+DIST pipewire-0.3.35.tar.gz 1704419 BLAKE2B 
5c0debd19b29a9488be26125794f04e57e8b3cd3842654cb935decae18ffefc4137927d969448f60f1c1c2985d54db139fc3dcf07e36e81014021d63490096d8
 SHA512 
08a2e305fe4e9d3c3f4533c163b725dd32d26513e51a9f476bd18d6157ebf67e97e48b8df9595d45c81599f416e6b3f76e90df575dd460a8d26fe951db30e0f6

diff --git 
a/media-video/pipewire/files/pipewire-0.3.35-non-systemd-integration.patch 
b/media-video/pipewire/files/pipewire-0.3.35-non-systemd-integration.patch
new file mode 100644
index 000..3edab5b924c
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.3.35-non-systemd-integration.patch
@@ -0,0 +1,20 @@
+--- a/src/daemon/pipewire.conf.in
 b/src/daemon/pipewire.conf.in
+@@ -235,12 +235,12 @@ context.exec = [
+ # but it is better to start it as a systemd service.
+ # Run the session manager with -h for options.
+ #
+-@sm_comment@{ path = "@session_manager_path@"  args = 
"@session_manager_args@" }
++{ path = "@session_manager_path@"  args = "@session_manager_args@" }
+ #
+ # You can optionally start the pulseaudio-server here as well
+ # but it is better to start it as a systemd service.
+ # It can be interesting to start another daemon here that listens
+ # on another address with the -a option (eg. -a tcp:4713).
+ #
+-@pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" 
}
++{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
+ ]
+-- 
+2.33.0
+

diff --git a/media-video/pipewire/pipewire-0.3.35.ebuild 
b/media-video/pipewire/pipewire-0.3.35.ebuild
new file mode 100644
index 000..591b040719c
--- /dev/null
+++ b/media-video/pipewire/pipewire-0.3.35.ebuild
@@ -0,0 +1,276 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit meson-multilib optfeature python-any-r1 udev
+
+if [[ ${PV} ==  ]]; then
+   EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git;
+   inherit git-r3
+else
+   
SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.gz;
+   KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Multimedia processing graphs"
+HOMEPAGE="https://pipewire.org/;
+
+LICENSE="MIT LGPL-2.1+ GPL-2"
+SLOT="0/0.3"
+IUSE="bluetooth doc echo-cancel extra gstreamer jack-client jack-sdk 
pipewire-alsa systemd test v4l"
+
+# Once replacing system JACK libraries is possible, it's likely that
+# jack-client IUSE will need blocking to avoid users accidentally
+# configuring their systems to send PW sink output to the emulated
+# JACK's sink - doing so is likely to yield no audio, cause a CPU
+# cycles consuming loop (and may even cause GUI crashes)!
+
+REQUIRED_USE="jack-sdk? ( !jack-client )"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+   app-doc/xmltoman
+   >=dev-util/meson-0.59
+   virtual/pkgconfig
+   

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2021-04-12 Thread Thomas Deutschmann
commit: b08c84f511f0c75e07bba317ca281a5d9d63ab12
Author: Niklāvs Koļesņikovs <80783143+pinkflames  users  noreply 
 github  com>
AuthorDate: Tue Mar 16 22:01:02 2021 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Mon Apr 12 21:55:34 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b08c84f5

media-video/pipewire: Bump to 0.3.25 & ebuild overhaul

This overhaul improves the instructions shown after merging and now
provides a sys-auth/realtime-base inspired limits.d file for
better user experience.
The user ID (UID) range used was chosen to match what SDDM accepts
as a valid non-system UID range. This has known shortcomings with
very large values in enterprise deployments but this was deemed
the least bad of all the imperfect options.

Updates SRC_URI to use the official repository hosted by The
freedesktop project instead of the GitHub mirror.
Patches Meson files to correctly handle docdir per FHS/Gentoo policy.

Replaces the old jack IUSE with jack-client for allowing PW to act
as a JACK 2 client, while the emulation code is now always enabled,
since it has no dependencies nor adverse effects on anything.

When systemd USE flag is not set, now automatically enables starting
of pipewire-pulse and pipewire-media-session binaries, since most
people installing PipeWire will want to do that anyway.
Adds instructions to inform users of the change and directs them to
Gentoo Wiki with details specific to their setups.

Always disables FFmpeg and Vulkan, and removes the respective IUSE,
and comments out their *DEPEND, because Vulkan feature is only
useful to developers, and FFmpeg code has had no major developments
since May 2020 - upstream disables both by default.

Removes dead code that no longer was doing anything and correctly
adds RDEPEND on supported Bluetooth audio codecs with the associated
IUSE flags. As well as adds RDEPEND on sys-libs/ncurses[unicode] that
was previously missing and ensures that disabled libsndfile IUSE does
not silently disable building of the pw-cat tool, leading to surprising
mismatch between upstream documentation and actually installed binaries.

Also turns the warning about failed mlock(), that upstream now disables,
back on - to known for sure that 256k is really enough for everyone.

Closes: https://bugs.gentoo.org/777288
Closes: https://bugs.gentoo.org/777837
Closes: https://bugs.gentoo.org/779058
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd  relay.firefox.com>
Closes: https://github.com/gentoo/gentoo/pull/19965
Signed-off-by: Thomas Deutschmann  gentoo.org>

 media-video/pipewire/Manifest  |   1 +
 ...pewire-0.3.25-enable-failed-mlock-warning.patch |  12 ++
 .../files/pipewire-0.3.25-fix-docdir-path.patch|  32 +++
 .../pipewire-0.3.25-non-systemd-integration.patch  |  18 ++
 media-video/pipewire/metadata.xml  |  13 +-
 media-video/pipewire/pipewire-0.3.25.ebuild| 236 +
 6 files changed, 310 insertions(+), 2 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index 5a7bf23034c..ea27a64762d 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,3 +1,4 @@
 DIST pipewire-0.3.18.tar.gz 1277055 BLAKE2B 
4a18bd668afaf144d6e83590293a744b6d2c2a7d8e9fc6ab581f22d294fac5a4841098875f8569f36b794c083e4ec9f0b7d4e29a10dc79286a4843996f7fb64e
 SHA512 
933b15908e30c389555dd9f82f87c2e571b4cb078bfbe5ed1858440166093cdee2b1c15da50bc5ab36087b62e216786b95c2aad9403e5047ae33e4fe8a6f4cc5
 DIST pipewire-0.3.22.tar.gz 1263844 BLAKE2B 
3fb90c0b1c17ed108e8c390873f5c4527e1ff9241d1c5964ad5b7c01fbfefda901ef1228f178cf3c9899e6e8e75969a470f8fba63473ff203cba612c6c0553ca
 SHA512 
a6587e0afd5c90be1733ecf62c6fc68e735ab3b84f2cbbf844bbe1be93e7a23dee07b041ed6b273cab6ab207d2388ae6f2027d0380928555a0155a7cc9ca4a7e
 DIST pipewire-0.3.24.tar.gz 1333048 BLAKE2B 
3146084e3028ed7bf27d483666e07d76c45988a911bba70bd31656ed75847fceb5c306a95bc3515cae9208f9b3cd9e9aaab56ee1de154a7520f669887e77fc6b
 SHA512 
be1fd3b15aae4fc276dd7e4be385cd58e6e9626d6e0a42b7bc3eb46ba324759c05320547aa857510ecf24b1628b76555222d342350d6406ad4d7b536cb3db497
+DIST pipewire-0.3.25.tar.gz 1351257 BLAKE2B 
3c4d6d98e3255df8baf50eb548bcf77b5c027a50f6acedd83cd63481ed5b642c174589f34314f150b07116cea8a3458c3f8b770df4081585d7f75cc8dde4decd
 SHA512 
0f84be21bfcd70f25900c53a8ce399c29ce2d4d10f8b56e5103603cf0c80673aab0b16492e55b42985283adf46343cdca01626225db85a2263f06c309f68f2d7

diff --git 
a/media-video/pipewire/files/pipewire-0.3.25-enable-failed-mlock-warning.patch 
b/media-video/pipewire/files/pipewire-0.3.25-enable-failed-mlock-warning.patch
new file mode 100644
index 000..bdb43fe551d
--- /dev/null
+++ 
b/media-video/pipewire/files/pipewire-0.3.25-enable-failed-mlock-warning.patch
@@ -0,0 +1,12 @@
+diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
+--- a/src/daemon/pipewire.conf.in
 b/src/daemon/pipewire.conf.in
+@@ -6,7 +6,7 @@ context.properties = {
+  

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2021-01-01 Thread Andreas Sturmlechner
commit: 6a1643f4ce3d251587560cccde0586e30d4a432a
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Fri Jan  1 19:10:22 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Fri Jan  1 19:11:50 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a1643f4

media-video/pipewire: Drop 0.2.7

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 media-video/pipewire/Manifest  |  1 -
 .../pipewire/files/pipewire-0.2.7-fno-common.patch | 47 -
 media-video/pipewire/pipewire-0.2.7.ebuild | 80 --
 3 files changed, 128 deletions(-)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
index f712153a007..9e35cbf939a 100644
--- a/media-video/pipewire/Manifest
+++ b/media-video/pipewire/Manifest
@@ -1,3 +1,2 @@
-DIST pipewire-0.2.7.tar.gz 421644 BLAKE2B 
d2ccb56a9ea5ea7782678deb6eae0b0a70da1fa69e807398062d388733901839f15a2f0f7db982fbebd2b2759f443709e6c1950b6367f3ed4801d6c2d6109e73
 SHA512 
10d3e20cc3d233fbcd1fc39702ae3043a656ebcd9cd3c39c77f0cc2bf42ff4956fc03e7933c7b397bca446c63f45ddacea948d5ec7e4a3300499fa2794f14334
 DIST pipewire-0.3.10.tar.gz 1148297 BLAKE2B 
d890b8e6697b17be9f8706a7228b9c79631120550ac51d7fbea8b5d05ca161ce6142a5666a6a61db618d4da0519676160ba1180cf9274865d879f4bb0da2a8e7
 SHA512 
f2f3dd7ce9b9f3a5ab55b6da97cd64419dad5115714848ce8893795c0ed2fd2fe0059240ec9fe1c92fb1442caf8d7071e415afe6712500be1c29fd001293cf0d
 DIST pipewire-0.3.18.tar.gz 1277055 BLAKE2B 
4a18bd668afaf144d6e83590293a744b6d2c2a7d8e9fc6ab581f22d294fac5a4841098875f8569f36b794c083e4ec9f0b7d4e29a10dc79286a4843996f7fb64e
 SHA512 
933b15908e30c389555dd9f82f87c2e571b4cb078bfbe5ed1858440166093cdee2b1c15da50bc5ab36087b62e216786b95c2aad9403e5047ae33e4fe8a6f4cc5

diff --git a/media-video/pipewire/files/pipewire-0.2.7-fno-common.patch 
b/media-video/pipewire/files/pipewire-0.2.7-fno-common.patch
deleted file mode 100644
index f4f82ba96c0..000
--- a/media-video/pipewire/files/pipewire-0.2.7-fno-common.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Bug: https://bugs.gentoo.org/710796
-
 a/spa/plugins/bluez5/a2dp-codecs.h
-+++ b/spa/plugins/bluez5/a2dp-codecs.h
-@@ -284,15 +284,15 @@
- }
- }
- 
--const a2dp_sbc_t bluez_a2dp_sbc;
-+extern const a2dp_sbc_t bluez_a2dp_sbc;
- #if ENABLE_MP3
--const a2dp_mpeg_t bluez_a2dp_mpeg;
-+extern const a2dp_mpeg_t bluez_a2dp_mpeg;
- #endif
- #if ENABLE_AAC
--const a2dp_aac_t bluez_a2dp_aac;
-+extern const a2dp_aac_t bluez_a2dp_aac;
- #endif
- #if ENABLE_APTX
--const a2dp_aptx_t bluez_a2dp_aptx;
-+extern const a2dp_aptx_t bluez_a2dp_aptx;
- #endif
- 
- #endif
 a/spa/plugins/bluez5/bluez5-monitor.c
-+++ b/spa/plugins/bluez5/bluez5-monitor.c
-@@ -75,7 +75,7 @@
-   struct spa_list transport_list;
- };
- 
--struct spa_handle_factory spa_a2dp_sink_factory;
-+extern struct spa_handle_factory spa_a2dp_sink_factory;
- 
- static void fill_item(struct spa_bt_monitor *this, struct spa_bt_transport 
*transport,
-   struct spa_pod **result, struct spa_pod_builder *builder)
 a/spa/plugins/bluez5/meson.build
-+++ b/spa/plugins/bluez5/meson.build
-@@ -1,7 +1,8 @@
- 
- bluez5_sources = ['plugin.c',
- 'a2dp-sink.c',
--  'bluez5-monitor.c']
-+'a2dp-codecs.c',
-+'bluez5-monitor.c']
- 
- bluez5lib = shared_library('spa-bluez5',
-   bluez5_sources,

diff --git a/media-video/pipewire/pipewire-0.2.7.ebuild 
b/media-video/pipewire/pipewire-0.2.7.ebuild
deleted file mode 100644
index 92f7f268808..000
--- a/media-video/pipewire/pipewire-0.2.7.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit meson
-
-if [[ ${PV} ==  ]]; then
-   EGIT_REPO_URI="https://github.com/PipeWire/pipewire.git;
-   inherit git-r3
-else
-   SRC_URI="https://github.com/PipeWire/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-   KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
-fi
-
-DESCRIPTION="Multimedia processing graphs"
-HOMEPAGE="https://pipewire.org/;
-
-LICENSE="LGPL-2.1+"
-SLOT="0/0.2"
-IUSE="bluetooth doc ffmpeg gstreamer sdl systemd vaapi X"
-
-BDEPEND="
-   app-doc/xmltoman
-   doc? (
-   app-doc/doxygen
-   media-gfx/graphviz
-   )
-"
-DEPEND="
-   media-libs/alsa-lib
-   sys-apps/dbus
-   virtual/libudev
-   bluetooth? ( media-libs/sbc )
-   ffmpeg? ( media-video/ffmpeg:= )
-   gstreamer? (
-   media-libs/gstreamer:1.0
-   media-libs/gst-plugins-base:1.0
-   )
-   sdl? ( media-libs/libsdl2 )
-   systemd? ( sys-apps/systemd )
-   vaapi? ( x11-libs/libva )
-   X? ( x11-libs/libX11 )
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=( "${FILESDIR}/${P}-fno-common.patch" )
-
-src_prepare() {
-   spa_use() {
-   if ! use ${1}; then
-

[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2020-06-28 Thread Andreas Sturmlechner
commit: 870706df4a5750b79dcae976373d8fe5f6ac749d
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Jun 28 14:54:28 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Jun 28 15:34:03 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=870706df

media-video/pipewire: Fix build with -fno-common

Thanks-to: Peter Levine  gmail.com>
Closes: https://bugs.gentoo.org/710796
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../pipewire/files/pipewire-0.2.7-fno-common.patch | 47 ++
 media-video/pipewire/pipewire-0.2.7.ebuild |  2 +
 2 files changed, 49 insertions(+)

diff --git a/media-video/pipewire/files/pipewire-0.2.7-fno-common.patch 
b/media-video/pipewire/files/pipewire-0.2.7-fno-common.patch
new file mode 100644
index 000..f4f82ba96c0
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.2.7-fno-common.patch
@@ -0,0 +1,47 @@
+Bug: https://bugs.gentoo.org/710796
+
+--- a/spa/plugins/bluez5/a2dp-codecs.h
 b/spa/plugins/bluez5/a2dp-codecs.h
+@@ -284,15 +284,15 @@
+ }
+ }
+ 
+-const a2dp_sbc_t bluez_a2dp_sbc;
++extern const a2dp_sbc_t bluez_a2dp_sbc;
+ #if ENABLE_MP3
+-const a2dp_mpeg_t bluez_a2dp_mpeg;
++extern const a2dp_mpeg_t bluez_a2dp_mpeg;
+ #endif
+ #if ENABLE_AAC
+-const a2dp_aac_t bluez_a2dp_aac;
++extern const a2dp_aac_t bluez_a2dp_aac;
+ #endif
+ #if ENABLE_APTX
+-const a2dp_aptx_t bluez_a2dp_aptx;
++extern const a2dp_aptx_t bluez_a2dp_aptx;
+ #endif
+ 
+ #endif
+--- a/spa/plugins/bluez5/bluez5-monitor.c
 b/spa/plugins/bluez5/bluez5-monitor.c
+@@ -75,7 +75,7 @@
+   struct spa_list transport_list;
+ };
+ 
+-struct spa_handle_factory spa_a2dp_sink_factory;
++extern struct spa_handle_factory spa_a2dp_sink_factory;
+ 
+ static void fill_item(struct spa_bt_monitor *this, struct spa_bt_transport 
*transport,
+   struct spa_pod **result, struct spa_pod_builder *builder)
+--- a/spa/plugins/bluez5/meson.build
 b/spa/plugins/bluez5/meson.build
+@@ -1,7 +1,8 @@
+ 
+ bluez5_sources = ['plugin.c',
+ 'a2dp-sink.c',
+-  'bluez5-monitor.c']
++'a2dp-codecs.c',
++'bluez5-monitor.c']
+ 
+ bluez5lib = shared_library('spa-bluez5',
+   bluez5_sources,

diff --git a/media-video/pipewire/pipewire-0.2.7.ebuild 
b/media-video/pipewire/pipewire-0.2.7.ebuild
index f8111e7a728..92f7f268808 100644
--- a/media-video/pipewire/pipewire-0.2.7.ebuild
+++ b/media-video/pipewire/pipewire-0.2.7.ebuild
@@ -44,6 +44,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/${P}-fno-common.patch" )
+
 src_prepare() {
spa_use() {
if ! use ${1}; then



[gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/

2019-07-07 Thread Andreas Sturmlechner
commit: 862fe9600d20ddb26d990f1b509ff337637e70a2
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Jul  7 15:09:07 2019 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Jul  7 15:51:01 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=862fe960

media-video/pipewire: New package, 0.2.6 initial version

Bug: https://bugs.gentoo.org/667014
Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 media-video/pipewire/Manifest  |   1 +
 .../files/pipewire-0.2.6-alsa-lib-1.1.9.patch  |  66 ++
 ...pewire-0.2.6-fix-probing-without-starting.patch |  63 ++
 .../pipewire-0.2.6-reuse-fd-in-pipewiresrc.patch   | 137 +
 .../pipewire-0.2.6-revert-combine-all-perms.patch  |  34 +
 media-video/pipewire/metadata.xml  |  15 +++
 media-video/pipewire/pipewire-0.2.6.ebuild |  88 +
 7 files changed, 404 insertions(+)

diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
new file mode 100644
index 000..edaa0d8055e
--- /dev/null
+++ b/media-video/pipewire/Manifest
@@ -0,0 +1 @@
+DIST pipewire-0.2.6.tar.gz 421137 BLAKE2B 
155667d14fe5380e21f0b70accea72dc4478085916a9126185136f6d33bd7729d91b790c171dcf7b6aea2c52894462d16516f8821229ca0bf9f6cde15df524d9
 SHA512 
3d1db41f5beb42a0ee15ae7bc8afb89b54a37c3a6a414e88b5e33ceaf98ec6dda0d9a2d03ac47a8dfce48e9637e647291919e6670bb70589b0d1951fbcbd3ff8

diff --git a/media-video/pipewire/files/pipewire-0.2.6-alsa-lib-1.1.9.patch 
b/media-video/pipewire/files/pipewire-0.2.6-alsa-lib-1.1.9.patch
new file mode 100644
index 000..7b2b4c894da
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.2.6-alsa-lib-1.1.9.patch
@@ -0,0 +1,66 @@
+From 37613b67ba52b5ad4e81d7ea38adc04027d9f9e5 Mon Sep 17 00:00:00 2001
+From: Wim Taymans 
+Date: Thu, 23 May 2019 09:25:51 +0200
+Subject: [PATCH] alsa: handle alsa-lib 1.1.9
+
+alsa-lib 1.1.9 removed /usr/include/alsa from the include path, we
+must include 
+---
+ spa/plugins/alsa/alsa-monitor.c | 2 +-
+ spa/plugins/alsa/alsa-sink.c| 2 +-
+ spa/plugins/alsa/alsa-source.c  | 2 +-
+ spa/plugins/alsa/alsa-utils.h   | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/spa/plugins/alsa/alsa-monitor.c b/spa/plugins/alsa/alsa-monitor.c
+index d8935cd7..16a01302 100644
+--- a/spa/plugins/alsa/alsa-monitor.c
 b/spa/plugins/alsa/alsa-monitor.c
+@@ -25,7 +25,7 @@
+ #include 
+ 
+ #include 
+-#include 
++#include 
+ 
+ #include 
+ #include 
+diff --git a/spa/plugins/alsa/alsa-sink.c b/spa/plugins/alsa/alsa-sink.c
+index c31fe3e2..3c252fab 100644
+--- a/spa/plugins/alsa/alsa-sink.c
 b/spa/plugins/alsa/alsa-sink.c
+@@ -19,7 +19,7 @@
+ 
+ #include 
+ 
+-#include 
++#include 
+ 
+ #include 
+ #include 
+diff --git a/spa/plugins/alsa/alsa-source.c b/spa/plugins/alsa/alsa-source.c
+index 74bbb3c0..8efc8fde 100644
+--- a/spa/plugins/alsa/alsa-source.c
 b/spa/plugins/alsa/alsa-source.c
+@@ -19,7 +19,7 @@
+ 
+ #include 
+ 
+-#include 
++#include 
+ 
+ #include 
+ #include 
+diff --git a/spa/plugins/alsa/alsa-utils.h b/spa/plugins/alsa/alsa-utils.h
+index 5ba57bc5..3b590007 100644
+--- a/spa/plugins/alsa/alsa-utils.h
 b/spa/plugins/alsa/alsa-utils.h
+@@ -26,7 +26,7 @@ extern "C" {
+ 
+ #include 
+ 
+-#include 
++#include 
+ 
+ #include 
+ #include 

diff --git 
a/media-video/pipewire/files/pipewire-0.2.6-fix-probing-without-starting.patch 
b/media-video/pipewire/files/pipewire-0.2.6-fix-probing-without-starting.patch
new file mode 100644
index 000..9b3aed33b96
--- /dev/null
+++ 
b/media-video/pipewire/files/pipewire-0.2.6-fix-probing-without-starting.patch
@@ -0,0 +1,63 @@
+From 37e66c9e55f556558088d9f6b2200d4341a37f04 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich 
+Date: Tue, 18 Jun 2019 09:53:12 +0200
+Subject: [PATCH] deviceprovider: fix probing without starting
+
+self->type is needed in registry_event_global() so it must be set in
+gst_pipewire_device_provider_probe() as well.
+
+self->devices is initialized as NULL when probing is started. So it should
+be just a simple GList* pointer.
+
+Signed-off-by: Michael Olbrich 
+---
+ src/gst/gstpipewiredeviceprovider.c | 8 ++--
+ src/gst/gstpipewiredeviceprovider.h | 2 +-
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/gst/gstpipewiredeviceprovider.c 
b/src/gst/gstpipewiredeviceprovider.c
+index b6472d96..02b38c2e 100644
+--- a/src/gst/gstpipewiredeviceprovider.c
 b/src/gst/gstpipewiredeviceprovider.c
+@@ -265,7 +265,7 @@ static void do_add_node(void *data)
+   nd->dev = new_node (self, nd);
+   if (nd->dev) {
+ if(self->list_only)
+-  *self->devices = g_list_prepend (*self->devices, gst_object_ref_sink 
(nd->dev));
++  self->devices = g_list_prepend (self->devices, gst_object_ref_sink 
(nd->dev));
+ else
+   gst_device_provider_device_add (GST_DEVICE_PROVIDER (self), nd->dev);
+   }
+@@ -555,6