summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-client')
-rw-r--r--mail-client/mutt/ChangeLog16
-rw-r--r--mail-client/mutt/files/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch19
-rw-r--r--mail-client/mutt/files/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch100
-rw-r--r--mail-client/mutt/files/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch22
-rw-r--r--mail-client/mutt/files/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch23
-rw-r--r--mail-client/mutt/files/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch40
-rw-r--r--mail-client/mutt/files/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch40
-rw-r--r--mail-client/mutt/files/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch116
-rw-r--r--mail-client/mutt/mutt-1.5.20-r13.ebuild281
9 files changed, 656 insertions, 1 deletions
diff --git a/mail-client/mutt/ChangeLog b/mail-client/mutt/ChangeLog
index ec49f58bd405..9f5fa5fb782e 100644
--- a/mail-client/mutt/ChangeLog
+++ b/mail-client/mutt/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for mail-client/mutt
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-client/mutt/ChangeLog,v 1.180 2010/02/22 08:07:40 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-client/mutt/ChangeLog,v 1.181 2010/03/11 20:18:28 grobian Exp $
+
+*mutt-1.5.20-r13 (11 Mar 2010)
+
+ 11 Mar 2010; Fabian Groffen <grobian@gentoo.org> +mutt-1.5.20-r13.ebuild,
+ +files/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch,
+ +files/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch,
+ +files/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch,
+ +files/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch,
+ +files/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch,
+ +files/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch,
+ +files/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch:
+ Bump du jour, add another bunch of patches from upstream, they really
+ should make a new release. Convert to EAPI=3, remove WANT_AUTOCONF
+ unsetting.
*mutt-1.5.20-r12 (22 Feb 2010)
diff --git a/mail-client/mutt/files/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch b/mail-client/mutt/files/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch
new file mode 100644
index 000000000000..64c1e3a639b4
--- /dev/null
+++ b/mail-client/mutt/files/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch
@@ -0,0 +1,19 @@
+http://dev.mutt.org/trac/changeset/c837ab790d2e
+http://dev.mutt.org/trac/ticket/1860
+
+Abort prompt on ^C, as was the case prior to 12a6de725483
+
+
+Index: curs_lib.c
+===================================================================
+--- curs_lib.c (revision 5981:cff8e8ce4327)
++++ curs_lib.c (revision 6010:c837ab790d2e)
+@@ -99,5 +99,8 @@
+
+ if (SigInt)
++ {
+ mutt_query_exit ();
++ return err;
++ }
+
+ if(ch == ERR)
diff --git a/mail-client/mutt/files/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch b/mail-client/mutt/files/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch
new file mode 100644
index 000000000000..d809fcd303b7
--- /dev/null
+++ b/mail-client/mutt/files/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch
@@ -0,0 +1,100 @@
+http://dev.mutt.org/trac/changeset/2c78b28027cc
+http://dev.mutt.org/trac/ticket/2180
+
+GPGME: Sender verification should be canse-insensitive for domain names.
+Closes #2180
+
+Index: crypt-gpgme.c
+===================================================================
+--- crypt-gpgme.c (revision 5935:f5849c72a274)
++++ crypt-gpgme.c (revision 6047:2c78b28027cc)
+@@ -4483,35 +4483,64 @@
+
+ if (sender)
+- {
+- if (signature_key)
++ {
++ if (signature_key)
++ {
++ gpgme_key_t key = signature_key;
++ gpgme_user_id_t uid = NULL;
++ int sender_length = 0;
++ int uid_length = 0;
++
++ sender_length = strlen (sender->mailbox);
++ for (uid = key->uids; uid && ret; uid = uid->next)
++ {
++ uid_length = strlen (uid->email);
++ if (1
++ && (uid->email[0] == '<')
++ && (uid->email[uid_length - 1] == '>')
++ && (uid_length == sender_length + 2))
+ {
+- gpgme_key_t key = signature_key;
+- gpgme_user_id_t uid = NULL;
+- int sender_length = 0;
+- int uid_length = 0;
+-
+- sender_length = strlen (sender->mailbox);
+- for (uid = key->uids; uid && ret; uid = uid->next)
+- {
+- uid_length = strlen (uid->email);
+- if (1
+- && (uid->email[0] == '<')
+- && (uid->email[uid_length - 1] == '>')
+- && (uid_length == sender_length + 2)
+- && (! strncmp (uid->email + 1, sender->mailbox, sender_length)))
+- ret = 0;
+- }
++ const char* at_sign = strchr(uid->email + 1, '@');
++ if (at_sign == NULL)
++ {
++ if (! strncmp (uid->email + 1, sender->mailbox, sender_length))
++ ret = 0;
++ }
++ else
++ {
++ /*
++ * Assume address is 'mailbox@domainname'.
++ * The mailbox part is case-sensitive,
++ * the domainname is not. (RFC 2821)
++ */
++ const char* tmp_email = uid->email + 1;
++ const char* tmp_sender = sender->mailbox;
++ /* length of mailbox part including '@' */
++ int mailbox_length = at_sign - tmp_email + 1;
++ int domainname_length = sender_length - mailbox_length;
++ int mailbox_match, domainname_match;
++
++ mailbox_match = (! strncmp (tmp_email, tmp_sender,
++ mailbox_length));
++ tmp_email += mailbox_length;
++ tmp_sender += mailbox_length;
++ domainname_match = (! strncasecmp (tmp_email, tmp_sender,
++ domainname_length));
++ if (mailbox_match && domainname_match)
++ ret = 0;
++ }
+ }
+- else
+- mutt_any_key_to_continue (_("Failed to verify sender"));
+- }
++ }
++ }
++ else
++ mutt_any_key_to_continue (_("Failed to verify sender"));
++ }
+ else
+ mutt_any_key_to_continue (_("Failed to figure out sender"));
+
+ if (signature_key)
+- {
+- gpgme_key_release (signature_key);
+- signature_key = NULL;
+- }
++ {
++ gpgme_key_release (signature_key);
++ signature_key = NULL;
++ }
+
+ return ret;
diff --git a/mail-client/mutt/files/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch b/mail-client/mutt/files/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch
new file mode 100644
index 000000000000..6f0f2e7d8f8d
--- /dev/null
+++ b/mail-client/mutt/files/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch
@@ -0,0 +1,22 @@
+
+# HG changeset patch
+# User Brendan Cully <brendan@kublai.com>
+# Date 1266957745 28800
+# Node ID 57124ea5592ee350af277b543bfedf04d3cd0ace
+# Parent f17302c1022979c654170a0ca0f5a4cc8ffd9eb5
+Don't use freed ctx.path when updating utime of target mailbox in save-message.
+Thanks to Sean Boudreau for the bug report.
+
+diff -r f17302c10229 -r 57124ea5592e commands.c
+--- a/commands.c Mon Feb 22 23:01:39 2010 -0800
++++ b/commands.c Tue Feb 23 12:42:25 2010 -0800
+@@ -863,7 +863,7 @@
+ mx_close_mailbox (&ctx, NULL);
+
+ if (need_buffy_cleanup)
+- mutt_buffy_cleanup (ctx.path, &st);
++ mutt_buffy_cleanup (buf, &st);
+
+ mutt_clear_error ();
+ return (0);
+
diff --git a/mail-client/mutt/files/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch b/mail-client/mutt/files/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch
new file mode 100644
index 000000000000..ac721a28004f
--- /dev/null
+++ b/mail-client/mutt/files/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch
@@ -0,0 +1,23 @@
+http://dev.mutt.org/hg/mutt/rev/817c60d5da7d
+
+# HG changeset patch
+# User Brendan Cully <brendan@kublai.com>
+# Date 1268089116 28800
+# Node ID 817c60d5da7dae3376a6ad683091ae24d7cf2ed2
+# Parent 8ec606f6cafb55299bec617d7d743deceb8d9e2d
+mutt_buffer_printf: NULL dptr means use data
+
+diff -r 8ec606f6cafb -r 817c60d5da7d muttlib.c
+--- a/muttlib.c Mon Mar 08 14:52:17 2010 -0800
++++ b/muttlib.c Mon Mar 08 14:58:36 2010 -0800
+@@ -1675,6 +1675,9 @@
+ va_start (ap, fmt);
+ va_copy (ap_retry, ap);
+
++ if (!buf->dptr)
++ buf->dptr = buf->data;
++
+ doff = buf->dptr - buf->data;
+ blen = buf->dsize - doff;
+ /* solaris 9 vsnprintf barfs when blen is 0 */
+
diff --git a/mail-client/mutt/files/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch b/mail-client/mutt/files/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch
new file mode 100644
index 000000000000..2a93cb385e01
--- /dev/null
+++ b/mail-client/mutt/files/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch
@@ -0,0 +1,40 @@
+http://dev.mutt.org/trac/changeset/6b057dc52222
+http://dev.mutt.org/trac/ticket/3322
+
+# HG changeset patch
+# User Antonio Radici <antonio@dyne.org>
+# Date 1267406350 28800
+# Node ID 6b057dc522224530f8d3146ce5efef747c60d1dc
+# Parent 2c78b28027cc59762d8c10097196b3aa855e185a
+pop: allow user-specified port to override default in URL.
+Closes #3322.
+
+diff -r 2c78b28027cc -r 6b057dc52222 pop_lib.c
+--- a/pop_lib.c Sun Feb 28 17:00:33 2010 -0800
++++ b/pop_lib.c Sun Feb 28 17:19:10 2010 -0800
+@@ -43,6 +43,7 @@
+ /* Defaults */
+ acct->flags = 0;
+ acct->type = M_ACCT_TYPE_POP;
++ acct->port = 0;
+
+ c = safe_strdup (path);
+ url_parse_ciss (&url, c);
+@@ -60,10 +61,12 @@
+ acct->flags |= M_ACCT_SSL;
+
+ service = getservbyname (url.scheme == U_POP ? "pop3" : "pop3s", "tcp");
+- if (service)
+- acct->port = ntohs (service->s_port);
+- else
+- acct->port = url.scheme == U_POP ? POP_PORT : POP_SSL_PORT;;
++ if (!acct->port) {
++ if (service)
++ acct->port = ntohs (service->s_port);
++ else
++ acct->port = url.scheme == U_POP ? POP_PORT : POP_SSL_PORT;;
++ }
+
+ FREE (&c);
+ return 0;
+
diff --git a/mail-client/mutt/files/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch b/mail-client/mutt/files/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch
new file mode 100644
index 000000000000..30cf74c039ce
--- /dev/null
+++ b/mail-client/mutt/files/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch
@@ -0,0 +1,40 @@
+http://dev.mutt.org/hg/mutt/rev/05cec973f0d9
+http://dev.mutt.org/hg/mutt/rev/8ec606f6cafb
+
+# HG changeset patch
+# User Brendan Cully <brendan@kublai.com>
+# Date 1268089247 28800
+# Node ID 05cec973f0d97065709f2ec55a42b39797995eff
+# Parent 817c60d5da7dae3376a6ad683091ae24d7cf2ed2
+When regexp compilation fails, report actual pattern along with error.
+
+diff -r 817c60d5da7d -r 05cec973f0d9 pattern.c
+--- a/pattern.c Mon Mar 08 14:58:36 2010 -0800
++++ b/pattern.c Mon Mar 08 15:00:47 2010 -0800
+@@ -254,6 +254,7 @@
+ static int eat_regexp (pattern_t *pat, BUFFER *s, BUFFER *err)
+ {
+ BUFFER buf;
++ char errmsg[STRING];
+ int r;
+
+ memset (&buf, 0, sizeof (buf));
+@@ -290,14 +291,15 @@
+ {
+ pat->p.rx = safe_malloc (sizeof (regex_t));
+ r = REGCOMP (pat->p.rx, buf.data, REG_NEWLINE | REG_NOSUB | mutt_which_case (buf.data));
+- FREE (&buf.data);
+ if (r)
+ {
+- regerror (r, pat->p.rx, err->data, err->dsize);
+- regfree (pat->p.rx);
++ regerror (r, pat->p.rx, errmsg, sizeof (errmsg));
++ mutt_buffer_printf (err, "'%s': %s", buf.data, errmsg);
++ FREE (&buf.data);
+ FREE (&pat->p.rx);
+ return (-1);
+ }
++ FREE (&buf.data);
+ }
+
+ return 0;
diff --git a/mail-client/mutt/files/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch b/mail-client/mutt/files/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch
new file mode 100644
index 000000000000..0da93d5a74f4
--- /dev/null
+++ b/mail-client/mutt/files/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch
@@ -0,0 +1,116 @@
+http://dev.mutt.org/trac/ticket/2014
+http://dev.mutt.org/hg/mutt/rev/165b998920e4
+http://dev.mutt.org/hg/mutt/rev/cc02f079b1b9
+http://dev.mutt.org/hg/mutt/rev/41cf44ddbb4c
+http://dev.mutt.org/hg/mutt/rev/fec2720ff6ef
+
+# HG changeset patch
+# User Brendan Cully <brendan@kublai.com>
+# Date 1267511730 28800
+# Node ID 165b998920e45655aef33c74b76fe39b9ec9dc0b
+# Parent 86d93280e5b32af477502f124f5b12f65f879e53
+Another attempt to dequote RFC2047-encoded address comments (see #2014)
+
+diff -r 86d93280e5b3 -r 165b998920e4 copy.c
+--- a/copy.c Mon Mar 01 16:14:57 2010 -0800
++++ b/copy.c Mon Mar 01 22:35:30 2010 -0800
+@@ -868,6 +868,7 @@
+ int l, rp = 0;
+
+ ADDRESS *a = NULL;
++ ADDRESS *cur = NULL;
+
+ switch (tolower ((unsigned char) *s))
+ {
+@@ -937,6 +938,9 @@
+
+ mutt_addrlist_to_local (a);
+ rfc2047_decode_adrlist (a);
++ for (cur = a; cur; cur = cur->next)
++ if (cur->personal)
++ rfc822_dequote_comment (cur->personal);
+
+ /* angle brackets for return path are mandated by RfC5322,
+ * so leave Return-Path as-is */
+diff -r 86d93280e5b3 -r 165b998920e4 rfc822.c
+--- a/rfc822.c Mon Mar 01 16:14:57 2010 -0800
++++ b/rfc822.c Mon Mar 01 22:35:30 2010 -0800
+@@ -60,7 +60,7 @@
+ "bad address spec"
+ };
+
+-static void rfc822_dequote_comment (char *s)
++void rfc822_dequote_comment (char *s)
+ {
+ char *w = s;
+
+@@ -177,17 +177,10 @@
+ static const char *
+ parse_quote (const char *s, char *token, size_t *tokenlen, size_t tokenmax)
+ {
+- if (*tokenlen < tokenmax)
+- token[(*tokenlen)++] = '"';
+ while (*s)
+ {
+ if (*tokenlen < tokenmax)
+ token[*tokenlen] = *s;
+- if (*s == '"')
+- {
+- (*tokenlen)++;
+- return (s + 1);
+- }
+ if (*s == '\\')
+ {
+ if (!*++s)
+@@ -196,6 +189,8 @@
+ if (*tokenlen < tokenmax)
+ token[*tokenlen] = *s;
+ }
++ else if (*s == '"')
++ return (s + 1);
+ (*tokenlen)++;
+ s++;
+ }
+@@ -431,6 +426,17 @@
+ }
+ s = ps;
+ }
++ else if (*s == '"')
++ {
++ if (phraselen && phraselen < sizeof (phrase) - 1)
++ phrase[phraselen++] = ' ';
++ if ((ps = parse_quote (s + 1, phrase, &phraselen, sizeof (phrase) - 1)) == NULL)
++ {
++ rfc822_free_address (&top);
++ return NULL;
++ }
++ s = ps;
++ }
+ else if (*s == ':')
+ {
+ cur = rfc822_new_address ();
+@@ -490,13 +496,7 @@
+ terminate_buffer (phrase, phraselen);
+ cur = rfc822_new_address ();
+ if (phraselen)
+- {
+- if (cur->personal)
+- FREE (&cur->personal);
+- /* if we get something like "Michael R. Elkins" remove the quotes */
+- rfc822_dequote_comment (phrase);
+ cur->personal = safe_strdup (phrase);
+- }
+ if ((ps = parse_route_addr (s + 1, comment, &commentlen, sizeof (comment) - 1, cur)) == NULL)
+ {
+ rfc822_free_address (&top);
+diff -r 86d93280e5b3 -r 165b998920e4 rfc822.h
+--- a/rfc822.h Mon Mar 01 16:14:57 2010 -0800
++++ b/rfc822.h Mon Mar 01 22:35:30 2010 -0800
+@@ -46,6 +46,7 @@
+ }
+ ADDRESS;
+
++void rfc822_dequote_comment (char *s);
+ void rfc822_free_address (ADDRESS **);
+ void rfc822_qualify (ADDRESS *, const char *);
+ ADDRESS *rfc822_parse_adrlist (ADDRESS *, const char *s);
diff --git a/mail-client/mutt/mutt-1.5.20-r13.ebuild b/mail-client/mutt/mutt-1.5.20-r13.ebuild
new file mode 100644
index 000000000000..807d8ebf2276
--- /dev/null
+++ b/mail-client/mutt/mutt-1.5.20-r13.ebuild
@@ -0,0 +1,281 @@
+# 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.20-r13.ebuild,v 1.1 2010/03/11 20:18:28 grobian Exp $
+
+EAPI="3"
+
+inherit eutils flag-o-matic autotools
+
+PATCHSET_REV="-r4"
+
+# note: latest sidebar patches can be found here:
+# http://www.lunar-linux.org/index.php?option=com_content&task=view&id=44
+SIDEBAR_PATCH_N="patch-1.5.20.sidebar.20090619.txt"
+
+DESCRIPTION="a small but very powerful text-based mail client"
+HOMEPAGE="http://www.mutt.org"
+SRC_URI="ftp://ftp.mutt.org/mutt/devel/${P}.tar.gz
+ !vanilla? (
+ !sidebar? (
+ mirror://gentoo/${P}-gentoo-patches${PATCHSET_REV}.tar.bz2
+ http://dev.gentoo.org/~grobian/distfiles/${P}-gentoo-patches${PATCHSET_REV}.tar.bz2
+ )
+ )
+ sidebar? (
+ http://www.lunar-linux.org/~tchan/mutt/${SIDEBAR_PATCH_N}
+ )"
+IUSE="berkdb crypt debug doc gdbm gnutls gpg idn imap mbox nls nntp pop qdbm sasl sidebar smime smtp ssl tokyocabinet vanilla"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+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 )
+ )"
+
+PATCHDIR="${WORKDIR}"/${P}-gentoo-patches${PATCHSET_REV}
+
+src_unpack() {
+ unpack ${A//${SIDEBAR_PATCH_N}}
+}
+
+src_prepare() {
+ # this patch is non-generic and only works because we use a sysconfdir
+ # different from the one used by the mailbase ebuild
+ use prefix && epatch "${FILESDIR}"/mutt-1.5.13-prefix-mailcap.patch
+
+ epatch "${FILESDIR}"/mutt-1.5.18-bdb-prefix.patch # fix bdb detection
+ epatch "${FILESDIR}"/mutt-1.5.18-interix.patch
+ built_with_use sys-libs/ncurses unicode && \
+ epatch "${FILESDIR}"/mutt-1.5.18-solaris-ncurses-chars.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-gpgme-1.2.0.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-dont-reveal-bbc.patch
+
+ # post-release hot-fixes
+ epatch "${FILESDIR}"/mutt-1.5.20-imap-port-invalid-d6f88fbf8387.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-header-weeding-f40de578e8ed.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-display-unsigned-pgp-7f37d0a57d83.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-unmailbox-segfault-25e46aad362b.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-mbox-new-mail-bd59be56c6b0.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-mbox-unchanged-new-mail-9ae13dedb5ed.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-imap-start-fatal-fe30f394cbe6.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-tab-subject-questionmark-298194c414f0-cff8e8ce4327.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-smtp-batch-mode-0a3de4d9a009-f6c6066a5925.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-leave-mailbox-no-new-mail-118b8fef8aae.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-gpgme-keys-d41e043fa775.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-mhs-flags-leak-9f3053f75f27.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-hcache-restore-address-848f08512bf3.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-ungroup-command-77ac8b5c2be6.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-propagate-mh_read_sequences-2fc9348684fe.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-fix-mh-parsing-14bb498c6a1c.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-search-pattern-crash-053ef7bbaa72.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-next-invalid-pattern-crash-6a08a5244d60.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-ssl-CVE-2009-3765-dc09812e63a3.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-ssl-stack-compile-fix-1cf34ea1f128.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-no-hcolor-in-hcache-b7d2cb7c7ce1.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-off-by-one-mailcap-736b6af3c5f1.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-subject-mistruncation-31881f38ca1e.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-copy-From-to-imap-b2b97c7a2ae6.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-yes-no-non-ascii-a6fddecdc5f5.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch
+ epatch "${FILESDIR}"/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch
+
+ # patch version string for bug reports
+ sed -i -e 's/"Mutt %s (%s)"/"Mutt %s (%s, Gentoo '"${PVR}"')"/' \
+ muttlib.c || die "failed patching in Gentoo version"
+
+ if use !vanilla && use !sidebar ; then
+ use nntp || rm "${PATCHDIR}"/06-nntp.patch
+ for p in "${PATCHDIR}"/*.patch ; do
+ epatch "${p}"
+ done
+ fi
+
+ if use sidebar ; then
+ use vanilla || \
+ ewarn "the sidebar patch is only applied to a vanilla mutt tree"
+ epatch "${DISTDIR}"/${SIDEBAR_PATCH_N}
+ fi
+
+ AT_M4DIR="m4" eautoreconf
+
+ # the configure script contains some "cleverness" whether or not to setgid
+ # the dotlock program, resulting in bugs like #278332
+ sed -i -e 's/@DOTLOCK_GROUP@//' \
+ Makefile.in || die "sed failed"
+
+ # don't just build documentation (lengthy process, with big dependencies)
+ if use !doc ; then
+ sed -i -e '/SUBDIRS =/s/doc//' Makefile.in || die
+ fi
+}
+
+src_configure() {
+ declare myconf="
+ $(use_enable nls) \
+ $(use_enable gpg gpgme) \
+ $(use_enable imap) \
+ $(use_enable pop) \
+ $(use_enable smtp) \
+ $(use_enable crypt pgp) \
+ $(use_enable smime) \
+ $(use_enable debug) \
+ $(use_with idn) \
+ --with-curses \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --with-docdir="${EPREFIX}"/usr/share/doc/${PN}-${PVR} \
+ --with-regex \
+ --enable-nfs-fix --enable-external-dotlock \
+ $(use_with !nntp mixmaster) \
+ --with-exec-shell=${EPREFIX}/bin/sh"
+
+ case $CHOST in
+ *-solaris*)
+ # Solaris has no flock in the standard headers
+ myconf="${myconf} --enable-fcntl --disable-flock"
+ ;;
+ *)
+ myconf="${myconf} --disable-fcntl --enable-flock"
+ ;;
+ esac
+
+ # 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
+
+ if use !vanilla && use !sidebar ; then
+ # rr.compressed patch
+ myconf="${myconf} --enable-compressed"
+
+ # nntp patch applied conditionally, so avoid QA warning when doing
+ # --disable-nntp while patch not being applied, bug #262069
+ use nntp && myconf="${myconf} --enable-nntp"
+ fi
+
+ 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
+ if use mbox; then
+ insinto /etc/mutt
+ newins "${FILESDIR}"/Muttrc.mbox Muttrc
+ else
+ insinto /etc/mutt
+ doins "${FILESDIR}"/Muttrc
+ fi
+
+ # 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
+}
+
+pkg_setup() {
+ if ! use gpg &&
+ has_version "<${CATEGORY}/${PN}-1.5.20-r2" &&
+ built_with_use ${CATEGORY}/${PN} gpgme ;
+ then
+ ewarn 'The "gpgme" USE-flag has been changed into "gpg". You'
+ ewarn 'previously had "gpgme" set, and you most likely want to'
+ ewarn 'enable "gpg" instead, right now, to obtain equivalent behaviour.'
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "If you are new to mutt you may want to take a look at"
+ elog "the Gentoo QuickStart Guide to Mutt E-Mail:"
+ elog " http://www.gentoo.org/doc/en/guide-to-mutt.xml"
+ echo
+}