Index: head/audio/pulseaudio/Makefile =================================================================== --- head/audio/pulseaudio/Makefile (revision 425811) +++ head/audio/pulseaudio/Makefile (revision 425812) @@ -1,119 +1,119 @@ # Created by: Joe Marcus Clarke # $FreeBSD$ # # !!!NOTE!!! Any PORTVERSION update to this port must be accompanied by # PORTREVISION bumps of depending ports. PORTNAME= pulseaudio PORTVERSION= 9.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/ MAINTAINER= gnome@FreeBSD.org COMMENT= Sound server for UNIX LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/LGPL LIB_DEPENDS= libsndfile.so:audio/libsndfile \ libfftw3.so:math/fftw3 \ libfftw3f.so:math/fftw3-float \ libjson-c.so:devel/json-c \ libdbus-1.so:devel/dbus \ libltdl.so:devel/libltdl \ libck-connector.so:sysutils/consolekit USE_GNOME= glib20 intltool USE_XORG= ice sm x11 xcb xtst USE_LDCONFIG= yes USES= compiler:c11 cpe execinfo gettext gmake gnome iconv libtool \ pathfix pkgconfig shebangfix ssl tar:xz GNU_CONFIGURE= yes CONFIGURE_ENV= PTHREAD_LIBS="-lpthread" \ OPENSSL_CFLAGS="-I${OPENSSLINC}" \ OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto -lssl" \ LIBS="-lm -lintl" \ ac_cv_header_linux_input_h="" CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib INSTALL_TARGET= install-strip SHEBANG_FILES= shell-completion/bash/pulseaudio bash_CMD= ${SETENV} bash SUB_FILES= pkg-message CONFIGURE_ARGS= --localstatedir=/var \ --without-caps \ --disable-udev \ --disable-gtk3 \ --disable-systemd-daemon \ --disable-systemd-journal \ --disable-systemd-login \ --disable-neon-opt \ --disable-xen \ --disable-lirc # untested USERS= pulse GROUPS= pulse pulse-access pulse-rt OPTIONS_SUB= yes OPTIONS_DEFINE= AVAHI GCONF SIMD OPTIONS_DEFAULT=AVAHI SIMD SIMPLE SOXR SPEEX AVAHI_CONFIGURE_ENABLE= avahi AVAHI_LIB_DEPENDS= libavahi-client.so:net/avahi-app GCONF_CONFIGURE_ENABLE= gconf GCONF_USE= GNOME=gconf2 SIMD_CONFIGURE_ENABLE= orc SIMD_LIB_DEPENDS= liborc-0.4.so:devel/orc OPTIONS_GROUP= AUDIO COMPLETIONS OPTIONS_GROUP_AUDIO= ALSA JACK SOXR SPEEX OPTIONS_GROUP_COMPLETIONS= BASH ZSH AUDIO_DESC= Audio support COMPLETIONS_DESC= Programmable completions ALSA_CONFIGURE_ENABLE= alsa ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib JACK_CONFIGURE_ENABLE= jack JACK_LIB_DEPENDS= libjack.so:audio/jack SOXR_DESC= SoX resampler support SOXR_CONFIGURE_WITH= soxr SOXR_LIB_DEPENDS= libsoxr.so:audio/libsoxr SPEEX_DESC= Speex resampler and AEC support SPEEX_CONFIGURE_WITH= speex SPEEX_LIB_DEPENDS= libspeexdsp.so:audio/speexdsp ZSH_CONFIGURE_OFF= --without-zsh-completion-dir OPTIONS_SINGLE= DATABASE OPTIONS_SINGLE_DATABASE= TDB GDBM SIMPLE DATABASE_DESC= Database support GDBM_DESC= GNU database manager support GDBM_CONFIGURE_ON= --with-database=gdbm GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm SIMPLE_DESC= Simple database support SIMPLE_CONFIGURE_ON= --with-database=simple TDB_DESC= Trivial database support TDB_CONFIGURE_ON= --with-database=tdb TDB_LIB_DEPENDS= libtdb.so:databases/tdb PULSE_VERSION= ${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} PLIST_SUB= PULSE_VERSION=${PULSE_VERSION} post-patch: @${REINPLACE_CMD} -e 's|/usr/share|${LOCALBASE}/share|g' \ ${WRKSRC}/src/daemon/default.pa.in @${REINPLACE_CMD} -e 's|-Wmissing-include-dirs||g' \ -e 's|/lib/dbus/machine-id|/db/dbus/machine-id|g' \ ${WRKSRC}/configure post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/etc/pulse .for ii in default.pa daemon.conf client.conf system.pa ${INSTALL_DATA} ${WRKSRC}/src/${ii} \ ${STAGEDIR}${PREFIX}/etc/pulse/${ii}.sample .endfor post-install-BASH-off: @${RM} -r ${STAGEDIR}${PREFIX}/share/bash-completion .include Index: head/audio/pulseaudio/files/patch-src_modules_module-detect.c =================================================================== --- head/audio/pulseaudio/files/patch-src_modules_module-detect.c (revision 425811) +++ head/audio/pulseaudio/files/patch-src_modules_module-detect.c (revision 425812) @@ -1,54 +1,51 @@ --- src/modules/module-detect.c.orig 2016-05-10 12:28:04 UTC +++ src/modules/module-detect.c -@@ -160,11 +160,48 @@ static int detect_oss(pa_core *c, int ju +@@ -160,11 +160,45 @@ static int detect_oss(pa_core *c, int ju continue; } else if (sscanf(line, "pcm%u: ", &device) == 1) { - /* FreeBSD support, the devices are named /dev/dsp0.0, dsp0.1 and so on */ - pa_snprintf(args, sizeof(args), "device=/dev/dsp%u.0", device); + pa_snprintf(args, sizeof(args), "device=/dev/dsp%u", device); + pa_module *m = pa_module_load(c, "module-oss", args); - if (!pa_module_load(c, "module-oss", args)) + if (!m) + continue; + + if (!pa_endswith(line, "default")) + continue; + -+ char *p = strrchr(line, '>'); -+ -+ if (p) -+ p = strchr(p, '('); ++ const char *p = strrchr(line, '('); + + if (!p) continue; + + if (!c->default_sink && (strstr(p, "play") || (strstr(p, "p:") && !strstr(p, "(0p:")))) { + uint32_t idx = PA_IDXSET_INVALID; + pa_sink *s; + PA_IDXSET_FOREACH(s, c->sinks, idx) { + if (s->module == m) { + if (!pa_namereg_set_default_sink(c, s)) + pa_log_error("failed to set default sink for device: /dev/dsp%u", device); + + break; + } + } + } + + if (!c->default_source && (strstr(p, "rec") || (strstr(p, "r:") && !strstr(p, "/0r:")))) { + uint32_t idx = PA_IDXSET_INVALID; + pa_source *s; + PA_IDXSET_FOREACH(s, c->sources, idx) { + if (s->module == m) { + if (!pa_namereg_set_default_source(c, s)) + pa_log_error("failed to set default source for device: /dev/dsp%u", device); + + break; + } + } + } } n++;