git: 037eee264831 - main - audio/alsa-plugins: Fix SPEEX option, and symlinks.

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Wed, 16 Feb 2022 21:03:02 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=037eee264831689f93e16d51875bbebd30ed50dd

commit 037eee264831689f93e16d51875bbebd30ed50dd
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2022-02-16 20:22:32 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-02-16 21:02:16 +0000

    audio/alsa-plugins: Fix SPEEX option, and symlinks.
    
    Fixes these errors:
    
    Error: /usr/local/lib/alsa-lib/libasound_module_pcm_speex.so is linked
      to /usr/local/lib/libspeexdsp.so.1 from audio/speexdsp but it is not
      declared as a dependency
    Error: Orphaned: etc/alsa/conf.d/60-speex.conf
    Error: Orphaned: share/alsa/alsa.conf.d/60-speex.conf
    
    Also makes symlinks from etc/alsa/conf.d to share/alsa/alsa.conf.d/
    relative to fix stage-qa warnings.
---
 audio/alsa-plugins/Makefile  | 9 +++++++--
 audio/alsa-plugins/pkg-plist | 2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/audio/alsa-plugins/Makefile b/audio/alsa-plugins/Makefile
index cb092103d9ca..e2f3c17781dc 100644
--- a/audio/alsa-plugins/Makefile
+++ b/audio/alsa-plugins/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	alsa-plugins
 PORTVERSION=	1.2.2
-PORTREVISION=	7
+PORTREVISION=	8
 DISTVERSIONPREFIX=	v
 CATEGORIES=	audio
 MASTER_SITES=	GH
@@ -53,8 +53,13 @@ PULSEAUDIO_CONFIGURE_ENABLE=	pulseaudio
 SAMPLERATE_LIB_DEPENDS=		libsamplerate.so:audio/libsamplerate
 SAMPLERATE_CONFIGURE_ENABLE=	samplerate
 
-SPEEX_LIB_DEPENDS=	libspeex.so:audio/speex
+SPEEX_LIB_DEPENDS=	libspeex.so:audio/speex libspeexdsp.so:audio/speexdsp
 SPEEX_CONFIGURE_ON=	--with-speex=lib
 SPEEX_CONFIGURE_OFF=	--without-speex
 
+post-install:
+	# sanitize links
+	cd ${STAGEDIR}${PREFIX}/etc/alsa/conf.d && for i in [0-9][0-9]-*.conf ; do \
+		${LN} -sf ../../../share/alsa/alsa.conf.d/$$i . ; done
+
 .include <bsd.port.mk>
diff --git a/audio/alsa-plugins/pkg-plist b/audio/alsa-plugins/pkg-plist
index 176a27a18e85..d93a5bad2821 100644
--- a/audio/alsa-plugins/pkg-plist
+++ b/audio/alsa-plugins/pkg-plist
@@ -4,6 +4,7 @@
 @comment etc/alsa/conf.d/50-arcam-av-ctl.conf
 @comment etc/alsa/conf.d/50-oss.conf
 @comment etc/alsa/conf.d/50-pulseaudio.conf
+%%SPEEX%%etc/alsa/conf.d/60-speex.conf
 @comment etc/alsa/conf.d/60-upmix.conf
 @comment etc/alsa/conf.d/60-vdownmix.conf
 @comment etc/alsa/conf.d/98-usb-stream.conf
@@ -54,6 +55,7 @@ lib/alsa-lib/libasound_module_pcm_vdownmix.so
 @comment share/alsa/alsa.conf.d/50-oss.conf
 %%PULSEAUDIO%%share/alsa/alsa.conf.d/50-pulseaudio.conf
 %%FFMPEG%%share/alsa/alsa.conf.d/60-a52-encoder.conf
+%%SPEEX%%share/alsa/alsa.conf.d/60-speex.conf
 @comment share/alsa/alsa.conf.d/60-upmix.conf
 @comment share/alsa/alsa.conf.d/60-vdownmix.conf
 @comment share/alsa/alsa.conf.d/98-usb-stream.conf