librespot: use alsa if building on linux

This commit is contained in:
pin 2020-10-08 13:41:58 +02:00
parent b325c30926
commit 14dc6a572e
1 changed files with 11 additions and 1 deletions

View File

@ -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"