| 1 |
# Copyright 1999-2013 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-plugins/alsa-plugins/alsa-plugins-1.0.25-r1.ebuild,v 1.12 2013/03/13 10:57:47 ago Exp $ |
| 4 |
|
| 5 |
EAPI=3 |
| 6 |
|
| 7 |
MY_P="${P/_/}" |
| 8 |
|
| 9 |
inherit autotools base flag-o-matic |
| 10 |
|
| 11 |
DESCRIPTION="ALSA extra plugins" |
| 12 |
HOMEPAGE="http://www.alsa-project.org/" |
| 13 |
SRC_URI="mirror://alsaproject/plugins/${MY_P}.tar.bz2" |
| 14 |
|
| 15 |
LICENSE="GPL-2 LGPL-2.1" |
| 16 |
SLOT="0" |
| 17 |
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86 ~amd64-linux" |
| 18 |
IUSE="debug ffmpeg jack libsamplerate pulseaudio speex" |
| 19 |
|
| 20 |
RDEPEND=">=media-libs/alsa-lib-${PV} |
| 21 |
ffmpeg? ( virtual/ffmpeg |
| 22 |
media-libs/alsa-lib ) |
| 23 |
jack? ( >=media-sound/jack-audio-connection-kit-0.98 ) |
| 24 |
libsamplerate? ( |
| 25 |
media-libs/libsamplerate |
| 26 |
media-libs/alsa-lib ) |
| 27 |
pulseaudio? ( media-sound/pulseaudio ) |
| 28 |
speex? ( media-libs/speex |
| 29 |
media-libs/alsa-lib )" |
| 30 |
|
| 31 |
DEPEND="${RDEPEND} |
| 32 |
virtual/pkgconfig" |
| 33 |
|
| 34 |
PATCHES=( |
| 35 |
"${FILESDIR}/${PN}-1.0.19-missing-avutil.patch" |
| 36 |
"${FILESDIR}/${PN}-1.0.23-automagic.patch" |
| 37 |
"${FILESDIR}/${PN}-1.0.25-avcodec54.patch" |
| 38 |
"${FILESDIR}/${P}-glibc-2.16.patch" #426254 |
| 39 |
) |
| 40 |
|
| 41 |
S="${WORKDIR}/${MY_P}" |
| 42 |
|
| 43 |
src_prepare() { |
| 44 |
base_src_prepare |
| 45 |
|
| 46 |
# For some reasons the polyp/pulse plugin does fail with alsaplayer with a |
| 47 |
# failed assert. As the code works just fine with asserts disabled, for now |
| 48 |
# disable them waiting for a better solution. |
| 49 |
sed -i -e '/AM_CFLAGS/s:-Wall:-DNDEBUG -Wall:' \ |
| 50 |
"${S}/pulse/Makefile.am" |
| 51 |
|
| 52 |
eautoreconf |
| 53 |
} |
| 54 |
|
| 55 |
src_configure() { |
| 56 |
use debug || append-flags -DNDEBUG |
| 57 |
|
| 58 |
local myspeex |
| 59 |
|
| 60 |
if use speex; then |
| 61 |
myspeex=lib |
| 62 |
else |
| 63 |
myspeex=no |
| 64 |
fi |
| 65 |
|
| 66 |
econf \ |
| 67 |
--disable-dependency-tracking \ |
| 68 |
$(use_enable ffmpeg avcodec) \ |
| 69 |
$(use_enable jack) \ |
| 70 |
$(use_enable libsamplerate samplerate) \ |
| 71 |
$(use_enable pulseaudio) \ |
| 72 |
--with-speex=${myspeex} |
| 73 |
} |
| 74 |
|
| 75 |
src_install() { |
| 76 |
emake DESTDIR="${D}" install |
| 77 |
|
| 78 |
cd "${S}/doc" |
| 79 |
dodoc upmix.txt vdownmix.txt README-pcm-oss |
| 80 |
use jack && dodoc README-jack |
| 81 |
use libsamplerate && dodoc samplerate.txt |
| 82 |
use ffmpeg && dodoc lavcrate.txt a52.txt |
| 83 |
|
| 84 |
if use pulseaudio; then |
| 85 |
dodoc README-pulse |
| 86 |
# install ALSA configuration files |
| 87 |
# making PA to be used by alsa clients |
| 88 |
insinto /usr/share/alsa |
| 89 |
doins "${FILESDIR}"/pulse-default.conf |
| 90 |
insinto /usr/share/alsa/alsa.conf.d |
| 91 |
doins "${FILESDIR}"/51-pulseaudio-probe.conf |
| 92 |
fi |
| 93 |
|
| 94 |
} |
| 95 |
|
| 96 |
pkg_postinst() { |
| 97 |
if use pulseaudio; then |
| 98 |
einfo "The PulseAudio device is now set as the default device if the" |
| 99 |
einfo "PulseAudio server is found to be running. Any custom" |
| 100 |
einfo "configuration in /etc/asound.conf or ~/.asoundrc for this" |
| 101 |
einfo "purpose should now be unnecessary." |
| 102 |
fi |
| 103 |
} |