pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/pipewire: Update to 1.4.7



Module Name:	pkgsrc-wip
Committed By:	Ryo ONODERA <ryoon%NetBSD.org@localhost>
Pushed By:	ryoon
Date:		Tue Aug 12 12:58:31 2025 +0900
Changeset:	8730374e4bcaa5de9d144a7bfa114667bb179b8f

Modified Files:
	pipewire/DESCR
	pipewire/Makefile
	pipewire/PLIST
	pipewire/TODO
	pipewire/distinfo
Added Files:
	pipewire/buildlink3.mk
	pipewire/patches/patch-meson.build
	pipewire/patches/patch-pipewire-jack_src_pipewire-jack.c
	pipewire/patches/patch-spa_include_spa_utils_endian.h
	pipewire/patches/patch-spa_plugins_alsa_alsa-pcm.c
	pipewire/patches/patch-spa_plugins_filter-graph_filter-graph.c
	pipewire/patches/patch-spa_plugins_meson.build
	pipewire/patches/patch-spa_plugins_support_cpu.c
	pipewire/patches/patch-spa_plugins_support_logger.c
	pipewire/patches/patch-spa_tests_stress-ringbuffer.c
	pipewire/patches/patch-src_daemon_pipewire.c
	pipewire/patches/patch-src_modules_module-netjack2-manager.c
	pipewire/patches/patch-src_modules_module-protocol-native_test-connection.c
	pipewire/patches/patch-src_modules_module-protocol-pulse_utils.c
	pipewire/patches/patch-src_modules_module-rt.c
	pipewire/patches/patch-src_modules_module-rtp-sap.c
	pipewire/patches/patch-src_modules_module-rtp-session.c
	pipewire/patches/patch-src_modules_module-rtp-source.c
	pipewire/patches/patch-src_modules_module-vban-recv.c
	pipewire/patches/patch-src_pipewire_conf.c
	pipewire/patches/patch-src_pipewire_mem.c
	pipewire/patches/patch-src_pipewire_pipewire.c
	pipewire/patches/patch-src_pipewire_pipewire.h
	pipewire/patches/patch-src_pipewire_private.h
	pipewire/patches/patch-src_pipewire_thread.c
	pipewire/patches/patch-src_tools_pw-cat.c
	pipewire/patches/patch-src_tools_pw-cli.c
	pipewire/patches/patch-src_tools_pw-config.c
	pipewire/patches/patch-src_tools_pw-container.c
	pipewire/patches/patch-src_tools_pw-dot.c
	pipewire/patches/patch-src_tools_pw-dump.c
	pipewire/patches/patch-src_tools_pw-link.c
	pipewire/patches/patch-src_tools_pw-loopback.c
	pipewire/patches/patch-src_tools_pw-metadata.c
	pipewire/patches/patch-src_tools_pw-mididump.c
	pipewire/patches/patch-src_tools_pw-mon.c
	pipewire/patches/patch-src_tools_pw-profiler.c
	pipewire/patches/patch-src_tools_pw-reserve.c
	pipewire/patches/patch-src_tools_pw-top.c

Log Message:
wip/pipewire: Update to 1.4.7

* This builds under NetBSD/amd64 11.99.1.
* I have way to verify the functionalities.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8730374e4bcaa5de9d144a7bfa114667bb179b8f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 pipewire/DESCR                                     |  24 +-
 pipewire/Makefile                                  |  69 +++-
 pipewire/PLIST                                     | 390 ++++++++++++++++++++-
 pipewire/TODO                                      |   2 +
 pipewire/buildlink3.mk                             |  13 +
 pipewire/distinfo                                  |  44 ++-
 pipewire/patches/patch-meson.build                 |  23 ++
 .../patch-pipewire-jack_src_pipewire-jack.c        |  26 ++
 .../patches/patch-spa_include_spa_utils_endian.h   |  17 +
 pipewire/patches/patch-spa_plugins_alsa_alsa-pcm.c |  16 +
 .../patch-spa_plugins_filter-graph_filter-graph.c  |  15 +
 pipewire/patches/patch-spa_plugins_meson.build     |  12 +
 pipewire/patches/patch-spa_plugins_support_cpu.c   |  22 ++
 .../patches/patch-spa_plugins_support_logger.c     |  13 +
 .../patches/patch-spa_tests_stress-ringbuffer.c    |  13 +
 pipewire/patches/patch-src_daemon_pipewire.c       |  28 ++
 .../patch-src_modules_module-netjack2-manager.c    |  25 ++
 ...odules_module-protocol-native_test-connection.c |  16 +
 ...patch-src_modules_module-protocol-pulse_utils.c |  27 ++
 pipewire/patches/patch-src_modules_module-rt.c     |  23 ++
 .../patches/patch-src_modules_module-rtp-sap.c     |  38 ++
 .../patches/patch-src_modules_module-rtp-session.c |  25 ++
 .../patches/patch-src_modules_module-rtp-source.c  |  25 ++
 .../patches/patch-src_modules_module-vban-recv.c   |  25 ++
 pipewire/patches/patch-src_pipewire_conf.c         |  13 +
 pipewire/patches/patch-src_pipewire_mem.c          |  31 ++
 pipewire/patches/patch-src_pipewire_pipewire.c     |  64 ++++
 pipewire/patches/patch-src_pipewire_pipewire.h     |  22 ++
 pipewire/patches/patch-src_pipewire_private.h      |  22 ++
 pipewire/patches/patch-src_pipewire_thread.c       |  63 ++++
 pipewire/patches/patch-src_tools_pw-cat.c          |  28 ++
 pipewire/patches/patch-src_tools_pw-cli.c          |  28 ++
 pipewire/patches/patch-src_tools_pw-config.c       |  27 ++
 pipewire/patches/patch-src_tools_pw-container.c    |  28 ++
 pipewire/patches/patch-src_tools_pw-dot.c          |  28 ++
 pipewire/patches/patch-src_tools_pw-dump.c         |  28 ++
 pipewire/patches/patch-src_tools_pw-link.c         |  22 ++
 pipewire/patches/patch-src_tools_pw-loopback.c     |  28 ++
 pipewire/patches/patch-src_tools_pw-metadata.c     |  28 ++
 pipewire/patches/patch-src_tools_pw-mididump.c     |  27 ++
 pipewire/patches/patch-src_tools_pw-mon.c          |  28 ++
 pipewire/patches/patch-src_tools_pw-profiler.c     |  28 ++
 pipewire/patches/patch-src_tools_pw-reserve.c      |  28 ++
 pipewire/patches/patch-src_tools_pw-top.c          |  28 ++
 44 files changed, 1492 insertions(+), 38 deletions(-)

diffs:
diff --git a/pipewire/DESCR b/pipewire/DESCR
index cbc9031662..55c8a51949 100644
--- a/pipewire/DESCR
+++ b/pipewire/DESCR
@@ -1,23 +1 @@
-TODO: Adjust the following lines from README.md
-
-# PipeWire
-
-[PipeWire](https://pipewire.org) is a server and user space API to
-deal with multimedia pipelines. This includes:
-
-  - Making available sources of video (such as from a capture devices or
-    application provided streams) and multiplexing this with
-    clients.
-  - Accessing sources of video for consumption.
-  - Generating graphs for audio and video processing.
-
-Nodes in the graph can be implemented as separate processes,
-communicating with sockets and exchanging multimedia content using fd
-passing.
-
-## Building and installation
-
-The preferred way to install PipeWire is to install it with your
-distribution package system. This ensures PipeWire is integrated
-into the rest of your system for the best experience.
-...
+PipeWire is a server and user space API to deal with multimedia pipelines.
diff --git a/pipewire/Makefile b/pipewire/Makefile
index 9cf1716138..b322bcc06e 100644
--- a/pipewire/Makefile
+++ b/pipewire/Makefile
@@ -1,19 +1,70 @@
 # $NetBSD$
 
-DISTNAME=	pipewire-1.0.7
-CATEGORIES=	audio
+DISTNAME=	pipewire-1.4.7
+CATEGORIES=	multimedia
 MASTER_SITES=	https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${PKGVERSION_NOREV}/
 EXTRACT_SUFX=	.tar.bz2
 
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	https://www.pipewire.org/
-COMMENT=	Low-latency, graph-based audio processing engine
-#LICENSE=	# TODO: (see mk/license.mk)
+MAINTAINER=	ryoon%NetBSD.org@localhost
+HOMEPAGE=	https://pipewire.org/
+COMMENT=	Low-latency, graph-based processing engine for audio and video
+LICENSE=	mit
 
-USE_LANGUAGES=	c c++
-USE_TOOLS+=	pkg-config
+USE_PKGLOCALEDIR=	yes
+USE_LANGUAGES=		gnu11 c++
+USE_TOOLS+=		msgfmt pkg-config xgettext
 
-.include "../../devel/meson/build.mk"
+CPPFLAGS.NetBSD+=	-UHAVE_MEMFD_CREATE
+
+CFLAGS.NetBSD+=	-D__LOCALE_C_ONLY
+CFLAGS.NetBSD+=	-D_NETBSD_SOURCE #should be _POSIX_C_SOURCE or _XOPEN_COURCE
+
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} != "Linux"
+.include "../../devel/libepoll-shim/buildlink3.mk"
+CFLAGS+=	-I${BUILDLINK_PREFIX.libepoll-shim}/include/libepoll-shim
+LDFLAGS+=	-lepoll-shim
+.endif
+
+BUILDLINK_TRANSFORM+=	rm:-Werror=format # %m in printf
+
+LDFLAGS+=	-L${PREFIX}/lib/pipewire-0.3
+LDFLAGS+=	${COMPILER_RPATH_FLAG}${PREFIX}/lib/pipewire-0.3
+
+MESON_ARGS+=	-Dv4l2=disabled
+MESON_ARGS+=	-Dpipewire-v4l2=disabled
+MESON_ARGS+=	-Dsession-managers=disabled
+MESON_ARGS+=	-Dtest=disabled
+MESON_ARGS+=	-Dtests=disabled
+MESON_ARGS+=	-Dexamples=disabled
+MESON_ARGS+=	-Dlegacy-rtkit=false
+MESON_ARGS+=	-Dlibpulse=disabled
+MESON_ARGS+=	-Draop=disabled
+MESON_ARGS+=	-Dsdl2=disabled
+
+# Enable these for usual installation
+MESON_ARGS+=	-Dalsa=disabled
+MESON_ARGS+=	-Dpipewire-alsa=disabled
+
+#.include "../../audio/alsa-lib/buildlink3.mk"
+.include "../../audio/jack/buildlink3.mk"
+.include "../../audio/libcanberra/buildlink3.mk"
+.include "../../audio/libopus/buildlink3.mk"
+.include "../../audio/libmysofa/buildlink3.mk"
+.include "../../audio/libsndfile/buildlink3.mk"
+.include "../../audio/lilv/buildlink3.mk"
+#.include "../../audio/pulseaudio/buildlink3.mk"
 .include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/libinotify/buildlink3.mk"
