Update pulseaudio to 6.0 [1].

* Correct some paths in the default config file (default.pa). [1]
* Add run depend freedesktop-sound-theme since pulse tries to run these files.
* Add a small patch to allow 24bit audio formats, it not clear why this is
  disabled by default. [2]
* Add pkg-message with instructions how to set input/output channel.
* The kde start script was merged into the normal x11 start script.

PR:		198567 [1], [2]
Submitted by:	olivierd@ [1], romain@ [2]
This commit is contained in:
Koop Mast 2015-04-15 21:41:25 +00:00
parent ceeab232bd
commit 0a551e4373
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=384072
9 changed files with 126 additions and 175 deletions

View file

@ -1,13 +1,11 @@
# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
# $FreeBSD$
# $MCom: ports/trunk/audio/pulseaudio/Makefile 20031 2014-11-02 21:47:55Z kwm $
#
# !!!NOTE!!! Any PORTVERSION update to this port must be accompanied by
# PORTREVISION bumps of depending ports.
PORTNAME= pulseaudio
PORTVERSION= 5.0
PORTREVISION= 3
PORTVERSION= 6.0
CATEGORIES= audio
MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/
@ -17,8 +15,7 @@ COMMENT= Sound server for UNIX
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LGPL
LIB_DEPENDS= libsamplerate.so:${PORTSDIR}/audio/libsamplerate \
libsndfile.so:${PORTSDIR}/audio/libsndfile \
LIB_DEPENDS= libsndfile.so:${PORTSDIR}/audio/libsndfile \
libspeexdsp.so:${PORTSDIR}/audio/speexdsp \
libfftw3.so:${PORTSDIR}/math/fftw3 \
libfftw3f.so:${PORTSDIR}/math/fftw3-float \
@ -27,11 +24,13 @@ LIB_DEPENDS= libsamplerate.so:${PORTSDIR}/audio/libsamplerate \
libdbus-1.so:${PORTSDIR}/devel/dbus \
libltdl.so:${PORTSDIR}/devel/libltdl \
libck-connector.so:${PORTSDIR}/sysutils/consolekit
RUN_DEPENDS= freedesktop-sound-theme>=0:${PORTSDIR}/audio/freedesktop-sound-theme
USE_GNOME= glib20 intltool
USE_XORG= x11 sm xtst ice
USE_LDCONFIG= yes
USES= cpe execinfo gettext gmake libtool pathfix pkgconfig tar:xz
USES= cpe execinfo gettext gmake libtool pathfix pkgconfig \
shebangfix tar:xz
GNU_CONFIGURE= yes
CONFIGURE_ENV= PTHREAD_LIBS="-lpthread" \
OPENSSL_CFLAGS="-I/usr/include" \
@ -42,6 +41,11 @@ CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
INSTALL_TARGET= install-strip
SHEBANG_FILES= shell-completion/bash/pulseaudio
SHEBANG_LANG= bash
bash_CMD= ${SETENV} bash
SUB_FILES= pkg-message
CONFIGURE_ARGS= --localstatedir=/var \
--with-database=simple \
--without-caps \
@ -57,7 +61,7 @@ USERS= pulse
GROUPS= pulse pulse-access pulse-rt
OPTIONS_SUB= yes
OPTIONS_DEFINE= JACK AVAHI GCONF ALSA SIMD
OPTIONS_DEFINE= JACK AVAHI GCONF ALSA SIMD BASH ZSH
OPTIONS_DEFAULT=AVAHI SIMD
JACK_CONFIGURE_ENABLE= jack
JACK_LIB_DEPENDS= libjack.so:${PORTSDIR}/audio/jack
@ -69,6 +73,7 @@ ALSA_CONFIGURE_ENABLE= alsa
ALSA_LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib
SIMD_CONFIGURE_ENABLE= orc
SIMD_LIB_DEPENDS= liborc-0.4.so:${PORTSDIR}/devel/orc
ZSH_CONFIGURE_DISABLE= --without-zsh-completion-dir
PULSE_VERSION= ${PORTVERSION}
PLIST_SUB= PULSE_VERSION=${PULSE_VERSION}
@ -87,5 +92,8 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/src/${ii} \
${STAGEDIR}${PREFIX}/etc/pulse/${ii}.sample
.endfor
.if !${PORT_OPTIONS:MBASH}
@${RM} -rf ${STAGEDIR}${PREFIX}/etc/bash_completion.d
.endif
.include <bsd.port.post.mk>

