pkgsrc-WIP-changes archive

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

librespot: use alsa if building on linux



Module Name:	pkgsrc-wip
Committed By:	pin <voidpin%protonmail.com@localhost>
Pushed By:	pin
Date:		Thu Oct 8 13:41:58 2020 +0200
Changeset:	14dc6a572e301e4332566bdc43c3c999dceb2dd8

Modified Files:
	librespot/Makefile

Log Message:
librespot: use alsa if building on linux

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=14dc6a572e301e4332566bdc43c3c999dceb2dd8

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

diffstat:
 librespot/Makefile | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diffs:
diff --git a/librespot/Makefile b/librespot/Makefile
index b164d85814..aad84b8bb4 100644
--- a/librespot/Makefile
+++ b/librespot/Makefile
@@ -4,7 +4,7 @@ DISTNAME=	librespot-0.1.3
 CATEGORIES=	audio
 MASTER_SITES=	${MASTER_SITE_GITHUB:=librespot-org/}
 #GITHUB_TAG=	v${PKGVERSION_NOREV}
-#Track a specific commit until new release upstream
+#Track a specific commit until upstream provides a new release
 GITHUB_PROJECT=	librespot
 GITHUB_TAG=	a2f832dff171914935f7e1a98a5da3d7c8a0b789
 
@@ -287,13 +287,23 @@ CARGO_CRATE_DEPENDS+=	zerocopy-derive-0.1.4
 
 INSTALLATION_DIRS=	bin
 
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "Linux"
+CARGO_ARGS+=    ${DEFAULT_CARGO_ARGS} --no-default-features --features alsa-backend
+.else
 CARGO_ARGS+=	${DEFAULT_CARGO_ARGS} --no-default-features --features portaudio-backend
+.endif
+
 RUSTFLAGS+=	-C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.portaudio}/${BUILDLINK_LIBDIRS.portaudio}
 MAKE_ENV+=	RUSTFLAGS=${RUSTFLAGS:Q}
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/target/release/librespot ${DESTDIR}${PREFIX}/bin
 
+.if ${OPSYS} == "Linux"
+.include "../../audio/alsa-lib/buildlink3.mk"
+.else
 .include "../../audio/portaudio/buildlink3.mk"
+.endif
 .include "../../lang/rust/cargo.mk"
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index