mpd: Update to 0.19.11, fix gcc5 builds
authorTed Hess <thess@kitschensync.net>
Mon, 23 Nov 2015 13:51:26 +0000 (08:51 -0500)
committerTed Hess <thess@kitschensync.net>
Mon, 23 Nov 2015 13:57:18 +0000 (08:57 -0500)
Add a patch from the Alpine Linux project to fix a musl build issue with gcc 5:

Signed-off-by: Ted Hess <thess@kitschensync.net>
sound/mpd/Makefile
sound/mpd/patches/100-musl_gcc5_fixes.patch [new file with mode: 0644]
sound/mpd/patches/210-support_raw_pcm_streams.patch
sound/mpd/patches/220-handle_slow_server_stream_startup.patch

index 52e2228671156ef6b20505b2b25680187201b270..3c7e5a2248a68557d61f4e1aa8d7e05a9528404a 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
-PKG_VERSION:=0.19.10
-PKG_RELEASE:=2
+PKG_VERSION:=0.19.11
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.19/
-PKG_MD5SUM:=da4bc3e47afd0faf9e7a67168e012102
+PKG_MD5SUM:=78935f6c464b67e19b4dc65bdb80319e
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=GPL-2.0
diff --git a/sound/mpd/patches/100-musl_gcc5_fixes.patch b/sound/mpd/patches/100-musl_gcc5_fixes.patch
new file mode 100644 (file)
index 0000000..8795cc6
--- /dev/null
@@ -0,0 +1,50 @@
+Add a patch from the Alpine Linux project to fix a musl build issue with gcc 5: 
+
+Problem has been reported upstream and closed with WONTFIX:
+http://bugs.musicpd.org/view.php?id=4387
+http://bugs.musicpd.org/view.php?id=4110
+
+however...
+
+POSIX does not permit using PTHREAD_COND_INITIALIZER except for static
+initialization, and certainly does not permit using it as a value
+
+POSIX does not specify the type of the object (it's opaque) so if
+there are any types for which their code would be invalid C++, then their
+code is invalid
+
+Volatile in the type is necessary. without that, LTO can break the code.
+
+--- a/src/notify.hxx
++++ b/src/notify.hxx
+@@ -28,7 +28,7 @@ struct notify {
+       Cond cond;
+       bool pending;
+-#if !defined(WIN32) && !defined(__NetBSD__) && !defined(__BIONIC__)
++#if defined(__GLIBC__)
+       constexpr
+ #endif
+       notify():pending(false) {}
+--- a/src/thread/PosixCond.hxx
++++ b/src/thread/PosixCond.hxx
+@@ -41,7 +41,7 @@ class PosixCond {
+       pthread_cond_t cond;
+ public:
+-#if defined(__NetBSD__) || defined(__BIONIC__)
++#if !defined(__GLIBC__)
+       /* NetBSD's PTHREAD_COND_INITIALIZER is not compatible with
+          "constexpr" */
+       PosixCond() {
+--- a/src/thread/PosixMutex.hxx
++++ b/src/thread/PosixMutex.hxx
+@@ -41,7 +41,7 @@ class PosixMutex {
+       pthread_mutex_t mutex;
+ public:
+-#if defined(__NetBSD__) || defined(__BIONIC__)
++#if !defined(__GLIBC__)
+       /* NetBSD's PTHREAD_MUTEX_INITIALIZER is not compatible with
+          "constexpr" */
+       PosixMutex() {
index 2c94c262c86ac6da486a68549a1082328f230e2f..69dac9f3da46abd11d84683a56b7765fc1d04093 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
 +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
-@@ -765,6 +765,7 @@ static const char *const ffmpeg_mime_typ
+@@ -774,6 +774,7 @@ static const char *const ffmpeg_mime_typ
        "audio/qcelp",
        "audio/vorbis",
        "audio/vorbis+ogg",
index 15c51f898d3442c674f6e21dfdf1c39213b06ed0..62a4e59f73ea8d9eeab09b5c9ec0d2d3864a33c9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
 +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
-@@ -458,6 +458,13 @@ ffmpeg_probe(Decoder *decoder, InputStre
+@@ -467,6 +467,13 @@ ffmpeg_probe(Decoder *decoder, InputStre
  
        unsigned char buffer[BUFFER_SIZE];
        size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE);