git: 2021e69a7cf4 - main - multimedia/obs-studio: expose PipeWire support

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sun, 01 Jan 2023 05:50:35 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2021e69a7cf4c6275f80000b303fd3ba2e03fe9a

commit 2021e69a7cf4c6275f80000b303fd3ba2e03fe9a
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-01-01 04:52:46 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-01-01 05:50:19 +0000

    multimedia/obs-studio: expose PipeWire support
    
    Requires xdg-desktop-portal-wlr, plasma5-xdg-desktop-portal-kde or
    similar to provide org.freedesktop.impl.portal.ScreenCast in order to
    be visible as Screen Capture source.
---
 multimedia/obs-studio/Makefile  | 11 +++++++++--
 multimedia/obs-studio/distinfo  |  6 ++++++
 multimedia/obs-studio/pkg-plist | 43 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+), 2 deletions(-)

diff --git a/multimedia/obs-studio/Makefile b/multimedia/obs-studio/Makefile
index aa33ca5fab36..e0d5e014cee7 100644
--- a/multimedia/obs-studio/Makefile
+++ b/multimedia/obs-studio/Makefile
@@ -5,6 +5,10 @@ CATEGORIES=	multimedia
 
 PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
 PATCHFILES+=	e221bf8eedfc.patch:-p1 # https://github.com/obsproject/obs-studio/pull/7989
+PATCHFILES+=	0dcc3a1696c0.patch:-p1 # https://github.com/obsproject/obs-studio/pull/7986
+PATCHFILES+=	2cebc65ad7f8.patch:-p1 # https://github.com/obsproject/obs-studio/pull/7992
+PATCHFILES+=	90c476983ce9.patch:-p1 # https://github.com/obsproject/obs-studio/pull/7992
+
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	Open source streaming/recording software
@@ -72,13 +76,12 @@ GH_TUPLE=	obsproject:obs-amd-encoder:d5a136c6834c39293ad749cf8f07bdaa772fe44b:ob
 			akheron:jansson:bc5741fb1ac730ead24e9bd08977fc6c248e04b0:akheron_jansson/plugins/obs-outputs/ftl-sdk/libjansson
 
 CMAKE_ON=	UNIX_STRUCTURE
-CMAKE_OFF=	ENABLE_PIPEWIRE # beginning with 27.0.1 (PR#4287) the linux-capture plugin optionally requires the piperware library and in this case expects the linux/dma-buf.h header
 CMAKE_ARGS=	-DOBS_VERSION_OVERRIDE:STRING="${PORTVERSION}" \
 		-DQT_VERSION=6
 
 LDFLAGS+=	-fPIC # pending https://github.com/obsproject/obs-studio/issues/3436
 
-OPTIONS_DEFINE=		BROWSER VLC VST
+OPTIONS_DEFINE=		BROWSER PIPEWIRE VLC VST
 OPTIONS_DEFAULT=	VLC VST
 OPTIONS_MULTI=		AUDIO
 OPTIONS_MULTI_AUDIO=	JACK PULSEAUDIO SNDIO
@@ -94,6 +97,10 @@ JACK_LIB_DEPENDS=	libjack.so:audio/jack
 JACK_CMAKE_ON=		-DENABLE_JACK=TRUE
 JACK_CMAKE_OFF=		-DDISABLE_JACK=TRUE
 
+PIPEWIRE_DESC=		Screen capture via PipeWire
+PIPEWIRE_LIB_DEPENDS=	libpipewire-0.3.so:multimedia/pipewire
+PIPEWIRE_CMAKE_BOOL=	ENABLE_PIPEWIRE
+
 PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
 PULSEAUDIO_CMAKE_ON=	-DENABLE_PULSEAUDIO=TRUE
 PULSEAUDIO_CMAKE_OFF=	-DDISABLE_PULSEAUDIO=TRUE
diff --git a/multimedia/obs-studio/distinfo b/multimedia/obs-studio/distinfo
index 8e74aa504c14..3fa1ce3bcd64 100644
--- a/multimedia/obs-studio/distinfo
+++ b/multimedia/obs-studio/distinfo
@@ -29,3 +29,9 @@ SHA256 (akheron-jansson-bc5741fb1ac730ead24e9bd08977fc6c248e04b0_GH0.tar.gz) = a
 SIZE (akheron-jansson-bc5741fb1ac730ead24e9bd08977fc6c248e04b0_GH0.tar.gz) = 127897
 SHA256 (e221bf8eedfc.patch) = a8c1d4614f2d019e967eb04d9214548491989c78f6df42dbbab610d3123f4eb1
 SIZE (e221bf8eedfc.patch) = 5766
+SHA256 (0dcc3a1696c0.patch) = c3690cbb5a5e11f22db4c582fc72d17945ef554e587f78856703d30e0b32a271
+SIZE (0dcc3a1696c0.patch) = 1451
+SHA256 (2cebc65ad7f8.patch) = bdad9893f25e9503514e1c4eea5f82024d9f85ce3b9594f8e6d202934205ccb0
+SIZE (2cebc65ad7f8.patch) = 765
+SHA256 (90c476983ce9.patch) = 7d3efcc7d9f7014c4e04ce3d2635e7ab2fce565f3bf3557846f7a5ca34e7bbcd
+SIZE (90c476983ce9.patch) = 684
diff --git a/multimedia/obs-studio/pkg-plist b/multimedia/obs-studio/pkg-plist
index d48f59af5d03..0c3c0760a7e7 100644
--- a/multimedia/obs-studio/pkg-plist
+++ b/multimedia/obs-studio/pkg-plist
@@ -141,6 +141,7 @@ lib/obs-plugins/frontend-tools.so
 lib/obs-plugins/image-source.so
 lib/obs-plugins/linux-capture.so
 %%JACK%%lib/obs-plugins/linux-jack.so
+%%PIPEWIRE%%lib/obs-plugins/linux-pipewire.so
 %%PULSEAUDIO%%lib/obs-plugins/linux-pulseaudio.so
 lib/obs-plugins/linux-v4l2.so
 lib/obs-plugins/obs-ffmpeg.so
@@ -429,6 +430,48 @@ share/obs/obs-plugins/linux-capture/locale/zh-TW.ini
 %%JACK%%share/obs/obs-plugins/linux-jack/locale/vi-VN.ini
 %%JACK%%share/obs/obs-plugins/linux-jack/locale/zh-CN.ini
 %%JACK%%share/obs/obs-plugins/linux-jack/locale/zh-TW.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/.gitkeep
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ar-SA.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ca-ES.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/cs-CZ.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/da-DK.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/de-DE.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/el-GR.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/en-US.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/es-ES.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/et-EE.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/eu-ES.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/fa-IR.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/fi-FI.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/fr-FR.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/gl-ES.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/he-IL.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/hi-IN.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/hu-HU.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/hy-AM.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/id-ID.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/it-IT.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ja-JP.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ka-GE.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/kmr-TR.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ko-KR.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ms-MY.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/nl-NL.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/pl-PL.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/pt-BR.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/pt-PT.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ro-RO.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ru-RU.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/si-LK.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/sk-SK.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/sl-SI.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/sv-SE.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/ta-IN.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/tr-TR.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/uk-UA.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/vi-VN.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/zh-CN.ini
+%%PIPEWIRE%%share/obs/obs-plugins/linux-pipewire/locale/zh-TW.ini
 %%PULSEAUDIO%%share/obs/obs-plugins/linux-pulseaudio/locale/ar-SA.ini
 %%PULSEAUDIO%%share/obs/obs-plugins/linux-pulseaudio/locale/az-AZ.ini
 %%PULSEAUDIO%%share/obs/obs-plugins/linux-pulseaudio/locale/ba-RU.ini