Add mutt package incorperating pgp_verbose_mime patch.
authorW. Trevor King <wking@drexel.edu>
Sat, 4 Jun 2011 17:05:38 +0000 (13:05 -0400)
committerW. Trevor King <wking@tremily.us>
Wed, 24 Sep 2014 18:42:56 +0000 (11:42 -0700)
mail-client/mutt/ChangeLog [new file with mode: 0644]
mail-client/mutt/Manifest [new file with mode: 0644]
mail-client/mutt/files/Muttrc [new file with mode: 0644]
mail-client/mutt/files/Muttrc.mbox [new file with mode: 0644]
mail-client/mutt/files/pgp_verbose_mime.patch [new file with mode: 0644]
mail-client/mutt/metadata.xml [new file with mode: 0644]
mail-client/mutt/mutt-1.5.21-r2.ebuild [new file with mode: 0644]

diff --git a/mail-client/mutt/ChangeLog b/mail-client/mutt/ChangeLog
new file mode 100644 (file)
index 0000000..9c64bab
--- /dev/null
@@ -0,0 +1,11 @@
+# ChangeLog for mail-client/mutt
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*mutt-1.5.21-r2 (04 Jun 2011)
+  04 Jun 2011; W. Trevor King <wking@drexel.edu> mutt-1.5.21-r2.ebuild :
+  - Temporary overlay with pgp_verbose_mime support until either
+      http://dev.mutt.org/trac/ticket/3478
+    or
+      http://bugs.gentoo.org/show_bug.cgi?id=348477
+    are fixed.
diff --git a/mail-client/mutt/Manifest b/mail-client/mutt/Manifest
new file mode 100644 (file)
index 0000000..f92eeeb
--- /dev/null
@@ -0,0 +1,8 @@
+AUX Muttrc 667 RMD160 0405e73c6a4122869ce9a9bd408068d316740b71 SHA1 e30c96e6f21a30fe576abcb3be65a34accf4e11f SHA256 932940db69c951caaa87a17ee98a8e2262aeadf1e978f6d671b642184c5d545f
+AUX Muttrc.mbox 486 RMD160 0f692c9d3a7591f3a0611529616aa94a5c62a641 SHA1 9e231303fe9fb2fe80542115ceefb972c7b11d5a SHA256 10b251f88ccc5d4c95c96ab17b6ab6a30a16d6590ab896a60037f869fc4d44a0
+AUX pgp_verbose_mime.patch 1470 RMD160 32957437aadf45a492c392ea90f3591ca095c26f SHA1 03a0ef5e24012488b433c0155f2608fb1bb01782 SHA256 3844bdec4edc74aacce0be5050fb336e269da6c0f13b4cb2f083f8821f33d50a
+DIST mutt-1.5.21-gentoo-patches-r2.tar.bz2 72256 RMD160 cd028c7d12e1885d8ea98ff60554a5fbf98e1922 SHA1 28ef259d8a964bbe46f72169ab597825819f244e SHA256 0ad8dcfbcb5b31321c7e96909d53a5d1e8e2f69241f9ddb0f36f69cf086ed615
+DIST mutt-1.5.21.tar.gz 3716886 RMD160 b235a42972ae410592253cdc117a90baf279f47a SHA1 a8475f2618ce5d5d33bff85c0affdf21ab1d76b9 SHA256 2141f36e8d0f4f71c9ca6780001e7cc679fe313e643953fc07f001223e67c4a0
+EBUILD mutt-1.5.21-r2.ebuild 7312 RMD160 dd971fbe99fa946512bb6ce82e434a191c00b818 SHA1 c0ad7ef69e534b14c5f095ff53146d08d7cd539a SHA256 12ba7a515732ee134abbfc90644771057df2e50558a078d1d94cdfd468184739
+MISC ChangeLog 402 RMD160 7c82e3420456e928e477b8f11e54e1b79cf2c432 SHA1 f1fad14db30f38c76d9aceb5d1d51da81218e766 SHA256 49d0a0d486d57c0393a9e1481b31ba65cdffd13708d694698b949d0f5edf196c
+MISC metadata.xml 247 RMD160 6735f3a5dd2d7a2b70589d1693f35d54291b7147 SHA1 c015969fe50967340dd050a44cb9f8a30b5e34a5 SHA256 9e65060e5f9d0a50d28c7a69d9c27fed6c3037fdd3e420cc276627fde2794f72
diff --git a/mail-client/mutt/files/Muttrc b/mail-client/mutt/files/Muttrc
new file mode 100644 (file)
index 0000000..6f0d63e
--- /dev/null
@@ -0,0 +1,19 @@
+# Some minimal Mutt settings, Gentoo-style.  These reflect the Gentoo
+# predilection for maildir folders.
+#
+# Please don't add settings to this file to change other user
+# preferences (such as colors), since those can be hard for a user to
+# undo if their preference doesn't match yours!  For example, it is
+# *impossible* currently in mutt to remove color settings from objects
+# other than the index.
+
+set mbox_type=Maildir
+set folder=~/.maildir
+set spoolfile=~/.maildir/
+set record=~/.maildir-sent/
+set move=no
+
+# Maybe we shouldn't set index_format here, but this is a recommended
+# one for maildir-style folders.
+
+set index_format="%4C %Z %{%b %d} %-16.16L  %s"
diff --git a/mail-client/mutt/files/Muttrc.mbox b/mail-client/mutt/files/Muttrc.mbox
new file mode 100644 (file)
index 0000000..1382a37
--- /dev/null
@@ -0,0 +1,9 @@
+# Some minimal Mutt settings, Gentoo-style.  Since mutt was installed
+# with USE=mbox, this file doesn't have any changes from the default
+# mutt settings, making it very minimal indeed...
+#
+# Please don't add settings to this file to change other user
+# preferences (such as colors), since those can be hard for a user to
+# undo if their preference doesn't match yours!  For example, it is
+# *impossible* currently in mutt to remove color settings from objects
+# other than the index.
diff --git a/mail-client/mutt/files/pgp_verbose_mime.patch b/mail-client/mutt/files/pgp_verbose_mime.patch
new file mode 100644 (file)
index 0000000..221e4ae
--- /dev/null
@@ -0,0 +1,43 @@
+--- a/globals.h        2009-08-25 21:08:52.000000000 +0200
++++ b/globals.h        2010-12-11 13:34:36.934682237 +0100
+@@ -227,6 +227,8 @@
+ WHERE char *PgpSignAs;
+ WHERE short PgpTimeout;
+ WHERE char *PgpEntryFormat;
++WHERE char *PgpMimeSignatureFilename;
++WHERE char *PgpMimeSignatureDescription;
+ WHERE char *PgpClearSignCommand;
+ WHERE char *PgpDecodeCommand;
+ WHERE char *PgpVerifyCommand;
+--- a/init.h   2010-09-15 17:39:31.000000000 +0200
++++ b/init.h   2010-12-11 13:32:21.630299369 +0100
+@@ -1884,6 +1884,18 @@
+   ** (PGP only)
+   **
+   */
++  { "pgp_mime_signature_filename", DT_STR, R_NONE, UL &PgpMimeSignatureFilename, UL "signature.asc"},
++  /*
++  ** .pp
++  ** This option sets the filename used for signature parts in PGP/MIME
++  ** signed messages.
++  */
++  { "pgp_mime_signature_description", DT_STR, R_NONE, UL &PgpMimeSignatureDescription, UL "Digital signature"},
++  /*
++  ** .pp
++  ** This option sets the Content-Description used for signature parts in
++  ** PGP/MIME signed messages.
++  */
+   { "pgp_retainable_sigs", DT_BOOL, R_NONE, OPTPGPRETAINABLESIG, 0 },
+   /*
+   ** .pp
+--- a/pgp.c    2010-09-13 19:19:55.000000000 +0200
++++ b/pgp.c    2010-12-11 13:32:07.926705504 +0100
+@@ -1129,6 +1129,8 @@
+   t->disposition = DISPNONE;
+   t->encoding = ENC7BIT;
+   t->unlink = 1; /* ok to remove this file after sending. */
++  mutt_set_parameter ("name", PgpMimeSignatureFilename, &t->parameter);
++  t->description = safe_strdup (PgpMimeSignatureDescription);
+
+   return (a);
+ }
diff --git a/mail-client/mutt/metadata.xml b/mail-client/mutt/metadata.xml
new file mode 100644 (file)
index 0000000..d124928
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <herd></herd>
+       <maintainer>
+               <email>wking@drexel.edu</email>
+               <name>W. Trevor King</name>
+       </maintainer>
+</pkgmetadata>
diff --git a/mail-client/mutt/mutt-1.5.21-r2.ebuild b/mail-client/mutt/mutt-1.5.21-r2.ebuild
new file mode 100644 (file)
index 0000000..f5b070e
--- /dev/null
@@ -0,0 +1,229 @@
+# Copyright 1999-2011 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-r2.ebuild,v 1.1 2011/04/26 17:32:14 grobian Exp $
+
+EAPI="3"
+
+inherit eutils flag-o-matic autotools
+
+PATCHSET_REV="-r2"
+
+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
+       mirror://gentoo/${P}-gentoo-patches${PATCHSET_REV}.tar.bz2
+       http://dev.gentoo.org/~grobian/distfiles/${P}-gentoo-patches${PATCHSET_REV}.tar.bz2"
+IUSE="berkdb crypt debug doc gdbm gnutls gpg idn imap mbox nls nntp pop qdbm sasl sidebar smime smtp ssl tokyocabinet"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~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_prepare() {
+       # Post-release hot-fixes grabbed from HG, this is what all following
+       # patches are based on in my Mercurial patchqueue (mq).
+       # If you ever take over or need to modify patches here, just check
+       # out the gentoo branch(es) of Gentoo's Mutt Mercurial clone, and
+       # the patchqueue as it'll save you a lot of work.
+       # http://prefix.gentooexperimental.org:8000/mutt/
+       # http://prefix.gentooexperimental.org:8000/mutt-patches/
+       for rev in $(eval echo {0..${PR#r}}) ; do
+               local revpatch="${PATCHDIR}"/mutt-gentoo-${PV}-r${rev}.patch
+               [[ -e ${revpatch} ]] && \
+                       epatch "${revpatch}"
+       done
+
+       # 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 "${PATCHDIR}"/prefix-mailcap.patch
+
+       # must have fixes to compile or behave correctly, upstream
+       # ignores, disagrees or simply doesn't respond/apply
+       epatch "${PATCHDIR}"/bdb-prefix.patch # fix bdb detection
+       epatch "${PATCHDIR}"/interix-btowc.patch
+       epatch "${PATCHDIR}"/solaris-ncurses-chars.patch
+       epatch "${PATCHDIR}"/gpgme-1.2.0.patch
+       # same category, but functional bits
+       epatch "${PATCHDIR}"/dont-reveal-bbc.patch
+
+       # the big feature patches that upstream doesn't want to include, but
+       # nearly every distro has due to their usefulness
+       for p in "${PATCHDIR}"/[0-9][0-9]-*.patch ; do
+               epatch "${p}"
+       done
+
+       # we conditionalise this one, simply because it has considerable
+       # impact on the code
+       use sidebar && epatch "${PATCHDIR}"/sidebar.patch
+
+       #custom line: added vk.pgp_verbose_mime patch
+       epatch "${FILESDIR}"/pgp_verbose_mime.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"
+
+       # many patches touch the buildsystem, we always need this
+       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() {
+       local myconf="
+               $(use_enable crypt pgp) \
+               $(use_enable debug) \
+               $(use_enable gpg gpgme) \
+               $(use_enable imap) \
+               $(use_enable nls) \
+               $(use_enable nntp) \
+               $(use_enable pop) \
+               $(use_enable smime) \
+               $(use_enable smtp) \
+               $(use_with idn) \
+               $(use_with !nntp mixmaster) \
+               --enable-compressed \
+               --enable-external-dotlock \
+               --enable-nfs-fix \
+               --sysconfdir="${EPREFIX}"/etc/${PN} \
+               --with-curses \
+               --with-docdir="${EPREFIX}"/usr/share/doc/${PN}-${PVR} \
+               --with-regex \
+               --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
+
+       econf ${myconf} || die "configure failed"
+}
+
+src_install() {
+       make DESTDIR="${D}" install || die "install failed"
+       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_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://dev.gentoo.org/~grobian/guide-to-mutt.xml"
+       echo
+}