View file

@ -1,2 +1,2 @@
SHA256 (pulseaudio-5.0.tar.xz) = 99c13a8b1249ddbd724f195579df79484e9af6418cecf6a15f003a7f36caf939
SIZE (pulseaudio-5.0.tar.xz) = 1455428
SHA256 (pulseaudio-6.0.tar.xz) = b50640e0b80b1607600accfad2e45aabb79d379bf6354c9671efa2065477f6f6
SIZE (pulseaudio-6.0.tar.xz) = 1469248

View file

@ -1,17 +1,26 @@
--- src/daemon/default.pa.in.orig 2011-10-21 15:14:14.000000000 +0200
+++ src/daemon/default.pa.in 2011-10-21 15:15:21.000000000 +0200
@@ -27,10 +27,10 @@
--- src/daemon/default.pa.in.orig 2015-02-12 14:10:35 UTC
+++ src/daemon/default.pa.in
@@ -26,10 +26,10 @@ ifelse(@OS_IS_WIN32@, 1, [dnl
load-sample x11-bell %WINDIR%\Media\ding.wav
load-sample-dir-lazy %WINDIR%\Media\*.wav
], [dnl
-#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
-#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
-#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
-#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
+#load-sample-lazy x11-bell %%LOCALBASE%%/share/sounds/gtk-events/activate.wav
+#load-sample-lazy pulse-hotplug %%LOCALBASE%%/share/sounds/startup3.wav
+#load-sample-lazy pulse-coldplug %%LOCALBASE%%/share/sounds/startup3.wav
+#load-sample-lazy pulse-access %%LOCALBASE/share/sounds/generic.wav
-#load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/bell.oga
-#load-sample-lazy pulse-hotplug /usr/share/sounds/freedesktop/stereo/device-added.oga
-#load-sample-lazy pulse-coldplug /usr/share/sounds/freedesktop/stereo/device-added.oga
-#load-sample-lazy pulse-access /usr/share/sounds/freedesktop/stereo/message.oga
+#load-sample-lazy x11-bell %%LOCALBASE%%/share/sounds/freedesktop/stereo/bell.oga
+#load-sample-lazy pulse-hotplug %%LOCALBASE%%/share/sounds/freedesktop/stereo/device-added.oga
+#load-sample-lazy pulse-coldplug %%LOCALBASE%%/share/sounds/freedesktop/stereo/device-added.oga
+#load-sample-lazy pulse-access %%LOCALBASE%%/share/sounds/freedesktop/stereo/message.oga
])dnl
.fail
@@ -40,7 +40,7 @@ load-module module-stream-restore
load-module module-card-restore
### Automatically augment property information from .desktop files
-### stored in /usr/share/application
+### stored in %%LOCALBASE%%/share/application
load-module module-augment-properties
### Should be after module-*-restore but before module-*-detect

View file

@ -1,6 +1,9 @@
--- src/modules/oss/oss-util.c.orig 2007-11-08 21:45:25.000000000 -0500
+++ src/modules/oss/oss-util.c 2008-01-09 17:00:45.000000000 -0500
@@ -44,6 +44,22 @@
Support 24bit audio see Comment 6 of
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567
--- src/modules/oss/oss-util.c.orig 2015-02-12 15:10:35.000000000 +0100
+++ src/modules/oss/oss-util.c 2015-04-15 14:41:41.512557000 +0200
@@ -39,6 +39,22 @@
#include "oss-util.h"
@ -23,3 +26,14 @@
int pa_oss_open(const char *device, int *mode, int* pcaps) {
int fd = -1;
int caps;
@@ -164,8 +180,8 @@
[PA_SAMPLE_FLOAT32BE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S32LE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S32BE] = AFMT_QUERY, /* not supported */
- [PA_SAMPLE_S24LE] = AFMT_QUERY, /* not supported */
- [PA_SAMPLE_S24BE] = AFMT_QUERY, /* not supported */
+ [PA_SAMPLE_S24LE] = AFMT_S24_LE,
+ [PA_SAMPLE_S24BE] = AFMT_S24_BE,
[PA_SAMPLE_S24_32LE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S24_32BE] = AFMT_QUERY, /* not supported */
};

