forked from ports/contrib
mpd: cherry-picked commit for fmt11
This commit is contained in:
parent
103ea04288
commit
db0c2bbc4f
@ -1,6 +1,7 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF38gdw50sY23ereljDR5cE/eJiCAWEKa0zdyM1bvomkbxOZxGcJ3UtHFnuU7Q5WQYX3PjHkxYuFMPgWTZ2/mRlQ0=
|
||||
SHA256 (Pkgfile) = fe3c35e4511ea2f855cf969f7dd73d294aa3113b4caa80b798d4e190251cdd67
|
||||
RWSagIOpLGJF3wowfBEr8ub+PB/wqXfJjNbLiSPK612/kSbE1NRoS1rm7GN+YSgcN6Cl+erns/uVWkCyRJvVkFgKm5z09t/7Bwg=
|
||||
SHA256 (Pkgfile) = f8673b96a4063dd44406b87a2260bc4cafa6a7eb338007cd8b776521b8045e05
|
||||
SHA256 (.footprint) = fbed54c68de1c373369d75e82e5ae5c6fb470a1841286a16a135ce21deb42de9
|
||||
SHA256 (mpd-0.23.15.tar.xz) = 550132239ad1acf82ccf8905b56cc13dc2c81a4489b96fba7731b3049907661a
|
||||
SHA256 (fmt.patch) = ba670ebb98de13161337b8a5f2d61ee9a85788d1f102d8eb3ce9044b102c5b7a
|
||||
SHA256 (mpd) = ec90dbf45d72c30b0837e2caed55df9c28b00416a92838012e1aea8cfe704ce3
|
||||
|
@ -6,8 +6,9 @@
|
||||
|
||||
name=mpd
|
||||
version=0.23.15
|
||||
release=1
|
||||
release=2
|
||||
source=(https://www.musicpd.org/download/mpd/${version:0:4}/$name-$version.tar.xz
|
||||
fmt.patch
|
||||
mpd)
|
||||
|
||||
build() {
|
||||
@ -29,7 +30,7 @@ build() {
|
||||
prt-get isinst libmad && PKGMK_MPD+=' -D mad=enabled'
|
||||
prt-get isinst libmkikmod && PKGMK_MPD+=' -D mikmod=enabled'
|
||||
prt-get isinst libmodplug && PKGMK_MPD+=' -D modplug=enabled'
|
||||
#prt-get isinst libmpcdec && PKGMK_MPD+=' -D mpcdec=enabled'
|
||||
#prt-get isinst libmpcdec && PKGMK_MPD+=' -D mpcdec=enabled'
|
||||
prt-get isinst libsamplerate && PKGMK_MPD+=' -D libsamplerate=enabled'
|
||||
prt-get isinst libsndfile && PKGMK_MPD+=' -D sndfile=enabled'
|
||||
prt-get isinst libsoxr && PKGMK_MPD+=' -D soxr=enabled'
|
||||
@ -46,6 +47,8 @@ build() {
|
||||
prt-get isinst zziplib && PKGMK_MPD+=' -D zzip=enabled'
|
||||
# }}}
|
||||
|
||||
patch -Np1 -d $name-$version -i $SRC/fmt.patch
|
||||
|
||||
meson setup $name-$version build $PKGMK_MPD \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/mpd \
|
||||
|
82
mpd/fmt.patch
Normal file
82
mpd/fmt.patch
Normal file
@ -0,0 +1,82 @@
|
||||
From 1402869715e3efca87942d79c3173a6b21a6925d Mon Sep 17 00:00:00 2001
|
||||
From: Rudi Heitbaum <rudi@heitbaum.com>
|
||||
Date: Fri, 5 Jul 2024 14:27:45 +0000
|
||||
Subject: [PATCH 1/1] lib/fmt: support build with libfmt-11.0.0
|
||||
|
||||
Upstream libfmt commit fmtlib/fmt@d707292
|
||||
now requires the format function to be const.
|
||||
|
||||
Adjust the function prototype so it is const and can compile.
|
||||
|
||||
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
|
||||
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
|
||||
---
|
||||
src/lib/ffmpeg/LibFmt.hxx | 2 +-
|
||||
src/lib/fmt/AudioFormatFormatter.hxx | 4 ++--
|
||||
src/lib/fmt/ExceptionFormatter.hxx | 2 +-
|
||||
src/lib/fmt/PathFormatter.hxx | 2 +-
|
||||
4 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/lib/ffmpeg/LibFmt.hxx b/src/lib/ffmpeg/LibFmt.hxx
|
||||
index aa068711f346..dee83ed2d54c 100644
|
||||
--- a/src/lib/ffmpeg/LibFmt.hxx
|
||||
+++ b/src/lib/ffmpeg/LibFmt.hxx
|
||||
@@ -13,7 +13,7 @@ template<>
|
||||
struct fmt::formatter<AVSampleFormat> : formatter<string_view>
|
||||
{
|
||||
template<typename FormatContext>
|
||||
- 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 --git a/src/lib/fmt/AudioFormatFormatter.hxx b/src/lib/fmt/AudioFormatFormatter.hxx
|
||||
index e0ffb6216056..8da98efd4176 100644
|
||||
--- a/src/lib/fmt/AudioFormatFormatter.hxx
|
||||
+++ b/src/lib/fmt/AudioFormatFormatter.hxx
|
||||
@@ -13,7 +13,7 @@ template<>
|
||||
struct fmt::formatter<SampleFormat> : formatter<string_view>
|
||||
{
|
||||
template<typename FormatContext>
|
||||
- auto format(const SampleFormat format, FormatContext &ctx) {
|
||||
+ auto format(const SampleFormat format, FormatContext &ctx) const {
|
||||
return formatter<string_view>::format(sample_format_to_string(format),
|
||||
ctx);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ template<>
|
||||
struct fmt::formatter<AudioFormat> : formatter<string_view>
|
||||
{
|
||||
template<typename FormatContext>
|
||||
- auto format(const AudioFormat &af, FormatContext &ctx) {
|
||||
+ auto format(const AudioFormat &af, FormatContext &ctx) const {
|
||||
return formatter<string_view>::format(ToString(af).c_str(),
|
||||
ctx);
|
||||
}
|
||||
diff --git a/src/lib/fmt/ExceptionFormatter.hxx b/src/lib/fmt/ExceptionFormatter.hxx
|
||||
index 3f342df672b2..f08b3bb2286a 100644
|
||||
--- a/src/lib/fmt/ExceptionFormatter.hxx
|
||||
+++ b/src/lib/fmt/ExceptionFormatter.hxx
|
||||
@@ -12,7 +12,7 @@ template<>
|
||||
struct fmt::formatter<std::exception_ptr> : formatter<string_view>
|
||||
{
|
||||
template<typename FormatContext>
|
||||
- auto format(std::exception_ptr e, FormatContext &ctx) {
|
||||
+ auto format(std::exception_ptr e, FormatContext &ctx) const {
|
||||
return formatter<string_view>::format(GetFullMessage(e), ctx);
|
||||
}
|
||||
};
|
||||
diff --git a/src/lib/fmt/PathFormatter.hxx b/src/lib/fmt/PathFormatter.hxx
|
||||
index e5ae89dec502..add06df81b1a 100644
|
||||
--- a/src/lib/fmt/PathFormatter.hxx
|
||||
+++ b/src/lib/fmt/PathFormatter.hxx
|
||||
@@ -13,7 +13,7 @@ template<std::convertible_to<Path> T>
|
||||
struct fmt::formatter<T> : formatter<string_view>
|
||||
{
|
||||
template<typename FormatContext>
|
||||
- auto format(Path path, FormatContext &ctx) {
|
||||
+ auto format(Path path, FormatContext &ctx) const {
|
||||
return formatter<string_view>::format(path.ToUTF8(), ctx);
|
||||
}
|
||||
};
|
||||
--
|
||||
2.45.2
|
Loading…
x
Reference in New Issue
Block a user