pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio/librespot



Module Name:    pkgsrc
Committed By:   tnn
Date:           Tue Oct 20 23:14:11 UTC 2020

Modified Files:
        pkgsrc/audio/librespot: Makefile
Added Files:
        pkgsrc/audio/librespot: options.mk

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


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/audio/librespot/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/librespot/options.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/librespot/Makefile
diff -u pkgsrc/audio/librespot/Makefile:1.2 pkgsrc/audio/librespot/Makefile:1.3
--- pkgsrc/audio/librespot/Makefile:1.2 Tue Oct 20 19:06:59 2020
+++ pkgsrc/audio/librespot/Makefile     Tue Oct 20 23:14:11 2020
@@ -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 @@ CARGO_CRATE_DEPENDS+=     zerocopy-derive-0.
 
 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"

Added files:

Index: pkgsrc/audio/librespot/options.mk
diff -u /dev/null pkgsrc/audio/librespot/options.mk:1.1
--- /dev/null   Tue Oct 20 23:14:11 2020
+++ pkgsrc/audio/librespot/options.mk   Tue Oct 20 23:14:11 2020
@@ -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