summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2014-06-09 13:08:19 +0000
committerryoon <ryoon@pkgsrc.org>2014-06-09 13:08:19 +0000
commit2d808ccbe183ad6144ea17173c4e3f9e285c50bd (patch)
tree5ee026385e1b6b986ad50af7fbcf9a540cea205f /audio
parent27fc24546ac628ecbb55dd5f4a07c511a6dc38d6 (diff)
downloadpkgsrc-2d808ccbe183ad6144ea17173c4e3f9e285c50bd.tar.gz
Update to 5.0 from 2.1
* Remove dependency to sysutils/hal, hald backend is removed. * Use deprecated OSS backend under NetBSD (alsa backend should be used?) Changelog: PulseAudio 5.0 Changes at a glance: * BlueZ 5 support (A2DP only) * Reimplementation of the tunnel modules * Native log target support for systemd-journal * Resampler refactoring * --monitor-stream option for parecord and parec * "latency_msec" argument for module-rtp-recv * "inhibit_auto_suspend" argument for module-rtp-send * "auto" argument for module-tunnel-sink and module-tunnel-source * Removed module-bluetooth-proximity * Jack detection for line out * Laptop internal surround speaker volume support * Improved float->s16 and s16->float sample conversion for ARM NEON * "Available" flag for card profiles * Removed module-dbus-protocol from the default configuration * Lots of other enhancements, bug fixes, and documenation and i18n updates Detailed change log: http://www.freedesktop.org/wiki/Software/PulseAudio/Notes/5.0 PulseAudio 4.0 Changes at a glance: * Better handling of low latency requests * Optimisations while mixing (generic, ARM NEON) * Default resampler is now speex-float-1 (lower CPU usage) * Major Bluetooth refactoring for better reliability and easier maintenance * Fixes for graceful hand-off to/from JACK * New module to apply ducking based on stream roles * Echo canceller infrastructure fixes * Bash and zsh completion for command line tools * Solaris and OS X fixes * Lots of other enhancements, bug fixes, and documenation and i18n updates Detailed change log: http://www.freedesktop.org/wiki/Software/PulseAudio/Notes/4.0 PulseAudio 3.0 Release Notes We're, back with another shiny PulseAudio release! While the 3.0 release was a little delayed, it brings a number of important improvements, and bug fixes. A summary of changes follows. Notable Changes ALSA Use Case Manager (UCM) support Runtime editable LADSPA filter parameters Out-of-the-box support for Bluetooth sources ARM NEON optimisations Configurable device latency offset Adhere to the XDG Base Directory Specification Various ALSA changes Lots of infrastructure improvements Packaging Bluetooth support requires now "sbc", a library for the SBC codec. The codec used to be included within PulseAudio, but it has now been split off into a separate library. It's available at http://www.bluez.org. Support for the "socket API" of BlueZ has been dropped in favour of the D-Bus based "media API". Due to this change, the minimum supported version of BlueZ is now 4.99. Also, make sure that you don't have "Disable=Media" in /etc/bluetooth/audio.conf. And due to a bug in BlueZ, it's probably necessary to have "Disable=Socket", otherwise there will be problems with the A2DP profile. Support for HAL has been removed. This shouldn't affect anyone, but if it does, please configure PulseAudio to use udev instead. module-hal-detect still exists for maintaining configuration file compatibility, but all it does is to load module-udev-detect. module-hal-detect may get completely removed in 4.0.
Diffstat (limited to 'audio')
-rw-r--r--audio/pulseaudio/Makefile19
-rw-r--r--audio/pulseaudio/PLIST31
-rw-r--r--audio/pulseaudio/buildlink3.mk6
-rw-r--r--audio/pulseaudio/distinfo28
-rw-r--r--audio/pulseaudio/patches/patch-aa18
-rw-r--r--audio/pulseaudio/patches/patch-configure99
-rw-r--r--audio/pulseaudio/patches/patch-configure.ac83
-rw-r--r--audio/pulseaudio/patches/patch-dc19
-rw-r--r--audio/pulseaudio/patches/patch-src_Makefile.am24
-rw-r--r--audio/pulseaudio/patches/patch-src_daemon_caps.c17
-rw-r--r--audio/pulseaudio/patches/patch-src_daemon_main.c19
-rw-r--r--audio/pulseaudio/patches/patch-src_modules_module-detect.c32
-rw-r--r--audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c18
-rw-r--r--audio/pulseaudio/patches/patch-src_pulsecore_sample-util.h21
-rw-r--r--audio/pulseaudio/patches/patch-src_pulsecore_semaphore-osx.c101
-rw-r--r--audio/pulseaudio/patches/patch-src_pulsecore_svolume__mmx.c20
-rw-r--r--audio/pulseaudio/patches/patch-src_pulsecore_svolume__sse.c20
-rw-r--r--audio/pulseaudio/patches/patch-src_tests_mult-s16-test.c21
-rw-r--r--audio/pulseaudio/patches/patch-src_tests_once-test.c28
-rw-r--r--audio/pulseaudio/patches/patch-src_tests_rtpoll-test.c22
-rw-r--r--audio/pulseaudio/patches/patch-src_tests_rtstutter.c28
21 files changed, 335 insertions, 339 deletions
diff --git a/audio/pulseaudio/Makefile b/audio/pulseaudio/Makefile
index 7e7eeef9e09..6388af4cee3 100644
--- a/audio/pulseaudio/Makefile
+++ b/audio/pulseaudio/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.86 2014/05/27 15:51:45 pho Exp $
+# $NetBSD: Makefile,v 1.87 2014/06/09 13:08:19 ryoon Exp $
-DISTNAME= pulseaudio-2.1
-PKGREVISION= 17
+DISTNAME= pulseaudio-5.0
CATEGORIES= audio
MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/
EXTRACT_SUFX= .tar.xz
@@ -13,9 +12,11 @@ LICENSE= gnu-lgpl-v2.1 AND gnu-gpl-v2
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
-USE_TOOLS+= gmake gm4 intltool msgfmt pkg-config
+USE_TOOLS+= aclocal autoheader autoconf automake gmake gm4 intltool msgfmt pkg-config
USE_LANGUAGES= c c++
+REPLACE_BASH= shell-completion/pulseaudio-bash-completion.sh
+
.include "../../mk/bsd.prefs.mk"
# Some tests are incompatible for NetBSD at least
.if ${OPSYS} == "NetBSD"
@@ -26,6 +27,8 @@ CONFIGURE_ARGS+= --disable-default-build-tests
CONFIGURE_ENV+= ac_cv_tls=none
.endif
+CONFIGURE_ENV+= DATADIRNAME=${PKGLOCALEDIR}
+
# Wrong sys/capability.h assumptions, incompatible implementation:
.if ${OPSYS} == "FreeBSD"
CONFIGURE_ARGS+= --without-caps
@@ -34,6 +37,8 @@ CONFIGURE_ARGS+= --without-caps
CONFIGURE_ENV+= EGDIR=${EGDIR}
MAKE_ENV+= EGDIR=${EGDIR}
+MAKE_FLAGS+= bashcompletiondir=${PREFIX}/share/bash-completion/completions
+
CONFIGURE_ARGS+= --enable-samplerate
CONFIGURE_ARGS+= --disable-tcpwrap
CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
@@ -86,7 +91,6 @@ PLIST_VARS+= bonjour coreaudio evdev hal oss sun
.if ${OPSYS} == "SunOS"
PLIST.sun= yes
. if ${OS_VERSION} == "5.11"
-PLIST.hal= yes
PLIST.oss= yes
. endif
.elif ${OPSYS} == "Darwin"
@@ -102,6 +106,10 @@ PKG_GROUPS+= ${PULSE_GROUP_REALTIME}
PKG_GROUPS+= ${PULSE_GROUP_ACCESS}
PKG_USERS= ${PULSE_USER}:${PULSE_GROUP}
+pre-configure:
+ set -e; cd ${WRKSRC}; \
+ aclocal; autoheader; automake -a --foreign -i; autoconf
+
.if ${OPSYS} != "Darwin"
.include "../../sysutils/consolekit/buildlink3.mk"
.endif
@@ -115,7 +123,6 @@ PKG_USERS= ${PULSE_USER}:${PULSE_GROUP}
.include "../../security/openssl/buildlink3.mk"
.include "../../security/policykit/buildlink3.mk"
.include "../../sysutils/dbus/buildlink3.mk"
-.include "../../sysutils/hal/buildlink3.mk"
.include "../../textproc/json-c/buildlink3.mk"
.include "../../mk/oss.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/audio/pulseaudio/PLIST b/audio/pulseaudio/PLIST
index 2e8aaa04014..a1839429cfe 100644
--- a/audio/pulseaudio/PLIST
+++ b/audio/pulseaudio/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.13 2014/05/27 15:51:45 pho Exp $
+@comment $NetBSD: PLIST,v 1.14 2014/06/09 13:08:19 ryoon Exp $
bin/esdcompat
bin/pacat
bin/pacmd
@@ -13,8 +13,6 @@ ${PLIST.x11}bin/pax11publish
bin/pulseaudio
${PLIST.x11}bin/start-pulseaudio-kde
${PLIST.x11}bin/start-pulseaudio-x11
-${PLIST.x11}share/examples/pulseaudio/pulseaudio-kde.desktop
-${PLIST.x11}share/examples/pulseaudio/pulseaudio.desktop
include/pulse/cdecl.h
include/pulse/channelmap.h
include/pulse/context.h
@@ -125,8 +123,6 @@ lib/pulse-${PKGVERSION}/modules/module-filter-apply.a
lib/pulse-${PKGVERSION}/modules/module-filter-apply.so
lib/pulse-${PKGVERSION}/modules/module-filter-heuristics.a
lib/pulse-${PKGVERSION}/modules/module-filter-heuristics.so
-${PLIST.hal}lib/pulse-${PKGVERSION}/modules/module-hal-detect.a
-${PLIST.hal}lib/pulse-${PKGVERSION}/modules/module-hal-detect.so
lib/pulse-${PKGVERSION}/modules/module-http-protocol-tcp.a
lib/pulse-${PKGVERSION}/modules/module-http-protocol-tcp.so
lib/pulse-${PKGVERSION}/modules/module-http-protocol-unix.a
@@ -137,8 +133,6 @@ lib/pulse-${PKGVERSION}/modules/module-ladspa-sink.a
lib/pulse-${PKGVERSION}/modules/module-ladspa-sink.so
lib/pulse-${PKGVERSION}/modules/module-loopback.a
lib/pulse-${PKGVERSION}/modules/module-loopback.so
-${PLIST.evdev}lib/pulse-${PKGVERSION}/modules/module-mmkbd-evdev.a
-${PLIST.evdev}lib/pulse-${PKGVERSION}/modules/module-mmkbd-evdev.so
lib/pulse-${PKGVERSION}/modules/module-match.a
lib/pulse-${PKGVERSION}/modules/module-match.so
lib/pulse-${PKGVERSION}/modules/module-native-protocol-fd.a
@@ -151,24 +145,28 @@ lib/pulse-${PKGVERSION}/modules/module-null-sink.a
lib/pulse-${PKGVERSION}/modules/module-null-sink.so
lib/pulse-${PKGVERSION}/modules/module-null-source.a
lib/pulse-${PKGVERSION}/modules/module-null-source.so
-${PLIST.oss}lib/pulse-${PKGVERSION}/modules/module-oss.a
-${PLIST.oss}lib/pulse-${PKGVERSION}/modules/module-oss.so
+lib/pulse-${PKGVERSION}/modules/module-oss.a
+lib/pulse-${PKGVERSION}/modules/module-oss.so
lib/pulse-${PKGVERSION}/modules/module-pipe-sink.a
lib/pulse-${PKGVERSION}/modules/module-pipe-sink.so
lib/pulse-${PKGVERSION}/modules/module-pipe-source.a
lib/pulse-${PKGVERSION}/modules/module-pipe-source.so
lib/pulse-${PKGVERSION}/modules/module-position-event-sounds.a
lib/pulse-${PKGVERSION}/modules/module-position-event-sounds.so
-${PLIST.avahi}lib/pulse-${PKGVERSION}/modules/module-raop-discover.a
-${PLIST.avahi}lib/pulse-${PKGVERSION}/modules/module-raop-discover.so
+lib/pulse-${PKGVERSION}/modules/module-raop-discover.a
+lib/pulse-${PKGVERSION}/modules/module-raop-discover.so
lib/pulse-${PKGVERSION}/modules/module-raop-sink.a
lib/pulse-${PKGVERSION}/modules/module-raop-sink.so
lib/pulse-${PKGVERSION}/modules/module-remap-sink.a
lib/pulse-${PKGVERSION}/modules/module-remap-sink.so
+lib/pulse-${PKGVERSION}/modules/module-remap-source.a
+lib/pulse-${PKGVERSION}/modules/module-remap-source.so
lib/pulse-${PKGVERSION}/modules/module-rescue-streams.a
lib/pulse-${PKGVERSION}/modules/module-rescue-streams.so
lib/pulse-${PKGVERSION}/modules/module-role-cork.a
lib/pulse-${PKGVERSION}/modules/module-role-cork.so
+lib/pulse-${PKGVERSION}/modules/module-role-ducking.a
+lib/pulse-${PKGVERSION}/modules/module-role-ducking.so
lib/pulse-${PKGVERSION}/modules/module-rtp-recv.a
lib/pulse-${PKGVERSION}/modules/module-rtp-recv.so
lib/pulse-${PKGVERSION}/modules/module-rtp-send.a
@@ -183,8 +181,6 @@ lib/pulse-${PKGVERSION}/modules/module-sine-source.a
lib/pulse-${PKGVERSION}/modules/module-sine-source.so
lib/pulse-${PKGVERSION}/modules/module-sine.a
lib/pulse-${PKGVERSION}/modules/module-sine.so
-${PLIST.sun}lib/pulse-${PKGVERSION}/modules/module-solaris.a
-${PLIST.sun}lib/pulse-${PKGVERSION}/modules/module-solaris.so
lib/pulse-${PKGVERSION}/modules/module-stream-restore.a
lib/pulse-${PKGVERSION}/modules/module-stream-restore.so
lib/pulse-${PKGVERSION}/modules/module-suspend-on-idle.a
@@ -193,8 +189,12 @@ lib/pulse-${PKGVERSION}/modules/module-switch-on-connect.a
lib/pulse-${PKGVERSION}/modules/module-switch-on-connect.so
lib/pulse-${PKGVERSION}/modules/module-switch-on-port-available.a
lib/pulse-${PKGVERSION}/modules/module-switch-on-port-available.so
+lib/pulse-${PKGVERSION}/modules/module-tunnel-sink-new.a
+lib/pulse-${PKGVERSION}/modules/module-tunnel-sink-new.so
lib/pulse-${PKGVERSION}/modules/module-tunnel-sink.a
lib/pulse-${PKGVERSION}/modules/module-tunnel-sink.so
+lib/pulse-${PKGVERSION}/modules/module-tunnel-source-new.a
+lib/pulse-${PKGVERSION}/modules/module-tunnel-source-new.so
lib/pulse-${PKGVERSION}/modules/module-tunnel-source.a
lib/pulse-${PKGVERSION}/modules/module-tunnel-source.so
lib/pulse-${PKGVERSION}/modules/module-virtual-sink.a
@@ -234,10 +234,13 @@ man/man5/default.pa.5
man/man5/pulse-cli-syntax.5
man/man5/pulse-client.conf.5
man/man5/pulse-daemon.conf.5
+share/bash-completion/completions/pulseaudio-bash-completion.sh
share/examples/pulseaudio/client.conf
share/examples/pulseaudio/daemon.conf
share/examples/pulseaudio/default.pa
+${PLIST.x11}share/examples/pulseaudio/pulseaudio-kde.desktop
share/examples/pulseaudio/pulseaudio-system.conf
+${PLIST.x11}share/examples/pulseaudio/pulseaudio.desktop
share/examples/pulseaudio/system.pa
share/locale/as/LC_MESSAGES/pulseaudio.mo
share/locale/bn_IN/LC_MESSAGES/pulseaudio.mo
@@ -253,6 +256,7 @@ share/locale/gu/LC_MESSAGES/pulseaudio.mo
share/locale/he/LC_MESSAGES/pulseaudio.mo
share/locale/hi/LC_MESSAGES/pulseaudio.mo
share/locale/hu/LC_MESSAGES/pulseaudio.mo
+share/locale/id/LC_MESSAGES/pulseaudio.mo
share/locale/it/LC_MESSAGES/pulseaudio.mo
share/locale/ja/LC_MESSAGES/pulseaudio.mo
share/locale/kn/LC_MESSAGES/pulseaudio.mo
@@ -278,4 +282,3 @@ share/vala/vapi/libpulse-mainloop-glib.vapi
share/vala/vapi/libpulse.deps
share/vala/vapi/libpulse.vapi
@pkgdir share/examples/pulse
-@pkgdir libexec/pulse
diff --git a/audio/pulseaudio/buildlink3.mk b/audio/pulseaudio/buildlink3.mk
index e7d19f8dc6c..e48eec8761d 100644
--- a/audio/pulseaudio/buildlink3.mk
+++ b/audio/pulseaudio/buildlink3.mk
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.21 2014/04/20 02:27:49 ryoon Exp $
+# $NetBSD: buildlink3.mk,v 1.22 2014/06/09 13:08:19 ryoon Exp $
BUILDLINK_TREE+= pulseaudio
.if !defined(PULSEAUDIO_BUILDLINK3_MK)
PULSEAUDIO_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.pulseaudio+= pulseaudio>=2.1
-BUILDLINK_ABI_DEPENDS.pulseaudio+= pulseaudio>=2.1nb16
+BUILDLINK_API_DEPENDS.pulseaudio+= pulseaudio>=5.0
+BUILDLINK_ABI_DEPENDS.pulseaudio+= pulseaudio>=5.0
BUILDLINK_PKGSRCDIR.pulseaudio?= ../../audio/pulseaudio
.include "../../mk/bsd.fast.prefs.mk"
diff --git a/audio/pulseaudio/distinfo b/audio/pulseaudio/distinfo
index 9024438c126..39ece6ca823 100644
--- a/audio/pulseaudio/distinfo
+++ b/audio/pulseaudio/distinfo
@@ -1,14 +1,18 @@
-$NetBSD: distinfo,v 1.40 2013/12/16 19:00:03 asau Exp $
+$NetBSD: distinfo,v 1.41 2014/06/09 13:08:19 ryoon Exp $
-SHA1 (pulseaudio-2.1.tar.xz) = 56b4ad9207ea3aec0ad1b8be4b55793b426a4f01
-RMD160 (pulseaudio-2.1.tar.xz) = 87f6051bbbe59c26e505a9765f388d3ee4d3a485
-Size (pulseaudio-2.1.tar.xz) = 1355004 bytes
-SHA1 (patch-aa) = 2fb8b36669e34f3ca0108176171be567a9eeda44
-SHA1 (patch-configure) = 8754fc3493e43baef14c99a6b9a24bbb2800b2ea
-SHA1 (patch-dc) = 1e8d79a37617aae18f55564757b5065fef2b9025
+SHA1 (pulseaudio-5.0.tar.xz) = e420931a0b9cf37331cd06e30ba415046317ab85
+RMD160 (pulseaudio-5.0.tar.xz) = 4ba13e92c58f8ada4542d521131094a55e3b6991
+Size (pulseaudio-5.0.tar.xz) = 1455428 bytes
+SHA1 (patch-aa) = c8bd0e5b6e4c4068d8706aea62ce248bb79184d7
+SHA1 (patch-configure.ac) = 38e2b4b1da406cd59c29b0ee5d17d92498265e01
+SHA1 (patch-src_Makefile.am) = debe40be5d1155f6cb0d5ae90119dece4e090b02
SHA1 (patch-src_Makefile.in) = 21daf6069ae067dd235de6d43a013e4e70bbca78
-SHA1 (patch-src_pulsecore_semaphore-osx.c) = f9b1962a700932434e05471b2d4df4a5ff5c1b00
-SHA1 (patch-src_pulsecore_svolume__mmx.c) = a3af18563fd11e3813d7a474ff8807ee9bf62390
-SHA1 (patch-src_pulsecore_svolume__sse.c) = 6d2406ad0889219bae96f52f9b525da9b19b9af9
-SHA1 (patch-src_tests_once-test.c) = ba0ca03e9f1cbc47e7985497397d03e7406420c6
-SHA1 (patch-src_tests_rtstutter.c) = e6d1627cb8a150cc5a106bb98ed31147ce8689d2
+SHA1 (patch-src_daemon_caps.c) = e819c26cd3d91d93ae5877725ed6a1b59183d89a
+SHA1 (patch-src_daemon_main.c) = e87f764d18345056210427bea52bf27f3f2999b6
+SHA1 (patch-src_modules_module-detect.c) = 1679519bc8a46a85790babe9c729850d10b9da6c
+SHA1 (patch-src_modules_oss_module-oss.c) = 43a0c2eeb5a9a37c7a231a531caa3658fe8d49b0
+SHA1 (patch-src_pulsecore_sample-util.h) = b6bd83cfdc1c337453d9a728f07205a2cf0af831
+SHA1 (patch-src_pulsecore_svolume__mmx.c) = b500530bcc9792b97050c7fa6e47639ac8e261a2
+SHA1 (patch-src_pulsecore_svolume__sse.c) = 07da6faa8529d7308d8a6a9f11958ef9faf46409
+SHA1 (patch-src_tests_mult-s16-test.c) = 3a0fbec804ebefbd88688e84b8d45e0aca597b84
+SHA1 (patch-src_tests_rtpoll-test.c) = 3584aeda2b6f7eb14af9cb5c665a31d972a306ae
diff --git a/audio/pulseaudio/patches/patch-aa b/audio/pulseaudio/patches/patch-aa
index 95f37c46d19..8638049de83 100644
--- a/audio/pulseaudio/patches/patch-aa
+++ b/audio/pulseaudio/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.14 2013/11/25 10:14:37 wiz Exp $
+$NetBSD: patch-aa,v 1.15 2014/06/09 13:08:19 ryoon Exp $
ioctl() takes u_long argument on NetBSD.
On NetBSD<6 and 6.99.0-6.99.7, use third parameter in ioctl instead of varargs.
@@ -6,7 +6,7 @@ stat() system call has been versioned, use latest version when dlopen()ing.
Try more typical device names.
SOUND_PCM_* is not available on SunOS.
---- src/utils/padsp.c.orig 2012-07-16 11:37:55.000000000 +0000
+--- src/utils/padsp.c.orig 2014-01-23 18:57:55.000000000 +0000
+++ src/utils/padsp.c
@@ -49,6 +49,9 @@
#ifdef __linux__
@@ -39,7 +39,7 @@ SOUND_PCM_* is not available on SunOS.
+do { \
+ pthread_mutex_lock(&func_mutex); \
+ if (!_ioctl) \
-+ _ioctl = (int (*)(int, u_long, void*)) dlsym_fn(RTLD_NEXT, "ioctl"); \
++ _ioctl = (int (*)(int, u_long, void*)) dlsym_fn(RTLD_NEXT, "ioctl"); \
+ pthread_mutex_unlock(&func_mutex); \
+} while(0)
+#else
@@ -76,7 +76,7 @@ SOUND_PCM_* is not available on SunOS.
pthread_mutex_unlock(&func_mutex); \
} while(0)
-@@ -2264,6 +2290,7 @@ static int dsp_ioctl(fd_info *i, unsigne
+@@ -2277,6 +2303,7 @@ static int dsp_ioctl(fd_info *i, unsigne
break;
}
@@ -84,15 +84,15 @@ SOUND_PCM_* is not available on SunOS.
case SOUND_PCM_READ_RATE:
debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_RATE\n");
-@@ -2288,6 +2315,7 @@ static int dsp_ioctl(fd_info *i, unsigne
+@@ -2284,6 +2311,7 @@ static int dsp_ioctl(fd_info *i, unsigne
+ *(int*) argp = i->sample_spec.rate;
pa_threaded_mainloop_unlock(i->mainloop);
break;
-
+#endif
- case SNDCTL_DSP_GETOPTR: {
- count_info *info;
-@@ -2357,21 +2385,35 @@ fail:
+ case SOUND_PCM_READ_CHANNELS:
+ debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_CHANNELS\n");
+@@ -2370,21 +2398,35 @@ fail:
return ret;
}
diff --git a/audio/pulseaudio/patches/patch-configure b/audio/pulseaudio/patches/patch-configure
deleted file mode 100644
index 9530f676d15..00000000000
--- a/audio/pulseaudio/patches/patch-configure
+++ /dev/null
@@ -1,99 +0,0 @@
-$NetBSD: patch-configure,v 1.4 2013/11/30 12:34:52 wiz Exp $
-
-- always use atomic_ops(3) on NetBSD, even on arm
-- kill test(1) bash'ism
-
---- configure.orig 2012-07-19 11:30:11.000000000 +0000
-+++ configure
-@@ -7995,6 +7995,11 @@ else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking architecture for native atomic operations" >&5
- $as_echo_n "checking architecture for native atomic operations... " >&6; }
- case $host in
-+ *-netbsd*)
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
-+ need_libatomic_ops=no
-+ ;;
- arm*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: arm" >&5
- $as_echo "arm" >&6; }
-@@ -8062,11 +8067,6 @@ $as_echo "#define ATOMIC_ARM_INLINE_ASM
- fi
- fi
- ;;
-- *-netbsdelf5*)
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
-- need_libatomic_ops=no
-- ;;
- *-freebsd*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
-@@ -19748,7 +19748,7 @@ _ACEOF
-
- fi
-
--if test "$ac_cv_tls" == "__thread"; then :
-+if test "$ac_cv_tls" = "__thread"; then :
-
- $as_echo "#define SUPPORT_TLS___THREAD 1" >>confdefs.h
-
-@@ -20146,7 +20146,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- fi
-
--if test "x$ax_pthread_ok" == "xyes"; then :
-+if test "x$ax_pthread_ok" = "xyes"; then :
-
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-@@ -23063,12 +23063,12 @@ if test -n "$LIBJSON_CFLAGS"; then
- pkg_cv_LIBJSON_CFLAGS="$LIBJSON_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" json >= 0.9 \""; } >&5
-- ($PKG_CONFIG --exists --print-errors " json >= 0.9 ") 2>&5
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" json-c >= 0.9 \""; } >&5
-+ ($PKG_CONFIG --exists --print-errors " json-c >= 0.9 ") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
-- pkg_cv_LIBJSON_CFLAGS=`$PKG_CONFIG --cflags " json >= 0.9 " 2>/dev/null`
-+ pkg_cv_LIBJSON_CFLAGS=`$PKG_CONFIG --cflags " json-c >= 0.9 " 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
- else
- pkg_failed=yes
-@@ -23080,12 +23080,12 @@ if test -n "$LIBJSON_LIBS"; then
- pkg_cv_LIBJSON_LIBS="$LIBJSON_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
-- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" json >= 0.9 \""; } >&5
-- ($PKG_CONFIG --exists --print-errors " json >= 0.9 ") 2>&5
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" json-c >= 0.9 \""; } >&5
-+ ($PKG_CONFIG --exists --print-errors " json-c >= 0.9 ") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
-- pkg_cv_LIBJSON_LIBS=`$PKG_CONFIG --libs " json >= 0.9 " 2>/dev/null`
-+ pkg_cv_LIBJSON_LIBS=`$PKG_CONFIG --libs " json-c >= 0.9 " 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
- else
- pkg_failed=yes
-@@ -23106,14 +23106,14 @@ else
- _pkg_short_errors_supported=no
- fi
- if test $_pkg_short_errors_supported = yes; then
-- LIBJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " json >= 0.9 " 2>&1`
-+ LIBJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " json-c >= 0.9 " 2>&1`
- else
-- LIBJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " json >= 0.9 " 2>&1`
-+ LIBJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " json-c >= 0.9 " 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$LIBJSON_PKG_ERRORS" >&5
-
-- as_fn_error $? "Package requirements ( json >= 0.9 ) were not met:
-+ as_fn_error $? "Package requirements ( json-c >= 0.9 ) were not met:
-
- $LIBJSON_PKG_ERRORS
-
diff --git a/audio/pulseaudio/patches/patch-configure.ac b/audio/pulseaudio/patches/patch-configure.ac
new file mode 100644
index 00000000000..c3d8c9612ba
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-configure.ac
@@ -0,0 +1,83 @@
+$NetBSD: patch-configure.ac,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+* Fix NetBSD detection for libatomics_ops check.
+* Fix unportable test(1) construct.
+* Adapt /var-paths for pkgsrc defaults.
+* Install default config files in example directory; pkgsrc config
+ file framework will install them in the right place.
+
+--- configure.ac.orig 2014-02-15 08:33:32.000000000 +0000
++++ configure.ac
+@@ -251,6 +251,11 @@ else
+ # HW specific atomic ops stuff
+ AC_MSG_CHECKING([architecture for native atomic operations])
+ case $host in
++ *-netbsd*)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ need_libatomic_ops=no
++ ;;
+ arm*)
+ AC_MSG_RESULT([arm])
+ AC_MSG_CHECKING([whether we can use Linux kernel helpers])
+@@ -286,10 +291,6 @@ else
+ ])
+ fi
+ ;;
+- *-netbsdelf5*)
+- AC_MSG_RESULT([yes])
+- need_libatomic_ops=no
+- ;;
+ *-freebsd*)
+ AC_MSG_RESULT([yes])
+ need_libatomic_ops=no
+@@ -478,14 +479,14 @@ AS_IF([test "$pulseaudio_cv__Bool" = "ye
+ #### Thread support ####
+
+ AX_TLS
+-AS_IF([test "$ac_cv_tls" == "__thread"],
++AS_IF([test "$ac_cv_tls" = "__thread"],
+ AC_DEFINE([SUPPORT_TLS___THREAD], 1, [Define this if the compiler supports __thread for Thread-Local Storage]))
+
+ # Win32 build breaks with win32 pthread installed
+ AS_IF([test "x$os_is_win32" != "x1"],
+ [AX_PTHREAD])
+
+-AS_IF([test "x$ax_pthread_ok" == "xyes"],
++AS_IF([test "x$ax_pthread_ok" = "xyes"],
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], 1, [Needed on Solaris]))
+
+
+@@ -988,7 +989,7 @@ AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DE
+
+ PA_MACHINE_ID="${sysconfdir}/machine-id"
+ AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file])
+-PA_MACHINE_ID_FALLBACK="${localstatedir}/lib/dbus/machine-id"
++PA_MACHINE_ID_FALLBACK="${localstatedir}/db/dbus/machine-id"
+ AX_DEFINE_DIR(PA_MACHINE_ID_FALLBACK, PA_MACHINE_ID_FALLBACK,
+ [Fallback machine-id file])
+
+@@ -1234,9 +1235,9 @@ fi
+
+ PA_SYSTEM_RUNTIME_PATH="${localstatedir}/run/pulse"
+ AX_DEFINE_DIR(PA_SYSTEM_RUNTIME_PATH, PA_SYSTEM_RUNTIME_PATH, [System runtime dir])
+-PA_SYSTEM_CONFIG_PATH="${localstatedir}/lib/pulse"
++PA_SYSTEM_CONFIG_PATH="${localstatedir}/db/pulse"
+ AX_DEFINE_DIR(PA_SYSTEM_CONFIG_PATH, PA_SYSTEM_CONFIG_PATH, [System config dir])
+-PA_SYSTEM_STATE_PATH="${localstatedir}/lib/pulse"
++PA_SYSTEM_STATE_PATH="${localstatedir}/db/pulse"
+ AX_DEFINE_DIR(PA_SYSTEM_STATE_PATH, PA_SYSTEM_STATE_PATH, [System state dir])
+
+ PA_BINARY=${bindir}/pulseaudio${EXEEXT}
+@@ -1248,8 +1249,9 @@ AX_DEFINE_DIR(PACTL_BINARY, PACTL_BINARY
+ AC_SUBST(PA_SOEXT, [.so])
+ AC_DEFINE(PA_SOEXT, [".so"], [Shared object extension])
+
+-AC_SUBST(pulseconfdir, ["${sysconfdir}/pulse"])
+-AX_DEFINE_DIR(PA_DEFAULT_CONFIG_DIR, pulseconfdir, [Location of configuration files])
++AC_SUBST(pulseconfdirreal, ["${sysconfdir}/pulse"])
++AC_SUBST(pulseconfdir, ["${EGDIR}"])
++AX_DEFINE_DIR(PA_DEFAULT_CONFIG_DIR, pulseconfdirreal, [Location of configuration files])
+
+ #### Mac OSX specific stuff #####
+
diff --git a/audio/pulseaudio/patches/patch-dc b/audio/pulseaudio/patches/patch-dc
deleted file mode 100644
index eac1bd8bbcc..00000000000
--- a/audio/pulseaudio/patches/patch-dc
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-dc,v 1.4 2013/11/25 10:13:56 wiz Exp $
-
-If oss.originating_device hal properly isn't available, try
-sound.originating_device.
-
---- src/modules/module-hal-detect.c.orig 2012-07-19 11:29:39.000000000 +0000
-+++ src/modules/module-hal-detect.c
-@@ -334,6 +334,11 @@ static int hal_device_load_oss(struct us
-
- /* We store only one entry per card, hence we look for the originating device */
- originating_udi = libhal_device_get_property_string(u->context, udi, "oss.originating_device", &error);
-+ if (dbus_error_is_set(&error) || !originating_udi) {
-+ if (dbus_error_is_set(&error))
-+ dbus_error_free(&error);
-+ originating_udi = libhal_device_get_property_string(u->context, udi, "sound.originating_device", &error);
-+ }
- if (dbus_error_is_set(&error) || !originating_udi)
- goto fail;
-
diff --git a/audio/pulseaudio/patches/patch-src_Makefile.am b/audio/pulseaudio/patches/patch-src_Makefile.am
new file mode 100644
index 00000000000..623edae40e5
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-src_Makefile.am
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_Makefile.am,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+Install files into pkgsrc example paths; will be correctly
+installed by pkgsrc configuration file framework.
+
+--- src/Makefile.am.orig 2014-02-14 13:45:45.000000000 +0000
++++ src/Makefile.am
+@@ -27,14 +27,14 @@ pulseincludedir=$(includedir)/pulse
+ pulsecoreincludedir=$(includedir)/pulsecore
+ pulselibexecdir=$(libexecdir)/pulse
+ if HAVE_X11
+-xdgautostartdir=$(sysconfdir)/xdg/autostart
++xdgautostartdir= ${EGDIR}
+ endif
+ if HAVE_ALSA
+ alsaprofilesetsdir=$(datadir)/pulseaudio/alsa-mixer/profile-sets
+ alsapathsdir=$(datadir)/pulseaudio/alsa-mixer/paths
+ endif
+ if HAVE_DBUS
+-dbuspolicydir=$(sysconfdir)/dbus-1/system.d
++dbuspolicydir=${EGDIR}
+ endif
+
+ ###################################
diff --git a/audio/pulseaudio/patches/patch-src_daemon_caps.c b/audio/pulseaudio/patches/patch-src_daemon_caps.c
new file mode 100644
index 00000000000..7d6bf737ff0
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-src_daemon_caps.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_daemon_caps.c,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+Disable warning about capabilities that only makes sense on Linux.
+
+--- src/daemon/caps.c.orig 2014-01-29 19:48:03.000000000 +0000
++++ src/daemon/caps.c
+@@ -93,8 +93,10 @@ void pa_drop_caps(void) {
+ #error "Don't know how to do capabilities on your system. Please send a patch."
+ #endif /* __linux__ */
+ #else /* HAVE_SYS_CAPABILITY_H */
++#if 0
+ pa_log_warn("Normally all extra capabilities would be dropped now, but "
+ "that's impossible because PulseAudio was built without "
+ "capabilities support.");
+ #endif
++#endif
+ }
diff --git a/audio/pulseaudio/patches/patch-src_daemon_main.c b/audio/pulseaudio/patches/patch-src_daemon_main.c
new file mode 100644
index 00000000000..d1cefe8cc7b
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-src_daemon_main.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_daemon_main.c,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+Only display Linux-specific warning on Linux.
+
+--- src/daemon/main.c.orig 2014-02-25 14:01:58.000000000 +0000
++++ src/daemon/main.c
+@@ -1002,10 +1002,12 @@ int main(int argc, char *argv[]) {
+
+ pa_disable_sigpipe();
+
++#if defined(__linux__)
+ if (pa_rtclock_hrtimer())
+ pa_log_info(_("Fresh high-resolution timers available! Bon appetit!"));
+ else
+ pa_log_info(_("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!"));
++#endif
+
+ if (conf->lock_memory) {
+ #if defined(HAVE_SYS_MMAN_H) && !defined(__ANDROID__)
diff --git a/audio/pulseaudio/patches/patch-src_modules_module-detect.c b/audio/pulseaudio/patches/patch-src_modules_module-detect.c
new file mode 100644
index 00000000000..e85640674df
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-src_modules_module-detect.c
@@ -0,0 +1,32 @@
+$NetBSD: patch-src_modules_module-detect.c,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+Hack to set proper sound device on NetBSD.
+
+--- src/modules/module-detect.c.orig 2014-01-23 18:57:55.000000000 +0000
++++ src/modules/module-detect.c
+@@ -122,6 +122,17 @@ static int detect_oss(pa_core *c, int ju
+ FILE *f;
+ int n = 0, b = 0;
+
++#if defined(__NetBSD__)
++/*
++ * Assume primary sound device is used (/dev/sound).
++ * And only primary sound device will be used (n=1).
++ */
++ char args[64];
++ pa_snprintf(args, sizeof(args), "device=/dev/sound");
++ if (!pa_module_load(c, "module-oss", args))
++ exit(1);
++ n = 1;
++#else /* __linux__ or __FreeBSD__ */
+ if (!(f = pa_fopen_cloexec("/dev/sndstat", "r")) &&
+ !(f = pa_fopen_cloexec("/proc/sndstat", "r")) &&
+ !(f = pa_fopen_cloexec("/proc/asound/oss/sndstat", "r"))) {
+@@ -173,6 +184,7 @@ static int detect_oss(pa_core *c, int ju
+ }
+
+ fclose(f);
++#endif
+ return n;
+ }
+ #endif
diff --git a/audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c b/audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c
new file mode 100644
index 00000000000..6b63725d719
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-src_modules_oss_module-oss.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_modules_oss_module-oss.c,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+Set proper sound device default on NetBSD.
+
+--- src/modules/oss/module-oss.c.orig 2014-01-23 18:57:55.000000000 +0000
++++ src/modules/oss/module-oss.c
+@@ -98,7 +98,11 @@ PA_MODULE_USAGE(
+ PA_MODULE_DEPRECATED("Please use module-alsa-card instead of module-oss!");
+ #endif
+
++#if defined(__NetBSD__)
++#define DEFAULT_DEVICE "/dev/sound"
++#else /* Linux */
+ #define DEFAULT_DEVICE "/dev/dsp"
++#endif
+
+ struct userdata {
+ pa_core *core;
diff --git a/audio/pulseaudio/patches/patch-src_pulsecore_sample-util.h b/audio/pulseaudio/patches/patch-src_pulsecore_sample-util.h
new file mode 100644
index 00000000000..d529535d513
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-src_pulsecore_sample-util.h
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_pulsecore_sample-util.h,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+Define glibc-specific (?) __WORDSIZE.
+
+--- src/pulsecore/sample-util.h.orig 2014-01-23 18:57:55.000000000 +0000
++++ src/pulsecore/sample-util.h
+@@ -34,6 +34,14 @@
+ #include <pulsecore/memblock.h>
+ #include <pulsecore/memchunk.h>
+
++#if !defined __WORDSIZE
++# if defined __LP64__
++# define __WORDSIZE 64
++# else
++# define __WORDSIZE 32
++# endif
++#endif
++
+ typedef struct pa_silence_cache {
+ pa_memblock* blocks[PA_SAMPLE_MAX];
+ } pa_silence_cache;
diff --git a/audio/pulseaudio/patches/patch-src_pulsecore_semaphore-osx.c b/audio/pulseaudio/patches/patch-src_pulsecore_semaphore-osx.c
deleted file mode 100644
index 9278cdca43f..00000000000
--- a/audio/pulseaudio/patches/patch-src_pulsecore_semaphore-osx.c
+++ /dev/null
@@ -1,101 +0,0 @@
-$NetBSD: patch-src_pulsecore_semaphore-osx.c,v 1.1 2013/10/24 17:48:53 jperkin Exp $
-
-Add patch to fix OSX build, from:
-
- https://bugs.freedesktop.org/attachment.cgi?id=77310
-
---- src/pulsecore/semaphore-osx.c
-+++ src/pulsecore/semaphore-osx.c
-@@ -1,7 +1,8 @@
- /***
- This file is part of PulseAudio.
-
-- Copyright 2009 Kim Lester <kim@dfusion.com.au>
-+ Copyright 2006 Lennart Poettering
-+ Copyright 2013 Albert Zeyer
-
- PulseAudio is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
-@@ -23,40 +24,72 @@
- #include <config.h>
- #endif
-
--#include <Multiprocessing.h>
-+#include <stdio.h>
-+#include <errno.h>
-+#include <pthread.h>
-+#include <semaphore.h>
-+#include <sys/types.h>
-+#include <unistd.h>
-
- #include <pulse/xmalloc.h>
- #include <pulsecore/macro.h>
-+#include <pulsecore/atomic.h>
-+#include <pulsecore/core-util.h>
-
- #include "semaphore.h"
-
-+/*
-+OSX doesn't support unnamed semaphores (via sem_init).
-+Thus, we use a counter to give them enumerated names.
-+*/
-+
-+static pa_atomic_t id_counter = PA_ATOMIC_INIT(0);
-+
- struct pa_semaphore {
-- MPSemaphoreID sema;
-+ sem_t* sem;
-+ int id;
- };
-
--pa_semaphore* pa_semaphore_new(unsigned int value) {
-- /* NOTE: Can't assume boolean - ie value = 0,1, so use UINT_MAX (boolean more efficient ?) */
-+static char *sem_name(char *fn, size_t l, int id) {
-+ pa_snprintf(fn, l, "/pulse-sem-%u-%u", getpid(), id);
-+ return fn;
-+}
-+
-+pa_semaphore* pa_semaphore_new(unsigned value) {
- pa_semaphore *s;
-
- s = pa_xnew(pa_semaphore, 1);
-- pa_assert_se(MPCreateSemaphore(UINT_MAX, value, &s->sema) == 0);
--
-+ s->id = pa_atomic_inc(&id_counter);
-+ char fn[32]; sem_name(fn, sizeof(fn), s->id);
-+ sem_unlink(fn); // in case it already exists
-+ if((s->sem = sem_open(fn, O_CREAT|O_EXCL, 0700, value)) == SEM_FAILED) {
-+ perror("pa_semaphore_new: sem_open");
-+ abort();
-+ }
- return s;
- }
-
- void pa_semaphore_free(pa_semaphore *s) {
- pa_assert(s);
-- pa_assert_se(MPDeleteSemaphore(s->sema) == 0);
-+ pa_assert_se(sem_close(s->sem) == 0);
-+ char fn[32]; sem_name(fn, sizeof(fn), s->id);
-+ if(sem_unlink(fn) != 0)
-+ perror("pa_semaphore_free: sem_unlink");
- pa_xfree(s);
- }
-
- void pa_semaphore_post(pa_semaphore *s) {
- pa_assert(s);
-- pa_assert_se(MPSignalSemaphore(s->sema) == 0);
-+ pa_assert_se(sem_post(s->sem) == 0);
- }
-
- void pa_semaphore_wait(pa_semaphore *s) {
-+ int ret;
- pa_assert(s);
-- /* should probably check return value (-ve is error), noErr is ok. */
-- pa_assert_se(MPWaitOnSemaphore(s->sema, kDurationForever) == 0);
-+
-+ do {
-+ ret = sem_wait(s->sem);
-+ } while (ret < 0 && errno == EINTR);
-+
-+ pa_assert(ret == 0);
- }
diff --git a/audio/pulseaudio/patches/patch-src_pulsecore_svolume__mmx.c b/audio/pulseaudio/patches/patch-src_pulsecore_svolume__mmx.c
index 706c0d41f02..30c229388d3 100644
--- a/audio/pulseaudio/patches/patch-src_pulsecore_svolume__mmx.c
+++ b/audio/pulseaudio/patches/patch-src_pulsecore_svolume__mmx.c
@@ -1,24 +1,24 @@
-$NetBSD: patch-src_pulsecore_svolume__mmx.c,v 1.1 2013/10/24 17:48:53 jperkin Exp $
+$NetBSD: patch-src_pulsecore_svolume__mmx.c,v 1.2 2014/06/09 13:08:19 ryoon Exp $
Avoid bad register usage on OSX 32-bit.
---- src/pulsecore/svolume_mmx.c.orig 2012-07-19 11:29:39.000000000 +0000
+--- src/pulsecore/svolume_mmx.c.orig 2014-02-22 11:03:55.000000000 +0000
+++ src/pulsecore/svolume_mmx.c
@@ -34,7 +34,7 @@
#include "sample-util.h"
--#if defined (__i386__) || defined (__amd64__)
-+#if (defined (__i386__) && !defined(__APPLE__)) || defined (__amd64__)
+-#if (!defined(__FreeBSD__) && defined (__i386__)) || defined (__amd64__)
++#if ((!defined(__FreeBSD__) || defined(__APPLE__)) && defined (__i386__)) || defined (__amd64__)
/* in s: 2 int16_t samples
* in v: 2 int32_t volumes, fixed point 16:16
* out s: contains scaled and clamped int16_t samples.
-@@ -328,7 +328,7 @@ static void run_test(void) {
-
+@@ -243,7 +243,7 @@ static void pa_volume_s16re_mmx(int16_t
+ #endif /* (!defined(__FreeBSD__) && defined (__i386__)) || defined (__amd64__) */
void pa_volume_func_init_mmx(pa_cpu_x86_flag_t flags) {
--#if defined (__i386__) || defined (__amd64__)
-+#if (defined (__i386__) && !defined(__APPLE__)) || defined (__amd64__)
+-#if (!defined(__FreeBSD__) && defined (__i386__)) || defined (__amd64__)
++#if ((!defined(__FreeBSD__) || defined(__APPLE__)) && defined (__i386__)) || defined (__amd64__)
+ if ((flags & PA_CPU_X86_MMX) && (flags & PA_CPU_X86_CMOV)) {
+ pa_log_info("Initialising MMX optimized volume functions.");
- #ifdef RUN_TEST
- run_test();
diff --git a/audio/pulseaudio/patches/patch-src_pulsecore_svolume__sse.c b/audio/pulseaudio/patches/patch-src_pulsecore_svolume__sse.c
index 721608f595e..b091b80c599 100644
--- a/audio/pulseaudio/patches/patch-src_pulsecore_svolume__sse.c
+++ b/audio/pulseaudio/patches/patch-src_pulsecore_svolume__sse.c
@@ -1,24 +1,24 @@
-$NetBSD: patch-src_pulsecore_svolume__sse.c,v 1.1 2013/10/24 17:48:53 jperkin Exp $
+$NetBSD: patch-src_pulsecore_svolume__sse.c,v 1.2 2014/06/09 13:08:19 ryoon Exp $
Avoid bad register usage on OSX 32-bit.
---- src/pulsecore/svolume_sse.c.orig 2012-07-19 11:29:39.000000000 +0000
+--- src/pulsecore/svolume_sse.c.orig 2014-02-22 11:05:30.000000000 +0000
+++ src/pulsecore/svolume_sse.c
@@ -34,7 +34,7 @@
#include "sample-util.h"
--#if defined (__i386__) || defined (__amd64__)
-+#if (defined (__i386__) && !defined(__APPLE__)) || defined (__amd64__)
+-#if (!defined(__FreeBSD__) && defined (__i386__)) || defined (__amd64__)
++#if ((!defined(__FreeBSD__) || defined(__APPLE__)) && defined (__i386__)) || defined (__amd64__)
#define VOLUME_32x16(s,v) /* .. | vh | vl | */ \
" pxor %%xmm4, %%xmm4 \n\t" /* .. | 0 | 0 | */ \
-@@ -335,7 +335,7 @@ static void run_test(void) {
- #endif /* defined (__i386__) || defined (__amd64__) */
+@@ -254,7 +254,7 @@ static void pa_volume_s16re_sse2(int16_t
+ #endif /* (!defined(__FreeBSD__) && defined (__i386__)) || defined (__amd64__) */
void pa_volume_func_init_sse(pa_cpu_x86_flag_t flags) {
--#if defined (__i386__) || defined (__amd64__)
-+#if (defined (__i386__) && !defined(__APPLE__)) || defined (__amd64__)
+-#if (!defined(__FreeBSD__) && defined (__i386__)) || defined (__amd64__)
++#if ((!defined(__FreeBSD__) || defined(__APPLE__)) && defined (__i386__)) || defined (__amd64__)
+ if (flags & PA_CPU_X86_SSE2) {
+ pa_log_info("Initialising SSE2 optimized volume functions.");
- #ifdef RUN_TEST
- run_test();
diff --git a/audio/pulseaudio/patches/patch-src_tests_mult-s16-test.c b/audio/pulseaudio/patches/patch-src_tests_mult-s16-test.c
new file mode 100644
index 00000000000..392cbd83992
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-src_tests_mult-s16-test.c
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_tests_mult-s16-test.c,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+Define glibc-specific (?) __WORDSIZE.
+
+--- src/tests/mult-s16-test.c.orig 2014-01-23 18:57:55.000000000 +0000
++++ src/tests/mult-s16-test.c
+@@ -30,6 +30,14 @@
+ #include <pulsecore/random.h>
+ #include <pulsecore/macro.h>
+
++#if !defined __WORDSIZE
++# if defined __LP64__
++# define __WORDSIZE 64
++# else
++# define __WORDSIZE 32
++# endif
++#endif
++
+ #include "runtime-test-util.h"
+
+ static inline int32_t pa_mult_s16_volume_32(int16_t v, int32_t cv) {
diff --git a/audio/pulseaudio/patches/patch-src_tests_once-test.c b/audio/pulseaudio/patches/patch-src_tests_once-test.c
deleted file mode 100644
index 9d9b2c9422d..00000000000
--- a/audio/pulseaudio/patches/patch-src_tests_once-test.c
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-src_tests_once-test.c,v 1.1 2013/12/16 19:00:03 asau Exp $
-
---- src/tests/once-test.c.orig 2012-07-03 12:47:50.000000000 +0000
-+++ src/tests/once-test.c 2013-09-26 00:26:09.760505519 +0000
-@@ -25,6 +25,11 @@
- #include <pthread.h>
- #endif
-
-+#if defined(__FreeBSD__)
-+#include <sys/param.h>
-+#include <sys/cpuset.h>
-+#endif
-+
- #include <pulsecore/thread.h>
- #include <pulsecore/once.h>
- #include <pulsecore/log.h>
-@@ -54,7 +59,11 @@
-
- #ifdef HAVE_PTHREAD_SETAFFINITY_NP
- static pa_atomic_t i_cpu = PA_ATOMIC_INIT(0);
-+#if defined(__FreeBSD__)
-+ cpuset_t mask;
-+#else
- cpu_set_t mask;
-+#endif
-
- CPU_ZERO(&mask);
- CPU_SET((size_t) (pa_atomic_inc(&i_cpu) % n_cpu), &mask);
diff --git a/audio/pulseaudio/patches/patch-src_tests_rtpoll-test.c b/audio/pulseaudio/patches/patch-src_tests_rtpoll-test.c
new file mode 100644
index 00000000000..124e999a649
--- /dev/null
+++ b/audio/pulseaudio/patches/patch-src_tests_rtpoll-test.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_tests_rtpoll-test.c,v 1.1 2014/06/09 13:08:19 ryoon Exp $
+
+Build fix for systems without real-time signals.
+
+--- src/tests/rtpoll-test.c.orig 2014-01-21 13:39:57.000000000 +0000
++++ src/tests/rtpoll-test.c
+@@ -85,6 +85,7 @@ START_TEST (rtpoll_test) {
+ END_TEST
+
+ int main(int argc, char *argv[]) {
++#ifdef SIGRTMIN
+ int failed = 0;
+ Suite *s;
+ TCase *tc;
+@@ -105,4 +106,7 @@ int main(int argc, char *argv[]) {
+ srunner_free(sr);
+
+ return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
++#else
++ return 0
++#endif
+ }
diff --git a/audio/pulseaudio/patches/patch-src_tests_rtstutter.c b/audio/pulseaudio/patches/patch-src_tests_rtstutter.c
deleted file mode 100644
index ee7d1cd23d8..00000000000
--- a/audio/pulseaudio/patches/patch-src_tests_rtstutter.c
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-src_tests_rtstutter.c,v 1.1 2013/12/16 19:00:03 asau Exp $
-
---- src/tests/rtstutter.c.orig 2011-09-26 15:51:42.000000000 +0000
-+++ src/tests/rtstutter.c 2013-09-26 00:28:11.949504937 +0000
-@@ -32,6 +32,11 @@
- #include <pthread.h>
- #endif
-
-+#if defined(__FreeBSD__)
-+#include <sys/param.h>
-+#include <sys/cpuset.h>
-+#endif
-+
- #include <pulse/util.h>
- #include <pulse/timeval.h>
- #include <pulse/gccmacro.h>
-@@ -54,7 +59,11 @@
-
- #ifdef HAVE_PTHREAD_SETAFFINITY_NP
- {
-+#if defined(__FreeBSD__)
-+ cpuset_t mask;
-+#else
- cpu_set_t mask;
-+#endif
-
- CPU_ZERO(&mask);
- CPU_SET((size_t) PA_PTR_TO_UINT(p), &mask);