From 2afb48b7f6a34dfadcc6038816c712dc022046d0 Mon Sep 17 00:00:00 2001 From: alperak Date: Sun, 12 Nov 2023 18:54:44 +0300 Subject: mpd: upgrade 0.23.12 -> 0.23.14 Patches deleted because issues fixed in the new version. Changelog: ver 0.23.14 (2023/10/08) * decoder - flac: fix scanning files with non-ASCII names on Windows - mad: fix calculation of LAME peak values * mixer - wasapi: fix problem setting volume * more libfmt 10 fixes * fix auto-detected systemd unit directory * Android - require Android 7 or newer ver 0.23.13 (2023/05/22) * input - curl: fix busy loop after connection failed - curl: hide "404" log messages for non-existent ".mpdignore" files * archive - zzip: fix crash bug * database - simple: reveal hidden songs after deleting containing CUE * decoder - ffmpeg: reorder to a lower priority than "gme" - gme: require GME 0.6 or later * output - pipewire: fix corruption bug due to missing lock * Linux - shut down if parent process dies in --no-daemon mode - determine systemd unit directories via pkg-config * support libfmt 10 Signed-off-by: alperak Signed-off-by: Khem Raj --- ...oderPlugin-Fix-type-mismatch-for-std-span.patch | 28 ------ .../mpd/fix-build-error-when-fmt-updated.patch | 71 -------------- .../musicpd/mpd/minor-fixup-for-libfmt10.patch | 27 ------ .../recipes-multimedia/musicpd/mpd_0.23.12.bb | 104 --------------------- .../recipes-multimedia/musicpd/mpd_0.23.14.bb | 101 ++++++++++++++++++++ 5 files changed, 101 insertions(+), 230 deletions(-) delete mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch delete mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch delete mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch delete mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.14.bb diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch b/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch deleted file mode 100644 index 37aa448e95..0000000000 --- a/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f2fbfeeb9c4ff7aa9ba4b95604ee0fb14ecec763 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 17 May 2023 17:54:09 -0700 -Subject: [PATCH] SndfileDecoderPlugin: Fix type mismatch for std::span - -Fixes -../git/src/decoder/plugins/SndfileDecoderPlugin.cxx:231:25: error: non-constant-expression cannot be narrowed from type 'sf_count_t' (aka 'long long') to 'size_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] - std::span{buffer, num_frames * frame_size}, - ^~~~~~~~~~~~~~~~~~~~~~~ -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - src/decoder/plugins/SndfileDecoderPlugin.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/decoder/plugins/SndfileDecoderPlugin.cxx b/src/decoder/plugins/SndfileDecoderPlugin.cxx -index ad3908847..a3cb87ca9 100644 ---- a/src/decoder/plugins/SndfileDecoderPlugin.cxx -+++ b/src/decoder/plugins/SndfileDecoderPlugin.cxx -@@ -228,7 +228,7 @@ sndfile_stream_decode(DecoderClient &client, InputStream &is) - break; - - cmd = client.SubmitAudio(is, -- std::span{buffer, num_frames * frame_size}, -+ std::span{buffer, static_cast(num_frames * frame_size)}, - 0); - if (cmd == DecoderCommand::SEEK) { - sf_count_t c = client.GetSeekFrame(); diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch b/meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch deleted file mode 100644 index ebbea2b358..0000000000 --- a/meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch +++ /dev/null @@ -1,71 +0,0 @@ -Upstream-Status: Backport [https://github.com/MusicPlayerDaemon/MPD/commit/181b96dd2d71bc8f2668776719d344466f258b5d] - -Signed-off-by: Wang Mingyu - -From 181b96dd2d71bc8f2668776719d344466f258b5d Mon Sep 17 00:00:00 2001 -From: Max Kellermann -Date: Mon, 15 May 2023 20:52:21 +0200 -Subject: [PATCH] command/player, SongPrint: use AudioFormatFormatter() - -libfmt version 10 apparently doesn't know how to format a -`StringBuffer`, failing the MPD build. Since we have a formatter -specialization for `AudioFormat`, let's use that - it's better and -easier to use. - -Closes https://github.com/MusicPlayerDaemon/MPD/issues/1807 ---- - src/SongPrint.cxx | 5 +++-- - src/command/PlayerCommands.cxx | 3 ++- - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx -index 98d544cc38..835669d276 100644 ---- a/src/SongPrint.cxx -+++ b/src/SongPrint.cxx -@@ -8,6 +8,7 @@ - #include "TagPrint.hxx" - #include "client/Response.hxx" - #include "fs/Traits.hxx" -+#include "lib/fmt/AudioFormatFormatter.hxx" - #include "time/ChronoUtil.hxx" - #include "util/StringBuffer.hxx" - #include "util/UriUtil.hxx" -@@ -77,7 +78,7 @@ song_print_info(Response &r, const LightSong &song, bool base) noexcept - time_print(r, "Last-Modified", song.mtime); - - if (song.audio_format.IsDefined()) -- r.Fmt(FMT_STRING("Format: {}\n"), ToString(song.audio_format)); -+ r.Fmt(FMT_STRING("Format: {}\n"), song.audio_format); - - tag_print_values(r, song.tag); - -@@ -100,7 +101,7 @@ song_print_info(Response &r, const DetachedSong &song, bool base) noexcept - time_print(r, "Last-Modified", song.GetLastModified()); - - if (const auto &f = song.GetAudioFormat(); f.IsDefined()) -- r.Fmt(FMT_STRING("Format: {}\n"), ToString(f)); -+ r.Fmt(FMT_STRING("Format: {}\n"), f); - - tag_print_values(r, song.GetTag()); - -diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx -index 5108b9d3c4..0b5a917020 100644 ---- a/src/command/PlayerCommands.cxx -+++ b/src/command/PlayerCommands.cxx -@@ -13,6 +13,7 @@ - #include "Partition.hxx" - #include "Instance.hxx" - #include "IdleFlags.hxx" -+#include "lib/fmt/AudioFormatFormatter.hxx" - #include "util/StringBuffer.hxx" - #include "util/ScopeExit.hxx" - #include "util/Exception.hxx" -@@ -170,7 +171,7 @@ handle_status(Client &client, [[maybe_unused]] Request args, Response &r) - - if (player_status.audio_format.IsDefined()) - r.Fmt(FMT_STRING(COMMAND_STATUS_AUDIO ": {}\n"), -- ToString(player_status.audio_format)); -+ player_status.audio_format); - } - - #ifdef ENABLE_DATABASE diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch b/meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch deleted file mode 100644 index 0c9d979107..0000000000 --- a/meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch +++ /dev/null @@ -1,27 +0,0 @@ -Upstream-Status: Backport -[https://github.com/MusicPlayerDaemon/MPD/commit/f869593ac8913e52c711e974257bd6dc0d5dbf26] - -Signed-off-by: Wang Mingyu - -From f869593ac8913e52c711e974257bd6dc0d5dbf26 Mon Sep 17 00:00:00 2001 -From: Max Kellermann -Date: Mon, 15 May 2023 20:59:58 +0200 -Subject: [PATCH] TimePrint: minor fixup for libfmt 10 - -libfmt version 10 has difficulties formatting a `StringBuffer`, and we -need to help it by explicitly invoking the `c_str()` method. ---- - src/TimePrint.cxx | 2 +- - 1 files changed, 1 insertions(+), 1 deletion(-) - -diff --git a/src/TimePrint.cxx b/src/TimePrint.cxx -index 5bf05f6238..d47f3178bb 100644 ---- a/src/TimePrint.cxx -+++ b/src/TimePrint.cxx -@@ -20,5 +20,5 @@ time_print(Response &r, const char *name, - return; - } - -- r.Fmt(FMT_STRING("{}: {}\n"), name, s); -+ r.Fmt(FMT_STRING("{}: {}\n"), name, s.c_str()); - } diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb deleted file mode 100644 index 0c309ded00..0000000000 --- a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb +++ /dev/null @@ -1,104 +0,0 @@ -SUMMARY = "Music Player Daemon" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -HOMEPAGE ="http://www.musicpd.org" - -inherit meson useradd systemd pkgconfig - -DEPENDS += " \ - curl \ - sqlite3 \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ - yajl \ - boost \ - icu \ - dbus \ - expat \ - fmt \ -" - -SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \ - file://mpd.conf.in \ - file://minor-fixup-for-libfmt10.patch \ - file://fix-build-error-when-fmt-updated.patch \ - file://0001-SndfileDecoderPlugin-Fix-type-mismatch-for-std-span.patch \ - " -SRCREV = "b1422fbda40a1831d397fb161e7a555443c2a072" -S = "${WORKDIR}/git" - -EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)}" - -PACKAGECONFIG ??= "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "aac", "", d)} \ - alsa ao bzip2 daemon \ - ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg aac", "", d)} \ - fifo flac fluidsynth iso9660 \ - jack libsamplerate httpd \ - mms mpg123 modplug sndfile \ - upnp openal opus oss recorder \ - vorbis wavpack zlib" - -PACKAGECONFIG[aac] = "-Dfaad=enabled,-Dfaad=disabled,faad2" -PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" -PACKAGECONFIG[ao] = "-Dao=enabled,-Dao=disabled,libao" -PACKAGECONFIG[audiofile] = "-Daudiofile=enabled,-Daudiofile=disabled,audiofile" -PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2" -PACKAGECONFIG[cdioparanoia] = "-Dcdio_paranoia=enabled,-Dcdio_paranoia=disabled,libcdio-paranoia" -PACKAGECONFIG[daemon] = "-Ddaemon=true,-Ddaemon=false" -PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" -PACKAGECONFIG[fifo] = "-Dfifo=true,-Dfifo=false" -PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" -PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" -PACKAGECONFIG[httpd] = "-Dhttpd=true,-Dhttpd=false" -PACKAGECONFIG[id3tag] = "-Did3tag=enabled,-Did3tag=disabled,libid3tag" -PACKAGECONFIG[iso9660] = "-Diso9660=enabled,-Diso9660=disabled,libcdio" -PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" -PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" -PACKAGECONFIG[libsamplerate] = "-Dlibsamplerate=enabled,-Dlibsamplerate=disabled,libsamplerate0" -PACKAGECONFIG[mad] = "-Dmad=enabled,-Dmad=disabled,libmad" -PACKAGECONFIG[mms] = "-Dmms=enabled,-Dmms=disabled,libmms" -PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" -PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" -PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" -PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus libogg" -PACKAGECONFIG[oss] = "-Doss=enabled,-Doss=disabled," -PACKAGECONFIG[recorder] = "-Drecorder=true,-Drecorder=false" -PACKAGECONFIG[smb] = "-Dsmbclient=enabled,-Dsmbclient=disabled,samba" -PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" -PACKAGECONFIG[upnp] = "-Dupnp=pupnp,-Dupnp=disabled,libupnp" -PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis libogg" -PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" -PACKAGECONFIG[zlib] = "-Dzlib=enabled,-Dzlib=disabled,zlib" - -do_install:append() { - install -o mpd -d \ - ${D}/${localstatedir}/lib/mpd \ - ${D}/${localstatedir}/lib/mpd/playlists - install -m775 -o mpd -g mpd -d \ - ${D}/${localstatedir}/lib/mpd/music - - install -d ${D}/${sysconfdir} - install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf - sed -i \ - -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \ - -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \ - -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \ - -e 's|%log_file%|${localstatedir}/log/mpd.log|' \ - -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \ - ${D}/${sysconfdir}/mpd.conf - - # we don't need the icon - rm -rf ${D}${datadir}/icons -} - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "mpd.socket" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = " \ - --system --no-create-home \ - --home ${localstatedir}/lib/mpd \ - --groups audio \ - --user-group mpd" diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.14.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.14.bb new file mode 100644 index 0000000000..310b5f7c3c --- /dev/null +++ b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.14.bb @@ -0,0 +1,101 @@ +SUMMARY = "Music Player Daemon" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +HOMEPAGE ="http://www.musicpd.org" + +inherit meson useradd systemd pkgconfig + +DEPENDS += " \ + curl \ + sqlite3 \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ + yajl \ + boost \ + icu \ + dbus \ + expat \ + fmt \ +" + +SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \ + file://mpd.conf.in \ + " +SRCREV = "feac1a3f56591ccfb00870aba66c9ac3abac4773" +S = "${WORKDIR}/git" + +EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)}" + +PACKAGECONFIG ??= "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "aac", "", d)} \ + alsa ao bzip2 daemon \ + ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg aac", "", d)} \ + fifo flac fluidsynth iso9660 \ + jack libsamplerate httpd \ + mms mpg123 modplug sndfile \ + upnp openal opus oss recorder \ + vorbis wavpack zlib" + +PACKAGECONFIG[aac] = "-Dfaad=enabled,-Dfaad=disabled,faad2" +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" +PACKAGECONFIG[ao] = "-Dao=enabled,-Dao=disabled,libao" +PACKAGECONFIG[audiofile] = "-Daudiofile=enabled,-Daudiofile=disabled,audiofile" +PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2" +PACKAGECONFIG[cdioparanoia] = "-Dcdio_paranoia=enabled,-Dcdio_paranoia=disabled,libcdio-paranoia" +PACKAGECONFIG[daemon] = "-Ddaemon=true,-Ddaemon=false" +PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" +PACKAGECONFIG[fifo] = "-Dfifo=true,-Dfifo=false" +PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" +PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" +PACKAGECONFIG[httpd] = "-Dhttpd=true,-Dhttpd=false" +PACKAGECONFIG[id3tag] = "-Did3tag=enabled,-Did3tag=disabled,libid3tag" +PACKAGECONFIG[iso9660] = "-Diso9660=enabled,-Diso9660=disabled,libcdio" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" +PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" +PACKAGECONFIG[libsamplerate] = "-Dlibsamplerate=enabled,-Dlibsamplerate=disabled,libsamplerate0" +PACKAGECONFIG[mad] = "-Dmad=enabled,-Dmad=disabled,libmad" +PACKAGECONFIG[mms] = "-Dmms=enabled,-Dmms=disabled,libmms" +PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" +PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" +PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" +PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus libogg" +PACKAGECONFIG[oss] = "-Doss=enabled,-Doss=disabled," +PACKAGECONFIG[recorder] = "-Drecorder=true,-Drecorder=false" +PACKAGECONFIG[smb] = "-Dsmbclient=enabled,-Dsmbclient=disabled,samba" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[upnp] = "-Dupnp=pupnp,-Dupnp=disabled,libupnp" +PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis libogg" +PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" +PACKAGECONFIG[zlib] = "-Dzlib=enabled,-Dzlib=disabled,zlib" + +do_install:append() { + install -o mpd -d \ + ${D}/${localstatedir}/lib/mpd \ + ${D}/${localstatedir}/lib/mpd/playlists + install -m775 -o mpd -g mpd -d \ + ${D}/${localstatedir}/lib/mpd/music + + install -d ${D}/${sysconfdir} + install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf + sed -i \ + -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \ + -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \ + -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \ + -e 's|%log_file%|${localstatedir}/log/mpd.log|' \ + -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \ + ${D}/${sysconfdir}/mpd.conf + + # we don't need the icon + rm -rf ${D}${datadir}/icons +} + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "mpd.socket" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = " \ + --system --no-create-home \ + --home ${localstatedir}/lib/mpd \ + --groups audio \ + --user-group mpd" -- cgit v1.2.3-54-g00ecf