summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2011-03-18 09:52:55 +0100
committerMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2011-03-18 09:52:55 +0100
commitc76df846be974136cbf346a9f8135630ac7c4725 (patch)
tree3020f7e54f0c76c9b2b0087f8fdba5ce19bb00c4 /media-sound
parentadd mm-common (for gtkmm and glibmm) (diff)
downloadkeruspe-c76df846be974136cbf346a9f8135630ac7c4725.tar.gz
keruspe-c76df846be974136cbf346a9f8135630ac7c4725.tar.bz2
keruspe-c76df846be974136cbf346a9f8135630ac7c4725.zip
don't make gdbm mandatory for pulse
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/pulseaudio/Manifest5
-rw-r--r--media-sound/pulseaudio/files/pulseaudio-0.9.21-armv5-build-fix.patch102
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.conf.d7
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.init.d-487
-rw-r--r--media-sound/pulseaudio/pulseaudio-0.9.22-r1.ebuild233
5 files changed, 434 insertions, 0 deletions
diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest
new file mode 100644
index 00000000..092a2d66
--- /dev/null
+++ b/media-sound/pulseaudio/Manifest
@@ -0,0 +1,5 @@
+AUX pulseaudio-0.9.21-armv5-build-fix.patch 3387 RMD160 a3c3d2cd97478fc7ee53eb9aa6054d7c09271ec4 SHA1 1a3747c5e24c2cc26e43348a12627725b5d6242f SHA256 4734ffb3b038194911627c20959f75609da76e8e071da0833a794f264c243000
+AUX pulseaudio.conf.d 275 RMD160 6317cb5be41a768428056c0057d8f5b1f189e804 SHA1 22ed7f1de0f2a18a608c5e9a91635ee66addac4d SHA256 c03661e8cc902d27ff6b52f291207f2b008957571b942abdd92a873a52aae0dd
+AUX pulseaudio.init.d-4 2493 RMD160 9f6b2f487298a5576b60b53095ee697095b88c89 SHA1 80f0e5e621d9312a7b24129fe843dd7ce085756d SHA256 dc8caa43aa297d2ca4019eef5b3cb64b3a57741e611620490f8d79091790f363
+EBUILD pulseaudio-0.9.22-r1.ebuild 6822 RMD160 9b2f550bba669d086de04e8be7f44a8800e73b3c SHA1 77ee439222dea5291e81828f3d99f0c94a2357ed SHA256 2fa3dbe8ecc32802c183a53fbee7469f4082ec64017a90b0a87f388385d287bd
+DIST pulseaudio-0.9.22.tar.gz 2076785 RMD160 31199c497f7b1cce2285a6369d43fc1f66cd41a4 SHA1 f5fc14d7a62ae9f9ee9745026e3f13f4c130140a SHA256 c6019324395117a258c048a6db5e9734551cc2c61dc35b46403ff00d64be55f0
diff --git a/media-sound/pulseaudio/files/pulseaudio-0.9.21-armv5-build-fix.patch b/media-sound/pulseaudio/files/pulseaudio-0.9.21-armv5-build-fix.patch
new file mode 100644
index 00000000..aaaaae68
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio-0.9.21-armv5-build-fix.patch
@@ -0,0 +1,102 @@
+From e5b136fc0fde751df3a94cd64855a74732dd4cc7 Mon Sep 17 00:00:00 2001
+From: Arun Raghavan <arun.raghavan@collabora.co.uk>
+Date: Fri, 26 Nov 2010 11:55:57 +0530
+Subject: [PATCH] volume: Add explicit checks for ARMv6 instructions
+
+This ensures that the build does not fail if the ssat and pkhbt
+instructions are not available (armv5te and below).
+
+Fixes: http://www.pulseaudio.org/ticket/790
+---
+ configure.ac | 33 ++++++++++++++++++++++++++++++++-
+ src/pulsecore/svolume_arm.c | 8 ++++----
+ 2 files changed, 36 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7ab42dc..3df8c6b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -230,7 +230,7 @@ else
+ [pulseaudio_cv_support_arm_atomic_ops=no])
+ ])
+ AS_IF([test "$pulseaudio_cv_support_arm_atomic_ops" = "yes"], [
+- AC_DEFINE([ATOMIC_ARM_INLINE_ASM], 1, [Have ARMv6 instructions.])
++ AC_DEFINE([ATOMIC_ARM_INLINE_ASM], 1, [Have ARM atomic instructions.])
+ need_libatomic_ops=no
+ ])
+ fi
+@@ -249,6 +249,37 @@ else
+ esac
+ fi
+
++# If we're on ARM, check for the ARMV6 instructions we need */
++case $host in
++ arm*)
++ AC_CACHE_CHECK([support for required armv6 instructions],
++ pulseaudio_cv_support_armv6,
++ [AC_COMPILE_IFELSE(
++ AC_LANG_PROGRAM([],
++ [[volatile int a = -60000, b = 0xaaaabbbb, c = 0xccccdddd;
++ asm volatile ("ldr r0, %2 \n"
++ "ldr r2, %3 \n"
++ "ldr r3, %4 \n"
++ "ssat r1, #8, r0 \n"
++ "str r1, %0 \n"
++ "pkhbt r1, r3, r2, LSL #8 \n"
++ "str r1, %1 \n"
++ : "=m" (a), "=m" (b)
++ : "m" (a), "m" (b), "m" (c)
++ : "r0", "r1", "r2", "r3", "cc");
++ return (a == -128 && b == 0xaabbdddd) ? 0 : -1;
++ ]]),
++ [pulseaudio_cv_support_armv6=yes],
++ [pulseaudio_cv_support_armv6=no])
++ ])
++ AS_IF([test "$pulseaudio_cv_support_armv6" = "yes"], [
++ AC_DEFINE([HAVE_ARMV6], 1, [Have ARMv6 instructions.])
++ ])
++ ;;
++ *)
++ ;;
++esac
++
+ CC_CHECK_TLS
+
+ AC_CACHE_CHECK([whether $CC knows _Bool],
+diff --git a/src/pulsecore/svolume_arm.c b/src/pulsecore/svolume_arm.c
+index fdd8f09..3973e51 100644
+--- a/src/pulsecore/svolume_arm.c
++++ b/src/pulsecore/svolume_arm.c
+@@ -35,7 +35,7 @@
+ #include "sample-util.h"
+ #include "endianmacros.h"
+
+-#if defined (__arm__)
++#if defined (__arm__) && defined (HAVE_ARMV6)
+
+ #define MOD_INC() \
+ " subs r0, r6, %2 \n\t" \
+@@ -182,11 +182,11 @@ static void run_test (void) {
+ }
+ #endif
+
+-#endif /* defined (__arm__) */
++#endif /* defined (__arm__) && defined (HAVE_ARMV6) */
+
+
+ void pa_volume_func_init_arm (pa_cpu_arm_flag_t flags) {
+-#if defined (__arm__)
++#if defined (__arm__) && defined (HAVE_ARMV6)
+ pa_log_info("Initialising ARM optimized functions.");
+
+ #ifdef RUN_TEST
+@@ -194,5 +194,5 @@ void pa_volume_func_init_arm (pa_cpu_arm_flag_t flags) {
+ #endif
+
+ pa_set_volume_func (PA_SAMPLE_S16NE, (pa_do_volume_func_t) pa_volume_s16ne_arm);
+-#endif /* defined (__arm__) */
++#endif /* defined (__arm__) && defined (HAVE_ARMV6) */
+ }
+--
+1.7.3.2
+
diff --git a/media-sound/pulseaudio/files/pulseaudio.conf.d b/media-sound/pulseaudio/files/pulseaudio.conf.d
new file mode 100644
index 00000000..1d31d342
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.conf.d
@@ -0,0 +1,7 @@
+# Config file for /etc/init.d/pulseaudio
+# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/files/pulseaudio.conf.d,v 1.6 2006/07/29 15:34:18 flameeyes Exp $
+
+# For more see "pulseaudio -h".
+
+# Startup options
+PA_OPTS="--log-target=syslog --disallow-module-loading=1"
diff --git a/media-sound/pulseaudio/files/pulseaudio.init.d-4 b/media-sound/pulseaudio/files/pulseaudio.init.d-4
new file mode 100644
index 00000000..30bc2abc
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.init.d-4
@@ -0,0 +1,87 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/files/pulseaudio.init.d-4,v 1.6 2009/09/13 10:46:12 flameeyes Exp $
+
+depend() {
+ need localmount
+ use net
+
+ local script="/etc/pulse/system.pa"
+
+ for opt in ${PA_OPTS}; do
+ case "$opt" in
+ --file=*) script="${opt#*=}" ;;
+ -F*) script="${opt#-F}" ;;
+ esac
+ done
+
+ config "$script"
+
+ local needs="$(get_options need)"
+ if [ -n "${needs}" ]; then
+ need ${needs}
+ return
+ fi
+
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-console-kit' "$script"; then
+ needs="${needs} consolekit"
+ fi
+
+#ifdef UDEV
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-udev-detect' "$script"; then
+ needs="${needs} udev"
+ fi
+#endif
+
+#ifdef HAL
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-hal-detect' "$script"; then
+ needs="${needs} hald"
+ fi
+#endif
+
+#ifdef AVAHI
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-zeroconf-publish' "$script"; then
+ needs="${needs} avahi-daemon"
+ fi
+#endif
+
+#ifdef BLUETOOTH
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-bt-proximity' "$script"; then
+ needs="${needs} bluetooth"
+ fi
+#endif
+
+#ifdef ALSA
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-alsa-(sink|source)' "$script" ||
+ egrep -q '^[[:space:]]*load-module[[:space:]]+module-((hal|udev)-)?detect' "$script" ||
+ egrep -q '^[[:space:]]*add-autoload-source[[:space:]]+(input|output)[[:space:]]+module-alsa-(sink|source)' "$script"; then
+ needs="${needs} alsasound"
+ fi
+#endif
+
+ need "${needs}"
+ save_options need "${needs}"
+}
+
+start() {
+ if [ -z "${PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE}" ]; then
+ eerror "Please don't use system wide PulseAudio unless you read the"
+ eerror "documentation available at http://www.pulseaudio.org/wiki/WhatIsWrongWithSystemMode"
+ eerror ""
+ eerror "When you're done, please set the variable PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE in"
+ eerror "/etc/conf.d/pulseaudio . Please remember that upstream does not support this mode"
+ eerror "when used for standard desktop configurations."
+ return 1
+ fi
+ ebegin "Starting pulseaudio"
+ PA_ALL_OPTS="${PA_OPTS} --fail=1 --daemonize=1 --system"
+ start-stop-daemon --start --exec /usr/bin/pulseaudio -- ${PA_ALL_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pulseaudio"
+ start-stop-daemon --stop --quiet --exec /usr/bin/pulseaudio --pidfile /var/run/pulse/pid
+ eend $?
+}
diff --git a/media-sound/pulseaudio/pulseaudio-0.9.22-r1.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.22-r1.ebuild
new file mode 100644
index 00000000..6dfffdc5
--- /dev/null
+++ b/media-sound/pulseaudio/pulseaudio-0.9.22-r1.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.22.ebuild,v 1.9 2011/02/11 08:49:58 radhermit Exp $
+
+EAPI=3
+
+inherit autotools eutils libtool flag-o-matic versionator
+
+DESCRIPTION="A networked sound server with an advanced plugin system"
+HOMEPAGE="http://www.pulseaudio.org/"
+
+SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2 GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+alsa avahi +caps jack lirc oss tcpd +X dbus libsamplerate gnome bluetooth
++asyncns +glib test doc +udev ipv6 system-wide realtime +gdbm tdb"
+
+RDEPEND="app-admin/eselect-esd
+ X? (
+ || ( >=x11-libs/libX11-1.4.0 <x11-libs/libX11-1.4.0[xcb] )
+ >=x11-libs/xcb-util-0.3.1
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXtst
+ )
+ caps? ( sys-libs/libcap )
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
+ alsa? ( >=media-libs/alsa-lib-1.0.19 )
+ glib? ( >=dev-libs/glib-2.4.0 )
+ avahi? ( >=net-dns/avahi-0.6.12[dbus] )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.100 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ lirc? ( app-misc/lirc )
+ dbus? ( >=sys-apps/dbus-1.0.0 )
+ gnome? ( >=gnome-base/gconf-2.4.0 )
+ bluetooth? (
+ >=net-wireless/bluez-4
+ >=sys-apps/dbus-1.0.0
+ )
+ asyncns? ( net-libs/libasyncns )
+ udev? ( >=sys-fs/udev-143[extras] )
+ realtime? ( sys-auth/rtkit )
+ >=media-libs/audiofile-0.2.6-r1
+ >=media-libs/speex-1.2_beta
+ >=media-libs/libsndfile-1.0.20
+ gdbm? ( sys-libs/gdbm )
+ !gdbm? (
+ tdb? ( sys-libs/tdb )
+ )
+ >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used
+
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ X? (
+ x11-proto/xproto
+ || ( >=x11-libs/libXtst-1.0.99.2 <x11-proto/xextproto-7.0.99 )
+ )
+ dev-libs/libatomic_ops
+ dev-util/pkgconfig
+ system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
+ dev-util/intltool"
+
+# alsa-utils dep is for the alsasound init.d script (see bug #155707)
+# bluez dep is for the bluetooth init.d script
+RDEPEND="${RDEPEND}
+ X? ( gnome-extra/gnome-audio )
+ system-wide? (
+ sys-apps/openrc
+ alsa? ( media-sound/alsa-utils )
+ bluetooth? ( >=net-wireless/bluez-4 )
+ )"
+
+pkg_setup() {
+ enewgroup audio 18 # Just make sure it exists
+ enewgroup pulse-access
+ enewgroup pulse
+ enewuser pulse -1 -1 /var/run/pulse pulse,audio
+}
+
+src_prepare() {
+ if use arm; then
+ # Fix build on armv5 - bug #294599
+ epatch "${FILESDIR}/${PN}-0.9.21-armv5-build-fix.patch"
+ eautoreconf
+ fi
+
+ elibtoolize
+}
+
+src_configure() {
+ # It's a binutils bug, once I can find time to fix that I'll add a
+ # proper dependency and fix this up. — flameeyes
+ append-ldflags $(no-as-needed)
+
+ local database="simple"
+ if use gdbm; then
+ database="gdbm"
+ elif use tdb; then
+ database="tdb"
+ fi
+
+ econf \
+ --enable-largefile \
+ $(use_enable glib glib2) \
+ --disable-solaris \
+ $(use_enable asyncns) \
+ $(use_enable oss oss-output) \
+ $(use_enable alsa) \
+ $(use_enable lirc) \
+ $(use_enable tcpd tcpwrap) \
+ $(use_enable jack) \
+ $(use_enable lirc) \
+ $(use_enable avahi) \
+ --disable-hal \
+ $(use_enable dbus) \
+ $(use_enable gnome gconf) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable bluetooth bluez) \
+ $(use_enable X x11) \
+ $(use_enable test default-build-tests) \
+ $(use_enable udev) \
+ $(use_enable ipv6) \
+ $(use_with caps) \
+ --localstatedir="${EPREFIX}"/var \
+ --disable-per-user-esound-socket \
+ --with-database=${database} \
+ --with-udev-rules-dir="${EPREFIX}/$(get_libdir)/udev/rules.d" \
+ || die "econf failed"
+
+ if use doc; then
+ pushd doxygen
+ doxygen doxygen.conf || die
+ popd
+ fi
+}
+
+src_test() {
+ # We avoid running the toplevel check target because that will run
+ # po/'s tests too, and they are broken. Officially, it should work
+ # with intltool 0.41, but that doesn't look like a stable release.
+ emake -C src check || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "make install failed"
+
+ # Drop the script entirely if X is disabled
+ use X || rm "${ED}"/usr/bin/start-pulseaudio-x11
+
+ if use system-wide; then
+ newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio
+
+ use_define() {
+ local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
+
+ use "$1" && echo "-D$define" || echo "-U$define"
+ }
+
+ unifdef $(use_define avahi) \
+ $(use_define alsa) \
+ $(use_define bluetooth) \
+ $(use_define udev) \
+ "${FILESDIR}/pulseaudio.init.d-4" \
+ > "${T}/pulseaudio"
+
+ doinitd "${T}/pulseaudio"
+ fi
+
+ use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
+
+ dodoc README ChangeLog todo || die
+
+ if use doc; then
+ pushd doxygen/html
+ dohtml * || die
+ popd
+ fi
+
+ # Create the state directory
+ use prefix || diropts -o pulse -g pulse -m0755
+ keepdir /var/run/pulse
+
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_postinst() {
+ if use system-wide; then
+ elog "PulseAudio in Gentoo can use a system-wide pulseaudio daemon."
+ elog "This support is enabled by starting the pulseaudio init.d ."
+ elog "To be able to access that you need to be in the group pulse-access."
+ elog "If you choose to use this feature, please make sure that you"
+ elog "really want to run PulseAudio this way:"
+ elog " http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode"
+ elog "For more information about system-wide support, please refer to:"
+ elog " http://pulseaudio.org/wiki/SystemWideInstance"
+ if use gnome ; then
+ elog
+ elog "By enabling gnome USE flag, you enabled gconf support. Please note"
+ elog "that you might need to remove the gnome USE flag or disable the"
+ elog "gconf module on /etc/pulse/system.pa to be able to use PulseAudio"
+ elog "with a system-wide instance."
+ fi
+ elog
+ elog "To use the ESounD wrapper while using a system-wide daemon, you also"
+ elog "need to enable auth-anonymous for the esound-unix module, or to copy"
+ elog "/var/run/pulse/.esd_auth into each home directory."
+ elog
+ fi
+ if use bluetooth; then
+ elog
+ elog "The BlueTooth proximity module is not enabled in the default"
+ elog "configuration file. If you do enable it, you'll have to have"
+ elog "your BlueTooth controller enabled and inserted at bootup or"
+ elog "PulseAudio will refuse to start."
+ elog
+ elog "Please note that the BlueTooth proximity module seems itself"
+ elog "still experimental, so please report to upstream if you have"
+ elog "problems with it."
+ fi
+ if use alsa; then
+ local pkg="media-plugins/alsa-plugins"
+ if has_version ${pkg} && ! has_version "${pkg}[pulseaudio]"; then
+ elog
+ elog "You have alsa support enabled so you probably want to install"
+ elog "${pkg} with pulseaudio support to have"
+ elog "alsa using applications route their sound through pulseaudio"
+ fi
+ fi
+
+ eselect esd update --if-unset
+}