1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools eutils flag-o-matic multilib multilib-minimal
7 DESCRIPTION="ALSA extra plugins"
8 HOMEPAGE="http://www.alsa-project.org/"
9 SRC_URI="mirror://alsaproject/plugins/${P}.tar.bz2"
11 LICENSE="GPL-2 LGPL-2.1"
13 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-linux"
14 IUSE="debug ffmpeg jack libav libsamplerate pulseaudio speex"
17 >=media-libs/alsa-lib-${PV}:=[${MULTILIB_USEDEP}]
19 libav? ( media-video/libav:= )
20 !libav? ( media-video/ffmpeg:0= )
22 jack? ( virtual/jack[${MULTILIB_USEDEP}] )
23 libsamplerate? ( >=media-libs/libsamplerate-0.1.8-r1:=[${MULTILIB_USEDEP}] )
24 pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
26 >=media-libs/speex-1.2.0:=[${MULTILIB_USEDEP}]
27 media-libs/speexdsp[${MULTILIB_USEDEP}]
34 "${FILESDIR}/${PN}-1.0.23-automagic.patch"
35 "${FILESDIR}/${PN}-1.0.28-libav10.patch"
41 # For some reasons the polyp/pulse plugin does fail with alsaplayer with a
42 # failed assert. As the code works just fine with asserts disabled, for now
43 # disable them waiting for a better solution.
45 -e '/AM_CFLAGS/s:-Wall:-DNDEBUG -Wall:' \
46 pulse/Makefile.am || die
51 multilib_src_configure() {
52 use debug || append-cppflags -DNDEBUG
55 use speex && myspeex=lib
59 $(use_enable ffmpeg avcodec) \
61 $(use_enable libsamplerate samplerate) \
62 $(use_enable pulseaudio) \
63 --with-speex=${myspeex}
66 multilib_src_install_all() {
70 dodoc upmix.txt vdownmix.txt README-pcm-oss
71 use jack && dodoc README-jack
72 use libsamplerate && dodoc samplerate.txt
73 use ffmpeg && dodoc lavcrate.txt a52.txt
75 if use pulseaudio; then
77 # install ALSA configuration files
78 # making PA to be used by alsa clients
79 insinto /usr/share/alsa
80 doins "${FILESDIR}"/pulse-default.conf
81 insinto /usr/share/alsa/alsa.conf.d
82 doins "${FILESDIR}"/51-pulseaudio-probe.conf
83 # bug #410261, comment 5+
84 # seems to work fine without any path
86 -e "s:/usr/lib/alsa-lib/::" \
87 "${ED}"/usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf || die #410261
90 prune_libtool_files --all
94 if use pulseaudio; then
95 einfo "The PulseAudio device is now set as the default device if the"
96 einfo "PulseAudio server is found to be running. Any custom"
97 einfo "configuration in /etc/asound.conf or ~/.asoundrc for this"
98 einfo "purpose should now be unnecessary."