summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/pulseaudio
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-sound/pulseaudio')
-rw-r--r--media-sound/pulseaudio/Manifest2
-rw-r--r--media-sound/pulseaudio/files/pulseaudio-5.0-crash-udp.patch53
-rw-r--r--media-sound/pulseaudio/files/pulseaudio-5.0-module-switch.patch35
-rw-r--r--media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-1.patch26
-rw-r--r--media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-2.patch73
-rw-r--r--media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-3.patch77
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.conf.d7
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.init.d-581
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.service10
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.tmpfiles1
-rw-r--r--media-sound/pulseaudio/files/svolume-fix_param_loading_undefined_beh.patch37
-rw-r--r--media-sound/pulseaudio/metadata.xml78
-rw-r--r--media-sound/pulseaudio/pulseaudio-5.0-r4.ebuild356
-rw-r--r--media-sound/pulseaudio/pulseaudio-5.0-r7.ebuild367
-rw-r--r--media-sound/pulseaudio/pulseaudio-6.0.ebuild382
15 files changed, 1585 insertions, 0 deletions
diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest
new file mode 100644
index 000000000000..3dfc27a818f0
--- /dev/null
+++ b/media-sound/pulseaudio/Manifest
@@ -0,0 +1,2 @@
+DIST pulseaudio-5.0.tar.xz 1455428 SHA256 99c13a8b1249ddbd724f195579df79484e9af6418cecf6a15f003a7f36caf939 SHA512 f3d64bd6e03a732fd812da466b6658004600b4f3d0b9760403b7e113b6d654d54387658bf3704f45f28ab700245433e23fe517e4579130886fc58647eb97be2b WHIRLPOOL c85829c78ded3bbef234e455bfd3778f2daf50de9d7627508dbf131d0c398e35ab3ae41a4b5136f0c0da09249bc9a600ad85d848ba4e1faba74875af0a787036
+DIST pulseaudio-6.0.tar.xz 1469248 SHA256 b50640e0b80b1607600accfad2e45aabb79d379bf6354c9671efa2065477f6f6 SHA512 4f2293b41c8278047a41be4609a6bc267766874001092a91e785b05d5224fd82810862402942dadbb54bed7f74689779c958ca512666dfe6755d29551583cc2d WHIRLPOOL d75724f2ada640dabd256dc9e9840def17e78f63116c31df711d266349e9f4b99efbc797a5108649c860a5bf8ec8199383eaede440d8b4b655ef09f4ce37984f
diff --git a/media-sound/pulseaudio/files/pulseaudio-5.0-crash-udp.patch b/media-sound/pulseaudio/files/pulseaudio-5.0-crash-udp.patch
new file mode 100644
index 000000000000..d14da07459ff
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio-5.0-crash-udp.patch
@@ -0,0 +1,53 @@
+From 26b9d22dd24c17eb118d0205bf7b02b75d435e3c Mon Sep 17 00:00:00 2001
+From: Alexander E. Patrakov <patrakov@gmail.com>
+Date: Thu, 05 Jun 2014 16:29:25 +0000
+Subject: rtp-recv: fix crash on empty UDP packets (CVE-2014-3970)
+
+On FIONREAD returning 0 bytes, we cannot return success, as the caller
+(rtpoll_work_cb in module-rtp-recv.c) would then try to
+pa_memblock_unref(chunk.memblock) and, because memblock is NULL, trigger
+an assertion.
+
+Also we have to read out the possible empty packet from the socket, so
+that the kernel doesn't tell us again and again about it.
+
+Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
+---
+diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
+index 570737e..7b75e0e 100644
+--- a/src/modules/rtp/rtp.c
++++ b/src/modules/rtp/rtp.c
+@@ -182,8 +182,29 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
+ goto fail;
+ }
+
+- if (size <= 0)
+- return 0;
++ if (size <= 0) {
++ /* size can be 0 due to any of the following reasons:
++ *
++ * 1. Somebody sent us a perfectly valid zero-length UDP packet.
++ * 2. Somebody sent us a UDP packet with a bad CRC.
++ *
++ * It is unknown whether size can actually be less than zero.
++ *
++ * In the first case, the packet has to be read out, otherwise the
++ * kernel will tell us again and again about it, thus preventing
++ * reception of any further packets. So let's just read it out
++ * now and discard it later, when comparing the number of bytes
++ * received (0) with the number of bytes wanted (1, see below).
++ *
++ * In the second case, recvmsg() will fail, thus allowing us to
++ * return the error.
++ *
++ * Just to avoid passing zero-sized memchunks and NULL pointers to
++ * recvmsg(), let's force allocation of at least one byte by setting
++ * size to 1.
++ */
++ size = 1;
++ }
+
+ if (c->memchunk.length < (unsigned) size) {
+ size_t l;
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/media-sound/pulseaudio/files/pulseaudio-5.0-module-switch.patch b/media-sound/pulseaudio/files/pulseaudio-5.0-module-switch.patch
new file mode 100644
index 000000000000..e8ff6e051ae4
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio-5.0-module-switch.patch
@@ -0,0 +1,35 @@
+From ef4a41e8b0ef81a53769d853dbc7679b25252327 Mon Sep 17 00:00:00 2001
+From: David Henningsson <david.henningsson@canonical.com>
+Date: Fri, 28 Mar 2014 11:59:09 +0100
+Subject: [PATCH 36/38] module-switch-on-port-available: Don't switch profiles
+ on uninitialized cards
+
+This could cause the HDMI port to become the default on some systems
+where analog output was available.
+
+BugLink: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1256511
+BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=73375
+Signed-off-by: David Henningsson <david.henningsson@canonical.com>
+---
+ src/modules/module-switch-on-port-available.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
+index 2c7ad17..c560306 100644
+--- a/src/modules/module-switch-on-port-available.c
++++ b/src/modules/module-switch-on-port-available.c
+@@ -173,6 +173,11 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
+ return PA_HOOK_OK;
+ }
+
++ if (pa_idxset_size(card->sinks) == 0 && pa_idxset_size(card->sources) == 0)
++ /* This card is not initialized yet. We'll handle it in
++ sink_new / source_new callbacks later. */
++ return PA_HOOK_OK;
++
+ find_sink_and_source(card, port, &sink, &source);
+
+ is_active_profile = card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
+--
+1.9.0
+
diff --git a/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-1.patch b/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-1.patch
new file mode 100644
index 000000000000..d90399be3653
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-1.patch
@@ -0,0 +1,26 @@
+From d03ffdccdb7286021e53876ba5d4adf9a1edd0d0 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
+Date: Sat, 15 Mar 2014 09:37:05 +0200
+Subject: zeroconf-publish: Add locking around pa_mainloop_api_once()
+
+Commit e1e154c7377779377fa1a36655a10effd693f7b5 added locking around
+pa_mainloop_api_once() everywhere except pa__done(). This fixes that
+omission.
+
+diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
+index 0110e1d..35277c2 100644
+--- a/src/modules/module-zeroconf-publish.c
++++ b/src/modules/module-zeroconf-publish.c
+@@ -807,7 +807,9 @@ void pa__done(pa_module*m) {
+ if (!(u = m->userdata))
+ return;
+
++ pa_threaded_mainloop_lock(u->mainloop);
+ pa_mainloop_api_once(u->api, client_free, u);
++ pa_threaded_mainloop_unlock(u->mainloop);
+ pa_asyncmsgq_wait_for(u->thread_mq.outq, AVAHI_MESSAGE_SHUTDOWN_COMPLETE);
+
+ pa_threaded_mainloop_stop(u->mainloop);
+--
+cgit v0.10.2
+
diff --git a/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-2.patch b/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-2.patch
new file mode 100644
index 000000000000..7d4de455941f
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-2.patch
@@ -0,0 +1,73 @@
+From 37e73e10be9e42544a4cc160ff85ccada2cc9aa9 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
+Date: Sat, 15 Mar 2014 09:37:06 +0200
+Subject: zeroconf-publish: Don't react to messages while shutting down
+
+This fixes a case where pa__done() is called while
+AVAHI_MESSAGE_PUBLISH_ALL is waiting for processing. The
+pa_asyncmsgq_wait_for(AVAHI_MESSAGE_SHUTDOWN_COMPLETE) call will
+process all pending messages, and processing AVAHI_MESSAGE_PUBLISH_ALL
+causes publish_all_services(), and that in turn accesses u->services,
+which has been already freed at this point. If we are shutting down,
+we shouldn't react to any of the messages that the Avahi thread is
+sending to the main thread.
+
+BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=76184
+
+diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
+index 35277c2..db92850 100644
+--- a/src/modules/module-zeroconf-publish.c
++++ b/src/modules/module-zeroconf-publish.c
+@@ -141,6 +141,8 @@ struct userdata {
+ pa_hook_slot *sink_new_slot, *source_new_slot, *sink_unlink_slot, *source_unlink_slot, *sink_changed_slot, *source_changed_slot;
+
+ pa_native_protocol *native;
++
++ bool shutting_down;
+ };
+
+ /* Runs in PA mainloop context */
+@@ -638,6 +640,11 @@ static void unpublish_all_services(struct userdata *u, bool rem) {
+ static int avahi_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
+ struct userdata *u = (struct userdata *) data;
+
++ pa_assert(u);
++
++ if (u->shutting_down)
++ return 0;
++
+ switch (code) {
+ case AVAHI_MESSAGE_PUBLISH_ALL:
+ publish_all_services(u);
+@@ -647,10 +654,6 @@ static int avahi_process_msg(pa_msgobject *o, int code, void *data, int64_t offs
+ pa_module_unload(u->core, u->module, true);
+ break;
+
+- case AVAHI_MESSAGE_SHUTDOWN_COMPLETE:
+- /* pa__done() is waiting for this */
+- break;
+-
+ default:
+ pa_assert_not_reached();
+ }
+@@ -797,7 +800,7 @@ static void client_free(pa_mainloop_api *api PA_GCC_UNUSED, void *userdata) {
+ if (u->avahi_poll)
+ pa_avahi_poll_free(u->avahi_poll);
+
+- pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->msg), AVAHI_MESSAGE_SHUTDOWN_COMPLETE, NULL, 0, NULL, NULL);
++ pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->msg), AVAHI_MESSAGE_SHUTDOWN_COMPLETE, u, 0, NULL, NULL);
+ }
+
+ void pa__done(pa_module*m) {
+@@ -807,6 +810,8 @@ void pa__done(pa_module*m) {
+ if (!(u = m->userdata))
+ return;
+
++ u->shutting_down = true;
++
+ pa_threaded_mainloop_lock(u->mainloop);
+ pa_mainloop_api_once(u->api, client_free, u);
+ pa_threaded_mainloop_unlock(u->mainloop);
+--
+cgit v0.10.2
+
diff --git a/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-3.patch b/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-3.patch
new file mode 100644
index 000000000000..6bdd46415cd2
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio-5.0-zeroconf-crash-3.patch
@@ -0,0 +1,77 @@
+From b75a20db10c8605d98324a7782a7da6483ae9f14 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
+Date: Wed, 19 Mar 2014 09:50:39 +0200
+Subject: zeroconf-publish: Don't assume any particular defer event ordering
+
+Also, initialize userdata with zeros to avoid invalid pointers in
+client_free().
+
+This fixes a crash when client_free() is called before
+create_client(). The whole issue could be avoided by using some other
+mechanism than defer events for running the two functions, but I'll
+do that change later (I have also other cleanups planned for
+zeroconf-publish).
+
+BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=76184
+
+diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
+index db92850..be8806e 100644
+--- a/src/modules/module-zeroconf-publish.c
++++ b/src/modules/module-zeroconf-publish.c
+@@ -142,7 +142,8 @@ struct userdata {
+
+ pa_native_protocol *native;
+
+- bool shutting_down;
++ bool shutting_down; /* Used in the main thread. */
++ bool client_freed; /* Used in the Avahi thread. */
+ };
+
+ /* Runs in PA mainloop context */
+@@ -707,6 +708,16 @@ static void create_client(pa_mainloop_api *api PA_GCC_UNUSED, void *userdata) {
+ struct userdata *u = (struct userdata *) userdata;
+ int error;
+
++ /* create_client() and client_free() are called via defer events. If the
++ * two defer events are created very quickly one after another, we can't
++ * assume that the defer event that runs create_client() will be dispatched
++ * before the defer event that runs client_free() (at the time of writing,
++ * pa_mainloop actually always dispatches queued defer events in reverse
++ * creation order). For that reason we must be prepared for the case where
++ * client_free() has already been called. */
++ if (u->client_freed)
++ return;
++
+ pa_thread_mq_install(&u->thread_mq);
+
+ if (!(u->client = avahi_client_new(u->avahi_poll, AVAHI_CLIENT_NO_FAIL, client_callback, u, &error))) {
+@@ -733,7 +744,7 @@ int pa__init(pa_module*m) {
+ goto fail;
+ }
+
+- m->userdata = u = pa_xnew(struct userdata, 1);
++ m->userdata = u = pa_xnew0(struct userdata, 1);
+ u->core = m->core;
+ u->module = m;
+ u->native = pa_native_protocol_get(u->core);
+@@ -757,8 +768,6 @@ int pa__init(pa_module*m) {
+ u->source_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PROPLIST_CHANGED], PA_HOOK_LATE, (pa_hook_cb_t) device_new_or_changed_cb, u);
+ u->source_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK], PA_HOOK_LATE, (pa_hook_cb_t) device_unlink_cb, u);
+
+- u->main_entry_group = NULL;
+-
+ un = pa_get_user_name_malloc();
+ hn = pa_get_host_name_malloc();
+ u->service_name = pa_truncate_utf8(pa_sprintf_malloc("%s@%s", un, hn), AVAHI_LABEL_MAX-1);
+@@ -801,6 +810,8 @@ static void client_free(pa_mainloop_api *api PA_GCC_UNUSED, void *userdata) {
+ pa_avahi_poll_free(u->avahi_poll);
+
+ pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->msg), AVAHI_MESSAGE_SHUTDOWN_COMPLETE, u, 0, NULL, NULL);
++
++ u->client_freed = true;
+ }
+
+ void pa__done(pa_module*m) {
+--
+cgit v0.10.2
+
diff --git a/media-sound/pulseaudio/files/pulseaudio.conf.d b/media-sound/pulseaudio/files/pulseaudio.conf.d
new file mode 100644
index 000000000000..348540b3fcf5
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.conf.d
@@ -0,0 +1,7 @@
+# Config file for /etc/init.d/pulseaudio
+# $Id$
+
+# 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-5 b/media-sound/pulseaudio/files/pulseaudio.init.d-5
new file mode 100644
index 000000000000..a6841020774d
--- /dev/null
+++ b/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
+# $Id$
+
+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 $?
+}
diff --git a/media-sound/pulseaudio/files/pulseaudio.service b/media-sound/pulseaudio/files/pulseaudio.service
new file mode 100644
index 000000000000..c5f0d5799929
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=System wide PulseAudio instance
+After=syslog.target network.target alsasound.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/pulseaudio --system --log-target=syslog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-sound/pulseaudio/files/pulseaudio.tmpfiles b/media-sound/pulseaudio/files/pulseaudio.tmpfiles
new file mode 100644
index 000000000000..88374e35574b
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.tmpfiles
@@ -0,0 +1 @@
+d /var/run/pulse 0755 pulse audio -
diff --git a/media-sound/pulseaudio/files/svolume-fix_param_loading_undefined_beh.patch b/media-sound/pulseaudio/files/svolume-fix_param_loading_undefined_beh.patch
new file mode 100644
index 000000000000..4e22f5e95d1c
--- /dev/null
+++ b/media-sound/pulseaudio/files/svolume-fix_param_loading_undefined_beh.patch
@@ -0,0 +1,37 @@
+From: Wim Taymans
+Date: Wed, 7 Jan 2015 11:20:01 +0100
+Subject: [PATCH] svolume.orc: avoid parameter loading undefined behaviour
+
+In some cases, depending on the instruction that performs the load, orc
+ignores the size of the parameter when loading it for the first time.
+Explicitly load the parameter into a temp to make sure it is loaded
+correctly, like we do for the 2ch case.
+
+See https://bugzilla.gnome.org/show_bug.cgi?id=742271
+---
+ src/pulsecore/svolume.orc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/pulsecore/svolume.orc b/src/pulsecore/svolume.orc
+index 0edbefb..f869893 100644
+--- a/src/pulsecore/svolume.orc
++++ b/src/pulsecore/svolume.orc
+@@ -45,13 +45,15 @@
+
+ .function pa_volume_s16ne_orc_1ch
+ .dest 2 samples int16_t
+-.param 4 v int32_t
++.param 4 vols int32_t
++.temp 4 v
+ .temp 2 vh
+ .temp 4 s
+ .temp 4 mh
+ .temp 4 ml
+ .temp 4 signc
+
++loadpl v, vols
+ convuwl s, samples
+ x2 cmpgtsw signc, 0, s
+ x2 andw signc, signc, v
+--
+1.9.3
diff --git a/media-sound/pulseaudio/metadata.xml b/media-sound/pulseaudio/metadata.xml
new file mode 100644
index 000000000000..2bc52644812e
--- /dev/null
+++ b/media-sound/pulseaudio/metadata.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <herd>sound</herd>
+ <use>
+ <flag name="X">
+ Build the X11 publish module to export PulseAudio information
+ through X11 protocol for clients to make use. Don't enable this
+ flag if you want to use a system wide instance. If unsure, enable
+ this flag.
+ </flag>
+ <flag name="alsa-plugin">
+ Request installing <pkg>media-plugins/alsa-plugins</pkg> with
+ PulseAudio plugin enabled. This ensures that clients supporting
+ ALSA only will use PulseAudio.
+ </flag>
+ <flag name="gnome">
+ Use GConf to store user preferences on streams and so on. Don't
+ enable this flag if you want to use a system wide instance. If
+ unsure, enable this flag.
+ </flag>
+ <flag name="oss">
+ Enable OSS sink/source (output/input). Deprecated, upstream does
+ not support this on systems where other sink/source systems are
+ available (i.e.: Linux). The padsp wrapper is now always build
+ if the system supports OSS at all.
+ </flag>
+ <flag name="glib">
+ Add support to <pkg>dev-libs/glib</pkg>-based mainloop for the
+ libpulse client library, to allow using libpulse on glib-based
+ programs.
+ </flag>
+ <flag name="system-wide" restrict="&gt;=media-sound/pulseaudio-0.9.21.1">
+ Allow preparation and installation of the system-wide init
+ script for PulseAudio. Since this support is only supported for
+ embedded situations, do not enable without reading the upstream
+ instructions at
+ http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ .
+ </flag>
+ <flag name="asyncns">Use libasyncns for asynchronous name resolution.</flag>
+ <flag name="doc">Build the doxygen-described API documentation.</flag>
+ <flag name="realtime" restrict="&gt;=media-sound/pulseaudio-0.9.21.2-r1">
+ Makes PulseAudio use RealtimeKit (<pkg>sys-auth/rtkit</pkg>) to get
+ real-time priority while running.
+ </flag>
+ <flag name="equalizer">
+ Enable the equalizer module (requires <pkg>sci-libs/fftw</pkg>).
+ </flag>
+ <flag name="ssl">
+ Use <pkg>dev-libs/openssl</pkg> to provide support for RAOP
+ (AirPort) streaming.
+ </flag>
+ <flag name="gdbm">
+ Use <pkg>sys-libs/gdbm</pkg> to store PulseAudio
+ databases. Recommended for desktop usage. This flag causes the
+ whole package to be licensed under GPL-2 or later.
+ </flag>
+ <flag name="webrtc-aec">
+ Uses the webrtc.org AudioProcessing library for enhancing VoIP calls
+ greatly in applications that support it by performing acoustic echo
+ cancellation, analog gain control, noise suppression and other processing.
+ </flag>
+ <flag name="xen">
+ Builds a special paravirtualized module for running in a Xen guest.
+ </flag>
+ <flag name='systemd'>
+ Build with <pkg>sys-apps/systemd</pkg> support to replace standalone
+ ConsoleKit.
+ </flag>
+ <flag name="native-headset">
+ Build with native HSP backend for bluez 5.
+ </flag>
+ <flag name="ofono-headset">
+ Build with oFono HFP backend for bluez 5, requires <pkg>net-misc/ofono</pkg>.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-sound/pulseaudio/pulseaudio-5.0-r4.ebuild b/media-sound/pulseaudio/pulseaudio-5.0-r4.ebuild
new file mode 100644
index 000000000000..60af38bda9b6
--- /dev/null
+++ b/media-sound/pulseaudio/pulseaudio-5.0-r4.ebuild
@@ -0,0 +1,356 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools bash-completion-r1 eutils flag-o-matic linux-info readme.gentoo systemd user versionator udev multilib-minimal
+
+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="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux"
+
+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"
+
+# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
+REQUIRED_USE="bluetooth? ( dbus )
+ udev? ( || ( alsa oss ) )"
+
+# libpcre needed in some cases, bug #472228
+RDEPEND="
+ || (
+ elibc_glibc? ( virtual/libc )
+ elibc_uclibc? ( virtual/libc )
+ dev-libs/libpcre
+ )
+ >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
+ X? (
+ >=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
+ x11-libs/libSM[${MULTILIB_USEDEP}]
+ x11-libs/libICE[${MULTILIB_USEDEP}]
+ x11-libs/libXtst[${MULTILIB_USEDEP}]
+ )
+ caps? ( sys-libs/libcap[${MULTILIB_USEDEP}] )
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
+ alsa? ( >=media-libs/alsa-lib-1.0.19 )
+ glib? ( >=dev-libs/glib-2.4.0[${MULTILIB_USEDEP}] )
+ avahi? ( >=net-dns/avahi-0.6.12[dbus] )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.117 )
+ tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
+ lirc? ( app-misc/lirc )
+ dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:3 )
+ gnome? ( >=gnome-base/gconf-2.4.0 )
+ bluetooth? (
+ net-wireless/bluez:=
+ >=sys-apps/dbus-1.0.0
+ media-libs/sbc
+ )
+ asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
+ udev? ( >=virtual/udev-143[hwdb(+)] )
+ realtime? ( sys-auth/rtkit )
+ equalizer? ( sci-libs/fftw:3.0 )
+ orc? ( >=dev-lang/orc-0.4.15 )
+ ssl? ( dev-libs/openssl:0 )
+ >=media-libs/speex-1.2_rc1
+ gdbm? ( sys-libs/gdbm )
+ webrtc-aec? ( media-libs/webrtc-audio-processing )
+ xen? ( app-emulation/xen-tools )
+ systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
+ dev-libs/json-c[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20131008-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )
+ || (
+ dev-libs/libltdl:0
+ ( >=sys-devel/libtool-2.4.2 <sys-devel/libtool-2.4.3-r2 )
+ )
+"
+# it's a valid RDEPEND, libltdl.so is used for native abi
+
+DEPEND="${RDEPEND}
+ sys-devel/m4
+ doc? ( app-doc/doxygen )
+ test? ( dev-libs/check )
+ X? (
+ x11-proto/xproto[${MULTILIB_USEDEP}]
+ >=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
+ )
+ dev-libs/libatomic_ops
+ virtual/pkgconfig
+ system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
+ dev-util/intltool
+ >=sys-devel/gettext-0.18.1
+"
+# This is a PDEPEND to avoid a circular dep
+PDEPEND="alsa? ( >=media-plugins/alsa-plugins-1.0.27-r1[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] ) )
+ system-wide? (
+ alsa? ( media-sound/alsa-utils )
+ bluetooth? ( net-wireless/bluez:= )
+ )
+"
+
+pkg_pretend() {
+ CONFIG_CHECK="~HIGH_RES_TIMERS"
+ WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
+ check_extra_config
+
+ if linux_config_exists; then
+ local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
+ if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
+ ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
+ ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
+ fi
+ fi
+}
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ enewgroup audio 18 # Just make sure it exists
+
+ if use system-wide; then
+ enewgroup pulse-access
+ enewgroup pulse
+ enewuser pulse -1 -1 /var/run/pulse pulse,audio
+ fi
+}
+
+src_prepare() {
+ # Skip test that cannot work with sandbox, bug #501846
+ sed -i -e '/lock-autospawn-test/d' src/Makefile.am || die
+
+ # Fix CVE-2014-3970, bug #512516
+ epatch "${FILESDIR}/${P}-crash-udp.patch"
+
+ # module-switch-on-port-available: Don't switch profiles on uninitialized cards (from 'master')
+ epatch "${FILESDIR}/${P}-module-switch.patch"
+
+ epatch_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ if use gdbm; then
+ myconf+=( --with-database=gdbm )
+ #elif use tdb; then
+ # myconf+=( --with-database=tdb )
+ else
+ myconf+=( --with-database=simple )
+ fi
+
+ if use bluetooth; then
+ if has_version '<net-wireless/bluez-5'; then
+ myconf+=( --disable-bluez5 --enable-bluez4 )
+ else
+ myconf+=( --enable-bluez5 --disable-bluez4 )
+ fi
+ else
+ myconf+=( --disable-bluez5 --disable-bluez4 )
+ fi
+
+ myconf+=(
+ --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 orc)
+ $(use_enable X x11)
+ $(use_enable test default-build-tests)
+ $(use_enable udev)
+ $(use_enable systemd)
+ $(use_enable systemd systemd-journal)
+ $(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}/$(get_udevdir)"/rules.d
+ )
+
+ if ! multilib_is_native_abi; then
+ # disable all the modules and stuff
+ myconf+=(
+ --disable-oss-output
+ --disable-alsa
+ --disable-lirc
+ --disable-jack
+ --disable-avahi
+ --disable-gconf
+ --disable-gtk3
+ --disable-samplerate
+ --disable-bluez4
+ --disable-bluez5
+ --disable-udev
+ --disable-systemd
+ --disable-openssl
+ --disable-orc
+ --disable-webrtc-aec
+ --disable-xen
+ --without-fftw
+
+ # tests involve random modules, so just do them for the native
+ --disable-default-build-tests
+
+ # hack around unnecessary checks
+ # (results don't matter, we're not building anything using it)
+ ac_cv_lib_ltdl_lt_dladvise_init=yes
+ --with-database=simple
+ LIBSPEEX_CFLAGS=' '
+ LIBSPEEX_LIBS=' '
+ )
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ emake
+ else
+ local targets=( libpulse.la libpulse-simple.la )
+ use glib && targets+=( libpulse-mainloop-glib.la )
+ emake -C src ${targets[@]}
+ fi
+}
+
+src_compile() {
+ multilib-minimal_src_compile
+
+ if use doc; then
+ pushd doxygen
+ doxygen doxygen.conf
+ popd
+ fi
+}
+
+multilib_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.
+ if multilib_is_native_abi; then
+ emake -C src check
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
+ else
+ local targets=( libpulse.la libpulse-simple.la )
+ use glib && targets+=( libpulse-mainloop-glib.la )
+ emake DESTDIR="${D}" install-pkgconfigDATA
+ emake DESTDIR="${D}" -C src \
+ install-libLTLIBRARIES \
+ lib_LTLIBRARIES="${targets[*]}" \
+ install-pulseincludeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ # 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"
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ fi
+
+ use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
+
+ dodoc NEWS README todo
+
+ if use doc; then
+ pushd doxygen/html
+ dohtml *
+ popd
+ fi
+
+ # Create the state directory
+ use prefix || diropts -o pulse -g pulse -m0755
+
+ # We need /var/run/pulse, bug #442852
+ use system-wide && systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
+
+ # Prevent warnings when system-wide is not used, bug #447694
+ use system-wide || rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use system-wide; then
+ elog "You have enabled the 'system-wide' USE flag for pulseaudio."
+ elog "This mode should only be used on headless servers, embedded systems,"
+ elog "or thin clients. It will usually require manual configuration, and is"
+ elog "incompatible with many expected pulseaudio features."
+ elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
+ elog "For more information, see"
+ elog " http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
+ elog " http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
+ elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
+ 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 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
+}
diff --git a/media-sound/pulseaudio/pulseaudio-5.0-r7.ebuild b/media-sound/pulseaudio/pulseaudio-5.0-r7.ebuild
new file mode 100644
index 000000000000..731060b641f1
--- /dev/null
+++ b/media-sound/pulseaudio/pulseaudio-5.0-r7.ebuild
@@ -0,0 +1,367 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools bash-completion-r1 eutils flag-o-matic gnome2-utils linux-info readme.gentoo systemd user versionator udev multilib-minimal
+
+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="~alpha amd64 arm hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# +alsa-plugin as discussed in bug #519530
+IUSE="+alsa +alsa-plugin +asyncns 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 zeroconf"
+
+# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
+REQUIRED_USE="bluetooth? ( dbus )
+ udev? ( || ( alsa oss ) )"
+
+# libpcre needed in some cases, bug #472228
+RDEPEND="
+ || (
+ elibc_glibc? ( virtual/libc )
+ elibc_uclibc? ( virtual/libc )
+ dev-libs/libpcre
+ )
+ >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
+ X? (
+ >=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
+ x11-libs/libSM[${MULTILIB_USEDEP}]
+ x11-libs/libICE[${MULTILIB_USEDEP}]
+ x11-libs/libXtst[${MULTILIB_USEDEP}]
+ )
+ caps? ( >=sys-libs/libcap-2.22-r2[${MULTILIB_USEDEP}] )
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
+ alsa? ( >=media-libs/alsa-lib-1.0.19 )
+ glib? ( >=dev-libs/glib-2.4.0[${MULTILIB_USEDEP}] )
+ zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.117 )
+ tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
+ lirc? ( app-misc/lirc )
+ dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:3 )
+ gnome? ( >=gnome-base/gconf-2.4.0 )
+ bluetooth? (
+ net-wireless/bluez:=
+ >=sys-apps/dbus-1.0.0
+ media-libs/sbc
+ )
+ asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
+ udev? ( >=virtual/udev-143[hwdb(+)] )
+ realtime? ( sys-auth/rtkit )
+ equalizer? ( sci-libs/fftw:3.0 )
+ orc? ( >=dev-lang/orc-0.4.15 )
+ ssl? ( dev-libs/openssl:0 )
+ >=media-libs/speex-1.2_rc1
+ gdbm? ( sys-libs/gdbm )
+ webrtc-aec? ( media-libs/webrtc-audio-processing )
+ xen? ( app-emulation/xen-tools )
+ systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
+ dev-libs/json-c[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20131008-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )
+ dev-libs/libltdl:0
+"
+# it's a valid RDEPEND, libltdl.so is used for native abi
+
+DEPEND="${RDEPEND}
+ sys-devel/m4
+ doc? ( app-doc/doxygen )
+ test? ( dev-libs/check )
+ X? (
+ x11-proto/xproto[${MULTILIB_USEDEP}]
+ >=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
+ )
+ dev-libs/libatomic_ops
+ virtual/pkgconfig
+ system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
+ dev-util/intltool
+ >=sys-devel/gettext-0.18.1
+"
+# This is a PDEPEND to avoid a circular dep
+PDEPEND="alsa? ( alsa-plugin? (
+ >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}]
+) )"
+
+# 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] ) )
+ system-wide? (
+ alsa? ( media-sound/alsa-utils )
+ bluetooth? ( net-wireless/bluez:= )
+ )
+"
+
+pkg_pretend() {
+ CONFIG_CHECK="~HIGH_RES_TIMERS"
+ WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
+ check_extra_config
+
+ if linux_config_exists; then
+ local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
+ if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
+ ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
+ ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
+ fi
+ fi
+}
+
+pkg_setup() {
+ gnome2_environment_reset
+ linux-info_pkg_setup
+
+ enewgroup audio 18 # Just make sure it exists
+
+ if use system-wide; then
+ enewgroup pulse-access
+ enewgroup pulse
+ enewuser pulse -1 -1 /var/run/pulse pulse,audio
+ fi
+}
+
+src_prepare() {
+ # Skip test that cannot work with sandbox, bug #501846
+ sed -i -e '/lock-autospawn-test/d' src/Makefile.am || die
+
+ # Fix CVE-2014-3970, bug #512516 (from 'master')
+ epatch "${FILESDIR}/${P}-crash-udp.patch"
+
+ # module-switch-on-port-available: Don't switch profiles on uninitialized cards (from 'master')
+ epatch "${FILESDIR}/${P}-module-switch.patch"
+
+ # Fix module-zeroconf-publish crashes, bug #504612 (from 'master')
+ epatch "${FILESDIR}"/${P}-zeroconf-crash-{1,2,3}.patch
+
+ # svolume.orc: avoid parameter loading undefined behaviour
+ # orc-0.4.23 triggers a bug on certain volume changes with PA, leading to distorted sounds
+ # http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-January/022905.html
+ # Gentoo bug 534144
+ epatch "${FILESDIR}"/svolume-fix_param_loading_undefined_beh.patch
+
+ epatch_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ if use gdbm; then
+ myconf+=( --with-database=gdbm )
+ #elif use tdb; then
+ # myconf+=( --with-database=tdb )
+ else
+ myconf+=( --with-database=simple )
+ fi
+
+ if use bluetooth; then
+ if has_version '<net-wireless/bluez-5'; then
+ myconf+=( --disable-bluez5 --enable-bluez4 )
+ else
+ myconf+=( --enable-bluez5 --disable-bluez4 )
+ fi
+ else
+ myconf+=( --disable-bluez5 --disable-bluez4 )
+ fi
+
+ myconf+=(
+ --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 zeroconf avahi)
+ $(use_enable dbus)
+ $(use_enable gnome gconf)
+ $(use_enable gtk gtk3)
+ $(use_enable libsamplerate samplerate)
+ $(use_enable orc)
+ $(use_enable X x11)
+ $(use_enable test default-build-tests)
+ $(use_enable udev)
+ $(use_enable systemd)
+ $(use_enable systemd systemd-journal)
+ $(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}/$(get_udevdir)"/rules.d
+ )
+
+ if ! multilib_is_native_abi; then
+ # disable all the modules and stuff
+ myconf+=(
+ --disable-oss-output
+ --disable-alsa
+ --disable-lirc
+ --disable-jack
+ --disable-avahi
+ --disable-gconf
+ --disable-gtk3
+ --disable-samplerate
+ --disable-bluez4
+ --disable-bluez5
+ --disable-udev
+ --disable-systemd
+ --disable-openssl
+ --disable-orc
+ --disable-webrtc-aec
+ --disable-xen
+ --without-fftw
+
+ # tests involve random modules, so just do them for the native
+ --disable-default-build-tests
+
+ # hack around unnecessary checks
+ # (results don't matter, we're not building anything using it)
+ ac_cv_lib_ltdl_lt_dladvise_init=yes
+ --with-database=simple
+ LIBSPEEX_CFLAGS=' '
+ LIBSPEEX_LIBS=' '
+ )
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ emake
+ else
+ local targets=( libpulse.la libpulse-simple.la )
+ use glib && targets+=( libpulse-mainloop-glib.la )
+ emake -C src libpulse{,dsp,-simple,-mainloop-glib}.la
+ fi
+}
+
+src_compile() {
+ multilib-minimal_src_compile
+
+ if use doc; then
+ pushd doxygen
+ doxygen doxygen.conf
+ popd
+ fi
+}
+
+multilib_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.
+ if multilib_is_native_abi; then
+ emake -C src check
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
+ else
+ local targets=( libpulse.la libpulse-simple.la )
+ use glib && targets+=( libpulse-mainloop-glib.la )
+ emake DESTDIR="${D}" install-pkgconfigDATA
+ emake DESTDIR="${D}" -C src \
+ install-libLTLIBRARIES \
+ install-padsplibLTLIBRARIES \
+ lib_LTLIBRARIES="${targets[*]}" \
+ install-pulseincludeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ # 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 zeroconf AVAHI) \
+ $(use_define alsa) \
+ $(use_define bluetooth) \
+ $(use_define udev) \
+ "${FILESDIR}/pulseaudio.init.d-5" \
+ > "${T}/pulseaudio"
+
+ doinitd "${T}/pulseaudio"
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ fi
+
+ use zeroconf && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
+
+ dodoc NEWS README todo
+
+ if use doc; then
+ pushd doxygen/html
+ dohtml *
+ popd
+ fi
+
+ # Create the state directory
+ use prefix || diropts -o pulse -g pulse -m0755
+
+ # We need /var/run/pulse, bug #442852
+ use system-wide && systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
+
+ # Prevent warnings when system-wide is not used, bug #447694
+ use system-wide || rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use system-wide; then
+ elog "You have enabled the 'system-wide' USE flag for pulseaudio."
+ elog "This mode should only be used on headless servers, embedded systems,"
+ elog "or thin clients. It will usually require manual configuration, and is"
+ elog "incompatible with many expected pulseaudio features."
+ elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
+ elog "For more information, see"
+ elog " http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
+ elog " http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
+ elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
+ 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 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
+}
diff --git a/media-sound/pulseaudio/pulseaudio-6.0.ebuild b/media-sound/pulseaudio/pulseaudio-6.0.ebuild
new file mode 100644
index 000000000000..f23c4d18d182
--- /dev/null
+++ b/media-sound/pulseaudio/pulseaudio-6.0.ebuild
@@ -0,0 +1,382 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools bash-completion-r1 eutils flag-o-matic gnome2-utils linux-info readme.gentoo systemd user versionator udev multilib-minimal
+
+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="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# +alsa-plugin as discussed in bug #519530
+IUSE="+alsa +alsa-plugin +asyncns bluetooth +caps dbus doc equalizer +gdbm +glib
+ gnome gtk ipv6 jack libsamplerate lirc native-headset neon ofono-headset
+ +orc oss qt4 realtime selinux ssl systemd system-wide tcpd test +udev
+ +webrtc-aec +X xen zeroconf"
+
+# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
+REQUIRED_USE="bluetooth? ( dbus )
+ ofono-headset? ( bluetooth )
+ native-headset? ( bluetooth )
+ udev? ( || ( alsa oss ) )"
+
+# libpcre needed in some cases, bug #472228
+RDEPEND="
+ || (
+ elibc_glibc? ( virtual/libc )
+ elibc_uclibc? ( virtual/libc )
+ dev-libs/libpcre
+ )
+ >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
+ X? (
+ >=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
+ >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
+ x11-libs/libSM[${MULTILIB_USEDEP}]
+ x11-libs/libICE[${MULTILIB_USEDEP}]
+ x11-libs/libXtst[${MULTILIB_USEDEP}]
+ )
+ caps? ( >=sys-libs/libcap-2.22-r2[${MULTILIB_USEDEP}] )
+ libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
+ alsa? ( >=media-libs/alsa-lib-1.0.19 )
+ glib? ( >=dev-libs/glib-2.4.0[${MULTILIB_USEDEP}] )
+ zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
+ jack? ( >=media-sound/jack-audio-connection-kit-0.117 )
+ tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
+ lirc? ( app-misc/lirc )
+ dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
+ gtk? ( x11-libs/gtk+:3 )
+ gnome? ( >=gnome-base/gconf-2.4.0 )
+ bluetooth? (
+ net-wireless/bluez:=
+ >=sys-apps/dbus-1.0.0
+ media-libs/sbc
+ )
+ asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
+ udev? ( >=virtual/udev-143[hwdb(+)] )
+ realtime? ( sys-auth/rtkit )
+ equalizer? ( sci-libs/fftw:3.0 )
+ ofono-headset? ( >=net-misc/ofono-1.13 )
+ orc? ( >=dev-lang/orc-0.4.15 )
+ ssl? ( dev-libs/openssl:0 )
+ >=media-libs/speex-1.2_rc1
+ gdbm? ( sys-libs/gdbm )
+ webrtc-aec? ( media-libs/webrtc-audio-processing )
+ xen? ( app-emulation/xen-tools )
+ systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
+ >=dev-libs/json-c-0.11[${MULTILIB_USEDEP}]
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20131008-r1
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )
+ dev-libs/libltdl:0
+ selinux? ( sec-policy/selinux-pulseaudio )
+"
+# it's a valid RDEPEND, libltdl.so is used for native abi
+
+DEPEND="${RDEPEND}
+ sys-devel/m4
+ doc? ( app-doc/doxygen )
+ test? ( dev-libs/check )
+ X? (
+ x11-proto/xproto[${MULTILIB_USEDEP}]
+ >=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
+ )
+ dev-libs/libatomic_ops
+ virtual/pkgconfig
+ system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
+ dev-util/intltool
+ >=sys-devel/gettext-0.18.1
+"
+# This is a PDEPEND to avoid a circular dep
+PDEPEND="alsa? ( alsa-plugin? (
+ >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}]
+) )"
+
+# 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] ) )
+ system-wide? (
+ alsa? ( media-sound/alsa-utils )
+ bluetooth? ( net-wireless/bluez:= )
+ )
+"
+
+pkg_pretend() {
+ CONFIG_CHECK="~HIGH_RES_TIMERS"
+ WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
+ check_extra_config
+
+ if linux_config_exists; then
+ local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
+ if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
+ ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
+ ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
+ fi
+ fi
+}
+
+pkg_setup() {
+ linux-info_pkg_setup
+ gnome2_environment_reset #543364
+
+ enewgroup audio 18 # Just make sure it exists
+
+ if use system-wide; then
+ enewgroup pulse-access
+ enewgroup pulse
+ enewuser pulse -1 -1 /var/run/pulse pulse,audio
+ fi
+}
+
+src_prepare() {
+ # Skip test that cannot work with sandbox, bug #501846
+ sed -i -e '/lock-autospawn-test/d' src/Makefile.am || die
+
+ # Fix CVE-2014-3970, bug #512516 (from 'master')
+ #epatch "${FILESDIR}/${P}-crash-udp.patch"
+
+ # module-switch-on-port-available: Don't switch profiles on uninitialized cards (from 'master')
+ #epatch "${FILESDIR}/${P}-module-switch.patch"
+
+ # Fix module-zeroconf-publish crashes, bug #504612 (from 'master')
+ #epatch "${FILESDIR}"/${P}-zeroconf-crash-{1,2,3}.patch
+
+ epatch_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ if use gdbm; then
+ myconf+=( --with-database=gdbm )
+ #elif use tdb; then
+ # myconf+=( --with-database=tdb )
+ else
+ myconf+=( --with-database=simple )
+ fi
+
+ if use bluetooth; then
+ if multilib_is_native_abi; then
+ if has_version '<net-wireless/bluez-5'; then
+ myconf+=( --disable-bluez5 --enable-bluez4 )
+ else
+ myconf+=( --enable-bluez5 --disable-bluez4
+ $(use_enable native-headset bluez5-native-headset)
+ $(use_enable ofono-headset bluez5-ofono-headset) )
+ fi
+ fi
+ else
+ myconf+=( --disable-bluez5 --disable-bluez4 )
+ fi
+
+ myconf+=(
+ --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 zeroconf avahi)
+ $(use_enable dbus)
+ $(use_enable gnome gconf)
+ $(use_enable gtk gtk3)
+ $(use_enable libsamplerate samplerate)
+ $(use_enable orc)
+ $(use_enable X x11)
+ $(use_enable test default-build-tests)
+ $(use_enable udev)
+ $(use_enable systemd systemd-daemon)
+ $(use_enable systemd systemd-login)
+ $(use_enable systemd systemd-journal)
+ $(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}/$(get_udevdir)"/rules.d
+ --with-systemduserunitdir=$(systemd_get_userunitdir)
+ )
+
+ if ! multilib_is_native_abi; then
+ # disable all the modules and stuff
+ myconf+=(
+ --disable-oss-output
+ --disable-alsa
+ --disable-lirc
+ --disable-jack
+ --disable-avahi
+ --disable-gconf
+ --disable-gtk3
+ --disable-samplerate
+ --disable-bluez4
+ --disable-bluez5
+ --disable-udev
+ --disable-openssl
+ --disable-orc
+ --disable-webrtc-aec
+ --disable-xen
+ --without-fftw
+
+ # tests involve random modules, so just do them for the native
+ --disable-default-build-tests
+
+ # hack around unnecessary checks
+ # (results don't matter, we're not building anything using it)
+ ac_cv_lib_ltdl_lt_dladvise_init=yes
+ --with-database=simple
+ LIBSPEEX_CFLAGS=' '
+ LIBSPEEX_LIBS=' '
+ )
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ emake
+ else
+ local targets=( libpulse.la libpulse-simple.la )
+ use glib && targets+=( libpulse-mainloop-glib.la )
+ emake -C src libpulse{,dsp,-simple,-mainloop-glib}.la
+ fi
+}
+
+src_compile() {
+ multilib-minimal_src_compile
+
+ if use doc; then
+ pushd doxygen
+ doxygen doxygen.conf
+ popd
+ fi
+}
+
+multilib_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.
+ if multilib_is_native_abi; then
+ emake -C src check
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
+ else
+ local targets=( libpulse.la libpulse-simple.la )
+ use glib && targets+=( libpulse-mainloop-glib.la )
+ emake DESTDIR="${D}" install-pkgconfigDATA
+ emake DESTDIR="${D}" -C src \
+ install-libLTLIBRARIES \
+ install-padsplibLTLIBRARIES \
+ lib_LTLIBRARIES="${targets[*]}" \
+ install-pulseincludeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ # 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 zeroconf AVAHI) \
+ $(use_define alsa) \
+ $(use_define bluetooth) \
+ $(use_define udev) \
+ "${FILESDIR}/pulseaudio.init.d-5" \
+ > "${T}/pulseaudio"
+
+ doinitd "${T}/pulseaudio"
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ fi
+
+ use zeroconf && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
+
+ dodoc NEWS README todo
+
+ if use doc; then
+ pushd doxygen/html
+ dohtml *
+ popd
+ fi
+
+ # Create the state directory
+ use prefix || diropts -o pulse -g pulse -m0755
+
+ # We need /var/run/pulse, bug #442852
+ use system-wide && systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
+
+ # Prevent warnings when system-wide is not used, bug #447694
+ use system-wide || rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use system-wide; then
+ elog "You have enabled the 'system-wide' USE flag for pulseaudio."
+ elog "This mode should only be used on headless servers, embedded systems,"
+ elog "or thin clients. It will usually require manual configuration, and is"
+ elog "incompatible with many expected pulseaudio features."
+ elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
+ elog "For more information, see"
+ elog " http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
+ elog " http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
+ elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
+ 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 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
+
+ if use native-headset && use ofono-headset; then
+ elog "You have enabled both native and ofono headset profiles. The runtime decision"
+ elog "which to use is done via the 'headset' argument of module-bluetooth-discover."
+ fi
+
+ if use libsamplerate; then
+ elog "The libsamplerate based resamplers are now deprecated, because they offer no"
+ elog "particular advantage over speex. Upstream suggests disabling them."
+ fi
+}