git: 3e6fe6466f50 - main - net/krfb: make pipewire optional

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Thu, 11 May 2023 09:58:15 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3e6fe6466f5021164ff3a0cdaea982bdf9b2b106

commit 3e6fe6466f5021164ff3a0cdaea982bdf9b2b106
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-05-11 09:54:28 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-05-11 09:57:22 +0000

    net/krfb: make pipewire optional
    
    Keep it on by default.
    
    PR:                     268761
    Approved by:            arrowd (mentor, kde@)
    Differential Revision:  https://reviews.freebsd.org/D39976
---
 net/krfb/Makefile  | 18 +++++++++++-------
 net/krfb/pkg-plist |  4 ++--
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/net/krfb/Makefile b/net/krfb/Makefile
index ce65952f734c..22bf50f951fa 100644
--- a/net/krfb/Makefile
+++ b/net/krfb/Makefile
@@ -9,22 +9,26 @@ WWW=		https://www.kde.org
 
 BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
 LIB_DEPENDS=	libvncserver.so:net/libvncserver \
-		libxcb-image.so:x11/xcb-util-image \
-		libpipewire-0.3.so:multimedia/pipewire
+		libxcb-image.so:x11/xcb-util-image
 
 USES=		alias cmake compiler:c++11-lib gettext jpeg kde:5 pkgconfig \
 		qt:5 tar:xz xorg
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
-		dbusaddons dnssd doctools i18n kpipewire notifications wallet \
+		dbusaddons dnssd doctools i18n notifications wallet \
 		wayland widgetsaddons windowsystem xmlgui \
 		ecm:build
 USE_QT=		core dbus gui network widgets x11extras xml \
 		buildtools:build qmake:build
 USE_XORG=	x11 xcb xdamage xext xtst
 
-OPTIONS_DEFINE=		TELEPATHY DOCS
-OPTIONS_SUB=		yes
-TELEPATHY_DESC=		Support for Telepathy Tubes
-TELEPATHY_LIB_DEPENDS=	libtelepathy-qt5.so:net-im/telepathy-qt
+OPTIONS_DEFINE=			DOCS PIPEWIRE TELEPATHY
+OPTIONS_DEFAULT=		PIPEWIRE
+OPTIONS_SUB=			yes
+PIPEWIRE_DESC=			Screen capture via PipeWire
+PIPEWIRE_LIB_DEPENDS=		libpipewire-0.3.so:multimedia/pipewire
+PIPEWIRE_USE=			KDE=kpipewire
+PIPEWIRE_CMAKE_BOOL_OFF=	DISABLE_PIPEWIRE
+TELEPATHY_DESC=			Support for Telepathy Tubes
+TELEPATHY_LIB_DEPENDS=		libtelepathy-qt5.so:net-im/telepathy-qt
 
 .include <bsd.port.mk>
diff --git a/net/krfb/pkg-plist b/net/krfb/pkg-plist
index 3721f454c9a8..f4ab21d68fca 100644
--- a/net/krfb/pkg-plist
+++ b/net/krfb/pkg-plist
@@ -3,8 +3,8 @@ bin/krfb-virtualmonitor
 lib/libkrfbprivate.so.5
 lib/libkrfbprivate.so.5.0
 %%QT_PLUGINDIR%%/krfb/events/x11.so
-%%QT_PLUGINDIR%%/krfb/events/xdp.so
-%%QT_PLUGINDIR%%/krfb/framebuffer/pw.so
+%%PIPEWIRE%%%%QT_PLUGINDIR%%/krfb/events/xdp.so
+%%PIPEWIRE%%%%QT_PLUGINDIR%%/krfb/framebuffer/pw.so
 %%QT_PLUGINDIR%%/krfb/framebuffer/qt.so
 %%QT_PLUGINDIR%%/krfb/framebuffer/xcb.so
 share/applications/org.kde.krfb.desktop