summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <ford_prefect@gentoo.org>2012-02-12 16:44:54 +0000
committerArun Raghavan <ford_prefect@gentoo.org>2012-02-12 16:44:54 +0000
commitf2fc2db825e1e5b5933870d0f68c726a3eb5a6d4 (patch)
treeaba99cb2fc36c30015b842466e8df371707600ae /media-plugins/alsa-plugins
parentVersion bump. Add missing libsoup dependency, bug #399673. (diff)
downloadgentoo-2-f2fc2db825e1e5b5933870d0f68c726a3eb5a6d4.tar.gz
gentoo-2-f2fc2db825e1e5b5933870d0f68c726a3eb5a6d4.tar.bz2
gentoo-2-f2fc2db825e1e5b5933870d0f68c726a3eb5a6d4.zip
Add new configuration for autoprobing the presence of PulseAudio and setting up the pulse device as default if PA is present. This makes the previous pulse.conf and pulse-alsa.conf unnceessary. Also remove now-irrelevant Also remove now-irrelevant alsa-jack blocker.
(Portage version: 2.2.0_alpha85/cvs/Linux x86_64)
Diffstat (limited to 'media-plugins/alsa-plugins')
-rw-r--r--media-plugins/alsa-plugins/ChangeLog12
-rw-r--r--media-plugins/alsa-plugins/alsa-plugins-1.0.25-r1.ebuild101
-rw-r--r--media-plugins/alsa-plugins/files/51-pulseaudio-probe.conf19
-rw-r--r--media-plugins/alsa-plugins/files/pulse-default.conf10
4 files changed, 141 insertions, 1 deletions
diff --git a/media-plugins/alsa-plugins/ChangeLog b/media-plugins/alsa-plugins/ChangeLog
index 956fcf954a48..74c941c38a22 100644
--- a/media-plugins/alsa-plugins/ChangeLog
+++ b/media-plugins/alsa-plugins/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for media-plugins/alsa-plugins
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/alsa-plugins/ChangeLog,v 1.141 2012/01/26 11:53:24 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/alsa-plugins/ChangeLog,v 1.142 2012/02/12 16:44:54 ford_prefect Exp $
+
+*alsa-plugins-1.0.25-r1 (12 Feb 2012)
+
+ 12 Feb 2012; Arun Raghavan <ford_prefect@gentoo.org>
+ +files/51-pulseaudio-probe.conf, +alsa-plugins-1.0.25-r1.ebuild,
+ +files/pulse-default.conf:
+ Add new configuration for autoprobing the presence of PulseAudio and setting
+ up the pulse device as default if PA is present. This makes the previous
+ pulse.conf and pulse-alsa.conf unnceessary. Also remove now-irrelevant
+ alsa-jack blocker.
*alsa-plugins-1.0.25 (26 Jan 2012)
diff --git a/media-plugins/alsa-plugins/alsa-plugins-1.0.25-r1.ebuild b/media-plugins/alsa-plugins/alsa-plugins-1.0.25-r1.ebuild
new file mode 100644
index 000000000000..087f9dab6d29
--- /dev/null
+++ b/media-plugins/alsa-plugins/alsa-plugins-1.0.25-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/alsa-plugins/alsa-plugins-1.0.25-r1.ebuild,v 1.1 2012/02/12 16:44:54 ford_prefect Exp $
+
+EAPI=3
+
+MY_P="${P/_/}"
+
+inherit autotools base flag-o-matic
+
+DESCRIPTION="ALSA extra plugins"
+HOMEPAGE="http://www.alsa-project.org/"
+SRC_URI="mirror://alsaproject/plugins/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="debug ffmpeg jack libsamplerate pulseaudio speex"
+
+RDEPEND=">=media-libs/alsa-lib-${PV}
+ ffmpeg? ( virtual/ffmpeg
+ media-libs/alsa-lib )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.98 )
+ libsamplerate? (
+ media-libs/libsamplerate
+ media-libs/alsa-lib )
+ pulseaudio? ( media-sound/pulseaudio )
+ speex? ( media-libs/speex
+ media-libs/alsa-lib )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.19-missing-avutil.patch"
+ "${FILESDIR}/${PN}-1.0.23-automagic.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ base_src_prepare
+
+ # For some reasons the polyp/pulse plugin does fail with alsaplayer with a
+ # failed assert. As the code works just fine with asserts disabled, for now
+ # disable them waiting for a better solution.
+ sed -i -e '/AM_CFLAGS/s:-Wall:-DNDEBUG -Wall:' \
+ "${S}/pulse/Makefile.am"
+
+ eautoreconf
+}
+
+src_configure() {
+ use debug || append-flags -DNDEBUG
+
+ local myspeex
+
+ if use speex; then
+ myspeex=lib
+ else
+ myspeex=no
+ fi
+
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable ffmpeg avcodec) \
+ $(use_enable jack) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable pulseaudio) \
+ --with-speex=${myspeex}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ cd "${S}/doc"
+ dodoc upmix.txt vdownmix.txt README-pcm-oss
+ use jack && dodoc README-jack
+ use libsamplerate && dodoc samplerate.txt
+ use ffmpeg && dodoc lavcrate.txt a52.txt
+
+ if use pulseaudio; then
+ dodoc README-pulse
+ # install ALSA configuration files
+ # making PA to be used by alsa clients
+ insinto /usr/share/alsa
+ doins "${FILESDIR}"/pulse-default.conf
+ insinto /usr/share/alsa/alsa.conf.d
+ doins "${FILESDIR}"/51-pulseaudio-probe.conf
+ fi
+
+}
+
+pkg_postinst() {
+ if use pulseaudio; then
+ einfo "The PulseAudio device is now set as the default device if the"
+ einfo "PulseAudio server is found to be running. Any custom"
+ einfo "configuration in /etc/asound.conf or ~/.asoundrc for this"
+ einfo "purpose should now be unnecessary."
+ fi
+}
diff --git a/media-plugins/alsa-plugins/files/51-pulseaudio-probe.conf b/media-plugins/alsa-plugins/files/51-pulseaudio-probe.conf
new file mode 100644
index 000000000000..c2272c85b072
--- /dev/null
+++ b/media-plugins/alsa-plugins/files/51-pulseaudio-probe.conf
@@ -0,0 +1,19 @@
+# PulseAudio alsa plugin configuration file to set the pulseaudio plugin as
+# default output for applications using alsa when pulseaudio is running.
+
+hook_func.pulse_load_if_running {
+ lib "/usr/lib/alsa-lib/libasound_module_conf_pulse.so"
+ func "conf_pulse_hook_load_if_running"
+}
+
+@hooks [
+ {
+ func pulse_load_if_running
+ files [
+ "/usr/share/alsa/pulse-default.conf"
+ "/etc/asound.conf"
+ "~/.asoundrc"
+ ]
+ errors false
+ }
+]
diff --git a/media-plugins/alsa-plugins/files/pulse-default.conf b/media-plugins/alsa-plugins/files/pulse-default.conf
new file mode 100644
index 000000000000..8f7cbf29d60c
--- /dev/null
+++ b/media-plugins/alsa-plugins/files/pulse-default.conf
@@ -0,0 +1,10 @@
+# This file is referred to from files in /usr/share/alsa/alsa.conf.d/ in order
+# to set up the pulse device as the default if required.
+
+pcm.!default {
+ type pulse
+}
+
+ctl.!default {
+ type pulse
+}