commit:     b7d5bd38e33bd99733ec36da12e699714814cdd7
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Fri Jan 17 23:37:03 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 14:18:08 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7d5bd38

media-sound/mpd: add 0.23.16

Added subslot depends as per qa-vdb.

For mpg123-base
https://bugs.gentoo.org/915858

For qobuz? ( || ( libgcrypt ffmpeg ) )
https://github.com/MusicPlayerDaemon/MPD/commit/5c550e8b334dfc08287a66051f954453b77445e4

Closes: https://bugs.gentoo.org/947753
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40188
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-sound/mpd/Manifest                           |   1 +
 .../files/mpd-0.23.15.16-fix-libfmt-11.1.0.patch   | 884 +++++++++++++++++++++
 media-sound/mpd/mpd-0.23.16.ebuild                 | 300 +++++++
 3 files changed, 1185 insertions(+)

diff --git a/media-sound/mpd/Manifest b/media-sound/mpd/Manifest
index 0accc3634bf6..5eea346c9977 100644
--- a/media-sound/mpd/Manifest
+++ b/media-sound/mpd/Manifest
@@ -1 +1,2 @@
 DIST mpd-0.23.15.tar.xz 778384 BLAKE2B 
78036078b850afab900b5d50e44ce83cbbf900369f5028d4177fdbfc4128dd3c35c59a773528a1fcfcc0179d0e579566b827fe87ef780a88082dc3b7f70cd5e7
 SHA512 
12329dbd0c1994c1bd95b88ce2a62a4c1d691b655e9e4fac7e9ef7066d0be3422b26fad3ea6ca144ba9b21add0a7c492c4f74fd2b68a1539bff2e0d2714db709
+DIST mpd-0.23.16.tar.xz 778572 BLAKE2B 
7e4e7dafdc60cac59b7b47898cdaf8332970dae9209f8dd408aee7f4ecf90909404ab12a263d06aae44124d795d0d1092425294034fc0728fc9b4ac973a75dd0
 SHA512 
1b7042cbe8543270b26c1a9e4f35d80d68e03682e4d1e039af8f52527753830972de2a763e5dfb7bde28f4c9d0308a397becd4a206d17e7a5b2fa97f48b69d20

