| 1 |
ford_prefect |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
vapier |
1.11 |
# $Header: /var/cvsroot/gentoo-x86/media-plugins/alsa-plugins/alsa-plugins-1.0.25-r1.ebuild,v 1.10 2012/05/05 08:27:19 jdhore Exp $
|
| 4 |
ford_prefect |
1.1 |
|
| 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 |
heroxbd |
1.9 |
KEYWORDS="alpha amd64 arm hppa ia64 ~ppc ppc64 sh sparc x86 ~amd64-linux"
|
| 18 |
ford_prefect |
1.1 |
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 |
jdhore |
1.10 |
virtual/pkgconfig"
|
| 33 |
ford_prefect |
1.1 |
|
| 34 |
|
|
PATCHES=(
|
| 35 |
|
|
"${FILESDIR}/${PN}-1.0.19-missing-avutil.patch"
|
| 36 |
|
|
"${FILESDIR}/${PN}-1.0.23-automagic.patch"
|
| 37 |
aballier |
1.7 |
"${FILESDIR}/${PN}-1.0.25-avcodec54.patch"
|
| 38 |
vapier |
1.11 |
"${FILESDIR}/${P}-glibc-2.16.patch" #426254
|
| 39 |
ford_prefect |
1.1 |
)
|
| 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 |
|
|
}
|