+.include "../../devel/ncurses/buildlink3.mk"
+#.include "../../multimedia/gst-plugins1-base/buildlink3.mk"
+#.include "../../multimedia/gstreamer1/buildlink3.mk"
+.include "../../net/avahi/buildlink3.mk"
 .include "../../sysutils/dbus/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/readline.buildlink3.mk"
+# For Linux?
+#.include "../../graphics/libv4l/buildlink3.mk"
+#.include "../../sysutils/libudev/buildlink3.mk"
+.include "../../devel/meson/build.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/pipewire/PLIST b/pipewire/PLIST
index 92ba51a2d7..08e2b92987 100644
--- a/pipewire/PLIST
+++ b/pipewire/PLIST
@@ -1,4 +1,388 @@
 @comment $NetBSD$
-@comment TODO: to fill this file with the file listing:
-@comment TODO: 1. run "/usr/bin/make package"
-@comment TODO: 2. run "/usr/bin/make print-PLIST"
+bin/pipewire
+bin/pipewire-aes67
+bin/pipewire-avb
+bin/pipewire-pulse
+bin/pw-cat
+bin/pw-cli
+bin/pw-config
+bin/pw-container
+bin/pw-dot
+bin/pw-dsdplay
+bin/pw-dump
+bin/pw-encplay
+bin/pw-jack
+bin/pw-link
+bin/pw-loopback
+bin/pw-metadata
+bin/pw-mididump
+bin/pw-midiplay
+bin/pw-midirecord
+bin/pw-mon
+bin/pw-play
+bin/pw-profiler
+bin/pw-record
+bin/pw-reserve
+bin/pw-top
+bin/spa-inspect
+bin/spa-json-dump
+bin/spa-monitor
+bin/spa-resample
+etc/security/limits.d/25-pw-rlimits.conf
+include/pipewire-0.3/pipewire/array.h
+include/pipewire-0.3/pipewire/buffers.h
+include/pipewire-0.3/pipewire/client.h
+include/pipewire-0.3/pipewire/conf.h
+include/pipewire-0.3/pipewire/context.h
+include/pipewire-0.3/pipewire/control.h
+include/pipewire-0.3/pipewire/core.h
+include/pipewire-0.3/pipewire/data-loop.h
+include/pipewire-0.3/pipewire/device.h
+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
+include/pipewire-0.3/pipewire/extensions/session-manager/introspect-funcs.h
+include/pipewire-0.3/pipewire/extensions/session-manager/introspect.h
+include/pipewire-0.3/pipewire/extensions/session-manager/keys.h
+include/pipewire-0.3/pipewire/factory.h
+include/pipewire-0.3/pipewire/filter.h
+include/pipewire-0.3/pipewire/global.h
+include/pipewire-0.3/pipewire/i18n.h
+include/pipewire-0.3/pipewire/impl-client.h
+include/pipewire-0.3/pipewire/impl-core.h
+include/pipewire-0.3/pipewire/impl-device.h
+include/pipewire-0.3/pipewire/impl-factory.h
+include/pipewire-0.3/pipewire/impl-link.h
+include/pipewire-0.3/pipewire/impl-metadata.h
+include/pipewire-0.3/pipewire/impl-module.h
+include/pipewire-0.3/pipewire/impl-node.h
+include/pipewire-0.3/pipewire/impl-port.h
+include/pipewire-0.3/pipewire/impl.h
+include/pipewire-0.3/pipewire/keys.h
+include/pipewire-0.3/pipewire/link.h
+include/pipewire-0.3/pipewire/log.h
+include/pipewire-0.3/pipewire/loop.h
+include/pipewire-0.3/pipewire/main-loop.h
+include/pipewire-0.3/pipewire/map.h
+include/pipewire-0.3/pipewire/mem.h
+include/pipewire-0.3/pipewire/module.h
+include/pipewire-0.3/pipewire/node.h
+include/pipewire-0.3/pipewire/permission.h
+include/pipewire-0.3/pipewire/pipewire.h
+include/pipewire-0.3/pipewire/port.h
+include/pipewire-0.3/pipewire/properties.h
+include/pipewire-0.3/pipewire/protocol.h
+include/pipewire-0.3/pipewire/proxy.h
+include/pipewire-0.3/pipewire/resource.h
+include/pipewire-0.3/pipewire/stream.h
+include/pipewire-0.3/pipewire/thread-loop.h
+include/pipewire-0.3/pipewire/thread.h
+include/pipewire-0.3/pipewire/type.h
+include/pipewire-0.3/pipewire/utils.h
+include/pipewire-0.3/pipewire/version.h
+include/pipewire-0.3/pipewire/work-queue.h
+include/spa-0.2/spa/buffer/alloc.h
+include/spa-0.2/spa/buffer/buffer.h
+include/spa-0.2/spa/buffer/meta.h
+include/spa-0.2/spa/buffer/type-info.h
+include/spa-0.2/spa/control/control.h
+include/spa-0.2/spa/control/type-info.h
+include/spa-0.2/spa/control/ump-utils.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
+include/spa-0.2/spa/debug/node.h
+include/spa-0.2/spa/debug/pod.h
+include/spa-0.2/spa/debug/types.h
+include/spa-0.2/spa/filter-graph/filter-graph.h
+include/spa-0.2/spa/graph/graph.h
+include/spa-0.2/spa/interfaces/audio/aec.h
+include/spa-0.2/spa/monitor/device.h
+include/spa-0.2/spa/monitor/event.h
+include/spa-0.2/spa/monitor/type-info.h
+include/spa-0.2/spa/monitor/utils.h
+include/spa-0.2/spa/node/command.h
+include/spa-0.2/spa/node/event.h
+include/spa-0.2/spa/node/io.h
+include/spa-0.2/spa/node/keys.h
+include/spa-0.2/spa/node/node.h
+include/spa-0.2/spa/node/type-info.h
+include/spa-0.2/spa/node/utils.h
+include/spa-0.2/spa/param/audio/aac-types.h
+include/spa-0.2/spa/param/audio/aac-utils.h
+include/spa-0.2/spa/param/audio/aac.h
+include/spa-0.2/spa/param/audio/alac-utils.h
+include/spa-0.2/spa/param/audio/alac.h
+include/spa-0.2/spa/param/audio/amr-types.h
+include/spa-0.2/spa/param/audio/amr-utils.h
+include/spa-0.2/spa/param/audio/amr.h
+include/spa-0.2/spa/param/audio/ape-utils.h
+include/spa-0.2/spa/param/audio/ape.h
+include/spa-0.2/spa/param/audio/compressed.h
+include/spa-0.2/spa/param/audio/dsd-utils.h
+include/spa-0.2/spa/param/audio/dsd.h
+include/spa-0.2/spa/param/audio/dsp-utils.h
+include/spa-0.2/spa/param/audio/dsp.h
+include/spa-0.2/spa/param/audio/flac-utils.h
+include/spa-0.2/spa/param/audio/flac.h
+include/spa-0.2/spa/param/audio/format-utils.h
+include/spa-0.2/spa/param/audio/format.h
+include/spa-0.2/spa/param/audio/iec958-types.h
+include/spa-0.2/spa/param/audio/iec958-utils.h
+include/spa-0.2/spa/param/audio/iec958.h
+include/spa-0.2/spa/param/audio/layout.h
+include/spa-0.2/spa/param/audio/mp3-types.h
+include/spa-0.2/spa/param/audio/mp3-utils.h
+include/spa-0.2/spa/param/audio/mp3.h
+include/spa-0.2/spa/param/audio/opus.h
+include/spa-0.2/spa/param/audio/ra-utils.h
+include/spa-0.2/spa/param/audio/ra.h
+include/spa-0.2/spa/param/audio/raw-json.h
+include/spa-0.2/spa/param/audio/raw-types.h
+include/spa-0.2/spa/param/audio/raw-utils.h
+include/spa-0.2/spa/param/audio/raw.h
+include/spa-0.2/spa/param/audio/type-info.h
+include/spa-0.2/spa/param/audio/vorbis-utils.h
+include/spa-0.2/spa/param/audio/vorbis.h
+include/spa-0.2/spa/param/audio/wma-types.h
+include/spa-0.2/spa/param/audio/wma-utils.h
+include/spa-0.2/spa/param/audio/wma.h
+include/spa-0.2/spa/param/bluetooth/audio.h
+include/spa-0.2/spa/param/bluetooth/type-info.h
+include/spa-0.2/spa/param/buffers-types.h
+include/spa-0.2/spa/param/buffers.h
+include/spa-0.2/spa/param/format-types.h
+include/spa-0.2/spa/param/format-utils.h
+include/spa-0.2/spa/param/format.h
+include/spa-0.2/spa/param/latency-types.h
+include/spa-0.2/spa/param/latency-utils.h
+include/spa-0.2/spa/param/latency.h
+include/spa-0.2/spa/param/param-types.h
+include/spa-0.2/spa/param/param.h
+include/spa-0.2/spa/param/port-config-types.h
+include/spa-0.2/spa/param/port-config.h
+include/spa-0.2/spa/param/profile-types.h
+include/spa-0.2/spa/param/profile.h
+include/spa-0.2/spa/param/profiler-types.h
+include/spa-0.2/spa/param/profiler.h
+include/spa-0.2/spa/param/props-types.h
+include/spa-0.2/spa/param/props.h
+include/spa-0.2/spa/param/route-types.h
+include/spa-0.2/spa/param/route.h
+include/spa-0.2/spa/param/tag-types.h
+include/spa-0.2/spa/param/tag-utils.h
+include/spa-0.2/spa/param/tag.h
+include/spa-0.2/spa/param/type-info.h
+include/spa-0.2/spa/param/video/chroma.h
+include/spa-0.2/spa/param/video/color.h
+include/spa-0.2/spa/param/video/dsp-utils.h
+include/spa-0.2/spa/param/video/dsp.h
+include/spa-0.2/spa/param/video/encoded.h
+include/spa-0.2/spa/param/video/format-utils.h
+include/spa-0.2/spa/param/video/format.h
+include/spa-0.2/spa/param/video/h264-utils.h
+include/spa-0.2/spa/param/video/h264.h
+include/spa-0.2/spa/param/video/mjpg-utils.h
+include/spa-0.2/spa/param/video/mjpg.h
+include/spa-0.2/spa/param/video/multiview.h
+include/spa-0.2/spa/param/video/raw-types.h
+include/spa-0.2/spa/param/video/raw-utils.h
+include/spa-0.2/spa/param/video/raw.h
+include/spa-0.2/spa/param/video/type-info.h
+include/spa-0.2/spa/pod/builder.h
+include/spa-0.2/spa/pod/command.h
+include/spa-0.2/spa/pod/compare.h
+include/spa-0.2/spa/pod/dynamic.h
+include/spa-0.2/spa/pod/event.h
+include/spa-0.2/spa/pod/filter.h
+include/spa-0.2/spa/pod/iter.h
+include/spa-0.2/spa/pod/parser.h
+include/spa-0.2/spa/pod/pod.h
+include/spa-0.2/spa/pod/vararg.h
+include/spa-0.2/spa/support/cpu.h
+include/spa-0.2/spa/support/dbus.h
+include/spa-0.2/spa/support/i18n.h
+include/spa-0.2/spa/support/log-impl.h
+include/spa-0.2/spa/support/log.h
+include/spa-0.2/spa/support/loop.h
+include/spa-0.2/spa/support/plugin-loader.h
+include/spa-0.2/spa/support/plugin.h
+include/spa-0.2/spa/support/system.h
+include/spa-0.2/spa/support/thread.h
+include/spa-0.2/spa/utils/ansi.h
+include/spa-0.2/spa/utils/atomic.h
+include/spa-0.2/spa/utils/cleanup.h
+include/spa-0.2/spa/utils/defs.h
+include/spa-0.2/spa/utils/dict.h
+include/spa-0.2/spa/utils/dll.h
+include/spa-0.2/spa/utils/endian.h
+include/spa-0.2/spa/utils/endian.h.orig
+include/spa-0.2/spa/utils/enum-types.h
+include/spa-0.2/spa/utils/hook.h
+include/spa-0.2/spa/utils/json-core.h
+include/spa-0.2/spa/utils/json-pod.h
+include/spa-0.2/spa/utils/json.h
+include/spa-0.2/spa/utils/keys.h
+include/spa-0.2/spa/utils/list.h
+include/spa-0.2/spa/utils/names.h
+include/spa-0.2/spa/utils/ratelimit.h
+include/spa-0.2/spa/utils/result.h
+include/spa-0.2/spa/utils/ringbuffer.h
+include/spa-0.2/spa/utils/string.h
+include/spa-0.2/spa/utils/type-info.h
+include/spa-0.2/spa/utils/type.h
+lib/libpipewire-0.3.so
+lib/libpipewire-0.3.so.0
+lib/libpipewire-0.3.so.0.1407.0
+lib/pipewire-0.3/jack/libjack.so
+lib/pipewire-0.3/jack/libjack.so.0
+lib/pipewire-0.3/jack/libjack.so.0.3.1407
+lib/pipewire-0.3/jack/libjacknet.so
+lib/pipewire-0.3/jack/libjacknet.so.0
+lib/pipewire-0.3/jack/libjacknet.so.0.3.1407
+lib/pipewire-0.3/jack/libjackserver.so
+lib/pipewire-0.3/jack/libjackserver.so.0
+lib/pipewire-0.3/jack/libjackserver.so.0.3.1407
+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
+lib/pipewire-0.3/libpipewire-module-client-node.so
+lib/pipewire-0.3/libpipewire-module-combine-stream.so
+lib/pipewire-0.3/libpipewire-module-echo-cancel.so
+lib/pipewire-0.3/libpipewire-module-fallback-sink.so
+lib/pipewire-0.3/libpipewire-module-filter-chain.so
+lib/pipewire-0.3/libpipewire-module-jack-tunnel.so
+lib/pipewire-0.3/libpipewire-module-jackdbus-detect.so
+lib/pipewire-0.3/libpipewire-module-link-factory.so
+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
+lib/pipewire-0.3/libpipewire-module-protocol-native.so
+lib/pipewire-0.3/libpipewire-module-protocol-pulse.so
+lib/pipewire-0.3/libpipewire-module-protocol-simple.so
+lib/pipewire-0.3/libpipewire-module-raop-discover.so
+lib/pipewire-0.3/libpipewire-module-rt.so
+lib/pipewire-0.3/libpipewire-module-rtp-sap.so
+lib/pipewire-0.3/libpipewire-module-rtp-session.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
+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
+lib/pipewire-0.3/libpipewire-module-spa-node.so
+lib/pipewire-0.3/libpipewire-module-vban-recv.so
+lib/pipewire-0.3/libpipewire-module-vban-send.so
+lib/pipewire-0.3/libpipewire-module-x11-bell.so
+lib/pipewire-0.3/libpipewire-module-zeroconf-discover.so
+lib/pkgconfig/libpipewire-0.3.pc
+lib/pkgconfig/libspa-0.2.pc
+lib/spa-0.2/aec/libspa-aec-null.so
+lib/spa-0.2/audioconvert/libspa-audioconvert.so
+lib/spa-0.2/audiomixer/libspa-audiomixer.so
+lib/spa-0.2/audiotestsrc/libspa-audiotestsrc.so
+lib/spa-0.2/control/libspa-control.so
+lib/spa-0.2/filter-graph/libspa-filter-graph-plugin-builtin.so
+lib/spa-0.2/filter-graph/libspa-filter-graph-plugin-ladspa.so
+lib/spa-0.2/filter-graph/libspa-filter-graph-plugin-lv2.so
+lib/spa-0.2/filter-graph/libspa-filter-graph-plugin-sofa.so
+lib/spa-0.2/filter-graph/libspa-filter-graph.so
+lib/spa-0.2/jack/libspa-jack.so
+lib/spa-0.2/libspa.so
+lib/spa-0.2/support/libspa-dbus.so
+lib/spa-0.2/support/libspa-support.so
+lib/spa-0.2/videoconvert/libspa-videoconvert.so
+lib/spa-0.2/videotestsrc/libspa-videotestsrc.so
+share/locale/af/LC_MESSAGES/pipewire.mo
+share/locale/as/LC_MESSAGES/pipewire.mo
+share/locale/be/LC_MESSAGES/pipewire.mo
+share/locale/bg/LC_MESSAGES/pipewire.mo
+share/locale/bn_IN/LC_MESSAGES/pipewire.mo
+share/locale/ca/LC_MESSAGES/pipewire.mo
+share/locale/cs/LC_MESSAGES/pipewire.mo
+share/locale/da/LC_MESSAGES/pipewire.mo
+share/locale/de/LC_MESSAGES/pipewire.mo
+share/locale/de_CH/LC_MESSAGES/pipewire.mo
+share/locale/el/LC_MESSAGES/pipewire.mo
+share/locale/eo/LC_MESSAGES/pipewire.mo
+share/locale/es/LC_MESSAGES/pipewire.mo
+share/locale/fi/LC_MESSAGES/pipewire.mo
+share/locale/fr/LC_MESSAGES/pipewire.mo
+share/locale/gl/LC_MESSAGES/pipewire.mo
+share/locale/gu/LC_MESSAGES/pipewire.mo
+share/locale/he/LC_MESSAGES/pipewire.mo
+share/locale/hi/LC_MESSAGES/pipewire.mo
+share/locale/hr/LC_MESSAGES/pipewire.mo
+share/locale/hu/LC_MESSAGES/pipewire.mo
+share/locale/id/LC_MESSAGES/pipewire.mo
+share/locale/it/LC_MESSAGES/pipewire.mo
+share/locale/ja/LC_MESSAGES/pipewire.mo
+share/locale/ka/LC_MESSAGES/pipewire.mo
+share/locale/kk/LC_MESSAGES/pipewire.mo
+share/locale/kn/LC_MESSAGES/pipewire.mo
+share/locale/ko/LC_MESSAGES/pipewire.mo
+share/locale/lt/LC_MESSAGES/pipewire.mo
+share/locale/ml/LC_MESSAGES/pipewire.mo
+share/locale/mr/LC_MESSAGES/pipewire.mo
+share/locale/my/LC_MESSAGES/pipewire.mo
+share/locale/nl/LC_MESSAGES/pipewire.mo
+share/locale/nn/LC_MESSAGES/pipewire.mo
+share/locale/oc/LC_MESSAGES/pipewire.mo
+share/locale/or/LC_MESSAGES/pipewire.mo
+share/locale/pa/LC_MESSAGES/pipewire.mo
+share/locale/pl/LC_MESSAGES/pipewire.mo
+share/locale/pt/LC_MESSAGES/pipewire.mo
+share/locale/pt_BR/LC_MESSAGES/pipewire.mo
+share/locale/ro/LC_MESSAGES/pipewire.mo
+share/locale/ru/LC_MESSAGES/pipewire.mo
+share/locale/si/LC_MESSAGES/pipewire.mo
+share/locale/sk/LC_MESSAGES/pipewire.mo
+share/locale/sl/LC_MESSAGES/pipewire.mo
+share/locale/sr/LC_MESSAGES/pipewire.mo
+share/locale/sr@latin/LC_MESSAGES/pipewire.mo
+share/locale/sv/LC_MESSAGES/pipewire.mo
+share/locale/ta/LC_MESSAGES/pipewire.mo
+share/locale/te/LC_MESSAGES/pipewire.mo
+share/locale/tr/LC_MESSAGES/pipewire.mo
+share/locale/uk/LC_MESSAGES/pipewire.mo
+share/locale/zh_CN/LC_MESSAGES/pipewire.mo
+share/locale/zh_TW/LC_MESSAGES/pipewire.mo
+share/pipewire/client.conf
+share/pipewire/client.conf.avail/20-upmix.conf
+share/pipewire/filter-chain.conf
+share/pipewire/filter-chain/demonic.conf
+share/pipewire/filter-chain/sink-dolby-surround.conf
+share/pipewire/filter-chain/sink-eq6.conf
+share/pipewire/filter-chain/sink-make-LFE.conf
+share/pipewire/filter-chain/sink-matrix-spatialiser.conf
+share/pipewire/filter-chain/sink-mix-FL-FR.conf
+share/pipewire/filter-chain/sink-upmix-5.1-filter.conf
+share/pipewire/filter-chain/sink-virtual-surround-5.1-kemar.conf
+share/pipewire/filter-chain/sink-virtual-surround-7.1-hesuvi.conf
+share/pipewire/filter-chain/source-duplicate-FL.conf
+share/pipewire/filter-chain/source-rnnoise.conf
+share/pipewire/jack.conf
+share/pipewire/minimal.conf
+share/pipewire/pipewire-aes67.conf
+share/pipewire/pipewire-avb.conf
+share/pipewire/pipewire-pulse.conf
+share/pipewire/pipewire-pulse.conf.avail/20-upmix.conf
+share/pipewire/pipewire.conf
+share/pipewire/pipewire.conf.avail/10-rates.conf
+share/pipewire/pipewire.conf.avail/20-upmix.conf
+share/pipewire/pipewire.conf.avail/50-raop.conf
diff --git a/pipewire/TODO b/pipewire/TODO
index f6a9939bc2..2f0d5b9f67 100644
--- a/pipewire/TODO
+++ b/pipewire/TODO
@@ -12,3 +12,5 @@ webrtc-audio-processing.wrap
 wireplumber.wrap
 
 Investigate if we need to download these or can disable them.
