git: a439683d94c6 - main - x11-wm/sway: make swaybg dependency optional

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 28 Nov 2022 09:05:30 UTC
The branch main has been updated by jbeich:

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

commit a439683d94c6b41a8251df30ba6fa55d6e81a79b
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-11-28 09:00:00 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-11-28 09:03:27 +0000

    x11-wm/sway: make swaybg dependency optional
    
    See swaybg_command in sway(5) manpage and
    https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway#Wallpaper
    
    Inspired by:    Alpine, Gentoo
---
 x11-wm/sway/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/x11-wm/sway/Makefile b/x11-wm/sway/Makefile
index bc4afb2a9366..05749f6dd2c8 100644
--- a/x11-wm/sway/Makefile
+++ b/x11-wm/sway/Makefile
@@ -24,7 +24,6 @@ LIB_DEPENDS=	libjson-c.so:devel/json-c \
 		libwlroots.so:x11-toolkits/wlroots \
 		libinput.so:x11/libinput \
 		libxkbcommon.so:x11/libxkbcommon
-RUN_DEPENDS=	swaybg:x11/swaybg
 
 USES=		compiler:c11 gl gnome meson pkgconfig xorg
 USE_GITHUB=	yes
@@ -34,8 +33,8 @@ USE_XORG=	pixman
 GH_ACCOUNT=	swaywm
 MESON_ARGS=	-Dsd-bus-provider=basu
 
-OPTIONS_DEFINE=	BASU MANPAGES PIXBUF X11
-OPTIONS_DEFAULT=BASU MANPAGES PIXBUF X11
+OPTIONS_DEFINE=	BASU MANPAGES PIXBUF SWAYBG X11
+OPTIONS_DEFAULT=BASU MANPAGES PIXBUF SWAYBG X11
 OPTIONS_SUB=	yes
 
 BASU_DESC=		Tray in swaybar via basu
@@ -48,6 +47,9 @@ MANPAGES_MESON_ENABLED=	man-pages
 PIXBUF_USE=		GNOME=gdkpixbuf2
 PIXBUF_MESON_ENABLED=	gdk-pixbuf
 
+SWAYBG_DESC=		Default command to set background
+SWAYBG_RUN_DEPENDS=	swaybg:x11/swaybg
+
 X11_USE=		XORG=xcb
 X11_LIB_DEPENDS=	libxcb-icccm.so:x11/xcb-util-wm
 X11_MESON_ENABLED=	xwayland