COMMENT =	The Advanced Linux Sound Architecture (ALSA) - plugins

DISTNAME =	alsa-plugins-1.2.7.1

CATEGORIES =	audio

HOMEPAGE =	https://www.alsa-project.org/

#LGPLv2.1
PERMIT_PACKAGE =	Yes

WANTLIB =		m pthread 

SITES =			https://www.alsa-project.org/files/pub/plugins/
EXTRACT_SUFX =		.tar.bz2

CONFIGURE_ENV =		LDFLAGS="-L${LOCALBASE}/lib/alsa-lib \
				-Wl,-rpath,${LOCALBASE}/lib/alsa-lib"

USE_GMAKE =		Yes
FAKE_FLAGS =		sysconfdir=${PREFIX}/share/examples/alsa-plugins
USE_LIBTOOL=		gnu
CONFIGURE_STYLE =	autoreconf
CONFIGURE_ARGS =	--with-plugindir=${LOCALBASE}/lib/alsa-lib/plugins \
			--with-alsadatadir=${LOCALBASE}/share/alsa-lib \
			--with-alsagconfdir=${LOCALBASE}/share/alsa-lib/alsa.conf.d \
			--with-speex=no \
			--enable-pulseaudio \
			--disable-mix \
			--disable-samplerate \
			--disable-libav \
			--disable-oss \
			--disable-usbstream \
			--disable-arcamav \
			--disable-jack \
			--disable-speexdsp \
			--disable-aaf \
			--disable-maemo_plugin

AUTOCONF_VERSION =	2.69
AUTOMAKE_VERSION =	1.16

# no make test
NO_TEST =		Yes

post-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/alsa-plugins/alsa
	${INSTALL_DATA} ${FILESDIR}/asound.conf \
		${PREFIX}/share/examples/alsa-plugins/alsa
	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/alsa-plugins/alsa/conf.d
	${INSTALL_DATA} \
		${WRKINST}/etc/alsa/conf.d/99-pulseaudio-default.conf.example \
		${PREFIX}/share/examples/alsa-plugins/alsa/conf.d

.include <bsd.port.mk>
