pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/musicpd Fix build failures on Darwin



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9ef2abf58015
branches:  trunk
changeset: 645222:9ef2abf58015
user:      pho <pho%pkgsrc.org@localhost>
date:      Sun Jan 25 14:10:03 2015 +0000

description:
Fix build failures on Darwin

patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx:
  Resurrected from the Attic and added some comment.

patches/patch-src_util_Alloc.cxx,
patches/patch-src_util_Alloc.hxx:
  Some platforms (e.g. Darwin 9) don't have strndup(3), but the function
  xstrndup() isn't used in the first place.

diffstat:

 audio/musicpd/distinfo                                                     |   5 +-
 audio/musicpd/patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx |  26 +++++++++
 audio/musicpd/patches/patch-src_util_Alloc.cxx                             |  27 ++++++++++
 audio/musicpd/patches/patch-src_util_Alloc.hxx                             |  22 ++++++++
 4 files changed, 79 insertions(+), 1 deletions(-)

diffs (100 lines):

diff -r ce6163cea581 -r 9ef2abf58015 audio/musicpd/distinfo
--- a/audio/musicpd/distinfo    Sun Jan 25 13:30:03 2015 +0000
+++ b/audio/musicpd/distinfo    Sun Jan 25 14:10:03 2015 +0000
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.56 2015/01/18 17:36:21 wiz Exp $
+$NetBSD: distinfo,v 1.57 2015/01/25 14:10:03 pho Exp $
 
 SHA1 (mpd-0.19.8.tar.xz) = e5e325b666474bddec6c07502fa2dcf3710a42e3
 RMD160 (mpd-0.19.8.tar.xz) = eec522d7a2ba4b91c0d7e2ca44bce3a14313a69d
 Size (mpd-0.19.8.tar.xz) = 705108 bytes
+SHA1 (patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx) = b47d79cc49a27d732a7531e23d666bf9df748bec
+SHA1 (patch-src_util_Alloc.cxx) = 722fece7583eeaf600e1f695979deb1f5e664b83
+SHA1 (patch-src_util_Alloc.hxx) = 3c145405ee303400dc93fed10662ab4fef47afa5
diff -r ce6163cea581 -r 9ef2abf58015 audio/musicpd/patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/musicpd/patches/patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx        Sun Jan 25 14:10:03 2015 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_output_plugins_httpd_HttpdOutputPlugin.cxx,v 1.1 2015/01/25 14:10:03 pho Exp $
+
+Inlining this method results in the following error on Mach-O systems
+(or at least on Darwin 9):
+
+  {standard input}:1322:FATAL:symbol: __ZZN11HttpdOutput7SendTagEPK3TagE5types
+  can't be a weak_definition (currently only supported in section of type
+  coalesced)
+
+This seems to be a bug in the compiler, not in MPD, but we aren't sure
+what is really going on. The patch has been rejected by the upstream
+for not knowing the actual cause.
+
+http://bugs.musicpd.org/view.php?id=4059
+
+--- src/output/plugins/httpd/HttpdOutputPlugin.cxx.orig        2014-10-24 22:28:53.000000000 +0000
++++ src/output/plugins/httpd/HttpdOutputPlugin.cxx
+@@ -498,7 +498,7 @@ httpd_output_pause(AudioOutput *ao)
+       }
+ }
+ 
+-inline void
++void
+ HttpdOutput::SendTag(const Tag *tag)
+ {
+       assert(tag != nullptr);
diff -r ce6163cea581 -r 9ef2abf58015 audio/musicpd/patches/patch-src_util_Alloc.cxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/musicpd/patches/patch-src_util_Alloc.cxx    Sun Jan 25 14:10:03 2015 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_util_Alloc.cxx,v 1.1 2015/01/25 14:10:03 pho Exp $
+
+Some platforms (e.g. Darwin 9) don't have strndup(3), but the function
+xstrndup() isn't used in the first place.
+
+--- src/util/Alloc.cxx.orig    2014-10-24 22:28:53.000000000 +0000
++++ src/util/Alloc.cxx
+@@ -58,19 +58,3 @@ xstrdup(const char *s)
+ 
+       return p;
+ }
+-
+-char *
+-xstrndup(const char *s, size_t n)
+-{
+-#ifdef WIN32
+-      char *p = (char *)xalloc(n + 1);
+-      memcpy(p, s, n);
+-      p[n] = 0;
+-#else
+-      char *p = strndup(s, n);
+-      if (gcc_unlikely(p == nullptr))
+-              oom();
+-#endif
+-
+-      return p;
+-}
diff -r ce6163cea581 -r 9ef2abf58015 audio/musicpd/patches/patch-src_util_Alloc.hxx
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/musicpd/patches/patch-src_util_Alloc.hxx    Sun Jan 25 14:10:03 2015 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_util_Alloc.hxx,v 1.1 2015/01/25 14:10:03 pho Exp $
+
+Some platforms (e.g. Darwin 9) don't have strndup(3), but the function
+xstrndup() isn't used in the first place.
+
+--- src/util/Alloc.hxx.orig    2014-10-24 22:28:53.000000000 +0000
++++ src/util/Alloc.hxx
+@@ -54,14 +54,4 @@ gcc_malloc gcc_nonnull_all
+ char *
+ xstrdup(const char *s);
+ 
+-/**
+- * Duplicate a string.  Use free() to free it.
+- *
+- * This function never fails; in out-of-memory situations, it aborts
+- * the process.
+- */
+-gcc_malloc gcc_nonnull_all
+-char *
+-xstrndup(const char *s, size_t n);
+-
+ #endif



Home | Main Index | Thread Index | Old Index