summaryrefslogtreecommitdiff
path: root/audio/pulseaudio
diff options
context:
space:
mode:
authorjmcneill <jmcneill>2008-12-18 14:42:56 +0000
committerjmcneill <jmcneill>2008-12-18 14:42:56 +0000
commit713e6ba592034419ea2563fd9a1a01e84e586ee8 (patch)
tree96bdc4b30032d005d3d65ec7104eeb9999835774 /audio/pulseaudio
parent0d7de98cdd1871b4d0f1d9dd5f1ab628da36deb9 (diff)
downloadpkgsrc-713e6ba592034419ea2563fd9a1a01e84e586ee8.tar.gz
Import pulseaudio version 0.9.13.
PulseAudio is a sound server for POSIX and Win32 systems. A sound server is basically a proxy for your sound applications. It allows you to do advanced operations on your sound data as it passes between your application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server.
Diffstat (limited to 'audio/pulseaudio')
-rw-r--r--audio/pulseaudio/DESCR6
-rw-r--r--audio/pulseaudio/Makefile76
-rw-r--r--audio/pulseaudio/PLIST144
-rw-r--r--audio/pulseaudio/distinfo11
-rw-r--r--audio/pulseaudio/patches/patch-aa150
-rw-r--r--audio/pulseaudio/patches/patch-ab14
-rw-r--r--audio/pulseaudio/patches/patch-ac20
-rw-r--r--audio/pulseaudio/patches/patch-ad38
-rw-r--r--audio/pulseaudio/patches/patch-ae30
-rw-r--r--audio/pulseaudio/patches/patch-af13
10 files changed, 502 insertions, 0 deletions
diff --git a/audio/pulseaudio/DESCR b/audio/pulseaudio/DESCR
new file mode 100644
index 00000000000..2cb38353a10
--- /dev/null
+++ b/audio/pulseaudio/DESCR
@@ -0,0 +1,6 @@
+PulseAudio is a sound server for POSIX and Win32 systems. A sound server is
+basically a proxy for your sound applications. It allows you to do advanced
+operations on your sound data as it passes between your application and your
+hardware. Things like transferring the audio to a different machine, changing
+the sample format or channel count and mixing several sounds into one are
+easily achieved using a sound server.
diff --git a/audio/pulseaudio/Makefile b/audio/pulseaudio/Makefile
new file mode 100644
index 00000000000..1c53f3722e4
--- /dev/null
+++ b/audio/pulseaudio/Makefile
@@ -0,0 +1,76 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+#
+
+DISTNAME= pulseaudio-0.9.13
+CATEGORIES= audio
+MASTER_SITES= http://0pointer.de/lennart/projects/pulseaudio/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://www.pulseaudio.org/
+COMMENT= Sound server for POSIX and Win32 systems
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_TOOLS+= pkg-config gmake msgfmt intltool perl
+USE_DIRS+= xdg-1.4
+
+PKGCONFIG_OVERRIDE+= libpulse-browse.pc.in
+PKGCONFIG_OVERRIDE+= libpulse-mainloop-glib.pc.in
+PKGCONFIG_OVERRIDE+= libpulse-simple.pc.in
+PKGCONFIG_OVERRIDE+= libpulse.pc.in
+
+PULSE_USER?= pulse
+PULSE_GROUP?= pulse
+PULSE_GROUP_REALTIME?= pulsert
+PULSE_GROUP_ACCESS?= pulseacc
+
+BUILD_DEFS+= VARBASE
+
+PKG_SYSCONFSUBDIR= pulse
+EGDIR= ${PREFIX}/share/examples/pulseaudio
+CONF_FILES= ${EGDIR}/client.conf ${PKG_SYSCONFDIR}/client.conf
+CONF_FILES+= ${EGDIR}/daemon.conf ${PKG_SYSCONFDIR}/daemon.conf
+CONF_FILES+= ${EGDIR}/default.pa ${PKG_SYSCONFDIR}/default.pa
+CONF_FILES+= ${EGDIR}/system.pa ${PKG_SYSCONFDIR}/system.pa
+
+CONFIGURE_ARGS+= --localstatedir=${VARBASE}
+CONFIGURE_ARGS+= --with-system-user=${PULSE_USER}
+CONFIGURE_ARGS+= --with-system-group=${PULSE_GROUP}
+CONFIGURE_ARGS+= --with-realtime-group=${PULSE_GROUP_REALTIME}
+CONFIGURE_ARGS+= --with-access-group=${PULSE_GROUP_ACCESS}
+MAKE_ENV+= EGDIR=${EGDIR}
+
+SUBST_CLASSES+= padsp
+SUBST_MESSAGE.padsp= Fixing LD_PRELOAD paths
+SUBST_STAGE.padsp= post-build
+SUBST_FILES.padsp= src/utils/padsp
+SUBST_SED.padsp= -e 's@libpulsedsp\.so@${PREFIX}/lib/&@'
+
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "NetBSD"
+# broken test for TLS
+CONFIGURE_ENV+= cc_cv_tls___thread=no
+.endif
+
+PKG_GROUPS= ${PULSE_GROUP}
+PKG_GROUPS+= ${PULSE_GROUP_REALTIME}
+PKG_GROUPS+= ${PULSE_GROUP_ACCESS}
+PKG_USERS= ${PULSE_USER}:${PULSE_GROUP}
+
+BUILDLINK_TRANSFORM+= rm:-Wl,--gc-sections
+
+.include "../../audio/libsamplerate/buildlink3.mk"
+.include "../../audio/libsndfile/buildlink3.mk"
+.include "../../audio/speex/buildlink3.mk"
+.include "../../databases/gdbm/buildlink3.mk"
+.include "../../devel/GConf/schemas.mk"
+.include "../../devel/libltdl/buildlink3.mk"
+.include "../../devel/liboil/buildlink3.mk"
+.include "../../security/policykit/buildlink3.mk"
+.include "../../sysutils/dbus/buildlink3.mk"
+.include "../../sysutils/hal/buildlink3.mk"
+.include "../../x11/libICE/buildlink3.mk"
+.include "../../x11/libSM/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../mk/oss.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/pulseaudio/PLIST b/audio/pulseaudio/PLIST
new file mode 100644
index 00000000000..994b15e1188
--- /dev/null
+++ b/audio/pulseaudio/PLIST
@@ -0,0 +1,144 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+bin/esdcompat
+bin/pacat
+bin/pacmd
+bin/pactl
+bin/padsp
+bin/paplay
+bin/parec
+bin/pasuspender
+bin/pax11publish
+bin/pulseaudio
+bin/start-pulseaudio-x11
+include/pulse/cdecl.h
+include/pulse/channelmap.h
+include/pulse/context.h
+include/pulse/def.h
+include/pulse/error.h
+include/pulse/ext-stream-restore.h
+include/pulse/gccmacro.h
+include/pulse/glib-mainloop.h
+include/pulse/introspect.h
+include/pulse/mainloop-api.h
+include/pulse/mainloop-signal.h
+include/pulse/mainloop.h
+include/pulse/operation.h
+include/pulse/proplist.h
+include/pulse/pulseaudio.h
+include/pulse/sample.h
+include/pulse/scache.h
+include/pulse/simple.h
+include/pulse/stream.h
+include/pulse/subscribe.h
+include/pulse/thread-mainloop.h
+include/pulse/timeval.h
+include/pulse/utf8.h
+include/pulse/util.h
+include/pulse/version.h
+include/pulse/volume.h
+include/pulse/xmalloc.h
+lib/libpulse-mainloop-glib.la
+lib/libpulse-simple.la
+lib/libpulse.la
+lib/libpulsecore.la
+lib/libpulsedsp.so
+lib/pkgconfig/libpulse-mainloop-glib.pc
+lib/pkgconfig/libpulse-simple.pc
+lib/pkgconfig/libpulse.pc
+lib/pulse-0.9/modules/libauth-cookie.so
+lib/pulse-0.9/modules/libauthkey.so
+lib/pulse-0.9/modules/libcli.so
+lib/pulse-0.9/modules/libdbus-util.so
+lib/pulse-0.9/modules/libiochannel.so
+lib/pulse-0.9/modules/libioline.so
+lib/pulse-0.9/modules/libipacl.so
+lib/pulse-0.9/modules/liboss-util.so
+lib/pulse-0.9/modules/libpacket.so
+lib/pulse-0.9/modules/libparseaddr.so
+lib/pulse-0.9/modules/libpdispatch.so
+lib/pulse-0.9/modules/libprotocol-cli.so
+lib/pulse-0.9/modules/libprotocol-esound.so
+lib/pulse-0.9/modules/libprotocol-http.so
+lib/pulse-0.9/modules/libprotocol-native.so
+lib/pulse-0.9/modules/libprotocol-simple.so
+lib/pulse-0.9/modules/libpstream-util.so
+lib/pulse-0.9/modules/libpstream.so
+lib/pulse-0.9/modules/librtp.so
+lib/pulse-0.9/modules/libsocket-client.so
+lib/pulse-0.9/modules/libsocket-server.so
+lib/pulse-0.9/modules/libsocket-util.so
+lib/pulse-0.9/modules/libstrlist.so
+lib/pulse-0.9/modules/libtagstruct.so
+lib/pulse-0.9/modules/libx11prop.so
+lib/pulse-0.9/modules/libx11wrap.so
+lib/pulse-0.9/modules/module-always-sink.so
+lib/pulse-0.9/modules/module-cli-protocol-tcp.so
+lib/pulse-0.9/modules/module-cli-protocol-unix.so
+lib/pulse-0.9/modules/module-cli.so
+lib/pulse-0.9/modules/module-combine.so
+lib/pulse-0.9/modules/module-console-kit.so
+lib/pulse-0.9/modules/module-default-device-restore.so
+lib/pulse-0.9/modules/module-detect.so
+lib/pulse-0.9/modules/module-device-restore.so
+lib/pulse-0.9/modules/module-esound-compat-spawnfd.so
+lib/pulse-0.9/modules/module-esound-compat-spawnpid.so
+lib/pulse-0.9/modules/module-esound-protocol-tcp.so
+lib/pulse-0.9/modules/module-esound-protocol-unix.so
+lib/pulse-0.9/modules/module-esound-sink.so
+lib/pulse-0.9/modules/module-gconf.so
+lib/pulse-0.9/modules/module-hal-detect.so
+lib/pulse-0.9/modules/module-http-protocol-tcp.so
+lib/pulse-0.9/modules/module-http-protocol-unix.so
+lib/pulse-0.9/modules/module-ladspa-sink.so
+lib/pulse-0.9/modules/module-match.so
+lib/pulse-0.9/modules/module-native-protocol-fd.so
+lib/pulse-0.9/modules/module-native-protocol-tcp.so
+lib/pulse-0.9/modules/module-native-protocol-unix.so
+lib/pulse-0.9/modules/module-null-sink.so
+lib/pulse-0.9/modules/module-oss.so
+lib/pulse-0.9/modules/module-pipe-sink.so
+lib/pulse-0.9/modules/module-pipe-source.so
+lib/pulse-0.9/modules/module-position-event-sounds.so
+lib/pulse-0.9/modules/module-remap-sink.so
+lib/pulse-0.9/modules/module-rescue-streams.so
+lib/pulse-0.9/modules/module-rtp-recv.so
+lib/pulse-0.9/modules/module-rtp-send.so
+lib/pulse-0.9/modules/module-simple-protocol-tcp.so
+lib/pulse-0.9/modules/module-simple-protocol-unix.so
+lib/pulse-0.9/modules/module-sine.so
+lib/pulse-0.9/modules/module-stream-restore.so
+lib/pulse-0.9/modules/module-suspend-on-idle.so
+lib/pulse-0.9/modules/module-tunnel-sink.so
+lib/pulse-0.9/modules/module-tunnel-source.so
+lib/pulse-0.9/modules/module-volume-restore.so
+lib/pulse-0.9/modules/module-x11-bell.so
+lib/pulse-0.9/modules/module-x11-publish.so
+lib/pulse-0.9/modules/module-x11-xsmp.so
+libexec/pulse/gconf-helper
+man/man1/esdcompat.1
+man/man1/pabrowse.1
+man/man1/pacat.1
+man/man1/pacmd.1
+man/man1/pactl.1
+man/man1/padsp.1
+man/man1/paplay.1
+man/man1/pasuspender.1
+man/man1/pax11publish.1
+man/man1/pulseaudio.1
+man/man5/default.pa.5
+man/man5/pulse-client.conf.5
+man/man5/pulse-daemon.conf.5
+share/gnome/autostart/pulseaudio.desktop
+share/examples/pulseaudio/client.conf
+share/examples/pulseaudio/daemon.conf
+share/examples/pulseaudio/default.pa
+share/examples/pulseaudio/system.pa
+share/PolicyKit/policy/org.pulseaudio.policy
+share/locale/de/LC_MESSAGES/pulseaudio.mo
+share/locale/el/LC_MESSAGES/pulseaudio.mo
+share/locale/fr/LC_MESSAGES/pulseaudio.mo
+share/locale/sv/LC_MESSAGES/pulseaudio.mo
+@dirrm libexec/pulse
+@dirrm lib/pulse-0.9/modules
+@dirrm lib/pulse-0.9
+@dirrm include/pulse
diff --git a/audio/pulseaudio/distinfo b/audio/pulseaudio/distinfo
new file mode 100644
index 00000000000..f60131b728d
--- /dev/null
+++ b/audio/pulseaudio/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+
+SHA1 (pulseaudio-0.9.13.tar.gz) = c8482f1bb42d5213bfdbe2154e1a55b7bc04c915
+RMD160 (pulseaudio-0.9.13.tar.gz) = 07cea9939dfb4fc76f13bf01dfe22ab6d0fd8459
+Size (pulseaudio-0.9.13.tar.gz) = 1308493 bytes
+SHA1 (patch-aa) = f37fadef990c8e8f387e7cc0f9880e40a5ff5e4e
+SHA1 (patch-ab) = b894cf1797a2f02e8131be8abc8250774bfec1ec
+SHA1 (patch-ac) = 8f61cf7c4a6681ab53c9ddf1007acb1bf524fe15
+SHA1 (patch-ad) = 63571597ba707679142b45b2daaffade7f094bb0
+SHA1 (patch-ae) = 1cd31d18c133fdd5e8db59be319ba5b7a45fe0fe
+SHA1 (patch-af) = 31b8564cb91aabb5de5490659e77de984fd1920b
diff --git a/audio/pulseaudio/patches/patch-aa b/audio/pulseaudio/patches/patch-aa
new file mode 100644
index 00000000000..909ad8d15ab
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-aa
@@ -0,0 +1,150 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+
+--- src/utils/padsp.c.orig 2008-10-01 19:05:01.000000000 -0400
++++ src/utils/padsp.c
+@@ -114,7 +114,11 @@ static pthread_mutex_t func_mutex = PTHR
+
+ static PA_LLIST_HEAD(fd_info, fd_infos) = NULL;
+
++#ifdef __NetBSD__
++static int (*_ioctl)(int, u_long, void *) = NULL;
++#else
+ static int (*_ioctl)(int, int, void*) = NULL;
++#endif
+ static int (*_close)(int) = NULL;
+ static int (*_open)(const char *, int, mode_t) = NULL;
+ static FILE* (*_fopen)(const char *path, const char *mode) = NULL;
+@@ -140,6 +144,15 @@ static inline fnptr dlsym_fn(void *handl
+ return (fnptr) (long) dlsym(handle, symbol);
+ }
+
++#ifdef __NetBSD__
++#define LOAD_IOCTL_FUNC() \
++do { \
++ pthread_mutex_lock(&func_mutex); \
++ if (!_ioctl) \
++ _ioctl = (int (*)(int, u_long, void*)) dlsym_fn(RTLD_NEXT, "ioctl"); \
++ pthread_mutex_unlock(&func_mutex); \
++} while(0)
++#else
+ #define LOAD_IOCTL_FUNC() \
+ do { \
+ pthread_mutex_lock(&func_mutex); \
+@@ -147,6 +160,7 @@ do { \
+ _ioctl = (int (*)(int, int, void*)) dlsym_fn(RTLD_NEXT, "ioctl"); \
+ pthread_mutex_unlock(&func_mutex); \
+ } while(0)
++#endif
+
+ #define LOAD_OPEN_FUNC() \
+ do { \
+@@ -1452,7 +1466,8 @@ static int real_open(const char *filenam
+ return _open(filename, flags, mode);
+ }
+
+- if (filename && dsp_cloak_enable() && (strcmp(filename, "/dev/dsp") == 0 || strcmp(filename, "/dev/adsp") == 0))
++ if (filename && dsp_cloak_enable() && (strcmp(filename, "/dev/dsp") == 0 || strcmp(filename, "/dev/adsp") == 0 ||
++ strcmp(filename, "/dev/sound") == 0 || strcmp(filename, "/dev/audio") == 0))
+ r = dsp_open(flags, &_errno);
+ else if (filename && mixer_cloak_enable() && strcmp(filename, "/dev/mixer") == 0)
+ r = mixer_open(flags, &_errno);
+@@ -2313,19 +2328,27 @@ fail:
+
+ #ifdef sun
+ int ioctl(int fd, int request, ...) {
++#elif defined(__NetBSD__)
++int ioctl(int fd, u_long request, void *_argp) {
+ #else
+ int ioctl(int fd, unsigned long request, ...) {
+ #endif
+ fd_info *i;
++#ifndef __NetBSD__
+ va_list args;
++#endif
+ void *argp;
+ int r, _errno = 0;
+
+ debug(DEBUG_LEVEL_VERBOSE, __FILE__": ioctl()\n");
+
++#ifdef __NetBSD__
++ argp = _argp;
++#else
+ va_start(args, request);
+ argp = va_arg(args, void *);
+ va_end(args);
++#endif
+
+ if (!function_enter()) {
+ LOAD_IOCTL_FUNC();
+@@ -2383,6 +2406,8 @@ int access(const char *pathname, int mod
+
+ if (!pathname ||
+ ( strcmp(pathname, "/dev/dsp") != 0 &&
++ strcmp(pathname, "/dev/sound") != 0 &&
++ strcmp(pathname, "/dev/audio") != 0 &&
+ strcmp(pathname, "/dev/adsp") != 0 &&
+ strcmp(pathname, "/dev/sndstat") != 0 &&
+ strcmp(pathname, "/dev/mixer") != 0 )) {
+@@ -2412,6 +2437,8 @@ int stat(const char *pathname, struct st
+ if (!pathname ||
+ !buf ||
+ ( strcmp(pathname, "/dev/dsp") != 0 &&
++ strcmp(pathname, "/dev/sound") != 0 &&
++ strcmp(pathname, "/dev/audio") != 0 &&
+ strcmp(pathname, "/dev/adsp") != 0 &&
+ strcmp(pathname, "/dev/sndstat") != 0 &&
+ strcmp(pathname, "/dev/mixer") != 0 )) {
+@@ -2469,6 +2496,8 @@ int stat64(const char *pathname, struct
+ if (!pathname ||
+ !buf ||
+ ( strcmp(pathname, "/dev/dsp") != 0 &&
++ strcmp(pathname, "/dev/sound") != 0 &&
++ strcmp(pathname, "/dev/audio") != 0 &&
+ strcmp(pathname, "/dev/adsp") != 0 &&
+ strcmp(pathname, "/dev/sndstat") != 0 &&
+ strcmp(pathname, "/dev/mixer") != 0 )) {
+@@ -2514,6 +2543,8 @@ int open64(const char *filename, int fla
+
+ if (!filename ||
+ ( strcmp(filename, "/dev/dsp") != 0 &&
++ strcmp(pathname, "/dev/sound") != 0 &&
++ strcmp(pathname, "/dev/audio") != 0 &&
+ strcmp(filename, "/dev/adsp") != 0 &&
+ strcmp(filename, "/dev/sndstat") != 0 &&
+ strcmp(filename, "/dev/mixer") != 0 )) {
+@@ -2534,6 +2565,8 @@ int __xstat(int ver, const char *pathnam
+ if (!pathname ||
+ !buf ||
+ ( strcmp(pathname, "/dev/dsp") != 0 &&
++ strcmp(pathname, "/dev/sound") != 0 &&
++ strcmp(pathname, "/dev/audio") != 0 &&
+ strcmp(pathname, "/dev/adsp") != 0 &&
+ strcmp(pathname, "/dev/sndstat") != 0 &&
+ strcmp(pathname, "/dev/mixer") != 0 )) {
+@@ -2557,6 +2590,8 @@ int __xstat64(int ver, const char *pathn
+ if (!pathname ||
+ !buf ||
+ ( strcmp(pathname, "/dev/dsp") != 0 &&
++ strcmp(pathname, "/dev/sound") != 0 &&
++ strcmp(pathname, "/dev/audio") != 0 &&
+ strcmp(pathname, "/dev/adsp") != 0 &&
+ strcmp(pathname, "/dev/sndstat") != 0 &&
+ strcmp(pathname, "/dev/mixer") != 0 )) {
+@@ -2586,6 +2621,8 @@ FILE* fopen(const char *filename, const
+ if (!filename ||
+ !mode ||
+ ( strcmp(filename, "/dev/dsp") != 0 &&
++ strcmp(filename, "/dev/sound") != 0 &&
++ strcmp(filename, "/dev/audio") != 0 &&
+ strcmp(filename, "/dev/adsp") != 0 &&
+ strcmp(filename, "/dev/sndstat") != 0 &&
+ strcmp(filename, "/dev/mixer") != 0 )) {
+@@ -2629,6 +2666,8 @@ FILE *fopen64(const char *filename, cons
+ if (!filename ||
+ !mode ||
+ ( strcmp(filename, "/dev/dsp") != 0 &&
++ strcmp(pathname, "/dev/sound") != 0 &&
++ strcmp(pathname, "/dev/audio") != 0 &&
+ strcmp(filename, "/dev/adsp") != 0 &&
+ strcmp(filename, "/dev/sndstat") != 0 &&
+ strcmp(filename, "/dev/mixer") != 0 )) {
diff --git a/audio/pulseaudio/patches/patch-ab b/audio/pulseaudio/patches/patch-ab
new file mode 100644
index 00000000000..d523fbf7d18
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-ab
@@ -0,0 +1,14 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+
+--- src/daemon/main.c.orig 2008-10-03 15:16:52.000000000 -0400
++++ src/daemon/main.c
+@@ -302,7 +302,9 @@ static void set_all_rlimits(const pa_dae
+ #ifdef RLIMIT_MEMLOCK
+ set_one_rlimit(&conf->rlimit_memlock, RLIMIT_MEMLOCK, "RLIMIT_MEMLOCK");
+ #endif
++#ifdef RLIMIT_AS
+ set_one_rlimit(&conf->rlimit_as, RLIMIT_AS, "RLIMIT_AS");
++#endif
+ #ifdef RLIMIT_LOCKS
+ set_one_rlimit(&conf->rlimit_locks, RLIMIT_LOCKS, "RLIMIT_LOCKS");
+ #endif
diff --git a/audio/pulseaudio/patches/patch-ac b/audio/pulseaudio/patches/patch-ac
new file mode 100644
index 00000000000..ff8ba4e1c48
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-ac
@@ -0,0 +1,20 @@
+$NetBSD: patch-ac,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+
+--- src/tests/rtstutter.c.orig 2008-08-19 17:25:05.000000000 -0400
++++ src/tests/rtstutter.c
+@@ -42,6 +42,7 @@ static int msec_lower, msec_upper;
+ static void* work(void *p) PA_GCC_NORETURN;
+
+ static void* work(void *p) {
++#ifdef __linux__
+ cpu_set_t mask;
+ struct sched_param param;
+
+@@ -83,6 +84,7 @@ static void* work(void *p) {
+ } while (now.tv_sec < end.tv_sec ||
+ (now.tv_sec == end.tv_sec && now.tv_nsec < end.tv_nsec));
+ }
++#endif
+ }
+
+ int main(int argc, char*argv[]) {
diff --git a/audio/pulseaudio/patches/patch-ad b/audio/pulseaudio/patches/patch-ad
new file mode 100644
index 00000000000..38019bda285
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-ad
@@ -0,0 +1,38 @@
+$NetBSD: patch-ad,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+
+--- src/Makefile.in.orig 2008-10-05 21:09:32.000000000 -0400
++++ src/Makefile.in
+@@ -2296,7 +2296,7 @@ pulseincludedir = $(includedir)/pulse
+ pulsecoreincludedir = $(includedir)/pulsecore
+ pulseconfdir = $(sysconfdir)/pulse
+ pulselibexecdir = $(libexecdir)/pulse
+-xdgautostartdir = $(sysconfdir)/xdg/autostart
++xdgautostartdir = $(PREFIX)/share/gnome/autostart
+
+ ###################################
+ # Defines #
+@@ -3091,7 +3091,7 @@ module_x11_xsmp_la_LIBADD = $(AM_LIBADD)
+
+ # OSS
+ liboss_util_la_SOURCES = modules/oss-util.c modules/oss-util.h
+-liboss_util_la_LDFLAGS = -avoid-version
++liboss_util_la_LDFLAGS = -avoid-version $(LIBOSSAUDIO)
+ liboss_util_la_LIBADD = libpulsecore.la
+ module_oss_la_SOURCES = modules/module-oss.c
+ module_oss_la_LDFLAGS = -module -avoid-version
+@@ -7776,12 +7776,12 @@ uninstall-policyDATA:
+ done
+ install-pulseconfDATA: $(pulseconf_DATA)
+ @$(NORMAL_INSTALL)
+- test -z "$(pulseconfdir)" || $(MKDIR_P) "$(DESTDIR)$(pulseconfdir)"
++ test -z "$(EGDIR)" || $(MKDIR_P) "$(DESTDIR)$(EGDIR)"
+ @list='$(pulseconf_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+- echo " $(pulseconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pulseconfdir)/$$f'"; \
+- $(pulseconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pulseconfdir)/$$f"; \
++ echo " $(pulseconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(EGDIR)/$$f'"; \
++ $(pulseconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(EGDIR)/$$f"; \
+ done
+
+ uninstall-pulseconfDATA:
diff --git a/audio/pulseaudio/patches/patch-ae b/audio/pulseaudio/patches/patch-ae
new file mode 100644
index 00000000000..bc75140bc43
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-ae
@@ -0,0 +1,30 @@
+$NetBSD: patch-ae,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+
+--- src/pulsecore/socket-util.c.orig 2008-12-18 00:53:11.000000000 -0500
++++ src/pulsecore/socket-util.c
+@@ -202,9 +202,11 @@ void pa_make_udp_socket_low_delay(int fd
+ }
+
+ int pa_socket_set_rcvbuf(int fd, size_t l) {
++ int bufsz = (int)l;
++
+ pa_assert(fd >= 0);
+
+- if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void*)&l, sizeof(l)) < 0) {
++ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void*)&bufsz, sizeof(bufsz)) < 0) {
+ pa_log_warn("SO_RCVBUF: %s", pa_cstrerror(errno));
+ return -1;
+ }
+@@ -213,9 +215,11 @@ int pa_socket_set_rcvbuf(int fd, size_t
+ }
+
+ int pa_socket_set_sndbuf(int fd, size_t l) {
++ int bufsz = (int)l;
++
+ pa_assert(fd >= 0);
+
+- if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void*)&l, sizeof(l)) < 0) {
++ if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void*)&bufsz, sizeof(bufsz)) < 0) {
+ pa_log("SO_SNDBUF: %s", pa_cstrerror(errno));
+ return -1;
+ }
diff --git a/audio/pulseaudio/patches/patch-af b/audio/pulseaudio/patches/patch-af
new file mode 100644
index 00000000000..9de7b4ff145
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-af
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1.1.1 2008/12/18 14:42:56 jmcneill Exp $
+
+--- src/daemon/default.pa.in.orig 2008-12-18 08:30:19.000000000 -0500
++++ src/daemon/default.pa.in
+@@ -87,7 +87,7 @@ load-module module-rescue-streams
+ load-module module-always-sink
+
+ ### Automatically suspend sinks/sources that become idle for too long
+-load-module module-suspend-on-idle
++#load-module module-suspend-on-idle
+
+ ### If autoexit on idle is enabled we want to make sure we only quit
+ ### when no local session needs us anymore.