From patchwork Tue Jul 16 11:00:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7927 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4WNbhG0Whdz3x1l for ; Tue, 16 Jul 2024 11:00:30 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4WNbhB3PTPzPQ; Tue, 16 Jul 2024 11:00:26 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4WNbhB0Z7Pz33mx; Tue, 16 Jul 2024 11:00:26 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4WNbh71b1Wz32y9 for ; Tue, 16 Jul 2024 11:00:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4WNbh62ts2zPQ; Tue, 16 Jul 2024 11:00:22 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1721127622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+SfYWK8k3SQ1vBl9b8Fa9/Hiv/ILRREehCAkZKKtjK0=; b=NuolaBzdZwUwizgMiOhqtuAjs7RV7FjyeCJV79/xTQSesJtmy2yARDgSt+YC/6hcn49+k7 KuRRazpc1s1MW8BA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1721127622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+SfYWK8k3SQ1vBl9b8Fa9/Hiv/ILRREehCAkZKKtjK0=; b=Kovv0w6YahC9llBElkKoytP/FzEvtyjOPwplWWxFjVhSqrRt9+Qg8or216PPhiuMFL4LJL wvSmW4/gWAGyJYRoVbGZMCch8S6VLeed3geuLwhK7+5LkuL6XKREDXI7KbAO8naw1ZP57s fJGbl6EIi4Mvz/0Gg3C77YKYgnBTekc00sZfA4y04WXnYq9n55dzGl0ia9BHjhzHr9Epu6 If9aDU0Ut53+8cYaghEl91UJRHap8Smm88K0XNG1sH9N+8BgwRN2RMyw/uPTE6fRE6j/tA auwjEEGv2yo6OgwhBiX0/L8XNBsZsBZukzNJ+F/dqvNM00FJrk+8NabKGnpKZw== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] mpd: Patch mpd to deal with format function being const in fmt-11.0.0 onwards Date: Tue, 16 Jul 2024 13:00:05 +0200 Message-ID: <20240716110005.1224776-2-adolf.belka@ipfire.org> In-Reply-To: <20240716110005.1224776-1-adolf.belka@ipfire.org> References: <20240716110005.1224776-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: 6MVN45GRLS4X4R5JWZOI6WSEWDIPMOQI X-Message-ID-Hash: 6MVN45GRLS4X4R5JWZOI6WSEWDIPMOQI X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - Commit has been made in mpd but no release has yet been made with the change. When the next version release of mpd occurs this patch can be removed. - The patch changes all format calls to be const . Without this patch mpd will not build with fmt-11.0.0 or newer. - Update of rootfile not required. Signed-off-by: Adolf Belka --- lfs/mpd | 3 +- ...format_function_const_for_fmt-11.0.0.patch | 57 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 src/patches/mpd-0.23.15_make_format_function_const_for_fmt-11.0.0.patch diff --git a/lfs/mpd b/lfs/mpd index 55408aeb3..0f842f993 100644 --- a/lfs/mpd +++ b/lfs/mpd @@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/${THISAPP} TARGET = $(DIR_INFO)/$(THISAPP) PROG = mpd -PAK_VER = 38 +PAK_VER = 39 # SUP_ARCH = aarch64 x86_64 DEPS = alsa avahi faad2 ffmpeg flac lame libmad libshout libogg libid3tag libvorbis opus soxr fmt @@ -82,6 +82,7 @@ $(subst %,%_BLAKE2,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/mpd-0.23.15_make_format_function_const_for_fmt-11.0.0.patch $(UPDATE_AUTOMAKE) cd $(DIR_APP) && meson setup \ --prefix=/usr \ diff --git a/src/patches/mpd-0.23.15_make_format_function_const_for_fmt-11.0.0.patch b/src/patches/mpd-0.23.15_make_format_function_const_for_fmt-11.0.0.patch new file mode 100644 index 000000000..beea45484 --- /dev/null +++ b/src/patches/mpd-0.23.15_make_format_function_const_for_fmt-11.0.0.patch @@ -0,0 +1,57 @@ +diff -Naur mpd-0.23.15.orig/src/lib/ffmpeg/LibFmt.hxx mpd-0.23.15/src/lib/ffmpeg/LibFmt.hxx +--- mpd-0.23.15.orig/src/lib/ffmpeg/LibFmt.hxx 2023-12-20 16:21:57.000000000 +0100 ++++ mpd-0.23.15/src/lib/ffmpeg/LibFmt.hxx 2024-07-15 23:04:27.093307051 +0200 +@@ -29,7 +29,7 @@ + struct fmt::formatter : formatter + { + template +- auto format(const AVSampleFormat format, FormatContext &ctx) { ++ auto format(const AVSampleFormat format, FormatContext &ctx) const { + const char *name = av_get_sample_fmt_name(format); + if (name == nullptr) + name = "?"; +diff -Naur mpd-0.23.15.orig/src/lib/fmt/AudioFormatFormatter.hxx mpd-0.23.15/src/lib/fmt/AudioFormatFormatter.hxx +--- mpd-0.23.15.orig/src/lib/fmt/AudioFormatFormatter.hxx 2023-12-20 16:21:57.000000000 +0100 ++++ mpd-0.23.15/src/lib/fmt/AudioFormatFormatter.hxx 2024-07-15 23:05:48.519267115 +0200 +@@ -39,7 +39,7 @@ + struct fmt::formatter : formatter + { + template +- auto format(const SampleFormat format, FormatContext &ctx) { ++ auto format(const SampleFormat format, FormatContext &ctx) const { + return formatter::format(sample_format_to_string(format), + ctx); + } +@@ -49,7 +49,7 @@ + struct fmt::formatter : formatter + { + template +- auto format(const AudioFormat &af, FormatContext &ctx) { ++ auto format(const AudioFormat &af, FormatContext &ctx) const { + return formatter::format(ToString(af).c_str(), + ctx); + } +diff -Naur mpd-0.23.15.orig/src/lib/fmt/ExceptionFormatter.hxx mpd-0.23.15/src/lib/fmt/ExceptionFormatter.hxx +--- mpd-0.23.15.orig/src/lib/fmt/ExceptionFormatter.hxx 2023-12-20 16:21:57.000000000 +0100 ++++ mpd-0.23.15/src/lib/fmt/ExceptionFormatter.hxx 2024-07-15 23:06:21.330325382 +0200 +@@ -38,7 +38,7 @@ + struct fmt::formatter : formatter + { + template +- auto format(std::exception_ptr e, FormatContext &ctx) { ++ auto format(std::exception_ptr e, FormatContext &ctx) const { + return formatter::format(GetFullMessage(e), ctx); + } + }; +diff -Naur mpd-0.23.15.orig/src/lib/fmt/PathFormatter.hxx mpd-0.23.15/src/lib/fmt/PathFormatter.hxx +--- mpd-0.23.15.orig/src/lib/fmt/PathFormatter.hxx 2023-12-20 16:21:57.000000000 +0100 ++++ mpd-0.23.15/src/lib/fmt/PathFormatter.hxx 2024-07-15 23:07:13.908687683 +0200 +@@ -29,7 +29,7 @@ + struct fmt::formatter : formatter + { + template +- auto format(Path path, FormatContext &ctx) { ++ auto format(Path path, FormatContext &ctx) const { + return formatter::format(path.ToUTF8(), ctx); + } + };