git: 1cfa5875458c - main - multimedia/pipewire: Update to 1.2.1

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Mon, 22 Jul 2024 10:29:09 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1cfa5875458cdc77e1caf19b9538004c96b731e1

commit 1cfa5875458cdc77e1caf19b9538004c96b731e1
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2024-07-22 09:30:35 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-07-22 10:28:52 +0000

    multimedia/pipewire: Update to 1.2.1
---
 multimedia/pipewire/Makefile                             |  6 ++++--
 multimedia/pipewire/distinfo                             |  6 +++---
 .../pipewire/files/patch-spa_plugins_support_meson.build | 16 ++++++++++++++++
 .../files/patch-spa_plugins_vulkan_dmabuf__fallback.c    | 16 ----------------
 .../files/patch-src_modules_module-snapcast-discover.c   | 14 ++++++++++++++
 .../pipewire/files/patch-src_modules_network-utils.h     | 13 +++++++++++++
 multimedia/pipewire/files/patch-src_pipewire_thread.c    | 12 ++++++++++++
 multimedia/pipewire/pkg-plist                            | 13 +++++++++----
 8 files changed, 71 insertions(+), 25 deletions(-)

diff --git a/multimedia/pipewire/Makefile b/multimedia/pipewire/Makefile
index ebb65c79263e..e93b8d82af00 100644
--- a/multimedia/pipewire/Makefile
+++ b/multimedia/pipewire/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	pipewire
-DISTVERSION=	1.0.4
-PORTREVISION=	3
+DISTVERSION=	1.2.1
 CATEGORIES=	multimedia
 
 MAINTAINER=	arrowd@FreeBSD.org
@@ -84,8 +83,11 @@ MESON_ARGS=	-D pw-cat=enabled \
 		-D pipewire-v4l2=disabled \
 		-D libmysofa=disabled \
 		-D libffado=disabled \
+		-D snap=disabled \
 		-D udevrulesdir="${LOCALBASE}/lib/udev/rules.d"
 
+PORTDOCS=	*
+
 # Fake pkg-config support before https://cgit.freebsd.org/src/commit/?id=396851c20aeb
 # but only if devel/ncurses isn't installed
 .if !exists(/usr/libdata/pkgconfig/ncursesw.pc)