diff --git a/media-sound/mpd/files/mpd-0.23.15.16-fix-libfmt-11.1.0.patch 
b/media-sound/mpd/files/mpd-0.23.15.16-fix-libfmt-11.1.0.patch
new file mode 100644
index 000000000000..ff9c50007278
--- /dev/null
+++ b/media-sound/mpd/files/mpd-0.23.15.16-fix-libfmt-11.1.0.patch
@@ -0,0 +1,884 @@
+https://github.com/MusicPlayerDaemon/MPD/commit/9db7144d0fa4512335070a984690f3f5034210a5
+https://github.com/MusicPlayerDaemon/MPD/pull/2181
+https://github.com/MusicPlayerDaemon/MPD/issues/2173
+https://github.com/fmtlib/fmt/issues/4304
+
+Modified to remove unintentional change in meson.build
+
+https://github.com/MusicPlayerDaemon/MPD/commit/da6efd6361fcf7a44cbb24e3058b38bee7be1ad6
+https://github.com/MusicPlayerDaemon/MPD/pull/2182
+
+From 9db7144d0fa4512335070a984690f3f5034210a5 Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <[email protected]>
+Date: Sat, 11 Jan 2025 21:33:04 +0000
+Subject: [PATCH] lib/fmt: drop use of FMT_STRING
+
+When compiling with libfmt-11.1.0 and newer the following compile errors occur:
+
+In file included from ../src/decoder/DecoderPrint.cxx:23:
+../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, 
Args&& ...) [with S = decoder_plugin_print(Response&, const 
DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING; Args = {const char* const&}]':
+../src/decoder/DecoderPrint.cxx:38:7:   required from here
+   38 |         r.Fmt(FMT_STRING("plugin: {}\n"), plugin.name);
+      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+../src/client/Response.hxx:86:28: error: cannot convert 'const 
decoder_plugin_print(Response&, const 
DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING' to 'fmt::v11::string_view' 
{aka 'fmt::v11::basic_string_view<char>'}
+   86 |                 return VFmt(format_str,
+      |                        ~~~~^~~~~~~~~~~~
+   87 |                             fmt::make_format_args(args...));
+      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+../src/client/Response.hxx:81:36: note: initializing argument 1 of 'bool 
Response::VFmt(fmt::v11::string_view, fmt::v11::format_args)'
+   81 |         bool VFmt(fmt::string_view format_str, fmt::format_args args) 
noexcept;
+      |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
+../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, 
Args&& ...) [with S = decoder_plugin_print(Response&, const 
DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING; Args = {const char* const&}]':
+
+The error is due to the use of FMT_STRING. The libfmt team shared the 
following:
+
+    The correct way of using FMT_STRING is to wrap a format string when 
passing to a
+    function with compile-time checks (i.e. that takes format_string) as 
documented
+    in https://fmt.dev/11.1/api/#legacy-compile-time-checks.
+
+    Noting that FMT_STRING is a legacy API and has been superseded by 
consteval-based
+    API starting from version 8: 
https://github.com/fmtlib/fmt/releases/tag/8.0.0. It
+    looks like MPD is trying to emulate {fmt}'s old way of implementing 
compile-time
+    checks which was never properly documented because it was basically a 
hack. So the
+    correct fix is to switch to format_string and, possibly, remove usage of 
FMT_STRING.
+
+    The old way of doing compile-time checks (fmt::make_args_checked) was 
documented
+    in https://fmt.dev/7.1/api.html#argument-lists but it looks like MPD is 
not using
+    that API so the problematic uses of FMT_STRING have no effect and can just 
be removed.
+
+The FMT_STRING has been removed in this change based on the fmt-7.1 API and 
now MPD is
+successfully compile against the current libfmt-11.1.0 which highlighted the 
issue that
+had been present in the codebase as it is now triggering the error, is legacy 
and was
+not using the API for which FMT_STRING was aligned with.
+--- a/src/SongPrint.cxx
++++ b/src/SongPrint.cxx
+@@ -46,14 +46,14 @@ song_print_uri(Response &r, const char *uri, bool base) 
noexcept
+                       uri = allocated.c_str();
+       }
+
+-      r.Fmt(FMT_STRING(SONG_FILE "{}\n"), uri);
++      r.Fmt(SONG_FILE "{}\n", uri);
+ }
+
+ void
+ song_print_uri(Response &r, const LightSong &song, bool base) noexcept
+ {
+       if (!base && song.directory != nullptr)
+-              r.Fmt(FMT_STRING(SONG_FILE "{}/{}\n"),
++              r.Fmt(SONG_FILE "{}/{}\n",
+                     song.directory, song.uri);
+       else
+               song_print_uri(r, song.uri, base);
+@@ -72,13 +72,13 @@ PrintRange(Response &r, SongTime start_time, SongTime 
end_time) noexcept
+       const unsigned end_ms = end_time.ToMS();
+
+       if (end_ms > 0)
+-              r.Fmt(FMT_STRING("Range: {}.{:03}-{}.{:03}\n"),
++              r.Fmt("Range: {}.{:03}-{}.{:03}\n",
+                     start_ms / 1000,
+                     start_ms % 1000,
+                     end_ms / 1000,
+                     end_ms % 1000);
+       else if (start_ms > 0)
+-              r.Fmt(FMT_STRING("Range: {}.{:03}-\n"),
++              r.Fmt("Range: {}.{:03}-\n",
+                     start_ms / 1000,
+                     start_ms % 1000);
+ }
+@@ -94,14 +94,14 @@ 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"), song.audio_format);
++              r.Fmt("Format: {}\n", song.audio_format);
+
+       tag_print_values(r, song.tag);
+
+       const auto duration = song.GetDuration();
+       if (!duration.IsNegative())
+-              r.Fmt(FMT_STRING("Time: {}\n"
+-                               "duration: {:1.3f}\n"),
++              r.Fmt("Time: {}\n"
++                    "duration: {:1.3f}\n",
+                     duration.RoundS(),
+                     duration.ToDoubleS());
+ }
+@@ -117,14 +117,14 @@ 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"), f);
++              r.Fmt("Format: {}\n", f);
+
+       tag_print_values(r, song.GetTag());
+
+       const auto duration = song.GetDuration();
+       if (!duration.IsNegative())
+-              r.Fmt(FMT_STRING("Time: {}\n"
+-                               "duration: {:1.3f}\n"),
++              r.Fmt("Time: {}\n"
++                    "duration: {:1.3f}\n",
+                     duration.RoundS(),
+                     duration.ToDoubleS());
+ }
+--- a/src/Stats.cxx
++++ b/src/Stats.cxx
+@@ -99,10 +99,10 @@ db_stats_print(Response &r, const Database &db)
+       unsigned total_duration_s =
+               
std::chrono::duration_cast<std::chrono::seconds>(stats.total_duration).count();
+
+-      r.Fmt(FMT_STRING("artists: {}\n"
+-                       "albums: {}\n"
+-                       "songs: {}\n"
+-                       "db_playtime: {}\n"),
++      r.Fmt("artists: {}\n"
++            "albums: {}\n"
++            "songs: {}\n"
++            "db_playtime: {}\n",
+             stats.artist_count,
+             stats.album_count,
+             stats.song_count,
+@@ -110,7 +110,7 @@ db_stats_print(Response &r, const Database &db)
+
+       const auto update_stamp = db.GetUpdateStamp();
+       if (!IsNegative(update_stamp))
+-              r.Fmt(FMT_STRING("db_update: {}\n"),
++              r.Fmt("db_update: {}\n",
+                     std::chrono::system_clock::to_time_t(update_stamp));
+ }
+
+@@ -125,8 +125,8 @@ stats_print(Response &r, const Partition &partition)
+       const auto uptime = std::chrono::steady_clock::now() - start_time;
+ #endif
+
+-      r.Fmt(FMT_STRING("uptime: {}\n"
+-                       "playtime: {}\n"),
++      r.Fmt("uptime: {}\n"
++            "playtime: {}\n",
+             std::chrono::duration_cast<std::chrono::seconds>(uptime).count(),
+             lround(partition.pc.GetTotalPlayTime().count()));
+
+--- a/src/TagPrint.cxx
++++ b/src/TagPrint.cxx
+@@ -31,20 +31,20 @@ tag_print_types(Response &r) noexcept
+       const auto tag_mask = global_tag_mask & r.GetTagMask();
+       for (unsigned i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++)
+               if (tag_mask.Test(TagType(i)))
+-                      r.Fmt(FMT_STRING("tagtype: {}\n"), tag_item_names[i]);
++                      r.Fmt("tagtype: {}\n", tag_item_names[i]);
+ }
+
+ void
+ tag_print(Response &r, TagType type, StringView _value) noexcept
+ {
+       const std::string_view value{_value};
+-      r.Fmt(FMT_STRING("{}: {}\n"), tag_item_names[type], value);
++      r.Fmt("{}: {}\n", tag_item_names[type], value);
+ }
+
+ void
+ tag_print(Response &r, TagType type, const char *value) noexcept
+ {
+-      r.Fmt(FMT_STRING("{}: {}\n"), tag_item_names[type], value);
++      r.Fmt("{}: {}\n", tag_item_names[type], value);
+ }
+
+ void
+@@ -60,8 +60,8 @@ void
+ tag_print(Response &r, const Tag &tag) noexcept
+ {
+       if (!tag.duration.IsNegative())
+-              r.Fmt(FMT_STRING("Time: {}\n"
+-                               "duration: {:1.3f}\n"),
++              r.Fmt("Time: {}\n"
++                    "duration: {:1.3f}\n",
+                     tag.duration.RoundS(),
+                     tag.duration.ToDoubleS());
+
+--- a/src/TimePrint.cxx
++++ b/src/TimePrint.cxx
+@@ -36,5 +36,5 @@ time_print(Response &r, const char *name,
+               return;
+       }
+
+-      r.Fmt(FMT_STRING("{}: {}\n"), name, s.c_str());
++      r.Fmt("{}: {}\n", name, s.c_str());
+ }
+--- a/src/client/Idle.cxx
++++ b/src/client/Idle.cxx
+@@ -32,7 +32,7 @@ WriteIdleResponse(Response &r, unsigned flags) noexcept
+       const char *const*idle_names = idle_get_names();
+       for (unsigned i = 0; idle_names[i]; ++i) {
+               if (flags & (1 << i))
+-                      r.Fmt(FMT_STRING("changed: {}\n"), idle_names[i]);
++                      r.Fmt("changed: {}\n", idle_names[i]);
+       }
+
+       r.Write("OK\n");
+--- a/src/client/Response.cxx
++++ b/src/client/Response.cxx
+@@ -66,7 +66,7 @@ Response::WriteBinary(ConstBuffer<void> payload) noexcept
+ void
+ Response::Error(enum ack code, const char *msg) noexcept
+ {
+-      Fmt(FMT_STRING("ACK [{}@{}] {{{}}} "),
++      Fmt("ACK [{}@{}] {{{}}} ",
+           (int)code, list_index, command);
+
+       Write(msg);
+@@ -77,7 +77,7 @@ void
+ Response::VFmtError(enum ack code,
+                   fmt::string_view format_str, fmt::format_args args) noexcept
+ {
+-      Fmt(FMT_STRING("ACK [{}@{}] {{{}}} "),
++      Fmt("ACK [{}@{}] {{{}}} ",
+           (int)code, list_index, command);
+
+       VFmt(format_str, args);
+--- a/src/command/AllCommands.cxx
++++ b/src/command/AllCommands.cxx
+@@ -255,7 +255,7 @@ PrintAvailableCommands(Response &r, const Partition 
&partition,
+
+               if (cmd->permission == (permission & cmd->permission) &&
+                   command_available(partition, cmd))
+-                      r.Fmt(FMT_STRING("command: {}\n"), cmd->cmd);
++                      r.Fmt("command: {}\n", cmd->cmd);
+       }
+
+       return CommandResult::OK;
+@@ -268,7 +268,7 @@ PrintUnavailableCommands(Response &r, unsigned permission) 
noexcept
+               const struct command *cmd = &i;
+
+               if (cmd->permission != (permission & cmd->permission))
+-                      r.Fmt(FMT_STRING("command: {}\n"), cmd->cmd);
++                      r.Fmt("command: {}\n", cmd->cmd);
+       }
+
+       return CommandResult::OK;
+@@ -326,7 +326,7 @@ command_check_request(const struct command *cmd, Response 
&r,
+ {
+       if (cmd->permission != (permission & cmd->permission)) {
+               r.FmtError(ACK_ERROR_PERMISSION,
+-                         FMT_STRING("you don't have permission for \"{}\""),
++                         "you don't have permission for \"{}\"",
+                          cmd->cmd);
+               return false;
+       }
+@@ -339,17 +339,17 @@ command_check_request(const struct command *cmd, 
Response &r,
+
+       if (min == max && unsigned(max) != args.size) {
+               r.FmtError(ACK_ERROR_ARG,
+-                         FMT_STRING("wrong number of arguments for \"{}\""),
++                         "wrong number of arguments for \"{}\"",
+                          cmd->cmd);
+               return false;
+       } else if (args.size < unsigned(min)) {
+               r.FmtError(ACK_ERROR_ARG,
+-                         FMT_STRING("too few arguments for \"{}\""),
++                         "too few arguments for \"{}\"",
+                          cmd->cmd);
+               return false;
+       } else if (max >= 0 && args.size > unsigned(max)) {
+               r.FmtError(ACK_ERROR_ARG,
+-                         FMT_STRING("too many arguments for \"{}\""),
++                         "too many arguments for \"{}\"",
+                          cmd->cmd);
+               return false;
+       } else
+@@ -363,7 +363,7 @@ command_checked_lookup(Response &r, unsigned permission,
+       const struct command *cmd = command_lookup(cmd_name);
+       if (cmd == nullptr) {
+               r.FmtError(ACK_ERROR_UNKNOWN,
+-                         FMT_STRING("unknown command \"{}\""), cmd_name);
++                         "unknown command \"{}\"", cmd_name);
+               return nullptr;
+       }
+
+--- a/src/command/DatabaseCommands.cxx
++++ b/src/command/DatabaseCommands.cxx
+@@ -243,7 +243,7 @@ handle_count(Client &client, Request args, Response &r)
+               group = tag_name_parse_i(s);
+               if (group == TAG_NUM_OF_ITEM_TYPES) {
+                       r.FmtError(ACK_ERROR_ARG,
+-                                 FMT_STRING("Unknown tag type: {}"), s);
++                                 "Unknown tag type: {}", s);
+                       return CommandResult::ERROR;
+               }
+
+@@ -312,7 +312,7 @@ handle_list(Client &client, Request args, Response &r)
+       const auto tagType = tag_name_parse_i(tag_name);
+       if (tagType == TAG_NUM_OF_ITEM_TYPES) {
+               r.FmtError(ACK_ERROR_ARG,
+-                         FMT_STRING("Unknown tag type: {}"), tag_name);
++                         "Unknown tag type: {}", tag_name);
+               return CommandResult::ERROR;
+       }
+
+@@ -326,7 +326,7 @@ handle_list(Client &client, Request args, Response &r)
+               /* for compatibility with < 0.12.0 */
+               if (tagType != TAG_ALBUM) {
+                       r.FmtError(ACK_ERROR_ARG,
+-                                 FMT_STRING("should be \"{}\" for 3 
arguments"),
++                                 "should be \"{}\" for 3 arguments",
+                                  tag_item_names[TAG_ALBUM]);
+                       return CommandResult::ERROR;
+               }
+@@ -341,7 +341,7 @@ handle_list(Client &client, Request args, Response &r)
+               const auto group = tag_name_parse_i(s);
+               if (group == TAG_NUM_OF_ITEM_TYPES) {
+                       r.FmtError(ACK_ERROR_ARG,
+-                                 FMT_STRING("Unknown tag type: {}"), s);
++                                 "Unknown tag type: {}", s);
+                       return CommandResult::ERROR;
+               }
+
+--- a/src/command/FileCommands.cxx
++++ b/src/command/FileCommands.cxx
+@@ -85,12 +85,12 @@ handle_listfiles_local(Response &r, Path path_fs)
+                       continue;
+
+               if (fi.IsRegular())
+-                      r.Fmt(FMT_STRING("file: {}\n"
+-                                       "size: {}\n"),
++                      r.Fmt("file: {}\n"
++                            "size: {}\n",
+                             name_utf8,
+                             fi.GetSize());
+               else if (fi.IsDirectory())
+-                      r.Fmt(FMT_STRING("directory: {}\n"), name_utf8);
++                      r.Fmt("directory: {}\n", name_utf8);
+               else
+                       continue;
+
+@@ -129,7 +129,7 @@ class PrintCommentHandler final : public NullTagHandler {
+       void OnPair(StringView _key, StringView _value) noexcept override {
+               const std::string_view key{_key}, value{_value};
+               if (IsValidName(key) && IsValidValue(value))
+-                      response.Fmt(FMT_STRING("{}: {}\n"), key, value);
++                      response.Fmt("{}: {}\n", key, value);
+       }
+ };
+
+@@ -218,7 +218,7 @@ read_stream_art(Response &r, const std::string_view 
art_directory,
+               read_size = is->Read(lock, buffer.get(), buffer_size);
+       }
+
+-      r.Fmt(FMT_STRING("size: {}\n"), art_file_size);
++      r.Fmt("size: {}\n", art_file_size);
+
+       r.WriteBinary({buffer.get(), read_size});
+
+@@ -348,10 +348,10 @@ class PrintPictureHandler final : public NullTagHandler {
+                       return;
+               }
+
+-              response.Fmt(FMT_STRING("size: {}\n"), buffer.size);
++              response.Fmt("size: {}\n", buffer.size);
+
+               if (mime_type != nullptr)
+-                      response.Fmt(FMT_STRING("type: {}\n"), mime_type);
++                      response.Fmt("type: {}\n", mime_type);
+
+               buffer.size -= offset;
+
+--- a/src/command/MessageCommands.cxx
++++ b/src/command/MessageCommands.cxx
+@@ -87,7 +87,7 @@ handle_channels(Client &client, [[maybe_unused]] Request 
args, Response &r)
+       }
+
+       for (const auto &channel : channels)
+-              r.Fmt(FMT_STRING("channel: {}\n"), channel);
++              r.Fmt("channel: {}\n", channel);
+
+       return CommandResult::OK;
+ }
+@@ -99,7 +99,7 @@ handle_read_messages(Client &client,
+       assert(args.empty());
+
+       client.ConsumeMessages([&r](const auto &msg){
+-              r.Fmt(FMT_STRING("channel: {}\nmessage: {}\n"),
++              r.Fmt("channel: {}\nmessage: {}\n",
+                     msg.GetChannel(), msg.GetMessage());
+       });
+
+--- a/src/command/OtherCommands.cxx
++++ b/src/command/OtherCommands.cxx
+@@ -62,7 +62,7 @@ static void
+ print_spl_list(Response &r, const PlaylistVector &list)
+ {
+       for (const auto &i : list) {
+-              r.Fmt(FMT_STRING("playlist: {}\n"), i.name);
++              r.Fmt("playlist: {}\n", i.name);
+
+               if (!IsNegative(i.mtime))
+                       time_print(r, "Last-Modified", i.mtime);
+@@ -249,7 +249,7 @@ handle_update(Response &r, UpdateService &update,
+             const char *uri_utf8, bool discard)
+ {
+       unsigned ret = update.Enqueue(uri_utf8, discard);
+-      r.Fmt(FMT_STRING("updating_db: {}\n"), ret);
++      r.Fmt("updating_db: {}\n", ret);
+       return CommandResult::OK;
+ }
+
+@@ -259,7 +259,7 @@ handle_update(Response &r, Database &db,
+ {
+       unsigned id = db.Update(uri_utf8, discard);
+       if (id > 0) {
+-              r.Fmt(FMT_STRING("updating_db: {}\n"), id);
++              r.Fmt("updating_db: {}\n", id);
+               return CommandResult::OK;
+       } else {
+               /* Database::Update() has returned 0 without setting
+@@ -326,7 +326,7 @@ handle_getvol(Client &client, Request, Response &r)
+
+       const auto volume = 
partition.mixer_memento.GetVolume(partition.outputs);
+       if (volume >= 0)
+-              r.Fmt(FMT_STRING("volume: {}\n"), volume);
++              r.Fmt("volume: {}\n", volume);
+
+       return CommandResult::OK;
+ }
+@@ -391,7 +391,7 @@ handle_config(Client &client, [[maybe_unused]] Request 
args, Response &r)
+       const Storage *storage = client.GetStorage();
+       if (storage != nullptr) {
+               const auto path = storage->MapUTF8("");
+-              r.Fmt(FMT_STRING("music_directory: {}\n"), path);
++              r.Fmt("music_directory: {}\n", path);
+       }
+ #endif
+
+@@ -406,7 +406,7 @@ handle_idle(Client &client, Request args, Response &r)
+               unsigned event = idle_parse_name(i);
+               if (event == 0) {
+                       r.FmtError(ACK_ERROR_ARG,
+-                                 FMT_STRING("Unrecognized idle event: {}"),
++                                 "Unrecognized idle event: {}",
+                                  i);
+                       return CommandResult::ERROR;
+               }
+--- a/src/command/PartitionCommands.cxx
++++ b/src/command/PartitionCommands.cxx
+@@ -48,7 +48,7 @@ CommandResult
+ handle_listpartitions(Client &client, Request, Response &r)
+ {
+       for (const auto &partition : client.GetInstance().partitions) {
+-              r.Fmt(FMT_STRING("partition: {}\n"), partition.name);
++              r.Fmt("partition: {}\n", partition.name);
+       }
+
+       return CommandResult::OK;
+--- a/src/command/PlayerCommands.cxx
++++ b/src/command/PlayerCommands.cxx
+@@ -133,17 +133,17 @@ handle_status(Client &client, [[maybe_unused]] Request 
args, Response &r)
+
+       const auto volume = 
partition.mixer_memento.GetVolume(partition.outputs);
+       if (volume >= 0)
+-              r.Fmt(FMT_STRING("volume: {}\n"), volume);
+-
+-      r.Fmt(FMT_STRING(COMMAND_STATUS_REPEAT ": {}\n"
+-                       COMMAND_STATUS_RANDOM ": {}\n"
+-                       COMMAND_STATUS_SINGLE ": {}\n"
+-                       COMMAND_STATUS_CONSUME ": {}\n"
+-                       "partition: {}\n"
+-                       COMMAND_STATUS_PLAYLIST ": {}\n"
+-                       COMMAND_STATUS_PLAYLIST_LENGTH ": {}\n"
+-                       COMMAND_STATUS_MIXRAMPDB ": {}\n"
+-                       COMMAND_STATUS_STATE ": {}\n"),
++              r.Fmt("volume: {}\n", volume);
++
++      r.Fmt(COMMAND_STATUS_REPEAT ": {}\n"
++            COMMAND_STATUS_RANDOM ": {}\n"
++            COMMAND_STATUS_SINGLE ": {}\n"
++            COMMAND_STATUS_CONSUME ": {}\n"
++            "partition: {}\n"
++            COMMAND_STATUS_PLAYLIST ": {}\n"
++            COMMAND_STATUS_PLAYLIST_LENGTH ": {}\n"
++            COMMAND_STATUS_MIXRAMPDB ": {}\n"
++            COMMAND_STATUS_STATE ": {}\n",
+             (unsigned)playlist.GetRepeat(),
+             (unsigned)playlist.GetRandom(),
+             SingleToString(playlist.GetSingle()),
+@@ -155,24 +155,24 @@ handle_status(Client &client, [[maybe_unused]] Request 
args, Response &r)
+             state);
+
+       if (pc.GetCrossFade() > FloatDuration::zero())
+-              r.Fmt(FMT_STRING(COMMAND_STATUS_CROSSFADE ": {}\n"),
++              r.Fmt(COMMAND_STATUS_CROSSFADE ": {}\n",
+                     lround(pc.GetCrossFade().count()));
+
+       if (pc.GetMixRampDelay() > FloatDuration::zero())
+-              r.Fmt(FMT_STRING(COMMAND_STATUS_MIXRAMPDELAY ": {}\n"),
++              r.Fmt(COMMAND_STATUS_MIXRAMPDELAY ": {}\n",
+                     pc.GetMixRampDelay().count());
+
+       song = playlist.GetCurrentPosition();
+       if (song >= 0) {
+-              r.Fmt(FMT_STRING(COMMAND_STATUS_SONG ": {}\n"
+-                               COMMAND_STATUS_SONGID ": {}\n"),
++              r.Fmt(COMMAND_STATUS_SONG ": {}\n"
++                    COMMAND_STATUS_SONGID ": {}\n",
+                     song, playlist.PositionToId(song));
+       }
+
+       if (player_status.state != PlayerState::STOP) {
+-              r.Fmt(FMT_STRING(COMMAND_STATUS_TIME ": {}:{}\n"
+-                               "elapsed: {:1.3f}\n"
+-                               COMMAND_STATUS_BITRATE ": {}\n"),
++              r.Fmt(COMMAND_STATUS_TIME ": {}:{}\n"
++                    "elapsed: {:1.3f}\n"
++                    COMMAND_STATUS_BITRATE ": {}\n",
+                     player_status.elapsed_time.RoundS(),
+                     player_status.total_time.IsNegative()
+                     ? 0U
+@@ -181,11 +181,11 @@ handle_status(Client &client, [[maybe_unused]] Request 
args, Response &r)
+                     player_status.bit_rate);
+
+               if (!player_status.total_time.IsNegative())
+-                      r.Fmt(FMT_STRING("duration: {:1.3f}\n"),
++                      r.Fmt("duration: {:1.3f}\n",
+                                player_status.total_time.ToDoubleS());
+
+               if (player_status.audio_format.IsDefined())
+-                      r.Fmt(FMT_STRING(COMMAND_STATUS_AUDIO ": {}\n"),
++                      r.Fmt(COMMAND_STATUS_AUDIO ": {}\n",
+                             player_status.audio_format);
+       }
+
+@@ -195,7 +195,7 @@ handle_status(Client &client, [[maybe_unused]] Request 
args, Response &r)
+               ? update_service->GetId()
+               : 0;
+       if (updateJobId != 0) {
+-              r.Fmt(FMT_STRING(COMMAND_STATUS_UPDATING_DB ": {}\n"),
++              r.Fmt(COMMAND_STATUS_UPDATING_DB ": {}\n",
+                     updateJobId);
+       }
+ #endif
+@@ -203,14 +203,14 @@ handle_status(Client &client, [[maybe_unused]] Request 
args, Response &r)
+       try {
+               pc.LockCheckRethrowError();
+       } catch (...) {
+-              r.Fmt(FMT_STRING(COMMAND_STATUS_ERROR ": {}\n"),
++              r.Fmt(COMMAND_STATUS_ERROR ": {}\n",
+                     GetFullMessage(std::current_exception()));
+       }
+
+       song = playlist.GetNextPosition();
+       if (song >= 0)
+-              r.Fmt(FMT_STRING(COMMAND_STATUS_NEXTSONG ": {}\n"
+-                               COMMAND_STATUS_NEXTSONGID ": {}\n"),
++              r.Fmt(COMMAND_STATUS_NEXTSONG ": {}\n"
++                    COMMAND_STATUS_NEXTSONGID ": {}\n",
+                     song, playlist.PositionToId(song));
+
+       return CommandResult::OK;
+@@ -353,7 +353,7 @@ CommandResult
+ handle_replay_gain_status(Client &client, [[maybe_unused]] Request args,
+                         Response &r)
+ {
+-      r.Fmt(FMT_STRING("replay_gain_mode: {}\n"),
++      r.Fmt("replay_gain_mode: {}\n",
+             ToString(client.GetPartition().replay_gain_mode));
+       return CommandResult::OK;
+ }
+--- a/src/command/PlaylistCommands.cxx
++++ b/src/command/PlaylistCommands.cxx
+@@ -57,7 +57,7 @@ static void
+ print_spl_list(Response &r, const PlaylistVector &list)
+ {
+       for (const auto &i : list) {
+-              r.Fmt(FMT_STRING("playlist: {}\n"), i.name);
++              r.Fmt("playlist: {}\n", i.name);
+
+               if (!IsNegative(i.mtime))
+                       time_print(r, "Last-Modified", i.mtime);
+--- a/src/command/QueueCommands.cxx
++++ b/src/command/QueueCommands.cxx
+@@ -155,7 +155,7 @@ handle_addid(Client &client, Request args, Response &r)
+
+       partition.instance.LookupRemoteTag(uri);
+
+-      r.Fmt(FMT_STRING("Id: {}\n"), added_id);
++      r.Fmt("Id: {}\n", added_id);
+       return CommandResult::OK;
+ }
+
+--- a/src/command/StorageCommands.cxx
++++ b/src/command/StorageCommands.cxx
+@@ -67,14 +67,14 @@ handle_listfiles_storage(Response &r, 
StorageDirectoryReader &reader)
+                       continue;
+
+               case StorageFileInfo::Type::REGULAR:
+-                      r.Fmt(FMT_STRING("file: {}\n"
+-                                       "size: {}\n"),
++                      r.Fmt("file: {}\n"
++                            "size: {}\n",
+                             name_utf8,
+                             info.size);
+                       break;
+
+               case StorageFileInfo::Type::DIRECTORY:
+-                      r.Fmt(FMT_STRING("directory: {}\n"), name_utf8);
++                      r.Fmt("directory: {}\n", name_utf8);
+                       break;
+               }
+
+@@ -127,7 +127,7 @@ print_storage_uri(Client &client, Response &r, const 
Storage &storage)
+                       uri = std::move(allocated);
+       }
+
+-      r.Fmt(FMT_STRING("storage: {}\n"), uri);
++      r.Fmt("storage: {}\n", uri);
+ }
+
+ CommandResult
+@@ -143,7 +143,7 @@ handle_listmounts(Client &client, [[maybe_unused]] Request 
args, Response &r)
+
+       const auto visitor = [&client, &r](const char *mount_uri,
+                                          const Storage &storage){
+-              r.Fmt(FMT_STRING("mount: {}\n"), mount_uri);
++              r.Fmt("mount: {}\n", mount_uri);
+               print_storage_uri(client, r, storage);
+       };
+
+--- a/src/command/TagCommands.cxx
++++ b/src/command/TagCommands.cxx
+@@ -35,7 +35,7 @@ handle_addtagid(Client &client, Request args, Response &r)
+       const char *const tag_name = args[1];
+       const TagType tag_type = tag_name_parse_i(tag_name);
+       if (tag_type == TAG_NUM_OF_ITEM_TYPES) {
+-              r.FmtError(ACK_ERROR_ARG, FMT_STRING("Unknown tag type: {}"),
++              r.FmtError(ACK_ERROR_ARG, "Unknown tag type: {}",
+                          tag_name);
+               return CommandResult::ERROR;
+       }
+@@ -57,7 +57,7 @@ handle_cleartagid(Client &client, Request args, Response &r)
+               tag_type = tag_name_parse_i(tag_name);
+               if (tag_type == TAG_NUM_OF_ITEM_TYPES) {
+                       r.FmtError(ACK_ERROR_ARG,
+-                                 FMT_STRING("Unknown tag type: {}"),
++                                 "Unknown tag type: {}",
+                                  tag_name);
+                       return CommandResult::ERROR;
+               }
+--- a/src/db/Count.cxx
++++ b/src/db/Count.cxx
+@@ -49,8 +49,8 @@ PrintSearchStats(Response &r, const SearchStats &stats) 
noexcept
+       unsigned total_duration_s =
+               
std::chrono::duration_cast<std::chrono::seconds>(stats.total_duration).count();
+
+-      r.Fmt(FMT_STRING("songs: {}\n"
+-                       "playtime: {}\n"),
++      r.Fmt("songs: {}\n"
++            "playtime: {}\n",
+             stats.n_songs, total_duration_s);
+ }
+
+--- a/src/db/DatabasePrint.cxx
++++ b/src/db/DatabasePrint.cxx
+@@ -49,7 +49,7 @@ static void
+ PrintDirectoryURI(Response &r, bool base,
+                 const LightDirectory &directory) noexcept
+ {
+-      r.Fmt(FMT_STRING("directory: {}\n"),
++      r.Fmt("directory: {}\n",
+             ApplyBaseFlag(directory.GetPath(), base));
+ }
+
+@@ -79,10 +79,10 @@ print_playlist_in_directory(Response &r, bool base,
+                           const char *name_utf8) noexcept
+ {
+       if (base || directory == nullptr)
+-              r.Fmt(FMT_STRING("playlist: {}\n"),
++              r.Fmt("playlist: {}\n",
+                     ApplyBaseFlag(name_utf8, base));
+       else
+-              r.Fmt(FMT_STRING("playlist: {}/{}\n"),
++              r.Fmt("playlist: {}/{}\n",
+                     directory, name_utf8);
+ }
+
+@@ -92,9 +92,9 @@ print_playlist_in_directory(Response &r, bool base,
+                           const char *name_utf8) noexcept
+ {
+       if (base || directory == nullptr || directory->IsRoot())
+-              r.Fmt(FMT_STRING("playlist: {}\n"), name_utf8);
++              r.Fmt("playlist: {}\n", name_utf8);
+       else
+-              r.Fmt(FMT_STRING("playlist: {}/{}\n"),
++              r.Fmt("playlist: {}/{}\n",
+                     directory->GetPath(), name_utf8);
+ }
+
+@@ -198,7 +198,7 @@ PrintUniqueTags(Response &r, ConstBuffer<TagType> 
tag_types,
+       tag_types.pop_front();
+
+       for (const auto &[key, tag] : map) {
+-              r.Fmt(FMT_STRING("{}: {}\n"), name, key);
++              r.Fmt("{}: {}\n", name, key);
+
+               if (!tag_types.empty())
+                       PrintUniqueTags(r, tag_types, tag);
+--- a/src/decoder/DecoderPrint.cxx
++++ b/src/decoder/DecoderPrint.cxx
+@@ -35,15 +35,15 @@ decoder_plugin_print(Response &r,
+
+       assert(plugin.name != nullptr);
+
+-      r.Fmt(FMT_STRING("plugin: {}\n"), plugin.name);
++      r.Fmt("plugin: {}\n", plugin.name);
+
+       if (plugin.suffixes != nullptr)
+               for (p = plugin.suffixes; *p != nullptr; ++p)
+-                      r.Fmt(FMT_STRING("suffix: {}\n"), *p);
++                      r.Fmt("suffix: {}\n", *p);
+
+       if (plugin.mime_types != nullptr)
+               for (p = plugin.mime_types; *p != nullptr; ++p)
+-                      r.Fmt(FMT_STRING("mime_type: {}\n"), *p);
++                      r.Fmt("mime_type: {}\n", *p);
+ }
+
+ void
+--- a/src/ls.cxx
++++ b/src/ls.cxx
+@@ -68,7 +68,7 @@ print_supported_uri_schemes(Response &r)
+       });
+
+       for (const auto& protocol : protocols) {
+-              r.Fmt(FMT_STRING("handler: {}\n"), protocol);
++              r.Fmt("handler: {}\n", protocol);
+       }
+ }
+
+--- a/src/output/Print.cxx
++++ b/src/output/Print.cxx
+@@ -34,16 +34,16 @@ printAudioDevices(Response &r, const MultipleOutputs 
&outputs)
+       for (unsigned i = 0, n = outputs.Size(); i != n; ++i) {
+               const auto &ao = outputs.Get(i);
+
+-              r.Fmt(FMT_STRING("outputid: {}\n"
+-                               "outputname: {}\n"
+-                               "plugin: {}\n"
+-                               "outputenabled: {}\n"),
++              r.Fmt("outputid: {}\n"
++                     "outputname: {}\n"
++                     "plugin: {}\n"
++                     "outputenabled: {}\n",
+                     i,
+                     ao.GetName(), ao.GetPluginName(),
+                     (unsigned)ao.IsEnabled());
+
+               for (const auto &[attribute, value] : ao.GetAttributes())
+-                      r.Fmt(FMT_STRING("attribute: {}={}\n"),
++                      r.Fmt("attribute: {}={}\n",
+                             attribute, value);
+       }
+ }
+--- a/src/queue/QueuePrint.cxx
++++ b/src/queue/QueuePrint.cxx
+@@ -40,12 +40,12 @@ queue_print_song_info(Response &r, const Queue &queue,
+                     unsigned position)
+ {
+       song_print_info(r, queue.Get(position));
+-      r.Fmt(FMT_STRING("Pos: {}\nId: {}\n"),
++      r.Fmt("Pos: {}\nId: {}\n",
+             position, queue.PositionToId(position));
+
+       uint8_t priority = queue.GetPriorityAtPosition(position);
+       if (priority != 0)
+-              r.Fmt(FMT_STRING("Prio: {}\n"), priority);
++              r.Fmt("Prio: {}\n", priority);
+ }
+
+ void
+@@ -67,7 +67,7 @@ queue_print_uris(Response &r, const Queue &queue,
+       assert(end <= queue.GetLength());
+
+       for (unsigned i = start; i < end; ++i) {
+-              r.Fmt(FMT_STRING("{}:"), i);
++              r.Fmt("{}:", i);
+               song_print_uri(r, queue.Get(i));
+       }
+ }
+@@ -95,7 +95,7 @@ queue_print_changes_position(Response &r, const Queue &queue,
+
+       for (unsigned i = start; i < end; i++)
+               if (queue.IsNewerAtPosition(i, version))
+-                      r.Fmt(FMT_STRING("cpos: {}\nId: {}\n"),
++                      r.Fmt("cpos: {}\nId: {}\n",
+                             i, queue.PositionToId(i));
+ }
+
+--- a/src/sticker/Print.cxx
++++ b/src/sticker/Print.cxx
+@@ -27,7 +27,7 @@ void
+ sticker_print_value(Response &r,
+                   const char *name, const char *value)
+ {
+-      r.Fmt(FMT_STRING("sticker: {}={}\n"), name, value);
++      r.Fmt("sticker: {}={}\n", name, value);
+ }
+
+ void
+
+https://github.com/MusicPlayerDaemon/MPD/pull/2187
+https://github.com/MusicPlayerDaemon/MPD/commit/5de0909ae5576b6070a7ba4085ddaed67de808fd
+
+From 720fd27aa007afdcc0c03d57557da94909018cdd Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <[email protected]>
+Date: Sat, 18 Jan 2025 03:29:14 +0200
+Subject: [PATCH] lib/fmt: remove the rest of the broken use of FMT_STRING
+
+Fixes: 9db7144d0fa4512335070a984690f3f5034210a5
+Signed-off-by: Alfred Wingate <[email protected]>
+---
+ src/command/FingerprintCommands.cxx         | 2 +-
+ src/command/NeighborCommands.cxx            | 4 ++--
+ src/output/plugins/PipeWireOutputPlugin.cxx | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/command/FingerprintCommands.cxx 
b/src/command/FingerprintCommands.cxx
+index ff91f6f57..f73e676fb 100644
+--- a/src/command/FingerprintCommands.cxx
++++ b/src/command/FingerprintCommands.cxx
+@@ -62,7 +62,7 @@ protected:
+       void Run() override;
+ 
+       void SendResponse(Response &r) noexcept override {
+-              r.Fmt(FMT_STRING("chromaprint: {}\n"),
++              r.Fmt("chromaprint: {}\n",
+                     GetFingerprint());
+       }
+ 
+diff --git a/src/command/NeighborCommands.cxx 
b/src/command/NeighborCommands.cxx
+index f67bb1a11..72bb88500 100644
+--- a/src/command/NeighborCommands.cxx
++++ b/src/command/NeighborCommands.cxx
+@@ -46,8 +46,8 @@ handle_listneighbors(Client &client, [[maybe_unused]] 
Request args, Response &r)
+       }
+ 
+       for (const auto &i : neighbors->GetList())
+-              r.Fmt(FMT_STRING("neighbor: {}\n"
+-                               "name: {}\n"),
++              r.Fmt("neighbor: {}\n"
++                    "name: {}\n",
+                     i.uri,
+                     i.display_name);
+       return CommandResult::OK;
+diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx 
b/src/output/plugins/PipeWireOutputPlugin.cxx
+index a97052f14..fea4adf0b 100644
+--- a/src/output/plugins/PipeWireOutputPlugin.cxx
++++ b/src/output/plugins/PipeWireOutputPlugin.cxx
+@@ -685,7 +685,7 @@ PipeWireOutput::ParamChanged([[maybe_unused]] uint32_t id,
+                               ::SetVolume(*stream, channels, volume);
+                       } catch (...) {
+                               FmtError(pipewire_output_domain,
+-                                       FMT_STRING("Failed to restore volume: 
{}"),
++                                       "Failed to restore volume: {}",
+                                        std::current_exception());
+                       }
+               }
+-- 
+2.48.0
+

diff --git a/media-sound/mpd/mpd-0.23.16.ebuild 
b/media-sound/mpd/mpd-0.23.16.ebuild
new file mode 100644
index 000000000000..5005b5ceee9b
--- /dev/null
+++ b/media-sound/mpd/mpd-0.23.16.ebuild
@@ -0,0 +1,300 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic linux-info meson systemd xdg
+
+DESCRIPTION="The Music Player Daemon (mpd)"
+HOMEPAGE="https://www.musicpd.org https://github.com/MusicPlayerDaemon/MPD";
+SRC_URI="https://www.musicpd.org/download/${PN}/${PV%.*}/${P}.tar.xz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="+alsa ao +audiofile bzip2 cdio chromaprint +cue +curl doc +dbus
+       +eventfd expat faad +ffmpeg +fifo flac fluidsynth gme +icu +id3tag 
+inotify +io-uring
+       jack lame libmpdclient libsamplerate libsoxr +mad mikmod mms
+       modplug mpg123 musepack +network nfs openal openmpt opus oss pipe 
pipewire pulseaudio qobuz
+       recorder samba selinux sid signalfd snapcast sndfile sndio soundcloud 
sqlite systemd
+       test twolame udisks vorbis wavpack webdav wildmidi upnp
+       yajl zeroconf zip zlib"
+
+OUTPUT_PLUGINS="alsa ao fifo jack network openal oss pipe pipewire pulseaudio 
snapcast sndio recorder"
+DECODER_PLUGINS="audiofile faad ffmpeg flac fluidsynth mad mikmod
+       modplug mpg123 musepack opus openmpt flac sid vorbis wavpack wildmidi"
+ENCODER_PLUGINS="audiofile flac lame twolame vorbis"
+
+REQUIRED_USE="
+       || ( ${OUTPUT_PLUGINS} )
+       || ( ${DECODER_PLUGINS} )
+       network? ( || ( ${ENCODER_PLUGINS} ) )
+       recorder? ( || ( ${ENCODER_PLUGINS} ) )
+       qobuz? ( curl soundcloud )
+       snapcast? ( yajl )
+       soundcloud? ( curl qobuz yajl )
+       udisks? ( dbus )
+       upnp? ( curl expat )
+       webdav? ( curl expat )
+"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       acct-user/mpd
+       dev-libs/libfmt:=
+       dev-libs/libpcre2:=
+       media-libs/libogg
+       alsa? (
+               media-libs/alsa-lib
+               media-sound/alsa-utils
+       )
+       ao? ( media-libs/libao[alsa?,pulseaudio?] )
+       audiofile? ( media-libs/audiofile:= )
+       bzip2? ( app-arch/bzip2 )
+       cdio? (
+               dev-libs/libcdio:=
+               dev-libs/libcdio-paranoia:=
+       )
+       chromaprint? ( media-libs/chromaprint:= )
+       curl? ( net-misc/curl )
+       dbus? ( sys-apps/dbus )
+       doc? ( dev-python/sphinx )
+       expat? ( dev-libs/expat )
+       faad? ( media-libs/faad2 )
+       ffmpeg? ( media-video/ffmpeg:= )
+       flac? ( media-libs/flac:= )
+       fluidsynth? ( media-sound/fluidsynth:= )
+       gme? ( >=media-libs/game-music-emu-0.6.0_pre20120802 )
+       icu? (
+               >=dev-libs/icu-50:=
+               virtual/libiconv
+       )
+       id3tag? ( media-libs/libid3tag:= )
+       io-uring? ( sys-libs/liburing:= )
+       jack? ( virtual/jack )
+       lame? ( network? ( media-sound/lame ) )
+       libmpdclient? ( media-libs/libmpdclient )
+       libsamplerate? ( media-libs/libsamplerate )
+       libsoxr? ( media-libs/soxr )
+       mad? ( media-libs/libmad )
+       mikmod? ( media-libs/libmikmod )
+       mms? ( media-libs/libmms )
+       modplug? ( media-libs/libmodplug )
+       mpg123? ( media-sound/mpg123-base )
+       musepack? ( media-sound/musepack-tools )
+       network? ( >=media-libs/libshout-2.4.0 )
+       nfs? ( net-fs/libnfs:= )
+       openal? ( media-libs/openal )
+       openmpt? ( media-libs/libopenmpt )
+       opus? ( media-libs/opus )
+       pulseaudio? ( media-libs/libpulse )
+       pipewire? ( media-video/pipewire:= )
+       qobuz? (
+               || (
+                       dev-libs/libgcrypt
+                       media-video/ffmpeg
+               )
+       )
+       samba? ( net-fs/samba:= )
+       selinux? ( sec-policy/selinux-mpd )
+       sid? ( || (
+               media-libs/libsidplay:2
+               media-libs/libsidplayfp
+       ) )
+       snapcast? ( media-sound/snapcast )
+       sndfile? ( media-libs/libsndfile )
+       sndio? ( media-sound/sndio:= )
+       sqlite? ( dev-db/sqlite:3 )
+       systemd? ( sys-apps/systemd:= )
+       twolame? ( media-sound/twolame )
+       udisks? ( sys-fs/udisks:2 )
+       upnp? ( net-libs/libupnp:= )
+       vorbis? ( media-libs/libvorbis )
+       wavpack? ( media-sound/wavpack )
+       wildmidi? ( media-sound/wildmidi )
+       yajl? ( >=dev-libs/yajl-2:= )
+       zeroconf? ( net-dns/avahi[dbus] )
+       zip? ( dev-libs/zziplib:= )
+       zlib? ( sys-libs/zlib:= )
+"
+
+DEPEND="
+       ${RDEPEND}
+       dev-libs/boost:=
+       test? ( dev-cpp/gtest )
+"
+
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/mpd-0.23.15.16-fix-libfmt-11.1.0.patch
+)
+
+pkg_setup() {
+       if use eventfd; then
+               CONFIG_CHECK+=" ~EVENTFD"
+               ERROR_EVENTFD="${P} requires eventfd in-kernel support."
+       fi
+
+       if use signalfd; then
+               CONFIG_CHECK+=" ~SIGNALFD"
+               ERROR_SIGNALFD="${P} requires signalfd in-kernel support."
+       fi
+
+       if use inotify; then
+               CONFIG_CHECK+=" ~INOTIFY_USER"
+               ERROR_INOTIFY_USER="${P} requires inotify in-kernel support."
+       fi
+
+       if use io-uring; then
+               CONFIG_CHECK+=" ~IO_URING"
+               ERROR_IO_URING="${P} requires io-uring in-kernel support."
+       fi
+
+       if use eventfd || use signalfd || use inotify || use io-uring; then
+               linux-info_pkg_setup
+       fi
+}
+
+src_configure() {
+       local emesonargs=(
+               # media-libs/adplug is not packaged anymore
+               -Dadplug=disabled
+               $(meson_feature alsa)
+               $(meson_feature ao)
+               $(meson_feature audiofile)
+               $(meson_feature bzip2)
+               $(meson_feature cdio cdio_paranoia)
+               $(meson_feature chromaprint)
+               $(meson_use cue)
+               $(meson_feature curl)
+               $(meson_feature dbus)
+               $(meson_use eventfd)
+               $(meson_feature expat)
+               $(meson_feature faad)
+               $(meson_feature ffmpeg)
+               $(meson_use fifo)
+               $(meson_feature flac)
+               $(meson_feature fluidsynth)
+               $(meson_feature gme)
+               $(meson_feature icu)
+               $(meson_feature id3tag)
+               $(meson_use inotify)
+               -Dipv6=enabled
+               $(meson_feature cdio iso9660)
+               $(meson_feature io-uring io_uring)
+               $(meson_feature jack)
+               $(meson_feature libmpdclient)
+               $(meson_feature libsamplerate)
+               $(meson_feature mad)
+               $(meson_feature mikmod)
+               $(meson_feature mms)
+               $(meson_feature modplug)
+               $(meson_feature musepack mpcdec)
+               $(meson_feature mpg123)
+               $(meson_feature nfs)
+               $(meson_feature openal)
+               $(meson_feature openmpt)
+               $(meson_feature opus)
+               $(meson_feature oss)
+               $(meson_use pipe)
+               $(meson_feature pipewire)
+               $(meson_feature pulseaudio pulse)
+               $(meson_feature qobuz)
+               $(meson_use recorder)
+               $(meson_use signalfd)
+               $(meson_feature samba smbclient)
+               $(meson_use snapcast)
+               $(meson_feature sid sidplay)
+               $(meson_feature sndfile)
+               $(meson_feature sndio)
+               $(meson_feature soundcloud)
+               $(meson_feature libsoxr soxr)
+               $(meson_feature sqlite)
+               $(meson_feature systemd)
+               $(meson_use test)
+               $(meson_feature udisks)
+               -Dupnp=$(usex upnp pupnp disabled)
+               $(meson_feature vorbis)
+               $(meson_feature wavpack)
+               $(meson_feature wildmidi)
+               $(meson_feature webdav)
+               $(meson_feature yajl)
+               -Dzeroconf=$(usex zeroconf avahi disabled)
+               $(meson_feature zlib)
+               $(meson_feature zip zzip)
+
+               --libdir="/usr/$(get_libdir)"
+               $(meson_feature doc documentation)
+               -Dsolaris_output=disabled
+
+               -Ddatabase=true
+               -Ddaemon=true
+               -Ddsd=true
+               -Dtcp=true
+
+               -Dsystemd_system_unit_dir="$(systemd_get_systemunitdir)"
+               -Dsystemd_user_unit_dir="$(systemd_get_userunitdir)"
+
+               $(meson_feature icu iconv)
+       )
+
+       if use samba || use upnp; then
+               emesonargs+=( -Dneighbor=true )
+       fi
+
+       append-lfs-flags
+       append-ldflags "-L${ESYSROOT}/usr/$(get_libdir)/sidplay/builders"
+
+       if use network; then
+               emesonargs+=(
+                       -Dshine=disabled
+                       -Dshout=enabled
+                       $(meson_feature vorbis vorbisenc)
+                       -Dhttpd=true
+                       $(meson_feature lame)
+                       $(meson_feature twolame)
+                       $(meson_use audiofile wave_encoder)
+               )
+       fi
+
+       meson_src_configure
+}
+
+src_install() {
+       meson_src_install
+
+       insinto /etc
+       newins doc/mpdconf.example mpd.conf
+
+       # When running MPD as system service, better switch to the user we 
provide
+       sed -i \
+               -e 's:^#user.*$:user "mpd":' \
+               -e 's:^#group.*$:group "audio":' \
+               "${ED}/etc/mpd.conf" || die
+
+       if ! use systemd; then
+               # Extra options for running MPD under OpenRC
+               # (options that should not be set when using systemd)
+               sed -i \
+                       -e 's:^#log_file.*$:log_file "/var/log/mpd/mpd.log":' \
+                       -e 's:^#pid_file.*$:pid_file "/run/mpd/mpd.pid":' \
+                       "${ED}/etc/mpd.conf" || die
+       fi
+
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/${PN}-0.23.15.logrotate" "${PN}"
+
+       newinitd "${FILESDIR}/${PN}-0.23.15.init-r1" "${PN}"
+
+       keepdir /var/lib/mpd
+       keepdir /var/lib/mpd/music
+       keepdir /var/lib/mpd/playlists
+       keepdir /var/log/mpd
+
+       rm -r "${ED}"/usr/share/doc/mpd || die
+
+       fowners mpd:audio -R /var/lib/mpd
+       fowners mpd:audio -R /var/log/mpd
+}


Reply via email to