mpd: bump version.

This commit is contained in:
Jerome Duval
2015-12-21 23:51:39 +00:00
parent 05fbe1866a
commit 73a4af672f
2 changed files with 85 additions and 204 deletions

View File

@@ -5,25 +5,26 @@ for playing music. Through plugins and libraries it can play a variety \
of sound files while being controlled by its network protocol.
"
HOMEPAGE="http://www.musicpd.org/"
SOURCE_URI="git://git.musicpd.org/master/mpd.git#459a812a54509ebfd634a3df2998395c9cb5b98f"
#CHECKSUM_SHA256=""
SOURCE_URI="http://www.musicpd.org/download/mpd/0.19/mpd-$portVersion.tar.xz"
CHECKSUM_SHA256="7b6fe6c7ce72f5f80a276d680072b524ecb395e546e252b8f3a0756377e1e875"
LICENSE="GNU GPL v2"
COPYRIGHT="2003-2014 The Music Player Daemon Project"
REVISION="1"
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PATCHES="mpd-$portVersion.patchset"
PROVIDES="
mpd$secondaryArchSuffix = $portVersion
cmd:mpd$secondaryArchSuffix = $portVersion
"
#FIXME: expat not detected (missing .pc ?)
REQUIRES="
haiku$secondaryArchSuffix
boost$secondaryArchSuffix
lib:libmpdclient$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix >= 0.38
icu$secondaryArchSuffix
lib:libicui18n$secondaryArchSuffix
lib:libao$secondaryArchSuffix >= 1.1.0
lib:libavcodec$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
@@ -50,7 +51,7 @@ BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
boost${secondaryArchSuffix}_devel
devel:libmpdclient$secondaryArchSuffix
icu${secondaryArchSuffix}_devel
devel:libicui18n$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix >= 0.38
devel:libao$secondaryArchSuffix >= 1.1.0
devel:libavcodec$secondaryArchSuffix
@@ -106,8 +107,4 @@ INSTALL()
export PKG_CONFIG_LIBDIR="`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/pkgconfig"
make install
# prepare devel/lib
#prepareInstalledDevelLibs libmp3lame
#fixPkgconfig
}

View File