View file

@ -1,12 +0,0 @@
--- src/pulse/thread-mainloop.c.orig 2008-01-01 17:23:28.000000000 -0500
+++ src/pulse/thread-mainloop.c 2008-01-01 17:25:00.000000000 -0500
@@ -27,6 +27,9 @@
#endif
#include <signal.h>
+#ifndef OS_IS_WIN32
+#include <pthread.h>
+#endif
#include <stdio.h>
#ifdef HAVE_POLL_H

View file

@ -1,20 +0,0 @@
--- src/pulse/util.c.orig 2008-01-01 17:29:31.000000000 -0500
+++ src/pulse/util.c 2008-01-01 17:29:00.000000000 -0500
@@ -184,6 +184,17 @@ char *pa_get_binary_name(char *s, size_t
}
#endif
+#ifdef __FreeBSD__
+ {
+ char *rp;
+
+ if ((rp = pa_readlink("/proc/curproc/file"))) {
+ pa_strlcpy(s, pa_path_get_filename(rp), l);
+ pa_xfree(rp);
+ return s;
+ }
+ }
+#endif
#if defined(HAVE_SYS_PRCTL_H) && defined(PR_GET_NAME)
{

View file

@ -1,116 +1,42 @@
--- src/pulsecore/atomic.h.orig 2008-01-23 19:44:20.000000000 -0500
+++ src/pulsecore/atomic.h 2008-03-15 14:48:41.000000000 -0400
@@ -106,6 +106,113 @@ static inline int pa_atomic_ptr_cmpxchg(
return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
}
--- src/pulsecore/atomic.h.orig 2015-02-12 15:10:35.000000000 +0100
+++ src/pulsecore/atomic.h 2015-03-29 15:54:11.161110000 +0200
@@ -185,39 +185,6 @@
#include <sys/param.h>
#include <machine/atomic.h>
+#elif defined(__FreeBSD__)
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <machine/atomic.h>
+
+#if __FreeBSD_version < 600000
+#if defined(__i386__) || defined(__amd64__)
+#if defined(__amd64__)
+#define atomic_load_acq_64 atomic_load_acq_long
+#endif
+static inline u_int
+atomic_fetchadd_int(volatile u_int *p, u_int v)
+{
+ __asm __volatile(
+ " " __XSTRING(MPLOCKED) " "
+ " xaddl %0, %1 ; "
+ "# atomic_fetchadd_int"
+ : "+r" (v),
+ "=m" (*p)
+ : "m" (*p));
+
+ return (v);
+}
+#elif defined(__sparc64__)
+#define atomic_load_acq_64 atomic_load_acq_long
+#define atomic_fetchadd_int atomic_add_int
+#elif defined(__ia64__)
+#define atomic_load_acq_64 atomic_load_acq_long
+static inline uint32_t
+atomic_fetchadd_int(volatile uint32_t *p, uint32_t v)
+{
+ uint32_t value;
+
+ do {
+ value = *p;
+ } while (!atomic_cmpset_32(p, value, value + v));
+ return (value);
+}
+#endif
+#endif
+
+typedef struct pa_atomic {
+ volatile unsigned long value;
+} pa_atomic_t;
+
+#define PA_ATOMIC_INIT(v) { .value = (v) }
+
+static inline int pa_atomic_load(const pa_atomic_t *a) {
+ return (int) atomic_load_acq_int((unsigned int *) &a->value);
+}
+
+static inline void pa_atomic_store(pa_atomic_t *a, int i) {
+ atomic_store_rel_int((unsigned int *) &a->value, i);
+}
+
+static inline int pa_atomic_add(pa_atomic_t *a, int i) {
+ return atomic_fetchadd_int((unsigned int *) &a->value, i);
+}
+
+static inline int pa_atomic_sub(pa_atomic_t *a, int i) {
+ return atomic_fetchadd_int((unsigned int *) &a->value, -(i));
+}
+
+static inline int pa_atomic_inc(pa_atomic_t *a) {
+ return atomic_fetchadd_int((unsigned int *) &a->value, 1);
+}
+
+static inline int pa_atomic_dec(pa_atomic_t *a) {
+ return atomic_fetchadd_int((unsigned int *) &a->value, -1);
+}
+
+static inline int pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
+ return atomic_cmpset_int((unsigned int *) &a->value, old_i, new_i);
+}
+
+typedef struct pa_atomic_ptr {
+ volatile unsigned long value;
+} pa_atomic_ptr_t;
+
+#define PA_ATOMIC_PTR_INIT(v) { .value = (unsigned long) (v) }
+
+static inline void* pa_atomic_ptr_load(const pa_atomic_ptr_t *a) {
+#ifdef atomic_load_acq_64
+ return (void*) atomic_load_acq_ptr((unsigned long *) &a->value);
+#else
+ return (void*) atomic_load_acq_ptr((unsigned int *) &a->value);
+#endif
+}
+
+static inline void pa_atomic_ptr_store(pa_atomic_ptr_t *a, void *p) {
+#ifdef atomic_load_acq_64
+ atomic_store_rel_ptr(&a->value, (unsigned long) p);
+#else
+ atomic_store_rel_ptr((unsigned int *) &a->value, (unsigned int) p);
+#endif
+}
+
+static inline int pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
+#ifdef atomic_load_acq_64
+ return atomic_cmpset_ptr(&a->value, (unsigned long) old_p, (unsigned long) new_p);
+#else
+ return atomic_cmpset_ptr((unsigned int *) &a->value, (unsigned int) old_p, (unsigned int) new_p);
+#endif
+}
+
#elif defined(__GNUC__) && (defined(__amd64__) || defined(__x86_64__))
#error "The native atomic operations implementation for AMD64 has not been tested. libatomic_ops is known to not work properly on AMD64 and your gcc version is too old for the gcc-builtin atomic ops support. You have three options now: make the native atomic operations implementation for AMD64 work, fix libatomic_ops, or upgrade your GCC."
-#if __FreeBSD_version < 600000
-#if defined(__i386__) || defined(__amd64__)
-#if defined(__amd64__)
-#define atomic_load_acq_64 atomic_load_acq_long
-#endif
-static inline u_int atomic_fetchadd_int(volatile u_int *p, u_int v) {
- __asm __volatile(
- " " __XSTRING(MPLOCKED) " "
- " xaddl %0, %1 ; "
- "# atomic_fetchadd_int"
- : "+r" (v),
- "=m" (*p)
- : "m" (*p));
-
- return (v);
-}
-#elif defined(__sparc64__)
-#define atomic_load_acq_64 atomic_load_acq_long
-#define atomic_fetchadd_int atomic_add_int
-#elif defined(__ia64__)
-#define atomic_load_acq_64 atomic_load_acq_long
-static inline uint32_t
-atomic_fetchadd_int(volatile uint32_t *p, uint32_t v) {
- uint32_t value;
-
- do {
- value = *p;
- } while (!atomic_cmpset_32(p, value, value + v));
- return (value);
-}
-#endif
-#endif
-
typedef struct pa_atomic {
volatile unsigned long value;
} pa_atomic_t;

