commit:     dc2cc4dce10d100fd26137232983645097008367
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  6 19:43:47 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Nov  6 19:46:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc2cc4dc

mail-client/mutt-2.2.8: drop userpatches, avoid command not found

- eapply_user doesn't have a return-code that indicates user patches
  were applied, so don't falsely report we did
- drop usage of commands that we don't have installed to avoid
  false-positives #864753

Closes: https://bugs.gentoo.org/864753
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 mail-client/mutt/mutt-2.2.8.ebuild | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/mail-client/mutt/mutt-2.2.8.ebuild 
b/mail-client/mutt/mutt-2.2.8.ebuild
index 06bb916b3761..2f770033de52 100644
--- a/mail-client/mutt/mutt-2.2.8.ebuild
+++ b/mail-client/mutt/mutt-2.2.8.ebuild
@@ -99,16 +99,27 @@ src_prepare() {
                        main.c || die "Failed to add bug instructions"
        fi
 
-       local upatches=
        # allow user patches
-       eapply_user && upatches=" with user patches"
+       eapply_user
 
        # patch version string for bug reports
        local patchset=
        use vanilla || patchset=", ${PATCHSET}"
-       sed -i -e 's|"Mutt %s (%s)"|"Mutt %s (%s'"${patchset}${upatches}"')"|' \
+       sed -i -e 's|"Mutt %s (%s)"|"Mutt %s (%s'"${patchset}"')"|' \
                muttlib.c || die "failed patching in Gentoo version"
 
+       # bug 864753: avoid warning about missing tools, currently the order
+       # is lynx, w3m, elinks, so remove lynx or w3m when not installed,
+       # elinks should be there via dep.
+       if use doc ; then
+               if ! has_version www-client/lynx ; then
+                       sed -i -e '/lynx/d' doc/Makefile.am || die
+               fi
+               if ! has_version www-client/w3m ; then
+                       sed -i -e '/w3m/d' doc/Makefile.am || die
+               fi
+       fi
+
        # many patches touch the buildsystem, we always need this
        AT_M4DIR="m4" eautoreconf
 

Reply via email to