<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[153196] trunk/dports/audio/pulseaudio</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/153196">153196</a></dd>
<dt>Author</dt> <dd>ionic@macports.org</dd>
<dt>Date</dt> <dd>2016-09-26 20:10:12 -0700 (Mon, 26 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>pulseaudio: update to 9.0. Fixes: #52386.
Changes:
- Now uses C11, some compilers were blacklisted.
- Refresh patches, drop upstreamed patches, rework the others.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsaudiopulseaudioPortfile">trunk/dports/audio/pulseaudio/Portfile</a></li>
<li><a href="#trunkdportsaudiopulseaudiofilesautogensh">trunk/dports/audio/pulseaudio/files/autogen.sh</a></li>
<li><a href="#trunkdportsaudiopulseaudiofilespatchsrc_daemon_defaultpainskipconsolekitandsystemdlogindiff">trunk/dports/audio/pulseaudio/files/patch-src_daemon_default.pa.in-skip-consolekit-and-systemdlogin.diff</a></li>
<li><a href="#trunkdportsaudiopulseaudiofilespatchsrc_modules_macosx_module_coreaudio_detect_devicecaddrecordplaybackmodargdiff">trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_detect_device.c-add-record-playback-modarg.diff</a></li>
<li><a href="#trunkdportsaudiopulseaudiofilespatchsrc_modules_macosx_module_coreaudio_devicecrespectPA_NAME_MAXdiff">trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-respect-PA_NAME_MAX.diff</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsaudiopulseaudiofilespatchconfigureaccoreservicesdiff">trunk/dports/audio/pulseaudio/files/patch-configure.ac-coreservices.diff</a></li>
<li><a href="#trunkdportsaudiopulseaudiofilespatchsrc_modules_macosx_module_coreaudio_devicecdynamicallyallocateCstringwhenconvertingfromCFStringpatch">trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-dynamically-allocate-C-string-when-converting-from-CFString.patch</a></li>
<li><a href="#trunkdportsaudiopulseaudiofilespatchsrc_modules_macosx_module_coreaudio_devicecskipunsupportedchannelscountdiff">trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-skip-unsupported-channels-count.diff</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#trunkdportsaudiopulseaudiofilesautogensh">trunk/dports/audio/pulseaudio/files/autogen.sh</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsaudiopulseaudioPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/audio/pulseaudio/Portfile (153195 => 153196)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/pulseaudio/Portfile        2016-09-26 22:56:08 UTC (rev 153195)
+++ trunk/dports/audio/pulseaudio/Portfile        2016-09-27 03:10:12 UTC (rev 153196)
</span><span class="lines">@@ -6,10 +6,11 @@
</span><span class="cx">
</span><span class="cx"> PortSystem 1.0
</span><span class="cx"> PortGroup active_variants 1.1
</span><ins>+PortGroup compiler_blacklist_versions 1.0
</ins><span class="cx">
</span><span class="cx"> name pulseaudio
</span><del>-version 8.0
-revision 2
</del><ins>+version 9.0
+revision 0
</ins><span class="cx"> license LGPL-2.1
</span><span class="cx"> categories audio
</span><span class="cx"> maintainers ionic openmaintainer
</span><span class="lines">@@ -28,8 +29,8 @@
</span><span class="cx">
</span><span class="cx"> use_xz yes
</span><span class="cx">
</span><del>-checksums rmd160 fc2700ec34ae9cbecd85c1ad6253b4c224541c96 \
- sha256 690eefe28633466cfd1ab9d85ebfa9376f6b622deec6bfee5091ac9737cd1989
</del><ins>+checksums rmd160 bab63483ff39e462a0701fcd612fea9f1ebe1173 \
+ sha256 c3d3d66b827f18fbe903fe3df647013f09fc1e2191c035be1ee2d82a9e404686
</ins><span class="cx">
</span><span class="cx"> set perl_branch 5.24
</span><span class="cx">
</span><span class="lines">@@ -75,9 +76,6 @@
</span><span class="cx"> # and posts on the mailing list.
</span><span class="cx"> patchfiles patch-man-Makefile.am.diff \
</span><span class="cx"> i386.patch \
</span><del>- patch-configure.ac-coreservices.diff \
- patch-src_modules_macosx_module_coreaudio_device.c-dynamically-allocate-C-string-when-converting-from-CFString.patch \
- patch-src_modules_macosx_module_coreaudio_device.c-skip-unsupported-channels-count.diff \
</del><span class="cx"> patch-src_modules_macosx_module_coreaudio_device.c-respect-PA_NAME_MAX.diff \
</span><span class="cx"> patch-src_daemon_default.pa.in-skip-consolekit-and-systemdlogin.diff \
</span><span class="cx"> patch-src_modules_macosx_module_coreaudio_detect_device.c-add-record-playback-modarg.diff
</span><span class="lines">@@ -88,6 +86,9 @@
</span><span class="cx"> reinplace "s|@@MP_PERL@@|${prefix}/bin/perl${perl_branch}|" ${worksrcpath}/man/Makefile.am
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+# Blacklist compilers that do not support C11.
+compiler.blacklist {*gcc-3*} {*gcc-4.[0-8]} {clang < 300} cc
+
</ins><span class="cx"> configure.cmd ./autogen.sh
</span><span class="cx">
</span><span class="cx"> configure.args --with-mac-version-min=$macosx_deployment_target \
</span></span></pre></div>
<a id="trunkdportsaudiopulseaudiofilesautogensh"></a>
<div class="modfile"><h4>Modified: trunk/dports/audio/pulseaudio/files/autogen.sh (153195 => 153196)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/pulseaudio/files/autogen.sh        2016-09-26 22:56:08 UTC (rev 153195)
+++ trunk/dports/audio/pulseaudio/files/autogen.sh        2016-09-27 03:10:12 UTC (rev 153196)
</span><span class="lines">@@ -13,8 +13,7 @@
</span><span class="cx"> # General Public License for more details.
</span><span class="cx"> #
</span><span class="cx"> # You should have received a copy of the GNU Lesser General Public License
</span><del>-# along with PulseAudio; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
</del><ins>+# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
</ins><span class="cx">
</span><span class="cx"> # Only there to make jhbuild happy
</span><span class="cx">
</span><span class="cx">Property changes on: trunk/dports/audio/pulseaudio/files/autogen.sh
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<a id="trunkdportsaudiopulseaudiofilespatchconfigureaccoreservicesdiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/audio/pulseaudio/files/patch-configure.ac-coreservices.diff (153195 => 153196)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/pulseaudio/files/patch-configure.ac-coreservices.diff        2016-09-26 22:56:08 UTC (rev 153195)
+++ trunk/dports/audio/pulseaudio/files/patch-configure.ac-coreservices.diff        2016-09-27 03:10:12 UTC (rev 153196)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>---- configure.ac.old        2016-01-22 08:33:38.000000000 +0100
-+++ configure.ac        2016-02-22 21:15:46.000000000 +0100
-@@ -533,13 +533,9 @@ AC_SEARCH_LIBS([backtrace], [execinfo ub
- # Darwin/OS X
- if test "x$os_is_darwin" = "x1" ; then
- AC_MSG_CHECKING([looking for Apple CoreService Framework])
-- # How do I check a framework "library" - AC_CHECK_LIB prob. won't work??, just assign LIBS & hope
-- AC_CHECK_HEADER([/Developer/Headers/FlatCarbon/CoreServices.h],
-+ AC_CHECK_HEADER([CoreServices/CoreServices.h],
- [LIBS="$LIBS -framework CoreServices"],
-- [AC_CHECK_HEADERS([/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h],
-- [LIBS="$LIBS -framework CoreServices"],
-- [AC_MSG_ERROR([CoreServices.h header file not found])]
-- )]
-+ [AC_MSG_ERROR([CoreServices.h header file not found])]
- )
-
- AC_MSG_RESULT([ok])
</del></span></pre></div>
<a id="trunkdportsaudiopulseaudiofilespatchsrc_daemon_defaultpainskipconsolekitandsystemdlogindiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/audio/pulseaudio/files/patch-src_daemon_default.pa.in-skip-consolekit-and-systemdlogin.diff (153195 => 153196)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/pulseaudio/files/patch-src_daemon_default.pa.in-skip-consolekit-and-systemdlogin.diff        2016-09-26 22:56:08 UTC (rev 153195)
+++ trunk/dports/audio/pulseaudio/files/patch-src_daemon_default.pa.in-skip-consolekit-and-systemdlogin.diff        2016-09-27 03:10:12 UTC (rev 153196)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><del>---- src/daemon/default.pa.in.old        2016-01-18 11:14:20.000000000 +0100
-+++ src/daemon/default.pa.in        2016-02-22 21:31:10.000000000 +0100
-@@ -153,12 +153,14 @@ load-module module-suspend-on-idle
</del><ins>+--- src/daemon/default.pa.in.old        2016-05-03 08:17:39.000000000 +0200
++++ src/daemon/default.pa.in        2016-09-27 03:23:14.000000000 +0200
+@@ -140,12 +140,14 @@ load-module module-suspend-on-idle
</ins><span class="cx">
</span><span class="cx"> ### If autoexit on idle is enabled we want to make sure we only quit
</span><span class="cx"> ### when no local session needs us anymore.
</span></span></pre></div>
<a id="trunkdportsaudiopulseaudiofilespatchsrc_modules_macosx_module_coreaudio_detect_devicecaddrecordplaybackmodargdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_detect_device.c-add-record-playback-modarg.diff (153195 => 153196)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_detect_device.c-add-record-playback-modarg.diff        2016-09-26 22:56:08 UTC (rev 153195)
+++ trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_detect_device.c-add-record-playback-modarg.diff        2016-09-27 03:10:12 UTC (rev 153196)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><del>---- src/modules/macosx/module-coreaudio-detect.c.old        2015-09-10 06:51:41.000000000 +0200
-+++ src/modules/macosx/module-coreaudio-detect.c        2016-02-23 00:59:31.000000000 +0100
</del><ins>+--- src/modules/macosx/module-coreaudio-detect.c.old        2016-05-03 08:17:39.000000000 +0200
++++ src/modules/macosx/module-coreaudio-detect.c        2016-09-27 03:27:05.000000000 +0200
</ins><span class="cx"> @@ -39,10 +39,14 @@ PA_MODULE_AUTHOR("Daniel Mack");
</span><span class="cx"> PA_MODULE_DESCRIPTION("CoreAudio device detection");
</span><span class="cx"> PA_MODULE_VERSION(PACKAGE_VERSION);
</span><span class="lines">@@ -69,8 +69,8 @@
</span><span class="cx"> pa_modargs_get_value_u32(ma, "ioproc_frames", &u->ioproc_frames);
</span><span class="cx">
</span><span class="cx"> property_address.mSelector = kAudioHardwarePropertyDevices;
</span><del>---- src/modules/macosx/module-coreaudio-device.c.old        2016-02-23 00:57:43.000000000 +0100
-+++ src/modules/macosx/module-coreaudio-device.c        2016-02-23 00:59:31.000000000 +0100
</del><ins>+--- src/modules/macosx/module-coreaudio-device.c.old        2016-09-27 03:14:04.000000000 +0200
++++ src/modules/macosx/module-coreaudio-device.c        2016-09-27 03:27:05.000000000 +0200
</ins><span class="cx"> @@ -58,11 +58,15 @@ PA_MODULE_DESCRIPTION("CoreAudio device"
</span><span class="cx"> PA_MODULE_VERSION(PACKAGE_VERSION);
</span><span class="cx"> PA_MODULE_LOAD_ONCE(false);
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> NULL
</span><span class="cx"> };
</span><span class="cx">
</span><del>-@@ -772,6 +776,7 @@ int pa__init(pa_module *m) {
</del><ins>+@@ -766,6 +770,7 @@ int pa__init(pa_module *m) {
</ins><span class="cx"> UInt32 size, frames;
</span><span class="cx"> struct userdata *u = NULL;
</span><span class="cx"> pa_modargs *ma = NULL;
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> char tmp[64];
</span><span class="cx"> pa_card_new_data card_new_data;
</span><span class="cx"> pa_card_profile *p;
</span><del>-@@ -786,6 +791,16 @@ int pa__init(pa_module *m) {
</del><ins>+@@ -780,6 +785,16 @@ int pa__init(pa_module *m) {
</ins><span class="cx"> goto fail;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx"> u = pa_xnew0(struct userdata, 1);
</span><span class="cx"> u->module = m;
</span><span class="cx"> m->userdata = u;
</span><del>-@@ -845,10 +860,12 @@ int pa__init(pa_module *m) {
</del><ins>+@@ -839,10 +854,12 @@ int pa__init(pa_module *m) {
</ins><span class="cx"> PA_LLIST_HEAD_INIT(coreaudio_sink, u->sinks);
</span><span class="cx">
</span><span class="cx"> /* create sinks */
</span></span></pre></div>
<a id="trunkdportsaudiopulseaudiofilespatchsrc_modules_macosx_module_coreaudio_devicecdynamicallyallocateCstringwhenconvertingfromCFStringpatch"></a>
<div class="delfile"><h4>Deleted: trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-dynamically-allocate-C-string-when-converting-from-CFString.patch (153195 => 153196)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-dynamically-allocate-C-string-when-converting-from-CFString.patch        2016-09-26 22:56:08 UTC (rev 153195)
+++ trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-dynamically-allocate-C-string-when-converting-from-CFString.patch        2016-09-27 03:10:12 UTC (rev 153196)
</span><span class="lines">@@ -1,121 +0,0 @@
</span><del>---- src/modules/macosx/module-coreaudio-device.c.old        2016-01-18 11:14:20.000000000 +0100
-+++ src/modules/macosx/module-coreaudio-device.c        2016-02-23 00:53:21.000000000 +0100
-@@ -376,23 +376,23 @@ static int ca_sink_set_state(pa_sink *s,
- }
-
- /* Caveat: The caller is responsible to get rid of the CFString(Ref). */
--static bool CFString_to_cstr_n(CFStringRef cfstr, char *buf, long n) {
-- bool ret;
--
-- pa_assert (buf);
--
-- ret = false;
-+static char * CFString_to_cstr(CFStringRef cfstr) {
-+ char *ret = NULL;
-
- if (cfstr != NULL) {
- const char *tmp = CFStringGetCStringPtr(cfstr, kCFStringEncodingUTF8);
-+ CFIndex n = CFStringGetLength(cfstr) + 1 /* for the terminating NULL */;
-+
-+ ret = pa_xmalloc(n);
-
- if (tmp == NULL) {
-- if (CFStringGetCString(cfstr, buf, n, kCFStringEncodingUTF8))
-- ret = true;
-+ if (!CFStringGetCString(cfstr, ret, n, kCFStringEncodingUTF8)) {
-+ pa_xfree(ret);
-+ ret = NULL;
-+ }
- } else {
-- strncpy(buf, tmp, n);
-- buf[n - 1] = 0;
-- ret = true;
-+ strncpy(ret, tmp, n - 1);
-+ ret[n - 1] = '\0';
- }
- }
-
-@@ -408,7 +408,7 @@ static int ca_device_create_sink(pa_modu
- coreaudio_sink *ca_sink;
- pa_sink *sink;
- unsigned int i;
-- char tmp[255];
-+ char *tmp;
- pa_strbuf *strbuf;
- AudioObjectPropertyAddress property_address;
- CFStringRef tmp_cfstr = NULL;
-@@ -425,23 +425,24 @@ static int ca_device_create_sink(pa_modu
- property_address.mSelector = kAudioObjectPropertyElementName;
- property_address.mScope = kAudioDevicePropertyScopeOutput;
- property_address.mElement = channel_idx + i + 1;
-- size = sizeof(tmp);
-+ size = sizeof(tmp_cfstr);
- err = AudioObjectGetPropertyData(u->object_id, &property_address, 0, NULL, &size, &tmp_cfstr);
- if (err == 0) {
-- err = !(CFString_to_cstr_n(tmp_cfstr, tmp, sizeof(tmp)));
-+ tmp = CFString_to_cstr(tmp_cfstr);
-
-- if (tmp_cfstr) {
-+ if (tmp_cfstr)
- CFRelease(tmp_cfstr);
-- }
- }
-
-- if (err || !strlen(tmp))
-- snprintf(tmp, sizeof(tmp), "Channel %d", (int) property_address.mElement);
--
- if (i > 0)
- pa_strbuf_puts(strbuf, ", ");
-
-- pa_strbuf_puts(strbuf, tmp);
-+ if (err || !tmp || !strlen(tmp))
-+ pa_strbuf_printf(strbuf, "Channel %d", (int) property_address.mElement);
-+ else
-+ pa_strbuf_puts(strbuf, tmp);
-+
-+ pa_xfree(tmp);
- }
-
- ca_sink->name = pa_strbuf_to_string_free(strbuf);
-@@ -535,7 +536,7 @@ static int ca_device_create_source(pa_mo
- coreaudio_source *ca_source;
- pa_source *source;
- unsigned int i;
-- char tmp[255];
-+ char *tmp;
- pa_strbuf *strbuf;
- AudioObjectPropertyAddress property_address;
- CFStringRef tmp_cfstr = NULL;
-@@ -552,23 +553,24 @@ static int ca_device_create_source(pa_mo
- property_address.mSelector = kAudioObjectPropertyElementName;
- property_address.mScope = kAudioDevicePropertyScopeInput;
- property_address.mElement = channel_idx + i + 1;
-- size = sizeof(tmp);
-+ size = sizeof(tmp_cfstr);
- err = AudioObjectGetPropertyData(u->object_id, &property_address, 0, NULL, &size, &tmp_cfstr);
- if (err == 0) {
-- err = !(CFString_to_cstr_n(tmp_cfstr, tmp, sizeof(tmp)));
-+ tmp = CFString_to_cstr(tmp_cfstr);
-
-- if (tmp_cfstr) {
-+ if (tmp_cfstr)
- CFRelease(tmp_cfstr);
-- }
- }
-
-- if (err || !strlen(tmp))
-- snprintf(tmp, sizeof(tmp), "Channel %d", (int) property_address.mElement);
--
- if (i > 0)
- pa_strbuf_puts(strbuf, ", ");
-
-- pa_strbuf_puts(strbuf, tmp);
-+ if (err || !tmp || !strlen(tmp))
-+ pa_strbuf_printf(strbuf, "Channel %d", (int) property_address.mElement);
-+ else
-+ pa_strbuf_puts(strbuf, tmp);
-+
-+ pa_xfree(tmp);
- }
-
- ca_source->name = pa_strbuf_to_string_free(strbuf);
</del></span></pre></div>
<a id="trunkdportsaudiopulseaudiofilespatchsrc_modules_macosx_module_coreaudio_devicecrespectPA_NAME_MAXdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-respect-PA_NAME_MAX.diff (153195 => 153196)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-respect-PA_NAME_MAX.diff        2016-09-26 22:56:08 UTC (rev 153195)
+++ trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-respect-PA_NAME_MAX.diff        2016-09-27 03:10:12 UTC (rev 153196)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><del>---- src/modules/macosx/module-coreaudio-device.c.old        2016-02-23 23:32:59.000000000 +0100
-+++ src/modules/macosx/module-coreaudio-device.c        2016-02-23 23:33:34.000000000 +0100
</del><ins>+--- src/modules/macosx/module-coreaudio-device.c.old        2016-05-03 08:17:39.000000000 +0200
++++ src/modules/macosx/module-coreaudio-device.c        2016-09-27 03:14:04.000000000 +0200
</ins><span class="cx"> @@ -43,6 +43,7 @@
</span><span class="cx"> #include <pulsecore/thread.h>
</span><span class="cx"> #include <pulsecore/thread-mq.h>
</span><span class="lines">@@ -8,55 +8,29 @@
</span><span class="cx">
</span><span class="cx"> #include <CoreAudio/CoreAudio.h>
</span><span class="cx"> #include <CoreAudio/CoreAudioTypes.h>
</span><del>-@@ -408,7 +409,7 @@ static int ca_device_create_sink(pa_modu
- coreaudio_sink *ca_sink;
- pa_sink *sink;
- unsigned int i;
-- char *tmp;
-+ char *tmp, *tmp_clamp;
- pa_strbuf *strbuf;
- AudioObjectPropertyAddress property_address;
- CFStringRef tmp_cfstr = NULL;
-@@ -450,7 +451,15 @@ static int ca_device_create_sink(pa_modu
</del><ins>+@@ -452,7 +453,11 @@ static int ca_device_create_sink(pa_modu
</ins><span class="cx"> pa_xfree(tmp);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - ca_sink->name = pa_strbuf_to_string_free(strbuf);
</span><span class="cx"> + /* Clamp to PA_NAME_MAX and leave a "safety margin" for deduplication
</span><span class="cx"> + * and other appended data. */
</span><del>-+ tmp_clamp = pa_strbuf_to_string_free(strbuf);
-+ tmp = pa_xmalloc0(PA_NAME_MAX);
-+ strncpy(tmp, tmp_clamp, PA_NAME_MAX - 20);
-+ tmp[PA_NAME_MAX - 20] = 0;
-+ pa_xfree(tmp_clamp);
-+
-+ ca_sink->name = pa_xstrndup(tmp, PA_NAME_MAX);
</del><ins>++ tmp = pa_strbuf_to_string_free(strbuf);
++ ca_sink->name = pa_xstrndup(tmp, PA_NAME_MAX - 20);
++ pa_xfree(tmp);
</ins><span class="cx">
</span><span class="cx"> pa_log_debug("Stream name is >%s<", ca_sink->name);
</span><span class="cx">
</span><del>-@@ -541,7 +550,7 @@ static int ca_device_create_source(pa_mo
- coreaudio_source *ca_source;
- pa_source *source;
- unsigned int i;
-- char *tmp;
-+ char *tmp, *tmp_clamp;
- pa_strbuf *strbuf;
- AudioObjectPropertyAddress property_address;
- CFStringRef tmp_cfstr = NULL;
-@@ -583,7 +592,15 @@ static int ca_device_create_source(pa_mo
</del><ins>+@@ -585,7 +590,11 @@ static int ca_device_create_source(pa_mo
</ins><span class="cx"> pa_xfree(tmp);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - ca_source->name = pa_strbuf_to_string_free(strbuf);
</span><span class="cx"> + /* Clamp to PA_NAME_MAX and leave a "safety margin" for deduplication
</span><span class="cx"> + * and other appended data. */
</span><del>-+ tmp_clamp = pa_strbuf_to_string_free(strbuf);
-+ tmp = pa_xmalloc0(PA_NAME_MAX);
-+ strncpy(tmp, tmp_clamp, PA_NAME_MAX - 20);
-+ tmp[PA_NAME_MAX - 20] = 0;
-+ pa_xfree(tmp_clamp);
-+
-+ ca_source->name = pa_xstrndup(tmp, PA_NAME_MAX);
</del><ins>++ tmp = pa_strbuf_to_string_free(strbuf);
++ ca_source->name = pa_xstrndup(tmp, PA_NAME_MAX - 20);
++ pa_xfree(tmp);
</ins><span class="cx">
</span><span class="cx"> pa_log_debug("Stream name is >%s<", ca_source->name);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkdportsaudiopulseaudiofilespatchsrc_modules_macosx_module_coreaudio_devicecskipunsupportedchannelscountdiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-skip-unsupported-channels-count.diff (153195 => 153196)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-skip-unsupported-channels-count.diff        2016-09-26 22:56:08 UTC (rev 153195)
+++ trunk/dports/audio/pulseaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-skip-unsupported-channels-count.diff        2016-09-27 03:10:12 UTC (rev 153196)
</span><span class="lines">@@ -1,26 +0,0 @@
</span><del>---- src/modules/macosx/module-coreaudio-device.c.old        2016-02-23 00:55:13.000000000 +0100
-+++ src/modules/macosx/module-coreaudio-device.c        2016-02-23 00:55:49.000000000 +0100
-@@ -413,6 +413,11 @@ static int ca_device_create_sink(pa_modu
- AudioObjectPropertyAddress property_address;
- CFStringRef tmp_cfstr = NULL;
-
-+ if (buf->mNumberChannels > PA_CHANNELS_MAX) {
-+ pa_log("Skipping device with more channels than we support (%u)", (unsigned int) buf->mNumberChannels);
-+ return -1;
-+ }
-+
- ca_sink = pa_xnew0(coreaudio_sink, 1);
- ca_sink->map.channels = buf->mNumberChannels;
- ca_sink->ss.channels = buf->mNumberChannels;
-@@ -541,6 +546,11 @@ static int ca_device_create_source(pa_mo
- AudioObjectPropertyAddress property_address;
- CFStringRef tmp_cfstr = NULL;
-
-+ if (buf->mNumberChannels > PA_CHANNELS_MAX) {
-+ pa_log("Skipping device with more channels than we support (%u)", (unsigned int) buf->mNumberChannels);
-+ return -1;
-+ }
-+
- ca_source = pa_xnew0(coreaudio_source, 1);
- ca_source->map.channels = buf->mNumberChannels;
- ca_source->ss.channels = buf->mNumberChannels;
</del></span></pre>
</div>
</div>
</body>
</html>