pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/audio/librespot librespot: add options for other audio...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1562633126b8
branches:  trunk
changeset: 440879:1562633126b8
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Tue Oct 20 23:14:11 2020 +0000

description:
librespot: add options for other audio backends. Leave default as portaudio.

diffstat:

 audio/librespot/Makefile   |   7 ++---
 audio/librespot/options.mk |  49 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 4 deletions(-)

diffs (80 lines):

diff -r 63885d191a71 -r 1562633126b8 audio/librespot/Makefile
--- a/audio/librespot/Makefile  Tue Oct 20 22:54:40 2020 +0000
+++ b/audio/librespot/Makefile  Tue Oct 20 23:14:11 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/10/20 19:06:59 tnn Exp $
+# $NetBSD: Makefile,v 1.3 2020/10/20 23:14:11 tnn Exp $
 
 DISTNAME=      librespot-0.1.3
 CATEGORIES=    audio
@@ -287,15 +287,14 @@
 
 INSTALLATION_DIRS=     bin
 
-RUSTFLAGS+=    -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.portaudio}/${BUILDLINK_LIBDIRS.portaudio}
 MAKE_ENV+=     RUSTFLAGS=${RUSTFLAGS:Q}
 
 CARGO_NO_DEFAULT_FEATURES=     yes
-CARGO_FEATURES=                        portaudio-backend
+
+.include "options.mk"
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/target/release/librespot ${DESTDIR}${PREFIX}/bin
 
-.include "../../audio/portaudio/buildlink3.mk"
 .include "../../lang/rust/cargo.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 63885d191a71 -r 1562633126b8 audio/librespot/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/librespot/options.mk        Tue Oct 20 23:14:11 2020 +0000
@@ -0,0 +1,49 @@
+# $NetBSD: options.mk,v 1.1 2020/10/20 23:14:11 tnn Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.librespot
+PKG_OPTIONS_OPTIONAL_GROUPS=   backend
+PKG_OPTIONS_GROUP.backend=     alsa gstreamer jack portaudio pulseaudio rodio sdl
+
+PKG_SUGGESTED_OPTIONS= portaudio
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+CARGO_FEATURES+=       alsa-backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.alsa-lib}/lib
+.include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mgstreamer)
+CARGO_FEATURES+=       gstreamer-backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.gstreamer1}/lib
+.include "../../multimedia/gstreamer1/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mjack)
+CARGO_FEATURES+=       jack-backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.jack}/lib
+.include "../../audio/jack/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mportaudio)
+CARGO_FEATURES+=       portaudio-backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.portaudio}/${BUILDLINK_LIBDIRS.portaudio}
+.include "../../audio/portaudio/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+CARGO_FEATURES+=       pulseaudio-backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pulseaudio}/lib
+.include "../../audio/pulseaudio/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mrodio)
+CARGO_FEATURES+=       rodio-backend
+.endif
+
+.if !empty(PKG_OPTIONS:Msdl)
+CARGO_FEATURES+=       sdl-backend
+RUSTFLAGS+=            -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.SDL2}/lib
+.include "../../devel/SDL2/buildlink3.mk"
+.endif



Home | Main Index | Thread Index | Old Index