commit: 0554d4de0f29b0b3e8dc87ece997b5668f25960e Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Oct 2 04:31:18 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Oct 2 04:32:00 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0554d4de
net-mail/mu: add 1.12.13 Been tending to use bundled libfmt but upstream default to using a system copy here so let's give it a go (though funny we needed a patch already). Signed-off-by: Sam James <sam <AT> gentoo.org> net-mail/mu/Manifest | 1 + net-mail/mu/files/mu-1.12.13-libfmt-12.patch | 27 +++++++ net-mail/mu/mu-1.12.13.ebuild | 104 +++++++++++++++++++++++++++ 3 files changed, 132 insertions(+) diff --git a/net-mail/mu/Manifest b/net-mail/mu/Manifest index e10bf3898e24..860bcb930c38 100644 --- a/net-mail/mu/Manifest +++ b/net-mail/mu/Manifest @@ -1,2 +1,3 @@ DIST mu-1.12.12.tar.xz 757272 BLAKE2B 3a73a41fdaa490b478b05d86493e42b4cb5c2059dd3c11b7f08201b48ff90a1df07a8f5d86a4ff31a62bbce9affc9a672581227782de5f3ed80cb9db28750443 SHA512 be6db3f713e5d69e08ddc91084e6ceb230a9da56f8b67b5d66bbe2d3f428ef74cbffb0fe89af43fa16bda86c46fa5d8a58989a0d4e195d349b8070083052dd20 +DIST mu-1.12.13.tar.xz 775148 BLAKE2B 946a0bfefb9f143354f6870616728512863a49db14b774fcd10771bd281328533a2f938195731caaef5aa7ffc1ae841e66d186baa479f7ab1c1a750cea71ed05 SHA512 88460b3d34dea78fcf85875c444fbe24277a9d315da0448880307c50034cc4ec8b5687227358bdc47f7713852ba60fa687fdc5a5ed94d469617b6fc8c7162ade DIST mu-1.12.9.tar.xz 734240 BLAKE2B e536e832872406d865565ec1ae3775042b4fc9d2f50e2581f3d247007b8aeb68507e59d08168cbd16870dc907314c522bedead73a99ca2d5e8a42b8a67898e7b SHA512 27cd28a44dc6c8146891337be2c478aa7bf9e1dc458c30f3895b7bbcbafabd6b290e01e3f8c5db97f09b6cd68aebb3a0a0d3e7d53e25b4cba30613e7b8123d19 diff --git a/net-mail/mu/files/mu-1.12.13-libfmt-12.patch b/net-mail/mu/files/mu-1.12.13-libfmt-12.patch new file mode 100644 index 000000000000..105738670ccb --- /dev/null +++ b/net-mail/mu/files/mu-1.12.13-libfmt-12.patch @@ -0,0 +1,27 @@ +https://github.com/djcb/mu/commit/0a4fabbf446d15b538600dfe7d879cad70ce941e + +From 0a4fabbf446d15b538600dfe7d879cad70ce941e Mon Sep 17 00:00:00 2001 +From: "Dirk-Jan C. Binnema" <[email protected]> +Date: Sun, 28 Sep 2025 18:52:56 +0300 +Subject: [PATCH] utils: avoid fmt:gmtime/fmt::localtime + +They've been deprecated and give build warnings with new enough libfmt. +--- + lib/utils/mu-utils.hh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/utils/mu-utils.hh b/lib/utils/mu-utils.hh +index ecdc2f24d..32bb0ddb7 100644 +--- a/lib/utils/mu-utils.hh ++++ b/lib/utils/mu-utils.hh +@@ -145,7 +145,9 @@ auto mu_join(Range&& range, std::string_view sepa) { + template <typename T=::time_t> + std::tm mu_time(T t={}, bool use_utc=false) { + ::time_t tt{static_cast<::time_t>(t)}; +- return use_utc ? fmt::gmtime(tt) : fmt::localtime(tt); ++ std::tm time_tm = {}; ++ use_utc ? gmtime_r(&tt, &time_tm) : localtime_r(&tt, &time_tm); ++ return time_tm; + } + + using StringVec = std::vector<std::string>; diff --git a/net-mail/mu/mu-1.12.13.ebuild b/net-mail/mu/mu-1.12.13.ebuild new file mode 100644 index 000000000000..e5b568318ab7 --- /dev/null +++ b/net-mail/mu/mu-1.12.13.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit elisp-common meson readme.gentoo-r1 + +DESCRIPTION="Set of tools to deal with Maildirs, in particular, searching and indexing" +HOMEPAGE="https://www.djcbsoftware.nl/code/mu/ https://github.com/djcb/mu" +SRC_URI="https://github.com/djcb/mu/releases/download/v${PV}/${P}.tar.xz" + +# mu: GPL-3+ +# + tl: CC0-1.0 +# + variant-lite: Boost-1.0 +LICENSE="BSD Boost-1.0 CC0-1.0 GPL-3+ MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~x64-macos" +IUSE="emacs readline test" +RESTRICT="!test? ( test )" + +DEPEND=" + >=dev-cpp/cli11-2.4 + dev-libs/glib:2 + >=dev-libs/gmime-3.2:3.0 + >=dev-libs/libfmt-11.1:= + >=dev-libs/xapian-1.4:= + emacs? ( >=app-editors/emacs-25.3:* ) + readline? ( sys-libs/readline:= ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + sys-apps/texinfo + virtual/pkgconfig +" + +PATCHES=( + # https://bugs.gentoo.org/925503 + "${FILESDIR}"/${PN}-1.12.0-no-python.patch + "${FILESDIR}"/${P}-libfmt-12.patch +) + +DOC_CONTENTS=" + To use mu4e you need to configure it in your .emacs file. + See the manual for more information: + https://www.djcbsoftware.nl/code/mu/mu4e/ +" +SITEFILE="70mu-gentoo-autoload.el" + +src_prepare() { + default + + # Don't install NEWS.org into /usr/share/doc. + sed -i '/NEWS.org/,+1 d' meson.build || die + sed -i '/mu4e-about.org/d' mu4e/meson.build || die + + # Don't compress the info file. + sed -i '/gzip/d' build-aux/meson-install-info.sh || die + + # Instead, put it in /usr/share/doc/${PF}. + sed -i "/MU_DOC_DIR/s/mu/${PF}/" mu4e/meson.build || die +} + +src_configure() { + local emesonargs=( + $(meson_feature readline) + $(meson_feature test tests) + -Dcld2=disabled + -Demacs="$(usex emacs "${EMACS}" emacs-not-enabled)" + # TODO: revisit this, it's not actually deprecated, just been reworked + -Dguile=disabled + -Dscm=disabled + -Duse-embedded-fmt=false + -Duse-embedded-cli11=false + ) + meson_src_configure +} + +src_install() { + meson_src_install + + # Since meson no longer installs NEWS.org, install it with dodoc. + # Also, it must be uncompressed so that it can be viewed with + # mu4e-info. + docompress -x /usr/share/doc/${PF}/NEWS.org + dodoc NEWS.org + + if use emacs; then + # Same as above. + docompress -x /usr/share/doc/${PF}/mu4e-about.org + dodoc mu4e/mu4e-about.org + + elisp-site-file-install "${FILESDIR}"/${SITEFILE} + + readme.gentoo_create_doc + fi +} + +pkg_postinst() { + use emacs && readme.gentoo_create_doc +} + +pkg_postrm() { + use emacs && elisp-site-regen +}