diff --git a/multimedia/pipewire/distinfo b/multimedia/pipewire/distinfo
index be6e7b5e0a4d..9fde287b2886 100644
--- a/multimedia/pipewire/distinfo
+++ b/multimedia/pipewire/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1710526199
-SHA256 (pipewire-1.0.4.tar.bz2) = acd317cabb73e975d40e03f86e7aecbb5df1fd261d7536a40cdbc6a2c2d4690a
-SIZE (pipewire-1.0.4.tar.bz2) = 1698660
+TIMESTAMP = 1721586613
+SHA256 (pipewire-1.2.1.tar.bz2) = f15be402ec3b69f36ee2cb0244b6c17fdd5e6374429ae9e3dc194313503dd5ad
+SIZE (pipewire-1.2.1.tar.bz2) = 1812153
diff --git a/multimedia/pipewire/files/patch-spa_plugins_support_meson.build b/multimedia/pipewire/files/patch-spa_plugins_support_meson.build
new file mode 100644
index 000000000000..822da0de66ae
--- /dev/null
+++ b/multimedia/pipewire/files/patch-spa_plugins_support_meson.build
@@ -0,0 +1,16 @@
+--- spa/plugins/support/meson.build.orig	2024-07-12 07:24:23 UTC
++++ spa/plugins/support/meson.build
+@@ -14,10 +14,12 @@ endif
+   simd_cargs += [sse_args, '-DHAVE_SSE']
+ endif
+ 
++stdthreads_lib = cc.find_library('stdthreads', required: false)
++
+ spa_support_lib = shared_library('spa-support',
+   spa_support_sources,
+   c_args : [ simd_cargs ],
+-  dependencies : [ spa_dep, pthread_lib, epoll_shim_dep, mathlib ],
++  dependencies : [ spa_dep, pthread_lib, epoll_shim_dep, mathlib, stdthreads_lib ],
+   install : true,
+   install_dir : spa_plugindir / 'support')
+ spa_support_dep = declare_dependency(link_with: spa_support_lib)
diff --git a/multimedia/pipewire/files/patch-spa_plugins_vulkan_dmabuf__fallback.c b/multimedia/pipewire/files/patch-spa_plugins_vulkan_dmabuf__fallback.c
deleted file mode 100644
index 7ab5e81f13b3..000000000000
--- a/multimedia/pipewire/files/patch-spa_plugins_vulkan_dmabuf__fallback.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- spa/plugins/vulkan/dmabuf_fallback.c.orig	2023-10-06 09:37:06 UTC
-+++ spa/plugins/vulkan/dmabuf_fallback.c
-@@ -32,11 +32,11 @@ bool dmabuf_import_sync_file(struct spa_log *log, int 
- }
- 
- bool dmabuf_import_sync_file(struct spa_log *log, int dmabuf_fd, uint32_t flags, int sync_file_fd) {
--	spa_log_error("DMA-BUF sync_file import IOCTL not available on this system");
-+	spa_log_error(log, "DMA-BUF sync_file import IOCTL not available on this system");
- 	return false;
- }
- 
- int dmabuf_export_sync_file(struct spa_log *log, int dmabuf_fd, uint32_t flags) {
--	spa_log_error("DMA-BUF sync_file export IOCTL not available on this system");
-+	spa_log_error(log, "DMA-BUF sync_file export IOCTL not available on this system");
- 	return false;
- }
diff --git a/multimedia/pipewire/files/patch-src_modules_module-snapcast-discover.c b/multimedia/pipewire/files/patch-src_modules_module-snapcast-discover.c
new file mode 100644
index 000000000000..194ffb203788
--- /dev/null
+++ b/multimedia/pipewire/files/patch-src_modules_module-snapcast-discover.c
@@ -0,0 +1,14 @@
+--- src/modules/module-snapcast-discover.c.orig	2024-07-12 07:24:23 UTC
++++ src/modules/module-snapcast-discover.c
+@@ -690,7 +690,11 @@ static void resolver_cb(AvahiServiceResolver *r, Avahi
+ 	spa_zero(ifreq);
+ 	fd = socket(family, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
+ 	ifreq.ifr_ifindex = interface;
++#ifndef __FreeBSD__
+ 	ioctl(fd, SIOCGIFNAME, &ifreq, sizeof(ifreq));
++#else
++	if_indextoname(interface, ifreq.ifr_name);
++#endif
+ 	pw_properties_setf(props, "snapcast.ifname", "%s", ifreq.ifr_name);
+ 	pw_properties_setf(props, "local.ifname", "%s", ifreq.ifr_name);
+ 
diff --git a/multimedia/pipewire/files/patch-src_modules_network-utils.h b/multimedia/pipewire/files/patch-src_modules_network-utils.h
new file mode 100644
index 000000000000..94afc824afed
--- /dev/null
+++ b/multimedia/pipewire/files/patch-src_modules_network-utils.h
@@ -0,0 +1,13 @@
+--- src/modules/network-utils.h.orig	2024-07-22 08:00:23 UTC
++++ src/modules/network-utils.h
+@@ -8,6 +8,10 @@
+ #include <net/if.h>
+ #include <errno.h>
+ 
++#ifdef __FreeBSD__
++#define ifr_ifindex ifr_index
++#endif
++
+ static inline int pw_net_parse_address(const char *address, uint16_t port,
+ 		struct sockaddr_storage *addr, socklen_t *len)
+ {
diff --git a/multimedia/pipewire/files/patch-src_pipewire_thread.c b/multimedia/pipewire/files/patch-src_pipewire_thread.c
new file mode 100644
index 000000000000..9329e73bdf93
--- /dev/null
+++ b/multimedia/pipewire/files/patch-src_pipewire_thread.c
@@ -0,0 +1,12 @@
+--- src/pipewire/thread.c.orig	2024-07-12 07:24:23 UTC
++++ src/pipewire/thread.c
+@@ -6,6 +6,9 @@
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <pthread.h>
++#ifdef __FreeBSD__
++#include <pthread_np.h>
++#endif
+ 
+ #include <spa/utils/dict.h>
+ #include <spa/utils/defs.h>
diff --git a/multimedia/pipewire/pkg-plist b/multimedia/pipewire/pkg-plist
index bcf33cc182ab..ac484eadb8e6 100644
--- a/multimedia/pipewire/pkg-plist
+++ b/multimedia/pipewire/pkg-plist
@@ -6,6 +6,7 @@ bin/pipewire-pulse
 bin/pw-cat
 bin/pw-cli
 bin/pw-config
+bin/pw-container
 bin/pw-dot
 bin/pw-dsdplay
 bin/pw-dump
@@ -41,6 +42,7 @@ include/pipewire-0.3/pipewire/extensions/client-node.h
 include/pipewire-0.3/pipewire/extensions/metadata.h
 include/pipewire-0.3/pipewire/extensions/profiler.h
 include/pipewire-0.3/pipewire/extensions/protocol-native.h
+include/pipewire-0.3/pipewire/extensions/security-context.h
 include/pipewire-0.3/pipewire/extensions/session-manager.h
 include/pipewire-0.3/pipewire/extensions/session-manager/impl-interfaces.h
 include/pipewire-0.3/pipewire/extensions/session-manager/interfaces.h
@@ -93,6 +95,7 @@ include/spa-0.2/spa/control/type-info.h
 include/spa-0.2/spa/debug/buffer.h
 include/spa-0.2/spa/debug/context.h
 include/spa-0.2/spa/debug/dict.h
+include/spa-0.2/spa/debug/file.h
 include/spa-0.2/spa/debug/format.h
 include/spa-0.2/spa/debug/log.h
 include/spa-0.2/spa/debug/mem.h
@@ -234,16 +237,16 @@ include/spa-0.2/spa/utils/type.h
 %%GSTREAMER%%lib/gstreamer-1.0/libgstpipewire.so
 lib/libpipewire-0.3.so
 lib/libpipewire-0.3.so.0
-lib/libpipewire-0.3.so.0.1004.0
+lib/libpipewire-0.3.so.0.1201.0
 %%JACK%%lib/pipewire-0.3/jack/libjack.so
 %%JACK%%lib/pipewire-0.3/jack/libjack.so.0
-%%JACK%%lib/pipewire-0.3/jack/libjack.so.0.3.1004
+%%JACK%%lib/pipewire-0.3/jack/libjack.so.0.3.1201
 %%JACK%%lib/pipewire-0.3/jack/libjacknet.so
 %%JACK%%lib/pipewire-0.3/jack/libjacknet.so.0
-%%JACK%%lib/pipewire-0.3/jack/libjacknet.so.0.3.1004
+%%JACK%%lib/pipewire-0.3/jack/libjacknet.so.0.3.1201
 %%JACK%%lib/pipewire-0.3/jack/libjackserver.so
 %%JACK%%lib/pipewire-0.3/jack/libjackserver.so.0
-%%JACK%%lib/pipewire-0.3/jack/libjackserver.so.0.3.1004
+%%JACK%%lib/pipewire-0.3/jack/libjackserver.so.0.3.1201
 lib/pipewire-0.3/libpipewire-module-access.so
 lib/pipewire-0.3/libpipewire-module-adapter.so
 lib/pipewire-0.3/libpipewire-module-client-device.so
@@ -260,6 +263,7 @@ lib/pipewire-0.3/libpipewire-module-loopback.so
 lib/pipewire-0.3/libpipewire-module-metadata.so
 lib/pipewire-0.3/libpipewire-module-netjack2-driver.so
 lib/pipewire-0.3/libpipewire-module-netjack2-manager.so
+lib/pipewire-0.3/libpipewire-module-parametric-equalizer.so
 lib/pipewire-0.3/libpipewire-module-pipe-tunnel.so
 lib/pipewire-0.3/libpipewire-module-portal.so
 lib/pipewire-0.3/libpipewire-module-profiler.so
@@ -276,6 +280,7 @@ lib/pipewire-0.3/libpipewire-module-rtp-sap.so
 lib/pipewire-0.3/libpipewire-module-rtp-sink.so
 lib/pipewire-0.3/libpipewire-module-rtp-source.so
 lib/pipewire-0.3/libpipewire-module-session-manager.so
+%%AVAHI%%lib/pipewire-0.3/libpipewire-module-snapcast-discover.so
 lib/pipewire-0.3/libpipewire-module-spa-device-factory.so
 lib/pipewire-0.3/libpipewire-module-spa-device.so
 lib/pipewire-0.3/libpipewire-module-spa-node-factory.so