* Patrice Levesque <mutt.wa...@ptaff.ca> [2013-01-20 22:14]:
Is your mutt compiled with ncurses or slang? I experienced that mutt
can handle ANSI code better if it's compiled with slang ...

ncurses; the official gentoo ebuild does not give any compilation flag
to switch between slang and ncurses (plus the gentoo patchset seems to
assume ncurses is selected).

I'm using my own live-ebuild though so I'm not sure how that is
handled by the official ebuild. Feel free to ask for my local ebuild
if there's any interest ...

I'd like that very much; thanks.

Certainly - here we go ...

Oh and my use flags are:
+berkdb
+crypt
+debug
-doc
+gdbm
-gnutls
+gpg
-idn
+imap
+mbox
+nls
+pop
-qdbm
+sasl
-sidebar
+smime
+smtp
+ssl
+tokyocabinet

You'll need the attached patch to successfully compile the hg-version.

Have fun B-)
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-client/mutt/mutt-1.5.21-r1.ebuild,v 1.2 
2010/12/07 02:37:21 mattst88 Exp $

EAPI="3"

inherit eutils flag-o-matic autotools mercurial

DESCRIPTION="A small but very powerful text-based mail client"
HOMEPAGE="http://www.mutt.org";
EHG_REPO_URI="http://dev.mutt.org/hg/mutt";
EHG_REVISION="HEAD"
IUSE="berkdb crypt debug doc gdbm gnutls gpg idn imap mbox nls pop qdbm sasl 
sidebar smime smtp ssl tokyocabinet"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"

RDEPEND=">=sys-libs/ncurses-5.2
        tokyocabinet?  ( dev-db/tokyocabinet )
        !tokyocabinet? (
                qdbm?  ( dev-db/qdbm )
                !qdbm? (
                        gdbm?  ( sys-libs/gdbm )
                        !gdbm? ( berkdb? ( >=sys-libs/db-4 ) )
                )
        )
        imap?    (
                gnutls?  ( >=net-libs/gnutls-1.0.17 )
                !gnutls? ( ssl? ( >=dev-libs/openssl-0.9.6 ) )
                sasl?    ( >=dev-libs/cyrus-sasl-2 )
        )
        pop?     (
                gnutls?  ( >=net-libs/gnutls-1.0.17 )
                !gnutls? ( ssl? ( >=dev-libs/openssl-0.9.6 ) )
                sasl?    ( >=dev-libs/cyrus-sasl-2 )
        )
        smtp?     (
                gnutls?  ( >=net-libs/gnutls-1.0.17 )
                !gnutls? ( ssl? ( >=dev-libs/openssl-0.9.6 ) )
                sasl?    ( >=dev-libs/cyrus-sasl-2 )
        )
        idn?     ( net-dns/libidn )
        gpg?   ( >=app-crypt/gpgme-0.9.0 )
        smime?   ( >=dev-libs/openssl-0.9.6 )
        app-misc/mime-types"
DEPEND="${RDEPEND}
        net-mail/mailbase
        doc? (
                dev-libs/libxml2
                dev-libs/libxslt
                app-text/docbook-xsl-stylesheets
                || ( www-client/lynx www-client/w3m www-client/elinks )
        )"


src_configure() {
        # Fix a small typo in hg source
        epatch "${FILESDIR}"/crypt-gpgme.patch || die "patch failed"

        local myconf="
                $(use_enable crypt pgp) \
                $(use_enable debug) \
                $(use_enable gpg gpgme) \
                $(use_enable imap) \
                $(use_enable nls) \
                $(use_enable pop) \
                $(use_enable smime) \
                $(use_enable smtp) \
                $(use_with idn) \
                $(use_with mixmaster) \
                --enable-external-dotlock \
                --enable-nfs-fix \
                --sysconfdir="${EPREFIX}"/etc/${PN} \
                --with-slang \
                --with-docdir="${EPREFIX}"/usr/share/doc/${PN}-${PVR} \
                --with-regex \
                --disable-fcntl --enable-flock \
                --with-exec-shell=${EPREFIX}/bin/sh"

        # mutt prioritizes gdbm over bdb, so we will too.
        # hcache feature requires at least one database is in USE.
        if use tokyocabinet; then
                myconf="${myconf} --enable-hcache \
                        --with-tokyocabinet --without-qdbm --without-gdbm 
--without-bdb"
        elif use qdbm; then
                myconf="${myconf} --enable-hcache \
                        --without-tokyocabinet --with-qdbm --without-gdbm 
--without-bdb"
        elif use gdbm ; then
                myconf="${myconf} --enable-hcache \
                        --without-tokyocabinet --without-qdbm --with-gdbm 
--without-bdb"
        elif use berkdb; then
                myconf="${myconf} --enable-hcache \
                        --without-tokyocabinet --without-qdbm --without-gdbm 
--with-bdb"
        else
                myconf="${myconf} --disable-hcache \
                        --without-tokyocabinet --without-qdbm --without-gdbm 
--without-bdb"
        fi

        # there's no need for gnutls, ssl or sasl without socket support
        if use pop || use imap || use smtp ; then
                if use gnutls; then
                        myconf="${myconf} --with-gnutls"
                elif use ssl; then
                        myconf="${myconf} --with-ssl"
                fi
                # not sure if this should be mutually exclusive with the other 
two
                myconf="${myconf} $(use_with sasl)"
        else
                myconf="${myconf} --without-gnutls --without-ssl --without-sasl"
        fi

        if use mbox; then
                myconf="${myconf} --with-mailpath=${EPREFIX}/var/spool/mail"
        else
                myconf="${myconf} --with-homespool=Maildir"
        fi

        eautoreconf || die "autoreconf failed"
        econf ${myconf} || die "configure failed"
}

src_install() {
        make DESTDIR="${D}" install || die "install failed"
        find "${ED}"/usr/share/doc -type f | grep -v "html\|manual" | xargs gzip

        # A newer file is provided by app-misc/mime-types. So we link it.
        rm "${ED}"/etc/${PN}/mime.types
        dosym /etc/mime.types /etc/${PN}/mime.types

        # A man-page is always handy
        if use !doc; then
                cp doc/mutt.man mutt.1
                cp doc/muttbug.man flea.1
                doman mutt.1 flea.1
        else
                # nuke manpages that should be provided by an MTA, bug #177605
                rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \
                        || ewarn "failed to remove files, please file a bug"
        fi

        if use !prefix ; then
                fowners root:mail /usr/bin/mutt_dotlock
                fperms g+s /usr/bin/mutt_dotlock
        fi

        dodoc BEWARE COPYRIGHT ChangeLog NEWS OPS* PATCHES README* TODO VERSION
}

--- orig-crypt-gpgme.c	2013-01-10 18:42:42.000000000 +0100
+++ crypt-gpgme.c	2013-01-10 18:47:47.000000000 +0100
@@ -4366,7 +4366,7 @@
 #ifdef ENABLE_NLS
     gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
 #endif
-    has_run = true;
+    has_run = 1;
   }
 }
 

Attachment: pgpreYz6ecGaI.pgp
Description: PGP signature

Reply via email to