git: 0d52a1007da8 - main - audio/cmus: enable MPRIS support

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 20 Dec 2021 12:20:59 UTC
The branch main has been updated by jbeich:

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

commit 0d52a1007da8e2731e07900b906a7450574a8630
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-12-20 12:14:02 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-12-20 12:20:35 +0000

    audio/cmus: enable MPRIS support
    
    Obtained from:  Gentoo
---
 audio/cmus/Makefile         | 10 +++++++---
 audio/cmus/files/patch-basu | 24 ++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/audio/cmus/Makefile b/audio/cmus/Makefile
index 27d120436710..63b2215b80a6 100644
--- a/audio/cmus/Makefile
+++ b/audio/cmus/Makefile
@@ -3,7 +3,7 @@
 PORTNAME=	cmus
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.9.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	audio
 
 MAINTAINER=	ports@FreeBSD.org
@@ -39,8 +39,8 @@ _CMUS_CONFIGURE_OPTS=	AAC ALSA AO ARTS CDDB CDIO COREAUDIO CUE DISCID	\
 CONFIGURE_ARGS+=	CONFIG_${opt}=n
 .endfor
 
-OPTIONS_DEFINE=		EXAMPLES
-OPTIONS_DEFAULT=	AAC FFMPEG FLAC MODPLUG MP4 OPUS OSS SNDIO VORBIS WAV
+OPTIONS_DEFINE=		BASU EXAMPLES
+OPTIONS_DEFAULT=	AAC BASU FFMPEG FLAC MODPLUG MP4 OPUS OSS SNDIO VORBIS WAV
 OPTIONS_SUB=	yes
 
 OPTIONS_GROUP=	OUT IN
@@ -49,6 +49,7 @@ OPTIONS_GROUP_IN=	AAC CDDB CDIO CUE DISCID FFMPEG FLAC MAD MIKMOD	\
 			MODPLUG MP4 MUSEPACK OPUS SAMPLERATE TREMOR	\
 			VORBIS WAV WAVPACK
 
+BASU_DESC=	MPRIS protocol support via basu
 DISCID_DESC=	libdiscid CDDA identification support
 IN_DESC=	Input plugins
 OUT_DESC=	Output plugins
@@ -59,6 +60,9 @@ AAC_LIB_DEPENDS=	libfaad.so:audio/faad
 AO_CONFIGURE_ON=	CONFIG_AO=y
 AO_LIB_DEPENDS=	libao.so:audio/libao
 
+BASU_CONFIGURE_ON=	CONFIG_MPRIS=y
+BASU_LIB_DEPENDS=	libbasu.so:devel/basu
+
 CDDB_CONFIGURE_ON=	CONFIG_CDDB=y
 CDDB_LIB_DEPENDS=	libcddb.so:audio/libcddb
 
diff --git a/audio/cmus/files/patch-basu b/audio/cmus/files/patch-basu
new file mode 100644
index 000000000000..cdd89e83f7e3
--- /dev/null
+++ b/audio/cmus/files/patch-basu
@@ -0,0 +1,24 @@
+https://github.com/cmus/cmus/issues/1133
+
+--- configure.orig	2021-01-22 19:34:38 UTC
++++ configure
+@@ -289,7 +289,7 @@ check_vorbis()
+ 
+ check_libsystemd()
+ {
+-	pkg_config LIBSYSTEMD "libsystemd" || pkg_config LIBSYSTEMD "libelogind >= 239.3"
++	pkg_config LIBSYSTEMD "libsystemd" || pkg_config LIBSYSTEMD "libelogind >= 239.3" || pkg_config LIBSYSTEMD "basu"
+ 	return $?
+ }
+ 
+--- mpris.c.orig	2021-01-22 19:34:38 UTC
++++ mpris.c
+@@ -15,7 +15,7 @@
+  * along with this program; if not, see <http://www.gnu.org/licenses/>.
+  */
+ 
+-#include <systemd/sd-bus.h>
++#include <basu/sd-bus.h>
+ 
+ #include "mpris.h"
+ #include "ui_curses.h"