View file

@ -0,0 +1,15 @@
Pulseaudio doesn't know about the hw.snd.default_unit=3 sysctl for the
FreeBSD OSS driver that is used to select the active input/output. So
for Pulseaudio we also need to tell it which input/output to use. The
difference is that Pulseaudio has separate input and output configure lines.
To change the default sink (output):
# pacmd set-default-sink 3
To change the default source (input):
# pacmd set-default-source 3
This can also be set in %%ETCDIR%%/pulse/default.pa
Replace the number '3' with the new default your want to set.

View file

@ -11,20 +11,27 @@ bin/pasuspender
bin/pax11publish
bin/pulseaudio
bin/qpaeq
bin/start-pulseaudio-kde
bin/start-pulseaudio-x11
etc/bash_completion.d/pulseaudio-bash-completion.sh
%%BASH%%etc/bash_completion.d/pacat
%%BASH%%etc/bash_completion.d/pacmd
%%BASH%%etc/bash_completion.d/pactl
%%BASH%%etc/bash_completion.d/padsp
%%BASH%%etc/bash_completion.d/paplay
%%BASH%%etc/bash_completion.d/parec
%%BASH%%etc/bash_completion.d/parecord
%%BASH%%etc/bash_completion.d/pasuspender
%%BASH%%etc/bash_completion.d/pulseaudio
etc/dbus-1/system.d/pulseaudio-system.conf
@sample etc/pulse/client.conf.sample
@sample etc/pulse/daemon.conf.sample
@sample etc/pulse/default.pa.sample
@sample etc/pulse/system.pa.sample
etc/xdg/autostart/pulseaudio.desktop
etc/xdg/autostart/pulseaudio-kde.desktop
include/pulse/cdecl.h
include/pulse/channelmap.h
include/pulse/context.h
include/pulse/def.h
include/pulse/direction.h
include/pulse/error.h
include/pulse/ext-device-manager.h
include/pulse/ext-device-restore.h
@ -62,7 +69,7 @@ lib/libpulse-simple.so.0
lib/libpulse-simple.so.0.1.0
lib/libpulse.so
lib/libpulse.so.0
lib/libpulse.so.0.17.3
lib/libpulse.so.0.18.0
lib/libpulsecore-%%PULSE_VERSION%%.so
%%AVAHI%%lib/pulse-%%PULSE_VERSION%%/modules/libavahi-wrap.so
lib/pulse-%%PULSE_VERSION%%/modules/module-device-manager.so
@ -167,7 +174,6 @@ man/man1/paplay.1.gz
man/man1/pasuspender.1.gz
man/man1/pax11publish.1.gz
man/man1/pulseaudio.1.gz
man/man1/start-pulseaudio-kde.1.gz
man/man1/start-pulseaudio-x11.1.gz
man/man5/default.pa.5.gz
man/man5/pulse-cli-syntax.5.gz
@ -217,6 +223,7 @@ man/man5/pulse-daemon.conf.5.gz
%%ALSA%%share/pulseaudio/alsa-mixer/profile-sets/native-instruments-traktor-audio2.conf
%%ALSA%%share/pulseaudio/alsa-mixer/profile-sets/native-instruments-traktor-audio6.conf
%%ALSA%%share/pulseaudio/alsa-mixer/profile-sets/native-instruments-traktorkontrol-s4.conf
%%ZSH%%share/zsh/site-functions/_pulseaudio
share/locale/as/LC_MESSAGES/pulseaudio.mo
share/locale/bn_IN/LC_MESSAGES/pulseaudio.mo
share/locale/ca/LC_MESSAGES/pulseaudio.mo
@ -244,15 +251,19 @@ share/locale/pl/LC_MESSAGES/pulseaudio.mo
share/locale/pt/LC_MESSAGES/pulseaudio.mo
share/locale/pt_BR/LC_MESSAGES/pulseaudio.mo
share/locale/ru/LC_MESSAGES/pulseaudio.mo
share/locale/sk/LC_MESSAGES/pulseaudio.mo
share/locale/sr/LC_MESSAGES/pulseaudio.mo
share/locale/sr@latin/LC_MESSAGES/pulseaudio.mo
share/locale/sv/LC_MESSAGES/pulseaudio.mo
share/locale/ta/LC_MESSAGES/pulseaudio.mo
share/locale/te/LC_MESSAGES/pulseaudio.mo
share/locale/tr/LC_MESSAGES/pulseaudio.mo
share/locale/uk/LC_MESSAGES/pulseaudio.mo
share/locale/zh_CN/LC_MESSAGES/pulseaudio.mo
share/locale/zh_TW/LC_MESSAGES/pulseaudio.mo
share/vala/vapi/libpulse-mainloop-glib.deps
share/vala/vapi/libpulse-mainloop-glib.vapi
share/vala/vapi/libpulse-simple.deps
share/vala/vapi/libpulse-simple.vapi
share/vala/vapi/libpulse.deps
share/vala/vapi/libpulse.vapi