Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FL-366, FL-579: fix pulseaudio dbus start error

  • Loading branch information...
commit 6b4ae1e42e08ff57f499e5654df21ba57258cc82 1 parent 082b5e3
@angryvincent angryvincent authored
View
3  media-sound/pulseaudio/Manifest
@@ -0,0 +1,3 @@
+DIST pulseaudio-2.1.tar.xz 1355004 SHA256 ef6b347bf47abfb98080795f1583018ac959b4aeb4df916b879f9e1eaba0ca7f SHA512 56b672968ae32dcaa5520b8199ed603f4f1223c7884ee6ad1ddf0ee796b1859784c262eef749504f996638f68bf2b213dd0ad1e9cddfb342e2795300ff9972b6 WHIRLPOOL cf4e38d868b67e1cf3fe610d8759a922c7a71040d923844ea0168b00b756b51882580504a7d876e470d0a6ad523a643ddb1559424d8786bc4d9ce457b4a855ea
+DIST pulseaudio-3.0.tar.xz 1367468 SHA256 c90bfda29605942d08e3e218ef10e3c660506a06651a616bfbb6a6df8392836d SHA512 965d6f2472f1b15b600b4578cfbfcb6bbe6be2e7661c0672216141118e34caba3046a026aed69d4fc6ae82b7190bc64e00cf03fb638a872b5d0d25c7c3e10514 WHIRLPOOL 79813545993c7a6291550a471d5e32826438c72060ca07051a455a23c8695de5e1d30d104bec01ec29552e5e8d72448f393536d5b81c50d6371e29567ba937bc
+DIST pulseaudio-4.0.tar.xz 1392072 SHA256 35ceb36bb1822fe54f0b5e4863b4f486769fdfb8ff2111f01fd8778928f9cdae SHA512 7cfb57b15943ec5239f23b90637ab7ab421ac57cf05312030bb348ee7d72a70343716b9bf79035b2426e820984cf8179285548b8acf0b7232defcd8b9ad32e83 WHIRLPOOL 41b69fa34648b484beb3fd81cd4756bdc8bbedf4e102d792e2f48b57f62e532f496e9f0146feabbfe37bd91f0d4f7402105a56d58a9b053bb0de3ac6ad233467
View
102 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
+
View
124 media-sound/pulseaudio/files/pulseaudio-0.9.22-xcb-atom-2.patch
@@ -0,0 +1,124 @@
+From b72fc9b4f158bafb66a7de28ce038986d96ce850 Mon Sep 17 00:00:00 2001
+From: Arnaud Fontaine <arnau@debian.org>
+Date: Tue, 29 Mar 2011 22:56:28 +0159
+Subject: [PATCH] x11: More XCB fixes.
+
+Commit 65ef80b fixed building with xcb-util >= 0.3.8, but the reply is never
+checked (possible SIGSEGV if the reply is NULL) nor freed (memory leak at each
+call of the functions).
+
+Also, remove include and dependencies on xcb-atom, as it was only meaningful
+for xcb_atom_get() and STRING, and depend instead on xcb >= 1.6 for
+XCB_ATOM_STRING.
+---
+ configure.ac | 2 +-
+ src/pulsecore/x11prop.c | 38 +++++++++++++++++++++++++-------------
+ 2 files changed, 26 insertions(+), 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 299dd49..ed9bd17 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -547,7 +547,7 @@ AC_ARG_ENABLE([x11],
+ [x11=auto])
+
+ if test "x${x11}" != xno ; then
+- PKG_CHECK_MODULES(X11, [ x11-xcb ice sm xtst xcb-atom ],
++ PKG_CHECK_MODULES(X11, [ x11-xcb xcb >= 1.6 ice sm xtst ],
+ HAVE_X11=1,
+ [
+ HAVE_X11=0
+diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c
+index d66c48f..8fca219 100644
+--- a/src/pulsecore/x11prop.c
++++ b/src/pulsecore/x11prop.c
+@@ -30,7 +30,6 @@
+ #include <pulsecore/macro.h>
+
+ #include <xcb/xproto.h>
+-#include <xcb/xcb_atom.h>
+
+ #define PA_XCB_FORMAT 8
+
+@@ -50,7 +49,6 @@ static xcb_screen_t *screen_of_display(xcb_connection_t *xcb, int screen)
+
+ void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const char *data) {
+ xcb_screen_t *xs;
+- xcb_intern_atom_cookie_t cookie;
+ xcb_intern_atom_reply_t *reply;
+
+ pa_assert(xcb);
+@@ -58,26 +56,36 @@ void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const
+ pa_assert(data);
+
+ if ((xs = screen_of_display(xcb, screen))) {
+- cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
+- reply = xcb_intern_atom_reply(xcb, cookie, NULL);
++ reply = xcb_intern_atom_reply(xcb,
++ xcb_intern_atom(xcb, 0, strlen(name), name),
++ NULL);
+
+- xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom, XCB_ATOM_STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data);
++ if (reply) {
++ xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom,
++ XCB_ATOM_STRING, PA_XCB_FORMAT,
++ (int) strlen(data), (const void*) data);
++
++ free(reply);
++ }
+ }
+ }
+
+ void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name) {
+ xcb_screen_t *xs;
+- xcb_intern_atom_cookie_t cookie;
+ xcb_intern_atom_reply_t *reply;
+
+ pa_assert(xcb);
+ pa_assert(name);
+
+ if ((xs = screen_of_display(xcb, screen))) {
+- cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
+- reply = xcb_intern_atom_reply(xcb, cookie, NULL);
+-
+- xcb_delete_property(xcb, xs->root, reply->atom);
++ reply = xcb_intern_atom_reply(xcb,
++ xcb_intern_atom(xcb, 0, strlen(name), name),
++ NULL);
++
++ if (reply) {
++ xcb_delete_property(xcb, xs->root, reply->atom);
++ free(reply);
++ }
+ }
+ }
+
+@@ -87,7 +95,6 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char
+ xcb_get_property_cookie_t req;
+ xcb_get_property_reply_t* prop = NULL;
+ xcb_screen_t *xs;
+- xcb_intern_atom_cookie_t cookie;
+ xcb_intern_atom_reply_t *reply;
+
+ pa_assert(xcb);
+@@ -106,10 +113,15 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char
+ xs = screen_of_display(xcb, 0);
+
+ if (xs) {
+- cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
+- reply = xcb_intern_atom_reply(xcb, cookie, NULL);
++ reply = xcb_intern_atom_reply(xcb,
++ xcb_intern_atom(xcb, 0, strlen(name), name),
++ NULL);
++
++ if (!reply)
++ goto finish;
+
+ req = xcb_get_property(xcb, 0, xs->root, reply->atom, XCB_ATOM_STRING, 0, (uint32_t)(l-1));
++ free(reply);
+ prop = xcb_get_property_reply(xcb, req, NULL);
+
+ if (!prop)
+--
+1.6.3.3
+
View
83 media-sound/pulseaudio/files/pulseaudio-0.9.22-xcb-atom.patch
@@ -0,0 +1,83 @@
+From 9cee2891e8ccd4b26b16449c120ac17e01aa1b36 Mon Sep 17 00:00:00 2001
+From: Maciej Grela <maciej.grela@gmail.com>
+Date: Tue, 29 Mar 2011 22:56:28 +0159
+Subject: [PATCH] x11: Fix build errors with newest xcb-util.
+
+The xcb_atom_get functions were removed from xcb-util. Changed these to
+xcb_intern_atom/xcb_intern_atom_reply. Also, STRING is now
+XCB_ATOM_STRING.
+---
+ src/pulsecore/x11prop.c | 26 +++++++++++++++++---------
+ 1 files changed, 17 insertions(+), 9 deletions(-)
+
+diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c
+index 8df3278..99ea55d 100644
+--- a/src/pulsecore/x11prop.c
++++ b/src/pulsecore/x11prop.c
+@@ -49,28 +49,34 @@ static xcb_screen_t *screen_of_display(xcb_connection_t *xcb, int screen) {
+
+ void pa_x11_set_prop(xcb_connection_t *xcb, int screen, const char *name, const char *data) {
+ xcb_screen_t *xs;
+- xcb_atom_t a;
++ xcb_intern_atom_cookie_t cookie;
++ xcb_intern_atom_reply_t *reply;
+
+ pa_assert(xcb);
+ pa_assert(name);
+ pa_assert(data);
+
+ if ((xs = screen_of_display(xcb, screen))) {
+- a = xcb_atom_get(xcb, name);
+- xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, a, STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data);
++ cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
++ reply = xcb_intern_atom_reply(xcb, cookie, NULL);
++
++ xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, reply->atom, XCB_ATOM_STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data);
+ }
+ }
+
+ void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name) {
+ xcb_screen_t *xs;
+- xcb_atom_t a;
++ xcb_intern_atom_cookie_t cookie;
++ xcb_intern_atom_reply_t *reply;
+
+ pa_assert(xcb);
+ pa_assert(name);
+
+ if ((xs = screen_of_display(xcb, screen))) {
+- a = xcb_atom_get(xcb, name);
+- xcb_delete_property(xcb, xs->root, a);
++ cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
++ reply = xcb_intern_atom_reply(xcb, cookie, NULL);
++
++ xcb_delete_property(xcb, xs->root, reply->atom);
+ }
+ }
+
+@@ -80,7 +86,8 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char
+ xcb_get_property_cookie_t req;
+ xcb_get_property_reply_t* prop = NULL;
+ xcb_screen_t *xs;
+- xcb_atom_t a;
++ xcb_intern_atom_cookie_t cookie;
++ xcb_intern_atom_reply_t *reply;
+
+ pa_assert(xcb);
+ pa_assert(name);
+@@ -98,9 +105,10 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char
+ xs = screen_of_display(xcb, 0);
+
+ if (xs) {
+- a = xcb_atom_get(xcb, name);
++ cookie = xcb_intern_atom(xcb, 0, strlen(name), name);
++ reply = xcb_intern_atom_reply(xcb, cookie, NULL);
+
+- req = xcb_get_property(xcb, 0, xs->root, a, STRING, 0, (uint32_t)(l-1));
++ req = xcb_get_property(xcb, 0, xs->root, reply->atom, XCB_ATOM_STRING, 0, (uint32_t)(l-1));
+ prop = xcb_get_property_reply(xcb, req, NULL);
+
+ if (!prop)
+--
+1.7.4.1
+
View
42 media-sound/pulseaudio/files/pulseaudio-1.1-machine-id-fix.patch
@@ -0,0 +1,42 @@
+commit 42881d277014d3bf3bb1b4e660c80378b4081a52
+Author: Arun Raghavan <arun.raghavan@collabora.co.uk>
+Date: Mon Nov 14 13:42:21 2011 +0530
+
+ core: Look up /etc/machine-id if D-Bus machine-id is not found
+
+ It appears that this is currently the fallback for early boot and other
+ such cases where /var might not be available. Relevant upstream commit:
+
+ http://cgit.freedesktop.org/dbus/dbus/commit/?id=66e52541d5bdd4927a5c702963749760643313f4
+
+ Thanks to Samuli Suominen <ssuominen@gentoo.org> for pointing this out
+ in https://bugs.gentoo.org/show_bug.cgi?id=390287
+
+diff --git a/configure.ac b/configure.ac
+index 324e32e..1f65dd5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -935,6 +935,9 @@ AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DEFINE([HAVE_DBUS], 1, [Have D-Bus.]))
+
+ PA_MACHINE_ID="${localstatedir}/lib/dbus/machine-id"
+ AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file])
++PA_MACHINE_ID_FALLBACK="${sysconfdir}/machine-id"
++AX_DEFINE_DIR(PA_MACHINE_ID_FALLBACK, PA_MACHINE_ID_FALLBACK,
++ [Fallback machine-id file])
+
+ #### HAL support (optional), dependant on D-Bus ####
+
+diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
+index 79c8e08..0173135 100644
+--- a/src/pulsecore/core-util.c
++++ b/src/pulsecore/core-util.c
+@@ -2717,7 +2717,8 @@ char *pa_machine_id(void) {
+ * since it fits perfectly our needs and is not as volatile as the
+ * hostname which might be set from dhcp. */
+
+- if ((f = pa_fopen_cloexec(PA_MACHINE_ID, "r"))) {
++ if ((f = pa_fopen_cloexec(PA_MACHINE_ID, "r")) ||
++ (f = pa_fopen_cloexec(PA_MACHINE_ID_FALLBACK, "r"))) {
+ char ln[34] = "", *r;
+
+ r = fgets(ln, sizeof(ln)-1, f);
View
122 media-sound/pulseaudio/files/pulseaudio-1.1-python3-fix.patch
@@ -0,0 +1,122 @@
+commit b453e13edef8be95d70d837466e911b883faf476
+Author: Maarten Bosmans <mkbosmans@gmail.com>
+Date: Mon Oct 10 12:28:22 2011 +0200
+
+ qpaeq: Make it python3 and python2 compatible
+
+diff --git a/src/utils/qpaeq b/src/utils/qpaeq
+index a8a9fda..951e70f 100755
+--- a/src/utils/qpaeq
++++ b/src/utils/qpaeq
+@@ -22,12 +22,11 @@ try:
+ from PyQt4 import QtGui,QtCore
+ import dbus.mainloop.qt
+ import dbus
+-except ImportError,e:
+- print 'There was an error importing need libraries'
+- print 'Make sure you haveqt4 and dbus forthon installed'
+- print 'The error that occured was'
+- print '\t%s' %(str(e))
+- import sys
++except ImportError as e:
++ sys.stderr.write('There was an error importing need libraries\n'
++ 'Make sure you haveqt4 and dbus forthon installed\n'
++ 'The error that occured was:\n'
++ '\t%s\n' % (str(e)))
+ sys.exit(-1)
+
+ from functools import partial
+@@ -47,10 +46,10 @@ def connect():
+ server_lookup = bus.get_object('org.PulseAudio1', '/org/pulseaudio/server_lookup1')
+ address = server_lookup.Get('org.PulseAudio.ServerLookup1', 'Address', dbus_interface='org.freedesktop.DBus.Properties')
+ return dbus.connection.Connection(address)
+- except Exception,e:
+- print 'There was an error connecting to pulseaudio, please make sure you have the pulseaudio dbus'
+- print 'and equalizer modules loaded, exiting...'
+- import sys
++ except Exception as e:
++ sys.stderr.write('There was an error connecting to pulseaudio, '
++ 'please make sure you have the pulseaudio dbus '
++ 'and equalizer modules loaded, exiting...\n')
+ sys.exit(-1)
+
+
+@@ -148,7 +147,7 @@ class QPaeq(QtGui.QWidget):
+
+ self.channel_box.clear()
+ self.channel_box.addItem('All',self.filter_state.channels)
+- for i in xrange(self.filter_state.channels):
++ for i in range(self.filter_state.channels):
+ self.channel_box.addItem('%d' %(i+1,),i)
+ self.setMinimumSize(self.sizeHint())
+
+@@ -221,7 +220,7 @@ class QPaeq(QtGui.QWidget):
+ self.filter_state.readback()
+
+ #TODO: add back in preamp!
+- #print frequencies
++ #print(frequencies)
+ #main_layout.addLayout(self.create_slider(partial(self.update_coefficient,0),
+ # 'Preamp')[0]
+ #)
+@@ -243,7 +242,7 @@ class QPaeq(QtGui.QWidget):
+ self.update_profiles()
+ self.update_sinks()
+ def update_profiles(self):
+- #print 'update profiles called!'
++ #print('update profiles called!')
+ manager_props=dbus.Interface(self.manager_obj,dbus_interface=prop_iface)
+ self.profiles=manager_props.Get(self.manager_iface,'Profiles')
+ self.profile_box.blockSignals(True)
+@@ -262,7 +261,7 @@ class QPaeq(QtGui.QWidget):
+ self.sink_box.blockSignals(False)
+ self.sink_box.setMinimumSize(self.sink_box.sizeHint())
+ def read_filter(self):
+- #print self.filter_frequencies
++ #print(self.filter_frequencies)
+ self.filter_state.readback()
+ def reset(self):
+ coefs=dbus.Array([1/math.sqrt(2.0)]*(self.filter_state.filter_rate//2+1))
+@@ -480,18 +479,16 @@ class FilterState(QtCore.QObject):
+ return [0]+xs+[self.sample_rate//2]
+ def _set_frequency_values(self,freqs):
+ self.frequencies=freqs
+- #print 'base',self.frequencies
+- self.filter_frequencies=map(lambda x: int(round(x)), \
+- self.translate_rates(self.filter_rate,self.sample_rate,
+- self.frequencies) \
+- )
++ #print('base',self.frequencies)
++ self.filter_frequencies=[int(round(x)) for x in self.translate_rates(self.filter_rate,self.sample_rate,
++ self.frequencies)]
+ self.coefficients=[0.0]*len(self.frequencies)
+ self.preamp=1.0
+ def set_frequency_values(self,freqs):
+ self._set_frequency_values(self.freq_proper(freqs))
+ @staticmethod
+ def translate_rates(dst,src,rates):
+- return list(map(lambda x: x*dst/src,rates))
++ return list([x*dst/src for x in rates])
+ def seed(self):
+ self.sink.SeedFilter(self.channel,self.filter_frequencies,self.coefficients,self.preamp)
+ self.sync_timer.start(SYNC_TIMEOUT)
+@@ -504,7 +501,7 @@ class FilterState(QtCore.QObject):
+ self.sink.SetFilter(self.channel,dbus.Array(coefs),self.preamp)
+ self.sync_timer.start(SYNC_TIMEOUT)
+ def save_state(self):
+- print 'saving state'
++ print('saving state')
+ self.sink.SaveState()
+ def load_profile(self,profile):
+ self.sink.LoadProfile(self.channel,dbus.String(profile))
+@@ -540,8 +537,8 @@ def subdivide(xs, t_points):
+ p_drop=len(xs)-t_points
+ p_drop_left=p_drop//2
+ p_drop_right=p_drop-p_drop_left
+- #print 'xs',xs
+- #print 'dropping %d, %d left, %d right' %(p_drop,p_drop_left,p_drop_right)
++ #print('xs',xs)
++ #print('dropping %d, %d left, %d right' %(p_drop,p_drop_left,p_drop_right))
+ c=len(xs)//2
+ left=xs[0:p_drop_left*2:2]+xs[p_drop_left*2:c]
+ right=list(reversed(xs[c:]))
View
80 media-sound/pulseaudio/files/pulseaudio-2.0-udev-symbols.patch
@@ -0,0 +1,80 @@
+From 2e64edbd3e12145950ccd952bb7984a4420b8c02 Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+Date: Thu, 17 May 2012 22:50:22 +0200
+Subject: [PATCH] udev: Don't use deprecated udev_get_*_path() functions
+
+[These symbols were removed in libudev.so.1.0.0. Replace them with
+hardcoded strings. -- heftig]
+
+Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+---
+ src/modules/module-udev-detect.c | 9 +++------
+ src/modules/udev-util.c | 4 ++--
+ 2 files changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c
+index 1192194..31416bd 100644
+--- a/src/modules/module-udev-detect.c
++++ b/src/modules/module-udev-detect.c
+@@ -123,7 +123,7 @@ static char *card_get_sysattr(const char *card_idx, const char *name) {
+ goto finish;
+ }
+
+- t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx);
++ t = pa_sprintf_malloc("/sys/class/sound/card%s", card_idx);
+ card = udev_device_new_from_syspath(udev, t);
+ pa_xfree(t);
+
+@@ -282,7 +282,7 @@ static void verify_access(struct userdata *u, struct device *d) {
+ pa_assert(u);
+ pa_assert(d);
+
+- cd = pa_sprintf_malloc("%s/snd/controlC%s", udev_get_dev_path(u->udev), path_get_card_id(d->path));
++ cd = pa_sprintf_malloc("/dev/snd/controlC%s", path_get_card_id(d->path));
+ accessible = access(cd, R_OK|W_OK) >= 0;
+ pa_log_debug("%s is accessible: %s", cd, pa_yes_no(accessible));
+
+@@ -621,7 +621,6 @@ fail:
+ }
+
+ static int setup_inotify(struct userdata *u) {
+- char *dev_snd;
+ int r;
+
+ if (u->inotify_fd >= 0)
+@@ -632,9 +631,7 @@ static int setup_inotify(struct userdata *u) {
+ return -1;
+ }
+
+- dev_snd = pa_sprintf_malloc("%s/snd", udev_get_dev_path(u->udev));
+- r = inotify_add_watch(u->inotify_fd, dev_snd, IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);
+- pa_xfree(dev_snd);
++ r = inotify_add_watch(u->inotify_fd, "/dev/snd", IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);
+
+ if (r < 0) {
+ int saved_errno = errno;
+diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c
+index 2f18bc4..b0bb17d 100644
+--- a/src/modules/udev-util.c
++++ b/src/modules/udev-util.c
+@@ -180,7 +180,7 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) {
+ goto finish;
+ }
+
+- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx);
++ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx);
+ card = udev_device_new_from_syspath(udev, t);
+ pa_xfree(t);
+
+@@ -277,7 +277,7 @@ char* pa_udev_get_property(int card_idx, const char *name) {
+ goto finish;
+ }
+
+- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx);
++ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx);
+ card = udev_device_new_from_syspath(udev, t);
+ pa_xfree(t);
+
+--
+1.7.8.6
+
View
28 media-sound/pulseaudio/files/pulseaudio-3.0-json-c-fix.patch
@@ -0,0 +1,28 @@
+From 759c0bc6f990240287a14fa6dec029ecea581463 Mon Sep 17 00:00:00 2001
+From: Arun Raghavan <arun.raghavan@collabora.co.uk>
+Date: Sat, 27 Apr 2013 08:57:05 +0530
+Subject: [PATCH] build-sys: json-c changed everything :(
+
+json-c 0.11 ships a pkg-config file with a different name, and changes
+the name of its library as well.
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c8161a4..b1bd21a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -624,7 +624,8 @@ AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_LIBCHECK" = x1])
+
+ #### json parsing ####
+
+-PKG_CHECK_MODULES(LIBJSON, [ json >= 0.9 ])
++PKG_CHECK_MODULES(LIBJSON, [ json-c >= 0.11 ], [],
++ [PKG_CHECK_MODULES(LIBJSON, [ json >= 0.9 ])])
+ AC_SUBST(LIBJSON_CFLAGS)
+ AC_SUBST(LIBJSON_LIBS)
+
+--
+1.8.1.2
+
View
7 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"
View
81 media-sound/pulseaudio/files/pulseaudio.init.d-5
@@ -0,0 +1,81 @@
+#!/sbin/runscript
+# Copyright 1999-2011 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-5,v 1.1 2011/03/27 16:58:49 ssuominen 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 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-(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 $?
+}
View
226 media-sound/pulseaudio/pulseaudio-2.1-r1.ebuild
@@ -0,0 +1,226 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic user versionator toolchain-funcs udev
+
+DESCRIPTION="A networked sound server with an advanced plugin system"
+HOMEPAGE="http://www.pulseaudio.org/"
+
+SRC_URI="http://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
+
+# libpulse-simple and libpulse link to libpulse-core; this is daemon's
+# library and can link to gdbm and other GPL-only libraries. In this
+# cases, we have a fully GPL-2 package. Leaving the rest of the
+# GPL-forcing USE flags for those who use them.
+LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="*"
+IUSE="+alsa avahi +caps equalizer jack lirc oss tcpd +X dbus libsamplerate gnome bluetooth +asyncns +glib gtk test doc +udev ipv6 system-wide realtime +orc ssl +gdbm +webrtc-aec xen systemd"
+
+RDEPEND=">=media-libs/libsndfile-1.0.20
+ X? (
+ >=x11-libs/libX11-1.4.0
+ >=x11-libs/libxcb-1.6
+ >=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.117 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ lirc? ( app-misc/lirc )
+ dbus? ( >=sys-apps/dbus-1.0.0 )
+ gtk? ( x11-libs/gtk+:2 )
+ gnome? ( >=gnome-base/gconf-2.4.0 )
+ bluetooth? (
+ >=net-wireless/bluez-4
+ >=sys-apps/dbus-1.0.0
+ )
+ asyncns? ( net-libs/libasyncns )
+ udev? ( >=virtual/udev-143[hwdb] )
+ realtime? ( sys-auth/rtkit )
+ equalizer? (
+ sci-libs/fftw:3.0
+ dev-python/PyQt4[dbus]
+ )
+ orc? ( >=dev-lang/orc-0.4.9 )
+ ssl? ( dev-libs/openssl )
+ >=media-libs/speex-1.2_rc1
+ gdbm? ( sys-libs/gdbm )
+ webrtc-aec? ( media-libs/webrtc-audio-processing )
+ xen? ( app-emulation/xen )
+ systemd? ( >=sys-apps/systemd-39 )
+ <dev-libs/json-c-0.11
+ >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used
+
+DEPEND="${RDEPEND}
+ sys-devel/m4
+ doc? ( app-doc/doxygen )
+ X? (
+ x11-proto/xproto
+ >=x11-libs/libXtst-1.0.99.2
+ )
+ dev-libs/libatomic_ops
+ virtual/pkgconfig
+ system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
+ dev-util/intltool"
+# This is a PDEPEND to avoid a circular dep
+PDEPEND="alsa? ( media-plugins/alsa-plugins[pulseaudio] )"
+
+# 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 )
+ )"
+
+# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
+REQUIRED_USE="bluetooth? ( dbus )"
+
+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_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)
+
+ if use gdbm; then
+ myconf+=" --with-database=gdbm"
+ #elif use tdb; then
+ # myconf+=" --with-database=tdb"
+ else
+ myconf+=" --with-database=simple"
+ 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 gtk gtk2) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable bluetooth bluez) \
+ $(use_enable X x11) \
+ $(use_enable test default-build-tests) \
+ $(use_enable udev) \
+ $(use_enable systemd) \
+ $(use_enable ipv6) \
+ $(use_enable ssl openssl) \
+ $(use_enable webrtc-aec) \
+ $(use_enable xen) \
+ $(use_with caps) \
+ $(use_with equalizer fftw) \
+ --disable-adrian-aec \
+ --disable-esound \
+ --localstatedir="${EPREFIX}"/var \
+ --with-udev-rules-dir="${EPREFIX}/$(udev_get_udevdir)"/rules.d \
+ ${myconf}
+
+ if use doc; then
+ pushd doxygen
+ doxygen doxygen.conf
+ 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
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+
+ # 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-5" \
+ > "${T}/pulseaudio"
+
+ doinitd "${T}/pulseaudio"
+ fi
+
+ use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
+
+ dodoc README todo
+
+ if use doc; then
+ pushd doxygen/html
+ dohtml *
+ 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
+ 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."
+ fi
+
+ eselect esd update --if-unset
+}
View
231 media-sound/pulseaudio/pulseaudio-3.0-r1.ebuild
@@ -0,0 +1,231 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic user versionator toolchain-funcs udev
+
+DESCRIPTION="A networked sound server with an advanced plugin system"
+HOMEPAGE="http://www.pulseaudio.org/"
+
+SRC_URI="http://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
+
+# libpulse-simple and libpulse link to libpulse-core; this is daemon's
+# library and can link to gdbm and other GPL-only libraries. In this
+# cases, we have a fully GPL-2 package. Leaving the rest of the
+# GPL-forcing USE flags for those who use them.
+LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="~*"
+IUSE="+alsa +asyncns avahi bluetooth +caps dbus doc equalizer +gdbm +glib gnome
+gtk ipv6 jack libsamplerate lirc neon +orc oss qt4 realtime ssl systemd
+system-wide tcpd test +udev +webrtc-aec +X xen"
+
+RDEPEND=">=media-libs/libsndfile-1.0.20
+ X? (
+ >=x11-libs/libX11-1.4.0
+ >=x11-libs/libxcb-1.6
+ >=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.117 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ lirc? ( app-misc/lirc )
+ dbus? ( >=sys-apps/dbus-1.0.0 )
+ gtk? ( x11-libs/gtk+:2 )
+ gnome? ( >=gnome-base/gconf-2.4.0 )
+ bluetooth? (
+ >=net-wireless/bluez-4.99
+ >=sys-apps/dbus-1.0.0
+ media-libs/sbc
+ )
+ asyncns? ( net-libs/libasyncns )
+ udev? ( >=virtual/udev-143[hwdb] )
+ realtime? ( sys-auth/rtkit )
+ equalizer? ( sci-libs/fftw:3.0 )
+ orc? ( >=dev-lang/orc-0.4.9 )
+ ssl? ( dev-libs/openssl )
+ >=media-libs/speex-1.2_rc1
+ gdbm? ( sys-libs/gdbm )
+ webrtc-aec? ( media-libs/webrtc-audio-processing )
+ xen? ( app-emulation/xen )
+ systemd? ( >=sys-apps/systemd-39 )
+ dev-libs/json-c
+ >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used
+
+DEPEND="${RDEPEND}
+ sys-devel/m4
+ doc? ( app-doc/doxygen )
+ test? ( dev-libs/check )
+ X? (
+ x11-proto/xproto
+ >=x11-libs/libXtst-1.0.99.2
+ )
+ dev-libs/libatomic_ops
+ virtual/pkgconfig
+ system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
+ dev-util/intltool"
+# This is a PDEPEND to avoid a circular dep
+PDEPEND="alsa? ( media-plugins/alsa-plugins[pulseaudio] )"
+
+# alsa-utils dep is for the alsasound init.d script (see bug #155707)
+# bluez dep is for the bluetooth init.d script
+# PyQt4 dep is for the qpaeq script
+RDEPEND="${RDEPEND}
+ equalizer? ( qt4? ( dev-python/PyQt4[dbus] ) )
+ X? ( gnome-extra/gnome-audio )
+ system-wide? (
+ sys-apps/openrc
+ alsa? ( media-sound/alsa-utils )
+ bluetooth? ( >=net-wireless/bluez-4 )
+ )"
+
+# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
+REQUIRED_USE="bluetooth? ( dbus )"
+
+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() {
+ epatch "${FILESDIR}/${P}-json-c-fix.patch"
+ eautoreconf
+}
+
+src_configure() {
+ if use gdbm; then
+ myconf+=" --with-database=gdbm"
+ #elif use tdb; then
+ # myconf+=" --with-database=tdb"
+ else
+ myconf+=" --with-database=simple"
+ 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 neon neon-opt) \
+ $(use_enable tcpd tcpwrap) \
+ $(use_enable jack) \
+ $(use_enable avahi) \
+ $(use_enable dbus) \
+ $(use_enable gnome gconf) \
+ $(use_enable gtk gtk2) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable bluetooth bluez) \
+ $(use_enable X x11) \
+ $(use_enable test default-build-tests) \
+ $(use_enable udev) \
+ $(use_enable systemd) \
+ $(use_enable ipv6) \
+ $(use_enable ssl openssl) \
+ $(use_enable webrtc-aec) \
+ $(use_enable xen) \
+ $(use_with caps) \
+ $(use_with equalizer fftw) \
+ --disable-adrian-aec \
+ --disable-esound \
+ --localstatedir="${EPREFIX}"/var \
+ --with-udev-rules-dir="${EPREFIX}/$(udev_get_udevdir)"/rules.d \
+ ${myconf}
+
+ if use doc; then
+ pushd doxygen
+ doxygen doxygen.conf
+ 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
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+
+ # 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-5" \
+ > "${T}/pulseaudio"
+
+ doinitd "${T}/pulseaudio"
+ fi
+
+ use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
+
+ dodoc README todo
+
+ if use doc; then
+ pushd doxygen/html
+ dohtml *
+ popd
+ fi
+
+ # Create the state directory
+ use prefix || diropts -o pulse -g pulse -m0755
+
+ 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
+ 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."
+ fi
+ if use equalizer && ! use qt4; then
+ elog "You've enabled the 'equalizer' USE-flag but not the 'qt4' USE-flag."
+ elog "This will build the equalizer module, but the 'qpaeq' tool"
+ elog "which is required to set equalizer levels will not work."
+ fi
+}
View
231 media-sound/pulseaudio/pulseaudio-4.0.ebuild
@@ -0,0 +1,231 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic user versionator udev
+
+DESCRIPTION="A networked sound server with an advanced plugin system"
+HOMEPAGE="http://www.pulseaudio.org/"
+
+SRC_URI="http://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
+
+# libpulse-simple and libpulse link to libpulse-core; this is daemon's
+# library and can link to gdbm and other GPL-only libraries. In this
+# cases, we have a fully GPL-2 package. Leaving the rest of the
+# GPL-forcing USE flags for those who use them.
+LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="~*"
+IUSE="+alsa +asyncns avahi bluetooth +caps dbus doc equalizer +gdbm +glib gnome
+gtk ipv6 jack libsamplerate lirc neon +orc oss qt4 realtime ssl systemd
+system-wide tcpd test +udev +webrtc-aec +X xen"
+
+RDEPEND=">=media-libs/libsndfile-1.0.20
+ X? (
+ >=x11-libs/libX11-1.4.0
+ >=x11-libs/libxcb-1.6
+ >=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.117 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ lirc? ( app-misc/lirc )
+ dbus? ( >=sys-apps/dbus-1.0.0 )
+ gtk? ( x11-libs/gtk+:3 )
+ gnome? ( >=gnome-base/gconf-2.4.0 )
+ bluetooth? (
+ >=net-wireless/bluez-4.99
+ >=sys-apps/dbus-1.0.0
+ media-libs/sbc
+ )
+ asyncns? ( net-libs/libasyncns )
+ udev? ( >=virtual/udev-143[hwdb] )
+ realtime? ( sys-auth/rtkit )
+ equalizer? ( sci-libs/fftw:3.0 )
+ orc? ( >=dev-lang/orc-0.4.9 )
+ ssl? ( dev-libs/openssl )
+ >=media-libs/speex-1.2_rc1
+ gdbm? ( sys-libs/gdbm )
+ webrtc-aec? ( media-libs/webrtc-audio-processing )
+ xen? ( app-emulation/xen )
+ systemd? ( >=sys-apps/systemd-39 )
+ dev-libs/json-c
+ >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used
+
+DEPEND="${RDEPEND}
+ sys-devel/m4
+ doc? ( app-doc/doxygen )
+ test? ( dev-libs/check )
+ X? (
+ x11-proto/xproto
+ >=x11-libs/libXtst-1.0.99.2
+ )
+ dev-libs/libatomic_ops
+ virtual/pkgconfig
+ system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
+ dev-util/intltool"
+# This is a PDEPEND to avoid a circular dep
+PDEPEND="alsa? ( media-plugins/alsa-plugins[pulseaudio] )"
+
+# alsa-utils dep is for the alsasound init.d script (see bug #155707)
+# bluez dep is for the bluetooth init.d script
+# PyQt4 dep is for the qpaeq script
+RDEPEND="${RDEPEND}
+ equalizer? ( qt4? ( dev-python/PyQt4[dbus] ) )
+ X? ( gnome-extra/gnome-audio )
+ system-wide? (
+ sys-apps/openrc
+ alsa? ( media-sound/alsa-utils )
+ bluetooth? ( >=net-wireless/bluez-4 )
+ )"
+
+# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
+REQUIRED_USE="bluetooth? ( dbus )"
+
+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() {
+ epatch_user
+}
+
+src_configure() {
+ if use gdbm; then
+ myconf+=" --with-database=gdbm"
+ #elif use tdb; then
+ # myconf+=" --with-database=tdb"
+ else
+ myconf+=" --with-database=simple"
+ 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 neon neon-opt) \
+ $(use_enable tcpd tcpwrap) \
+ $(use_enable jack) \
+ $(use_enable avahi) \
+ $(use_enable dbus) \
+ $(use_enable gnome gconf) \
+ $(use_enable gtk gtk3) \
+ $(use_enable libsamplerate samplerate) \
+ $(use_enable bluetooth bluez) \
+ $(use_enable X x11) \
+ $(use_enable test default-build-tests) \
+ $(use_enable udev) \
+ $(use_enable systemd) \
+ $(use_enable ipv6) \
+ $(use_enable ssl openssl) \
+ $(use_enable webrtc-aec) \
+ $(use_enable xen) \
+ $(use_with caps) \
+ $(use_with equalizer fftw) \
+ --disable-adrian-aec \
+ --disable-esound \
+ --localstatedir="${EPREFIX}"/var \
+ --with-udev-rules-dir="${EPREFIX}/$(udev_get_udevdir)"/rules.d \
+ ${myconf}
+
+ if use doc; then
+ pushd doxygen
+ doxygen doxygen.conf
+ 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
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+
+ # 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-5" \
+ > "${T}/pulseaudio"
+
+ doinitd "${T}/pulseaudio"
+ fi
+
+ use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
+
+ dodoc README todo
+
+ if use doc; then
+ pushd doxygen/html
+ dohtml *
+ popd
+ fi
+
+ # Create the state directory
+ use prefix || diropts -o pulse -g pulse -m0755
+
+ 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
+ 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."
+ fi
+ if use equalizer && ! use qt4; then
+ elog "You've enabled the 'equalizer' USE-flag but not the 'qt4' USE-flag."
+ elog "This will build the equalizer module, but the 'qpaeq' tool"
+ elog "which is required to set equalizer levels will not work."
+ fi
+}
Please sign in to comment.
Something went wrong with that request. Please try again.