@@ -1,15 +1,11 @@
From ef779aef81d2463f7ace973849b7308b51397b3a Mon Sep 17 00:00:00 2001
From 87bae9cd45f7b44cc403d0ac931b4f119afc670b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Sun, 13 Jul 2014 01:29:05 +0200
Subject: [PATCH 01/11] configure.ac: check for socket() in libnetwork for
Haiku
Subject: configure.ac: check for socket() in libnetwork for Haiku
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index dbbb5a5..5ff995f 100644
index 107b45a..8582abf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,7 +198,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt])
@@ -22,51 +18,21 @@ index dbbb5a5..5ff995f 100644
if test x$host_is_linux = xyes; then
--
1.8.3.4
2.2.2
From 538cc30e408668dc81299137b3771c5e7999ab81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Sun, 13 Jul 2014 01:29:39 +0200
Subject: [PATCH 02/11] output: make sure AudioOutput::mixer is initialized
Avoids crashing when libao fails to initialize.
---
src/output/Init.cxx | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/output/Init.cxx b/src/output/Init.cxx
index eafcec4..79ef4f9 100644
--- a/src/output/Init.cxx
+++ b/src/output/Init.cxx
@@ -48,6 +48,7 @@
AudioOutput::AudioOutput(const AudioOutputPlugin &_plugin)
:plugin(_plugin),
+ mixer(nullptr),
enabled(true), really_enabled(false),
open(false),
pause(false),
--
1.8.3.4
From 4ed5e354d778792ed4a0dbc647655865e13de59a Mon Sep 17 00:00:00 2001
From 87613b4eb56997a6183092c2104d95cd230c5cb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 14 Jul 2014 23:10:02 +0200
Subject: [PATCH 03/11] unix: define WCOREDUMP() for platforms that don't
support it
Subject: unix: define WCOREDUMP() for platforms that don't support it
Haiku does not dump core, it just starts the debugger.
---
src/unix/Daemon.cxx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/unix/Daemon.cxx b/src/unix/Daemon.cxx
index 490b2de..49ad394 100644
index d283108..1892952 100644
--- a/src/unix/Daemon.cxx
+++ b/src/unix/Daemon.cxx
@@ -37,6 +37,10 @@
@@ -36,6 +36,10 @@
#include <grp.h>
#endif
@@ -74,22 +40,19 @@ index 490b2de..49ad394 100644
+#define WCOREDUMP(v) 0
+#endif
+
static constexpr Domain daemon_domain("daemon");
#ifndef WIN32
/** the Unix user name which MPD runs as */
--
1.8.3.4
2.2.2
From aabca27705ed851d637b5a16c913f056983ba3ce Mon Sep 17 00:00:00 2001
From 5d1677de5e6a39b7586ff4efa77fed97220ae245 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 14 Jul 2014 23:12:03 +0200
Subject: [PATCH 04/11] system/SocketUtil: guard usage of SO_PASSCRED
Subject: system/SocketUtil: guard usage of SO_PASSCRED
Haiku has struct ucred but no SO_PASSCRED (yet).
---
src/system/SocketUtil.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/system/SocketUtil.cxx b/src/system/SocketUtil.cxx
index b9df0d5..5a88dd1 100644
@@ -105,33 +68,21 @@ index b9df0d5..5a88dd1 100644
(const char *) &reuse, sizeof(reuse));
#endif
--
1.8.3.4
2.2.2
From 7daa8a861af79f0d70db13367dfdec27dfdcd4d6 Mon Sep 17 00:00:00 2001
From 3ea9c2c808a5882701dae90c5d363bb1665cc1b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 14 Jul 2014 23:16:20 +0200
Subject: [PATCH 05/11] output: add native Haiku audio output and mixer support
Subject: output: add native Haiku audio output and mixer support
Also uses the notification system to display tags.
---
Makefile.am | 8 +
configure.ac | 20 ++
src/mixer/MixerList.hxx | 1 +
src/mixer/plugins/HaikuMixerPlugin.cxx | 73 +++++
src/output/Registry.cxx | 4 +
src/output/plugins/HaikuOutputPlugin.cxx | 453 +++++++++++++++++++++++++++++++
src/output/plugins/HaikuOutputPlugin.hxx | 34 +++
7 files changed, 593 insertions(+)
create mode 100644 src/mixer/plugins/HaikuMixerPlugin.cxx
create mode 100644 src/output/plugins/HaikuOutputPlugin.cxx
create mode 100644 src/output/plugins/HaikuOutputPlugin.hxx
diff --git a/Makefile.am b/Makefile.am
index 6e5eb03..7c87573 100644
index 307fcba..46a07d7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1232,6 +1232,14 @@ liboutput_plugins_a_SOURCES += \
@@ -1275,6 +1275,14 @@ liboutput_plugins_a_SOURCES += \
src/output/plugins/FifoOutputPlugin.hxx
endif
@@ -147,12 +98,12 @@ index 6e5eb03..7c87573 100644
liboutput_plugins_a_SOURCES += \
src/output/plugins/PipeOutputPlugin.cxx \
diff --git a/configure.ac b/configure.ac
index 5ff995f..81dec53 100644
index 8582abf..5d4d709 100644
--- a/configure.ac
+++ b/configure.ac
@@ -389,6 +389,11 @@ AC_ARG_ENABLE(gme,
[enable Blargg's game music emulator plugin]),,
enable_gme=auto)
@@ -410,6 +410,11 @@ AC_ARG_ENABLE(gme,
MPD_DEPENDS([enable_gme], [enable_glib],
[Cannot use --enable-gme with --disable-glib])
+AC_ARG_ENABLE(haiku,
+ AS_HELP_STRING([--enable-haiku],
@@ -162,7 +113,7 @@ index 5ff995f..81dec53 100644
AC_ARG_ENABLE(httpd-output,
AS_HELP_STRING([--enable-httpd-output],
[enables the HTTP server output]),,
@@ -1514,6 +1519,19 @@ fi
@@ -1533,6 +1538,19 @@ fi
AM_CONDITIONAL(HAVE_FIFO, test x$enable_fifo = xyes)
@@ -182,15 +133,7 @@ index 5ff995f..81dec53 100644
dnl ------------------------------- HTTPD Output ------------------------------
if test x$enable_httpd_output = xauto; then
# handle HTTPD auto-detection: disable if no encoder is
@@ -1680,6 +1698,7 @@ if
test x$enable_roar = xno &&
test x$enable_ao = xno &&
test x$enable_fifo = xno &&
+ test x$enable_haiku = xno &&
test x$enable_httpd_output = xno &&
test x$enable_jack = xno &&
test x$enable_openal = xno &&
@@ -1854,6 +1873,7 @@ printf '\nPlayback support:\n\t'
@@ -1858,6 +1876,7 @@ printf '\nPlayback support:\n\t'
results(alsa,ALSA)
results(fifo,FIFO)
results(recorder_output,[File Recorder])
@@ -313,7 +256,7 @@ index 566f6b6..4d80ff5 100644
#endif
diff --git a/src/output/plugins/HaikuOutputPlugin.cxx b/src/output/plugins/HaikuOutputPlugin.cxx
new file mode 100644
index 0000000..fe933cc
index 0000000..fa3509f
--- /dev/null
+++ b/src/output/plugins/HaikuOutputPlugin.cxx
@@ -0,0 +1,453 @@
@@ -811,23 +754,19 @@ index 0000000..f3f224d
+
+#endif
--
1.8.3.4
2.2.2
From e91b2b7299d4f337549713ec9ef3a347d280a8ee Mon Sep 17 00:00:00 2001
From c49e3597247f91640bb56d22077e555c2c9bbd85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Thu, 31 Jul 2014 23:03:07 +0200
Subject: [PATCH 06/11] Haiku: add an HVIF icon
Subject: Haiku: add an HVIF icon
3D version reinterpreted from the official 2D design,
reusing existing Haiku icons.
Icon-O-Matic source file.
Same as data/artwork/icons/App_MusicPD in the Haiku tree as hrev47609.
---
src/haiku/App_MusicPD | Bin 0 -> 46028 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 src/haiku/App_MusicPD
diff --git a/src/haiku/App_MusicPD b/src/haiku/App_MusicPD
new file mode 100644
@@ -957,18 +896,14 @@ literal 0
HcmV?d00001
--
1.8.3.4
2.2.2
From 255425c7fe9cc6ce6ae5e1cf7ec30ff637549723 Mon Sep 17 00:00:00 2001
From a90a64028eece85e72ad1ca2680beda5f55c3b60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Thu, 31 Jul 2014 23:09:29 +0200
Subject: [PATCH 07/11] Haiku: add icon as resource definition file
Subject: Haiku: add icon as resource definition file
---
src/haiku/mpd.rdef | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100644 src/haiku/mpd.rdef
diff --git a/src/haiku/mpd.rdef b/src/haiku/mpd.rdef
new file mode 100644
@@ -1041,19 +976,16 @@ index 0000000..30fcfe4
+ $"2204"
+};
--
1.8.3.4
2.2.2
From aa6e9cc1fbe13da18685efb28122462b55c57fa9 Mon Sep 17 00:00:00 2001
From 46537e37995399130690efad5f2ebf724753d6ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Thu, 31 Jul 2014 23:12:56 +0200
Subject: [PATCH 08/11] Haiku: add resources: application signature and flags
Subject: Haiku: add resources: application signature and flags
Since we do not handle B_QUIT_REQUESTED because the BApplication
does not Run(), use the background flag to avoid showing up in Deskbar.
---
src/haiku/mpd.rdef | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/haiku/mpd.rdef b/src/haiku/mpd.rdef
index 30fcfe4..6f1aca2 100644
@@ -1069,20 +1001,17 @@ index 30fcfe4..6f1aca2 100644
resource vector_icon {
$"6E6369661F050102031604BEE29BBEC5403EC540BEE29B4A10004A10000001C6"
--
1.8.3.4
2.2.2
From 913cc76583cd70d3cf6b0d12ba716699039180de Mon Sep 17 00:00:00 2001
From d3a864ddb60cfd49563396792b311ae096b9a8c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Fri, 1 Aug 2014 19:03:32 +0200
Subject: [PATCH 09/11] configure: add tests for Haiku tools (rc, xres)
Subject: configure: add tests for Haiku tools (rc, xres)
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index 81dec53..83b5ecf 100644
index 5d4d709..8f1c594 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,6 +114,10 @@ darwin*)
@@ -1097,23 +1026,20 @@ index 81dec53..83b5ecf 100644
AM_CONDITIONAL([ANDROID], [test x$host_is_android = xyes])
--
1.8.3.4
2.2.2
From e8dfa37617e7c83798ecf2e548ce3dff444df7b7 Mon Sep 17 00:00:00 2001
From 4725a5c191a81b26c73b8b6ce9f13378d80ad72b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Fri, 1 Aug 2014 19:03:54 +0200
Subject: [PATCH 10/11] Makefile.am: add the Haiku resources to the mpd binary
Subject: Makefile.am: add the Haiku resources to the mpd binary
---
Makefile.am | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 7c87573..fefc746 100644
index 46a07d7..af31b87 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -333,6 +333,28 @@ src_mpd_DEPENDENCIES = src/win32/mpd_win32_rc.$(OBJEXT)
@@ -333,6 +333,28 @@ EXTRA_src_mpd_DEPENDENCIES = src/win32/mpd_win32_rc.$(OBJEXT)
src_mpd_LDFLAGS = -Wl,src/win32/mpd_win32_rc.$(OBJEXT)
endif
@@ -1142,28 +1068,25 @@ index 7c87573..fefc746 100644
if ENABLE_DATABASE
if ENABLE_INOTIFY
libmpd_a_SOURCES += \
@@ -2079,4 +2101,5 @@ EXTRA_DIST = $(doc_DATA) autogen.sh \
test/test_archive_zzip.sh \
$(wildcard scripts/*.sh) \
$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
@@ -2168,4 +2190,5 @@ EXTRA_DIST = $(doc_DATA) autogen.sh \
android/src/Bridge.java \
android/src/Loader.java \
android/src/Main.java \
- src/win32/mpd_win32_rc.rc.in src/win32/mpd.ico
+ src/win32/mpd_win32_rc.rc.in src/win32/mpd.ico \
+ src/haiku/App_MusicPD
--
1.8.3.4
2.2.2
From fd01e80a754f8c180fc5638df509502fa6a80768 Mon Sep 17 00:00:00 2001
From f9c177cc18e1a1c2d9905abfa7b8fdc6060d2c79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Thu, 31 Jul 2014 23:18:06 +0200
Subject: [PATCH 11/11] output/haiku: use the icon for notifications
Subject: output/haiku: use the icon for notifications
---
src/output/plugins/HaikuOutputPlugin.cxx | 53 +++++++++++++++++++++++++++++++-
1 file changed, 52 insertions(+), 1 deletion(-)
diff --git a/src/output/plugins/HaikuOutputPlugin.cxx b/src/output/plugins/HaikuOutputPlugin.cxx
index fe933cc..0f111c6 100644
index fa3509f..ca4acdb 100644
--- a/src/output/plugins/HaikuOutputPlugin.cxx
+++ b/src/output/plugins/HaikuOutputPlugin.cxx
@@ -26,11 +26,15 @@
@@ -1268,78 +1191,39 @@ index fe933cc..0f111c6 100644
}
--
1.8.3.4
2.2.2
From af2b547614d4813d2e24e4b70bfd30ea00e0800c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Fri, 15 Aug 2014 21:12:50 +0200
Subject: [PATCH 1/2] util: Fix header for strcasecmp
According to POSIX and both OSX and Linux manpages,
strcasecmp comes from strings.h, not string.h.
From cb4f358909e5a7dc95962434d3967eaf99ccb3f0 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 21 Dec 2015 23:28:18 +0000
Subject: output/haiku: fix use of tags.
Most OSes also have them available in string.h,
but we just fixed the headers on Haiku and it now
only provides them in strings.h.
We might want to fall back to string.h for other
OSes though...
cf.
http://pubs.opengroup.org/onlinepubs/009695399/functions/strcasecmp.html
http://linux.die.net/man/3/strcasecmp
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/strcasecmp.3.html
---
src/util/ASCII.hxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/util/ASCII.hxx b/src/util/ASCII.hxx
index adea6dc..4a65254 100644
--- a/src/util/ASCII.hxx
+++ b/src/util/ASCII.hxx
@@ -30,10 +30,13 @@
#ifndef MPD_ASCII_HXX
#define MPD_ASCII_HXX
diff --git a/src/output/plugins/HaikuOutputPlugin.cxx b/src/output/plugins/HaikuOutputPlugin.cxx
index ca4acdb..5bba640 100644
--- a/src/output/plugins/HaikuOutputPlugin.cxx
+++ b/src/output/plugins/HaikuOutputPlugin.cxx
@@ -381,8 +381,9 @@ haiku_send_tag(AudioOutput *ao, const Tag *meta)
notification.SetGroup("Music Player Daemon");
+#include "config.h"
#include "Compiler.h"
char timebuf[16];
+ const unsigned seconds = tag.duration.ToS();
snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d",
- tag.time / 3600, (tag.time % 3600) / 60, tag.time % 60);
+ seconds / 3600, (seconds % 3600) / 60, seconds % 60);
#include <assert.h>
-#include <string.h>
+#if HAVE_STRINGS_H
+#include <strings.h>
+#endif
BString artist;
BString album;
@@ -451,7 +452,7 @@ haiku_send_tag(AudioOutput *ao, const Tag *meta)
/**
* Determine whether two strings are equal, ignoring case for ASCII
BString full = content.Join(" " B_UTF8_BULLET " ");
- if (tag.time > 0)
+ if (seconds > 0)
full << " (" << timebuf << ")";
notification.SetContent(full);
--
2.1.0.rc1
From c761b00e3a1f2b92b15b54a9a9626b123164e174 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Fri, 15 Aug 2014 22:17:45 +0200
Subject: [PATCH 2/2] icu: include strings.h for strcasecmp
Again, POSIX says strcasecmp is not in string.h.
---
src/lib/icu/Collate.cxx | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lib/icu/Collate.cxx b/src/lib/icu/Collate.cxx
index f6621eb..7542c0e 100644
--- a/src/lib/icu/Collate.cxx
+++ b/src/lib/icu/Collate.cxx
@@ -38,6 +38,9 @@
#include <assert.h>
#include <string.h>
+#if HAVE_STRINGS_H
+#include <strings.h>
+#endif
#ifdef HAVE_ICU
static UCollator *collator;
--
2.1.0.rc1
2.2.2