+
+ALSA support is disabled yet.
diff --git a/pipewire/buildlink3.mk b/pipewire/buildlink3.mk
new file mode 100644
index 0000000000..6153c90370
--- /dev/null
+++ b/pipewire/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	pipewire
+
+.if !defined(PIPEWIRE_BUILDLINK3_MK)
+PIPEWIRE_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.pipewire+=	pipewire>=1.2.5
+BUILDLINK_PKGSRCDIR.pipewire?=	../../multimedia/pipewire
+
+.endif	# PIPEWIRE_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-pipewire
diff --git a/pipewire/distinfo b/pipewire/distinfo
index 47be908e99..ba25807a90 100644
--- a/pipewire/distinfo
+++ b/pipewire/distinfo
@@ -1,5 +1,43 @@
 $NetBSD$
 
-BLAKE2s (pipewire-1.0.7.tar.bz2) = 8dc3f24e2ce5ba87546bf1fbca3b6acf2cbd841b9be0f04de9acf56c1ecd8ea8
-SHA512 (pipewire-1.0.7.tar.bz2) = 3fb46376cdf061b3ea7be55249399d0036c2728bb4deeb6f5c6d708141234e75f563e6a3dc749fbd40dadba72ad2db5fda358b368a480479157731cc67f3303d
-Size (pipewire-1.0.7.tar.bz2) = 1698775 bytes
+BLAKE2s (pipewire-1.4.7.tar.bz2) = 2214ca98e30710c6c440fd80b8ee534defff60d2ef011eedad15f3884193277e
+SHA512 (pipewire-1.4.7.tar.bz2) = f63b3b6fb2e3c75f12f2ddd5c67961b7f5ac83da78af7dd7074ccc9b021752d68b5f1831bf661b56df676519f24aa065fda2bed37622e1a3763b0dc221a34226
+Size (pipewire-1.4.7.tar.bz2) = 1928174 bytes
+SHA1 (patch-meson.build) = ce08fa4175f16228d93a2513d23d5d8d2323f4cb
+SHA1 (patch-pipewire-jack_src_pipewire-jack.c) = 84d1054ec44fe205bbeb9d83b3c83ae30a9d0cc4
+SHA1 (patch-spa_include_spa_utils_endian.h) = 4377e65a3cab0889c353d355bf4294529860cedf
+SHA1 (patch-spa_plugins_alsa_alsa-pcm.c) = 92903d37f6c825e798c0217cbd196bf12fc960fe
+SHA1 (patch-spa_plugins_filter-graph_filter-graph.c) = 264977f256e09aa9a1a07afb0ac759b9f4250725
+SHA1 (patch-spa_plugins_meson.build) = defc725affd4f598b7c0e02a6c1c01e151883188
+SHA1 (patch-spa_plugins_support_cpu.c) = 6a980e0ba22df0729d59df0bd3e2b6dc835323c8
+SHA1 (patch-spa_plugins_support_logger.c) = d85aaffa889ccd04be7cf02287cd961565504491
+SHA1 (patch-spa_tests_stress-ringbuffer.c) = 4e8da5b1d519ae8de706ecd3946d42f1378758a0
+SHA1 (patch-src_daemon_pipewire.c) = e3b155fa2b5839a168b21154d5f90917c46eccc3
+SHA1 (patch-src_modules_module-netjack2-manager.c) = 698a991a634fd603ec26d7f0b9ae2940df155fe5
+SHA1 (patch-src_modules_module-protocol-native_test-connection.c) = 26504b447acce99c7def1fd88e9b278ef58747f2
+SHA1 (patch-src_modules_module-protocol-pulse_utils.c) = f0d3009287376502db2f93315dacbeeed3dcc431
+SHA1 (patch-src_modules_module-rt.c) = c6b2370cd13a445747dbf52a6da53658557589a1
+SHA1 (patch-src_modules_module-rtp-sap.c) = c8dcbaf64dbc318046dc937ce471c249224174b6
+SHA1 (patch-src_modules_module-rtp-session.c) = bed76eceb46fa71fc7b836ac7b5de2ddf6a29efe
+SHA1 (patch-src_modules_module-rtp-source.c) = 6ea2fae1ae17c989150f3c7a932c28fcf59cd644
+SHA1 (patch-src_modules_module-vban-recv.c) = 1648a4370f715184337a65543c21ea9b5e8e4935
+SHA1 (patch-src_pipewire_conf.c) = e2e9660d185ef6fc288ab183cbc83076a8adaadd
+SHA1 (patch-src_pipewire_mem.c) = 7303212928cefd40148f5c2856e7467cb83ffbb2
+SHA1 (patch-src_pipewire_pipewire.c) = 4cc7421caec0d29123bbc41764828f39f222261d
+SHA1 (patch-src_pipewire_pipewire.h) = bfa44be19efdbf53cd2c77e62a51aec4649dbbfd
+SHA1 (patch-src_pipewire_private.h) = 70a0fad644b45369ef4221f3cc9939a3e90fa8f1
+SHA1 (patch-src_pipewire_thread.c) = f84142bc63a0efa4b167a7e0a7bce276e7a9f679
+SHA1 (patch-src_tools_pw-cat.c) = 52d13671a68bce22730813fef67866a5d96765d5
+SHA1 (patch-src_tools_pw-cli.c) = 7de86b01fedbb36f6871eb1c74472619030f2e10
+SHA1 (patch-src_tools_pw-config.c) = caacaa5ae6326f98c3f04d939046e4a932edd5c7
+SHA1 (patch-src_tools_pw-container.c) = 88c30c63fc84d200ef147b616dbb62c1c8ffc71b
+SHA1 (patch-src_tools_pw-dot.c) = 96144a22d9603c011aece61455b7372363696663
+SHA1 (patch-src_tools_pw-dump.c) = 5f02c308694482430e3b527f6fefb077cdde6c99
+SHA1 (patch-src_tools_pw-link.c) = d56c4b0df4361290921ac3280005a425ba8c1050
+SHA1 (patch-src_tools_pw-loopback.c) = 39b0bbdc80ac3ff8218dfaf51232f7cd1ef09a6f
+SHA1 (patch-src_tools_pw-metadata.c) = ba753a021ab23bd9eca3dc50fad746abd4260c8c
+SHA1 (patch-src_tools_pw-mididump.c) = 333de7d65246a34336a9730f09d90b83315cfab3
+SHA1 (patch-src_tools_pw-mon.c) = d3e1ab4c9526a1787d7b79e2f393802e01d03e4a
+SHA1 (patch-src_tools_pw-profiler.c) = b034a6ac5a78b9808697ec59d9deac83581b336a
+SHA1 (patch-src_tools_pw-reserve.c) = 53e5f1a0555b1d96b5eb190c6b41814d79a0e0de
+SHA1 (patch-src_tools_pw-top.c) = 08117be52bedcab8bf42a2c5ffe7eefb1ae7b988
diff --git a/pipewire/patches/patch-meson.build b/pipewire/patches/patch-meson.build
new file mode 100644
index 0000000000..b7dde1844f
--- /dev/null
+++ b/pipewire/patches/patch-meson.build
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- meson.build.orig	2025-07-23 15:42:58.000000000 +0000
++++ meson.build
+@@ -526,7 +526,6 @@ summary({'Snapd-glib (Snap support)': sn
+ 
+ check_functions = [
+   ['gettid', '#include <unistd.h>', ['-D_GNU_SOURCE'], []],
+-  ['memfd_create', '#include <sys/mman.h>', ['-D_GNU_SOURCE'], []],
+   ['getrandom', '#include <stddef.h>\n#include <sys/random.h>', ['-D_GNU_SOURCE'], []],
+   ['random_r', '#include <stdlib.h>', ['-D_GNU_SOURCE'], []],
+   ['reallocarray', '#include <stdlib.h>', ['-D_GNU_SOURCE'], []],
+@@ -536,6 +535,10 @@ check_functions = [
+   ['malloc_info', '#include <malloc.h>', [], []],
+ ]
+ 
++if host_machine.system() in ['linux']
++  check_functions.append(['memfd_create', '#include <sys/mman.h>', ['-D_GNU_SOURCE'], []])
++endif
++
+ foreach f : check_functions
+   cdata.set('HAVE_' + f.get(0).to_upper(),
+             cc.has_function(f.get(0),
diff --git a/pipewire/patches/patch-pipewire-jack_src_pipewire-jack.c b/pipewire/patches/patch-pipewire-jack_src_pipewire-jack.c
new file mode 100644
index 0000000000..1253139c46
--- /dev/null
+++ b/pipewire/patches/patch-pipewire-jack_src_pipewire-jack.c
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- pipewire-jack/src/pipewire-jack.c.orig	2024-09-27 10:02:20.000000000 +0000
++++ pipewire-jack/src/pipewire-jack.c
+@@ -7552,7 +7552,11 @@ int jack_get_video_image_size(jack_clien
+ static void reg(void) __attribute__ ((constructor));
+ static void reg(void)
+ {
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(NULL, NULL);
++#else
++	pipewire_init(NULL, NULL);
++#endif
+ 	PW_LOG_TOPIC_INIT(jack_log_topic);
+ 	pthread_mutex_init(&globals.lock, NULL);
+ 	pw_array_init(&globals.descriptions, 16);
+@@ -7572,5 +7576,9 @@ static void unreg(void)
+ 		free(o);
+ 	}
+ 	pthread_mutex_unlock(&globals.lock);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ }
diff --git a/pipewire/patches/patch-spa_include_spa_utils_endian.h b/pipewire/patches/patch-spa_include_spa_utils_endian.h
new file mode 100644
index 0000000000..e63279394d
--- /dev/null
+++ b/pipewire/patches/patch-spa_include_spa_utils_endian.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- spa/include/spa/utils/endian.h.orig	2025-07-23 15:42:58.000000000 +0000
++++ spa/include/spa/utils/endian.h
+@@ -10,6 +10,12 @@
+ #define bswap_16 bswap16
+ #define bswap_32 bswap32
+ #define bswap_64 bswap64
++#elif defined(__NetBSD__)
++#include <sys/types.h>
++#include <machine/bswap.h>
++#define bswap_16 bswap16
++#define bswap_32 bswap32
++#define bswap_64 bswap64
+ #elif defined(_MSC_VER) && defined(_WIN32)
+ #include <stdlib.h>
+ #define __LITTLE_ENDIAN 1234
diff --git a/pipewire/patches/patch-spa_plugins_alsa_alsa-pcm.c b/pipewire/patches/patch-spa_plugins_alsa_alsa-pcm.c
new file mode 100644
index 0000000000..4363d5c390
--- /dev/null
+++ b/pipewire/patches/patch-spa_plugins_alsa_alsa-pcm.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- spa/plugins/alsa/alsa-pcm.c.orig	2025-07-29 22:28:04.080110792 +0000
++++ spa/plugins/alsa/alsa-pcm.c
+@@ -1033,7 +1033,11 @@ int spa_alsa_init(struct state *state, c
+ 
+ 	state->card = ensure_card(state->card_index, state->open_ucm, state->is_split_parent);
+ 
++#if defined(__NetBSD__)
++	state->log_file = fopen(state, "w");
++#else
+ 	state->log_file = fopencookie(state, "w", io_funcs);
++#endif
+ 	if (state->log_file == NULL) {
+ 		spa_log_error(state->log, "can't create log file");
+ 		return -errno;
diff --git a/pipewire/patches/patch-spa_plugins_filter-graph_filter-graph.c b/pipewire/patches/patch-spa_plugins_filter-graph_filter-graph.c
new file mode 100644
index 0000000000..d6c4eacf17
--- /dev/null
+++ b/pipewire/patches/patch-spa_plugins_filter-graph_filter-graph.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- spa/plugins/filter-graph/filter-graph.c.orig	2025-07-29 19:42:37.820319590 +0000
++++ spa/plugins/filter-graph/filter-graph.c
+@@ -31,6 +31,10 @@
+ #include <spa/debug/log.h>
+ #include <spa/filter-graph/filter-graph.h>
+ 
++#if defined(__NetBSD__)
++#define strdupa(s) strdup(s)
++#endif
++
+ #include "audio-plugin.h"
+ #include "audio-dsp-impl.h"
+ 
diff --git a/pipewire/patches/patch-spa_plugins_meson.build b/pipewire/patches/patch-spa_plugins_meson.build
new file mode 100644
index 0000000000..62c47cedd8
--- /dev/null
+++ b/pipewire/patches/patch-spa_plugins_meson.build
@@ -0,0 +1,12 @@
+$NetBSD$
+
+* Do not restrict ALSA-lib support for Linux.
+
+--- spa/plugins/meson.build.orig	2024-10-21 15:21:40.908844333 +0000
++++ spa/plugins/meson.build
+@@ -1,4 +1,4 @@
+-if alsa_dep.found() and host_machine.system() == 'linux'
++if alsa_dep.found()
+   subdir('alsa')
+ endif
+ if get_option('avb').require(host_machine.system() == 'linux', error_message: 'AVB support is only available on Linux').allowed()
diff --git a/pipewire/patches/patch-spa_plugins_support_cpu.c b/pipewire/patches/patch-spa_plugins_support_cpu.c
new file mode 100644
index 0000000000..5a6d5050f9
--- /dev/null
+++ b/pipewire/patches/patch-spa_plugins_support_cpu.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- spa/plugins/support/cpu.c.orig	2024-10-21 16:08:11.337154178 +0000
++++ spa/plugins/support/cpu.c
+@@ -10,7 +10,7 @@
+ #include <sched.h>
+ #include <fcntl.h>
+ 
+-#if defined(__FreeBSD__) || defined(__MidnightBSD__)
++#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__NetBSD__)
+ #include <sys/sysctl.h>
+ #endif
+ 
+@@ -86,7 +86,7 @@ impl_cpu_force_flags(void *object, uint3
+ 	return 0;
+ }
+ 
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ static uint32_t get_count(struct impl *this)
+ {
+ 	cpu_set_t cpuset;
diff --git a/pipewire/patches/patch-spa_plugins_support_logger.c b/pipewire/patches/patch-spa_plugins_support_logger.c
new file mode 100644
index 0000000000..07bf962bb5
--- /dev/null
+++ b/pipewire/patches/patch-spa_plugins_support_logger.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- spa/plugins/support/logger.c.orig	2025-07-29 19:25:58.121117580 +0000
++++ spa/plugins/support/logger.c
+@@ -20,7 +20,7 @@
+ #include <spa/utils/string.h>
+ #include <spa/utils/ansi.h>
+ 
+-#if defined(__FreeBSD__) || defined(__MidnightBSD__)
++#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__NetBSD__)
+ #define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC
+ #elif defined(_MSC_VER)
+ static inline void setlinebuf(FILE* stream) {
diff --git a/pipewire/patches/patch-spa_tests_stress-ringbuffer.c b/pipewire/patches/patch-spa_tests_stress-ringbuffer.c
new file mode 100644
index 0000000000..a23939123c
--- /dev/null
+++ b/pipewire/patches/patch-spa_tests_stress-ringbuffer.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- spa/tests/stress-ringbuffer.c.orig	2024-10-21 16:52:33.198030042 +0000
++++ spa/tests/stress-ringbuffer.c
+@@ -11,7 +11,7 @@
+ #define ARRAY_SIZE 63
+ #define MAX_VALUE 0x10000
+ 
+-#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined (__GNU__)
++#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined (__GNU__) || defined(__NetBSD__)
+ #include <sys/param.h>
+ #if (__FreeBSD_version >= 1400000 && __FreeBSD_version < 1400043) \
+     || (__FreeBSD_version < 1300523) || defined(__MidnightBSD__) \
diff --git a/pipewire/patches/patch-src_daemon_pipewire.c b/pipewire/patches/patch-src_daemon_pipewire.c
new file mode 100644
index 0000000000..53fcfd19a2
--- /dev/null
+++ b/pipewire/patches/patch-src_daemon_pipewire.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/daemon/pipewire.c.orig	2024-10-21 16:45:20.167265470 +0000
++++ src/daemon/pipewire.c
+@@ -63,7 +63,11 @@ int main(int argc, char *argv[])
+ 	config_name = basename(path);
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	level = pw_log_level;
+ 
+@@ -136,7 +140,11 @@ done:
+ 		pw_context_destroy(context);
+ 	if (loop)
+ 		pw_main_loop_destroy(loop);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return res;
+ }
diff --git a/pipewire/patches/patch-src_modules_module-netjack2-manager.c b/pipewire/patches/patch-src_modules_module-netjack2-manager.c
new file mode 100644
index 0000000000..3c71deda26
--- /dev/null
+++ b/pipewire/patches/patch-src_modules_module-netjack2-manager.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- src/modules/module-netjack2-manager.c.orig	2025-07-29 19:59:44.038954088 +0000
++++ src/modules/module-netjack2-manager.c
+@@ -44,6 +44,10 @@
+ #define IPTOS_DSCP(x) ((x) & IPTOS_DSCP_MASK)
+ #endif
+ 
++#if defined(__NetBSD__)
++#define ip_mreqn ip_mreq
++#endif
++
+ /** \page page_module_netjack2_manager Netjack2 manager
+  *
+  * The netjack2 manager module listens for new netjack2 driver messages and will
+@@ -895,7 +899,9 @@ static int make_announce_socket(struct s
+ 			struct ip_mreqn mr4;
+ 			memset(&mr4, 0, sizeof(mr4));
+ 			mr4.imr_multiaddr = sa4->sin_addr;
++#if !defined(__NetBSD__)
+ 			mr4.imr_ifindex = req.ifr_ifindex;
++#endif
+ 			res = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr4, sizeof(mr4));
+ 		} else {
+ 			sa4->sin_addr.s_addr = INADDR_ANY;
diff --git a/pipewire/patches/patch-src_modules_module-protocol-native_test-connection.c b/pipewire/patches/patch-src_modules_module-protocol-native_test-connection.c
new file mode 100644
index 0000000000..89977a8796
--- /dev/null
+++ b/pipewire/patches/patch-src_modules_module-protocol-native_test-connection.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- src/modules/module-protocol-native/test-connection.c.orig	2024-10-21 17:46:33.774732133 +0000
++++ src/modules/module-protocol-native/test-connection.c
+@@ -172,7 +172,11 @@ int main(int argc, char *argv[])
+ 	struct pw_protocol_native_connection *in, *out;
+ 	int fds[2];
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	PW_LOG_TOPIC_INIT(mod_topic);
+ 	PW_LOG_TOPIC_INIT(mod_topic_connection);
diff --git a/pipewire/patches/patch-src_modules_module-protocol-pulse_utils.c b/pipewire/patches/patch-src_modules_module-protocol-pulse_utils.c
new file mode 100644
index 0000000000..8fed29d4e3
--- /dev/null
+++ b/pipewire/patches/patch-src_modules_module-protocol-pulse_utils.c
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- src/modules/module-protocol-pulse/utils.c.orig	2024-09-27 10:02:20.000000000 +0000
++++ src/modules/module-protocol-pulse/utils.c
+@@ -21,6 +21,10 @@
+ #ifdef HAVE_PWD_H
+ #include <pwd.h>
+ #endif
++#if defined(__NetBSD__)
++#include <sys/statvfs.h>
++#define statfs statvfs
++#endif
+ 
+ #include <spa/utils/result.h>
+ #include <pipewire/context.h>
+@@ -92,9 +96,11 @@ int check_flatpak(struct client *client,
+ 			 * filesystem, such as in a toolbox container. We will never have a fuse rootfs
+ 			 * in the flatpak case, so in that case its safe to ignore this and
+ 			 * continue to detect other types of apps. */
++#if !defined(__NetBSD__)
+ 			if (statfs(root_path, &buf) == 0 &&
+ 			    buf.f_type == 0x65735546) /* FUSE_SUPER_MAGIC */
+ 				return 0;
++#endif
+ 		}
+ 		/* Not able to open the root dir shouldn't happen. Probably the app died and
+ 		 * we're failing due to /proc/$pid not existing. In that case fail instead
diff --git a/pipewire/patches/patch-src_modules_module-rt.c b/pipewire/patches/patch-src_modules_module-rt.c
new file mode 100644
index 0000000000..0777dfcbcc
--- /dev/null
+++ b/pipewire/patches/patch-src_modules_module-rt.c
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- src/modules/module-rt.c.orig	2025-07-23 15:42:58.000000000 +0000
++++ src/modules/module-rt.c
+@@ -38,6 +38,9 @@
+ #if defined(__GNU__)
+ #include <hurd.h>
+ #endif
++#if defined(__NetBSD__)
++#include <lwp.h>
++#endif
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <pthread.h>
+@@ -259,6 +262,8 @@ static pid_t _gettid(void)
+ #elif defined(__GNU__)
+        mach_port_t thread = hurd_thread_self();
+        return (pid_t)thread;
++#elif defined(__NetBSD__)
++       return (pid_t)_lwp_self();
+ #else
+ #error "No gettid impl"
+ #endif
diff --git a/pipewire/patches/patch-src_modules_module-rtp-sap.c b/pipewire/patches/patch-src_modules_module-rtp-sap.c
new file mode 100644
index 0000000000..018ba7d35c
--- /dev/null
+++ b/pipewire/patches/patch-src_modules_module-rtp-sap.c
@@ -0,0 +1,38 @@
+$NetBSD$
+
+--- src/modules/module-rtp-sap.c.orig	2025-07-23 15:42:58.000000000 +0000
++++ src/modules/module-rtp-sap.c
+@@ -32,6 +32,10 @@
+ #define SO_PASSCRED LOCAL_CREDS_PERSISTENT
+ #endif
+ 
++#if defined(__NetBSD__)
++#define ip_mreqn ip_mreq
++#endif
++
+ /** \page page_module_rtp_sap SAP Announce and create RTP streams
+  *
+  * The `rtp-sap` module announces RTP streams that match the rules with the
+@@ -391,10 +395,12 @@ static int make_unix_socket(const char *
+ 	}
+ 
+ 	int val = 1;
++#if !defined(__NetBSD__)
+ 	if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &val, sizeof(val)) < 0) {
+ 		pw_log_warn("Failed to bind PTP management socket");
+ 		return -1;
+ 	}
++#endif
+ 
+ 	spa_zero(addr);
+ 	addr.sun_family = AF_UNIX;
+@@ -490,7 +496,9 @@ static int make_recv_socket(struct socka
+ 			struct ip_mreqn mr4;
+ 			memset(&mr4, 0, sizeof(mr4));
+ 			mr4.imr_multiaddr = sa4->sin_addr;
++#if !defined(__NetBSD__)
+ 			mr4.imr_ifindex = req.ifr_ifindex;
++#endif
+ 			pw_net_get_ip(sa, addr, sizeof(addr), NULL, NULL);
+ 			pw_log_info("join IPv4 group: %s iface:%d", addr, req.ifr_ifindex);
+ 			res = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr4, sizeof(mr4));
diff --git a/pipewire/patches/patch-src_modules_module-rtp-session.c b/pipewire/patches/patch-src_modules_module-rtp-session.c
new file mode 100644
index 0000000000..039facae70
--- /dev/null
+++ b/pipewire/patches/patch-src_modules_module-rtp-session.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- src/modules/module-rtp-session.c.orig	2025-07-29 20:27:37.922024927 +0000
++++ src/modules/module-rtp-session.c
+@@ -39,6 +39,10 @@
+ #include <module-rtp/stream.h>
+ #include "network-utils.h"
+ 
++#if defined(__NetBSD__)
++#define ip_mreqn ip_mreq
++#endif
++
+ /** \page page_module_rtp_session RTP session
+  *
+  * The `rtp-session` module creates a media session that is announced
+@@ -1103,7 +1107,9 @@ static int make_socket(const struct sock
+ 			struct ip_mreqn mr4;
+ 			memset(&mr4, 0, sizeof(mr4));
+ 			mr4.imr_multiaddr = sa4->sin_addr;
++#if !defined(__NetBSD__)
+ 			mr4.imr_ifindex = req.ifr_ifindex;
++#endif
+ 			res = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr4, sizeof(mr4));
+ 			is_multicast = true;
+ 		} else {
diff --git a/pipewire/patches/patch-src_modules_module-rtp-source.c b/pipewire/patches/patch-src_modules_module-rtp-source.c
new file mode 100644
index 0000000000..43574ede2b
--- /dev/null
+++ b/pipewire/patches/patch-src_modules_module-rtp-source.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- src/modules/module-rtp-source.c.orig	2025-07-29 20:02:44.942300562 +0000
++++ src/modules/module-rtp-source.c
+@@ -32,6 +32,10 @@
+ #include <module-rtp/stream.h>
+ #include "network-utils.h"
+ 
++#if defined(__NetBSD__)
++#define ip_mreqn ip_mreq
++#endif
++
+ /** \page page_module_rtp_source RTP source
+  *
+  * The `rtp-source` module creates a PipeWire source that receives audio
+@@ -270,7 +274,9 @@ static int make_socket(const struct sock
+ 			struct ip_mreqn mr4;
+ 			memset(&mr4, 0, sizeof(mr4));
+ 			mr4.imr_multiaddr = sa4->sin_addr;
++#if !defined(__NetBSD__)
+ 			mr4.imr_ifindex = req.ifr_ifindex;
++#endif
+ 			pw_net_get_ip((struct sockaddr_storage*)sa, addr, sizeof(addr), NULL, NULL);
+ 			pw_log_info("join IPv4 group: %s", addr);
+ 			res = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr4, sizeof(mr4));
diff --git a/pipewire/patches/patch-src_modules_module-vban-recv.c b/pipewire/patches/patch-src_modules_module-vban-recv.c
new file mode 100644
index 0000000000..fea926fe7f
--- /dev/null
+++ b/pipewire/patches/patch-src_modules_module-vban-recv.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- src/modules/module-vban-recv.c.orig	2025-07-29 20:14:02.633438730 +0000
++++ src/modules/module-vban-recv.c
+@@ -33,6 +33,10 @@
+ #include <module-vban/vban.h>
+ #include "network-utils.h"
+ 
++#if defined(__NetBSD__)
++#define ip_mreqn ip_mreq
++#endif
++
+ /** \page page_module_vban_recv VBAN receiver
+  *
+  * The `vban-recv` module creates a PipeWire source that receives audio
+@@ -244,7 +248,9 @@ static int make_socket(const struct sock
+ 			struct ip_mreqn mr4;
+ 			memset(&mr4, 0, sizeof(mr4));
+ 			mr4.imr_multiaddr = sa4->sin_addr;
++#if !defined(__NetBSD__)
+ 			mr4.imr_ifindex = req.ifr_ifindex;
++#endif
+ 			res = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr4, sizeof(mr4));
+ 		} else {
+ 			sa4->sin_addr.s_addr = INADDR_ANY;
diff --git a/pipewire/patches/patch-src_pipewire_conf.c b/pipewire/patches/patch-src_pipewire_conf.c
new file mode 100644
index 0000000000..0132b16233
--- /dev/null
+++ b/pipewire/patches/patch-src_pipewire_conf.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/pipewire/conf.c.orig	2024-10-21 15:45:51.137278772 +0000
++++ src/pipewire/conf.c
+@@ -18,7 +18,7 @@
+ #ifdef HAVE_PWD_H
+ #include <pwd.h>
+ #endif
+-#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__)
++#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__) || defined(__NetBSD__)
+ #ifndef O_PATH
+ #define O_PATH 0
+ #endif
diff --git a/pipewire/patches/patch-src_pipewire_mem.c b/pipewire/patches/patch-src_pipewire_mem.c
new file mode 100644
index 0000000000..1b2622bce6
--- /dev/null
+++ b/pipewire/patches/patch-src_pipewire_mem.c
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- src/pipewire/mem.c.orig	2025-07-23 15:42:58.000000000 +0000
++++ src/pipewire/mem.c
+@@ -27,7 +27,7 @@ PW_LOG_TOPIC_EXTERN(log_mem);
+ #define PW_LOG_TOPIC_DEFAULT log_mem
+ 
+ #if !defined(__FreeBSD__) && !defined(__MidnightBSD__) && !defined(__GNU__) \
+-       && !defined(HAVE_MEMFD_CREATE)
++       && !defined(__NetBSD__) && !defined(HAVE_MEMFD_CREATE)
+ /*
+  * No glibc wrappers exist for memfd_create(2), so provide our own.
+  *
+@@ -44,7 +44,7 @@ static inline int memfd_create(const cha
+ #define HAVE_MEMFD_CREATE 1
+ #endif
+ 
+-#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__)
++#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__) || defined(__NetBSD__)
+ #define MAP_LOCKED 0
+ #endif
+ 
+@@ -567,7 +567,7 @@ struct pw_memblock * pw_mempool_alloc(st
+ #else
+ 	char filename[128];
+ 	snprintf(filename, sizeof(filename),
+-		 "/dev/shm/pipewire-tmpfile:flags=0x%08x,type=%" PRIu32 ",size=%zu:XXXXXX",
++		 "/var/shm/pipewire-tmpfile:flags=0x%08x,type=%" PRIu32 ",size=%zu:XXXXXX",
+ 		 (unsigned int) flags, type, size);
+ 
+ 	b->this.fd = mkostemp(filename, O_CLOEXEC);
diff --git a/pipewire/patches/patch-src_pipewire_pipewire.c b/pipewire/patches/patch-src_pipewire_pipewire.c
new file mode 100644
index 0000000000..5a0175cd7a
--- /dev/null
+++ b/pipewire/patches/patch-src_pipewire_pipewire.c
@@ -0,0 +1,64 @@
+$NetBSD$
+
+https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819
+
+--- src/pipewire/pipewire.c.orig	2024-09-27 10:02:20.000000000 +0000
++++ src/pipewire/pipewire.c
+@@ -7,7 +7,7 @@
+ #include <unistd.h>
+ #include <limits.h>
+ #include <stdio.h>
+-#if !defined(__FreeBSD__) && !defined(__MidnightBSD__) && !defined(__GNU__)
++#if !defined(__FreeBSD__) && !defined(__MidnightBSD__) && !defined(__NetBSD__) && !defined(__GNU__)
+ #include <sys/prctl.h>
+ #endif
+ #include <pwd.h>
+@@ -484,7 +484,7 @@ static struct spa_log *load_journal_logg
+  * This function can be called multiple times.
+  */
+ SPA_EXPORT
+-void pw_init(int *argc, char **argv[])
++void pipewire_init(int *argc, char **argv[])
+ {
+ 	const char *str;
+ 	struct spa_dict_item items[6];
+@@ -596,7 +596,7 @@ done:
+  * used again after being deinitialized with a new pw_init() call.
+  */
+ SPA_EXPORT
+-void pw_deinit(void)
++void pipewire_deinit(void)
+ {
+ 	struct support *support = &global_support;
+ 	struct registry *registry = &support->registry;
+@@ -622,6 +622,21 @@ done:
+ 
+ }
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
++#undef pw_init
++SPA_EXPORT
++void pw_init(int *argc, char **argv[])
++{
++	pipewire_init(argc, argv);
++}
++#undef pw_deinit
++SPA_EXPORT
++void pw_deinit(void)
++{
++	pipewire_deinit();
++}
++#endif
++
+ /** Check if a debug category is enabled
+  *
+  * \param name the name of the category to check
+@@ -669,7 +684,7 @@ static void init_prgname(void)
+ 		}
+ 	}
+ #endif
+-#if !defined(__FreeBSD__) && !defined(__MidnightBSD__) && !defined(__GNU__)
++#if !defined(__FreeBSD__) && !defined(__MidnightBSD__) && !defined(__GNU__) && !defined(__NetBSD__)
+ 	{
+ 		if (prctl(PR_GET_NAME, (unsigned long) name, 0, 0, 0) == 0) {
+ 			prgname = name;
diff --git a/pipewire/patches/patch-src_pipewire_pipewire.h b/pipewire/patches/patch-src_pipewire_pipewire.h
new file mode 100644
index 0000000000..14d485f89b
--- /dev/null
+++ b/pipewire/patches/patch-src_pipewire_pipewire.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/pipewire/pipewire.h.orig	2024-10-21 16:43:48.330236571 +0000
++++ src/pipewire/pipewire.h
+@@ -50,9 +50,17 @@ extern "C" {
+  * \{
+  */
+ void
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ pw_init(int *argc, char **argv[]);
++#else
++pipewire_init(int *argc, char **argv[]);
++#endif
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ void pw_deinit(void);
++#else
++void pipewire_deinit(void);
++#endif
+ 
+ bool
+ pw_debug_is_category_enabled(const char *name);
diff --git a/pipewire/patches/patch-src_pipewire_private.h b/pipewire/patches/patch-src_pipewire_private.h
new file mode 100644
index 0000000000..42d192bd5a
--- /dev/null
+++ b/pipewire/patches/patch-src_pipewire_private.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/pipewire/private.h.orig	2024-09-27 10:02:20.000000000 +0000
++++ src/pipewire/private.h
+@@ -11,6 +11,8 @@
+ extern "C" {
+ #endif
+ 
++#include <pthread.h>
++#include <sys/time.h>
+ #include <sys/socket.h>
+ #include <sys/types.h> /* for pthread_t */
+ 
+@@ -24,7 +26,7 @@ extern "C" {
+ #include <spa/utils/result.h>
+ #include <spa/utils/type-info.h>
+ 
+-#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__)
++#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__) || defined(__NetBSD__)
+ struct ucred {
+ };
+ #endif
diff --git a/pipewire/patches/patch-src_pipewire_thread.c b/pipewire/patches/patch-src_pipewire_thread.c
new file mode 100644
index 0000000000..e845b6f2c8
--- /dev/null
+++ b/pipewire/patches/patch-src_pipewire_thread.c
@@ -0,0 +1,63 @@
+$NetBSD$
+
+--- src/pipewire/thread.c.orig	2025-07-23 15:42:58.000000000 +0000
++++ src/pipewire/thread.c
+@@ -20,6 +20,11 @@
+ #include <pipewire/private.h>
+ #include <pipewire/thread.h>
+ 
++#if defined(__NetBSD__)
++#include <sched.h>
++#define cpu_set_t cpuset_t*
++#endif
++
+ #define CHECK(expression,label)						\
+ do {									\
+ 	if ((errno = (expression)) != 0) {				\
+@@ -34,13 +39,22 @@ static int parse_affinity(const char *af
+ 	struct spa_json it[1];
+ 	int v;
+ 
++#if defined(__NetBSD__)
++	cpuset_zero(*set);
++#else
+ 	CPU_ZERO(set);
++#endif
+ 	if (spa_json_begin_array_relax(&it[0], affinity, strlen(affinity)) <= 0)
+ 		return 0;
+ 
+ 	while (spa_json_get_int(&it[0], &v) > 0) {
++#if defined(__NetBSD__)
++		if (v >= 0 && v < cpuset_size(*set))
++			cpuset_set(v, *set);
++#else
+ 		if (v >= 0 && v < CPU_SETSIZE)
+ 			CPU_SET(v, set);
++#endif
+         }
+ 	return 0;
+ }
+@@ -82,7 +96,11 @@ static int thread_setaffinity(pthread_t 
+ {
+ 	cpu_set_t set;
+ 	parse_affinity(affinity, &set);
++#if defined(__NetBSD__)
++	return -pthread_setaffinity_np(thread, sizeof(set), set);
++#else
+ 	return -pthread_setaffinity_np(thread, sizeof(set), &set);
++#endif
+ }
+ 
+ static struct spa_thread *impl_create(void *object,
+@@ -113,7 +131,11 @@ static struct spa_thread *impl_create(vo
+ 	}
+ 	if (props) {
+ 		if ((str = spa_dict_lookup(props, SPA_KEY_THREAD_NAME)) != NULL &&
++#if defined(__NetBSD__)
++		    (err = pthread_setname_np(pt, "%s", str)) != 0)
++#else
+ 		    (err = pthread_setname_np(pt, str)) != 0)
++#endif
+ 			pw_log_warn("pthread_setname error: %s", strerror(err));
+ 		if ((str = spa_dict_lookup(props, SPA_KEY_THREAD_AFFINITY)) != NULL &&
+ 		    (err = thread_setaffinity(pt, str)) != 0)
diff --git a/pipewire/patches/patch-src_tools_pw-cat.c b/pipewire/patches/patch-src_tools_pw-cat.c
new file mode 100644
index 0000000000..ed64cebcb3
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-cat.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-cat.c.orig	2024-10-21 16:46:32.481500875 +0000
++++ src/tools/pw-cat.c
+@@ -1612,7 +1612,11 @@ int main(int argc, char *argv[])
+ 	struct spa_error_location loc;
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ #ifdef HAVE_PW_CAT_FFMPEG_INTEGRATION
+ 	av_log_set_level(AV_LOG_DEBUG);
+@@ -2078,7 +2082,11 @@ error_no_main_loop:
+ 	if (data.encoded.format_context)
+ 		avformat_close_input(&data.encoded.format_context);
+ #endif
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 	return exit_code;
+ 
+ error_usage:
diff --git a/pipewire/patches/patch-src_tools_pw-cli.c b/pipewire/patches/patch-src_tools_pw-cli.c
new file mode 100644
index 0000000000..67012bdb91
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-cli.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-cli.c.orig	2025-07-23 15:42:58.000000000 +0000
++++ src/tools/pw-cli.c
+@@ -2335,7 +2335,11 @@ int main(int argc, char *argv[])
+ 	setlinebuf(stdout);
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	while ((c = getopt_long(argc, argv, "hVmdr:", long_options, NULL)) != -1) {
+ 		switch (c) {
+@@ -2447,7 +2451,11 @@ int main(int argc, char *argv[])
+ 	pw_context_destroy(data.context);
+ 	pw_main_loop_destroy(data.loop);
+ 	pw_map_clear(&data.vars);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return 0;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-config.c b/pipewire/patches/patch-src_tools_pw-config.c
new file mode 100644
index 0000000000..b18606f2d7
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-config.c
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- src/tools/pw-config.c.orig	2024-10-21 17:01:05.914242136 +0000
++++ src/tools/pw-config.c
+@@ -158,7 +158,11 @@ int main(int argc, char *argv[])
+ 		d.opt_colors = true;
+ 	d.opt_cmd = "paths";
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	while ((c = getopt_long(argc, argv, "hVn:p:LrNC", long_options, NULL)) != -1) {
+ 		switch (c) {
+@@ -249,6 +253,10 @@ done:
+ 	pw_properties_free(d.assemble);
+ 	pw_properties_free(props);
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 	return res;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-container.c b/pipewire/patches/patch-src_tools_pw-container.c
new file mode 100644
index 0000000000..2040b8ccbf
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-container.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-container.c.orig	2024-10-21 17:02:04.736034476 +0000
++++ src/tools/pw-container.c
+@@ -159,7 +159,11 @@ int main(int argc, char *argv[])
+ 			NULL);
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	while ((c = getopt_long(argc, argv, "hVr:P:", long_options, NULL)) != -1) {
+ 		switch (c) {
+@@ -297,7 +301,11 @@ int main(int argc, char *argv[])
+ 	pw_context_destroy(data.context);
+ 	pw_main_loop_destroy(data.loop);
+ 	pw_properties_free(data.props);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return 0;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-dot.c b/pipewire/patches/patch-src_tools_pw-dot.c
new file mode 100644
index 0000000000..a72aae9a4e
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-dot.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-dot.c.orig	2024-10-21 17:02:53.122364745 +0000
++++ src/tools/pw-dot.c
+@@ -1364,7 +1364,11 @@ int main(int argc, char *argv[])
+ 	int c;
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	while ((c = getopt_long(argc, argv, "hVasdr:o:L9j:", long_options, NULL)) != -1) {
+ 		switch (c) {
+@@ -1436,7 +1440,11 @@ int main(int argc, char *argv[])
+ 		spa_list_remove(&g->link);
+ 		free(g);
+ 	}
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return 0;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-dump.c b/pipewire/patches/patch-src_tools_pw-dump.c
new file mode 100644
index 0000000000..b26ad3e705
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-dump.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-dump.c.orig	2024-10-21 17:03:44.349655454 +0000
++++ src/tools/pw-dump.c
+@@ -1538,7 +1538,11 @@ int main(int argc, char *argv[])
+ 	int c;
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	data.out = stdout;
+ 	if (getenv("NO_COLOR") == NULL && isatty(fileno(data.out)))
+@@ -1640,7 +1644,11 @@ int main(int argc, char *argv[])
+ 	spa_hook_remove(&data.core_listener);
+ 	pw_context_destroy(data.context);
+ 	pw_main_loop_destroy(data.loop);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#elsee
++	pipewire_deinit();
++#endif
+ 
+ 	return 0;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-link.c b/pipewire/patches/patch-src_tools_pw-link.c
new file mode 100644
index 0000000000..2d1b7b7ca6
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-link.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/tools/pw-link.c.orig	2024-10-21 17:08:16.721868216 +0000
++++ src/tools/pw-link.c
+@@ -1099,9 +1099,17 @@ int main(int argc, char *argv[])
+ 	setlocale(LC_ALL, "");
+ 	setlinebuf(stdout);
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 	int res = run(argc, argv);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return res;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-loopback.c b/pipewire/patches/patch-src_tools_pw-loopback.c
new file mode 100644
index 0000000000..38fcf82058
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-loopback.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-loopback.c.orig	2024-10-21 17:07:29.288463859 +0000
++++ src/tools/pw-loopback.c
+@@ -115,7 +115,11 @@ int main(int argc, char *argv[])
+ 	struct spa_error_location loc;
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	data.channels = DEFAULT_CHANNELS;
+ 	data.opt_channel_map = DEFAULT_CHANNEL_MAP;
+@@ -273,7 +277,11 @@ exit:
+ 		pw_main_loop_destroy(data.loop);
+ 	pw_properties_free(data.capture_props);
+ 	pw_properties_free(data.playback_props);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return res;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-metadata.c b/pipewire/patches/patch-src_tools_pw-metadata.c
new file mode 100644
index 0000000000..ce657e53d7
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-metadata.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-metadata.c.orig	2024-10-21 17:06:44.708173773 +0000
++++ src/tools/pw-metadata.c
+@@ -194,7 +194,11 @@ int main(int argc, char *argv[])
+ 	setlinebuf(stdout);
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	data.opt_name = "default";
+ 
+@@ -289,7 +293,11 @@ int main(int argc, char *argv[])
+ 	pw_core_disconnect(data.core);
+ 	pw_context_destroy(data.context);
+ 	pw_main_loop_destroy(data.loop);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return res;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-mididump.c b/pipewire/patches/patch-src_tools_pw-mididump.c
new file mode 100644
index 0000000000..0635572552
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-mididump.c
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- src/tools/pw-mididump.c.orig	2024-10-21 17:05:38.447958934 +0000
++++ src/tools/pw-mididump.c
+@@ -178,7 +178,11 @@ int main(int argc, char *argv[])
+ 	};
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	setlinebuf(stdout);
+ 
+@@ -209,6 +213,10 @@ int main(int argc, char *argv[])
+ 	} else {
+ 		res = dump_filter(&data);
+ 	}
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 	return res;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-mon.c b/pipewire/patches/patch-src_tools_pw-mon.c
new file mode 100644
index 0000000000..73caf2effa
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-mon.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-mon.c.orig	2024-10-21 16:59:19.555160910 +0000
++++ src/tools/pw-mon.c
+@@ -805,7 +805,11 @@ int main(int argc, char *argv[])
+ 	bool colors = false;
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	setlinebuf(stdout);
+ 
+@@ -911,7 +915,11 @@ int main(int argc, char *argv[])
+ 	spa_hook_remove(&data.core_listener);
+ 	pw_context_destroy(data.context);
+ 	pw_main_loop_destroy(data.loop);
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return 0;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-profiler.c b/pipewire/patches/patch-src_tools_pw-profiler.c
new file mode 100644
index 0000000000..8442539e52
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-profiler.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-profiler.c.orig	2025-07-23 15:42:58.000000000 +0000
++++ src/tools/pw-profiler.c
+@@ -691,7 +691,11 @@ int main(int argc, char *argv[])
+ 	int c;
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	while ((c = getopt_long(argc, argv, "hVr:o:Jn:", long_options, NULL)) != -1) {
+ 		switch (c) {
+@@ -795,7 +799,11 @@ int main(int argc, char *argv[])
+ 		printf("{ } ]\n");
+ 	}
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return 0;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-reserve.c b/pipewire/patches/patch-src_tools_pw-reserve.c
new file mode 100644
index 0000000000..1f0a649f39
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-reserve.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-reserve.c.orig	2024-10-21 17:11:34.642954401 +0000
++++ src/tools/pw-reserve.c
+@@ -107,7 +107,11 @@ int main(int argc, char *argv[])
+ 	setlinebuf(stdout);
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	while ((c = getopt_long(argc, argv, "hVn:a:p:mr", long_options, NULL)) != -1) {
+ 		switch (c) {
+@@ -232,7 +236,11 @@ exit:
+ 	if (impl.mainloop)
+ 		pw_main_loop_destroy(impl.mainloop);
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return res;
+ }
diff --git a/pipewire/patches/patch-src_tools_pw-top.c b/pipewire/patches/patch-src_tools_pw-top.c
new file mode 100644
index 0000000000..b4fe5d76f2
--- /dev/null
+++ b/pipewire/patches/patch-src_tools_pw-top.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/tools/pw-top.c.orig	2024-10-21 17:10:39.289793310 +0000
++++ src/tools/pw-top.c
+@@ -812,7 +812,11 @@ int main(int argc, char *argv[])
+ 	struct node *n;
+ 
+ 	setlocale(LC_ALL, "");
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_init(&argc, &argv);
++#else
++	pipewire_init(&argc, &argv);
++#endif
+ 
+ 	data.iterations = -1;
+ 
+@@ -921,7 +925,11 @@ int main(int argc, char *argv[])
+ 	pw_context_destroy(data.context);
+ 	pw_main_loop_destroy(data.loop);
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ 	pw_deinit();
++#else
++	pipewire_deinit();
++#endif
+ 
+ 	return 0;
+ }


Home | Main Index | Thread Index | Old Index