From 88218a840c990719954f75cb24c6da4ebd33613e Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Mon, 1 Apr 2024 11:33:20 +0000 Subject: net-mail/mu: fix musl build Closes: https://bugs.gentoo.org/928361 Signed-off-by: Matthew Smith --- net-mail/mu/files/mu-1.12.2-musl.patch | 31 +++++++++++++++++++++++++++++++ net-mail/mu/mu-1.12.2.ebuild | 3 +++ 2 files changed, 34 insertions(+) create mode 100644 net-mail/mu/files/mu-1.12.2-musl.patch diff --git a/net-mail/mu/files/mu-1.12.2-musl.patch b/net-mail/mu/files/mu-1.12.2-musl.patch new file mode 100644 index 000000000000..35f6017e56f3 --- /dev/null +++ b/net-mail/mu/files/mu-1.12.2-musl.patch @@ -0,0 +1,31 @@ +From: https://github.com/djcb/mu/pull/2677 +From: Matthew Smith +Date: Mon, 1 Apr 2024 11:23:39 +0000 +Subject: [PATCH] mu-utils: Fix build with musl + +In musl, `stdout` is a macro that expands to `(stdout)`, and +`::(stdout)` is not valid C++. + +../mu-1.12.2/lib/utils/mu-utils.hh:268:32: error: expected + id-expression before '(' token + 268 | ::stdout); + | ^~~~~~ + +Nothing in the Mu namespace is named stdout, so it is safe to drop +the `::`. + +Bug: https://bugs.gentoo.org/928361 +--- a/lib/utils/mu-utils.hh ++++ b/lib/utils/mu-utils.hh +@@ -265,7 +265,7 @@ bool fputs_encoded (const std::string& str, FILE *stream); + template + static inline bool mu_print_encoded(fmt::format_string frm, T&&... args) noexcept { + return fputs_encoded(fmt::format(frm, std::forward(args)...), +- ::stdout); ++ stdout); + } + + /** +-- +2.44.0 + diff --git a/net-mail/mu/mu-1.12.2.ebuild b/net-mail/mu/mu-1.12.2.ebuild index 04c44da48677..f4e55a3d9779 100644 --- a/net-mail/mu/mu-1.12.2.ebuild +++ b/net-mail/mu/mu-1.12.2.ebuild @@ -29,6 +29,9 @@ BDEPEND=" PATCHES=( # https://bugs.gentoo.org/925503 "${FILESDIR}"/${PN}-1.12.0-no-python.patch + + # https://bugs.gentoo.org/928361 + "${FILESDIR}"/${PN}-1.12.2-musl.patch ) SITEFILE="70mu-gentoo-autoload.el" -- cgit v1.2.3-65-gdbad