pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mutt: Import mutt-1.5.24 from mail/mutt



Module Name:	pkgsrc-wip
Committed By:	Mateusz Poszwa <old4%o2.pl@localhost>
Pushed By:	f8l
Date:		Mon Apr 4 17:12:50 2016 +0200
Changeset:	461f1fc87343b3d528989efd53261edabbdfa034

Modified Files:
	Makefile
Added Files:
	mutt/DEINSTALL
	mutt/DESCR
	mutt/INSTALL
	mutt/Makefile
	mutt/Makefile.common
	mutt/PLIST
	mutt/distinfo
	mutt/options.mk
	mutt/patches/patch-aa
	mutt/patches/patch-ab
	mutt/patches/patch-ac
	mutt/patches/patch-ad
	mutt/patches/patch-ae
	mutt/patches/patch-af
	mutt/patches/patch-ag
	mutt/patches/patch-ah
	mutt/patches/patch-al
	mutt/patches/patch-am
	mutt/patches/patch-an
	mutt/patches/patch-ao
	mutt/patches/patch-ap
	mutt/patches/patch-aq
	mutt/patches/patch-crypt.c

Log Message:
mutt: Import mutt-1.5.24 from mail/mutt

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=461f1fc87343b3d528989efd53261edabbdfa034

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                   |   1 +
 mutt/DEINSTALL             |   7 ++
 mutt/DESCR                 |  10 +++
 mutt/INSTALL               |   8 ++
 mutt/Makefile              |  15 ++++
 mutt/Makefile.common       |  55 +++++++++++++
 mutt/PLIST                 | 113 +++++++++++++++++++++++++++
 mutt/distinfo              |  24 ++++++
 mutt/options.mk            | 187 +++++++++++++++++++++++++++++++++++++++++++++
 mutt/patches/patch-aa      |  18 +++++
 mutt/patches/patch-ab      |  42 ++++++++++
 mutt/patches/patch-ac      |  17 +++++
 mutt/patches/patch-ad      |  32 ++++++++
 mutt/patches/patch-ae      |  24 ++++++
 mutt/patches/patch-af      |  22 ++++++
 mutt/patches/patch-ag      |  15 ++++
 mutt/patches/patch-ah      |  17 +++++
 mutt/patches/patch-al      |  22 ++++++
 mutt/patches/patch-am      |  14 ++++
 mutt/patches/patch-an      |  18 +++++
 mutt/patches/patch-ao      |  18 +++++
 mutt/patches/patch-ap      |  36 +++++++++
 mutt/patches/patch-aq      |  32 ++++++++
 mutt/patches/patch-crypt.c | 124 ++++++++++++++++++++++++++++++
 24 files changed, 871 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 75c6047..6f073f0 100644
--- a/Makefile
+++ b/Makefile
@@ -1980,6 +1980,7 @@ SUBDIR+=	muscle-pam
 SUBDIR+=	muscle-pkcs11
 SUBDIR+=	muscletool
 SUBDIR+=	musescore
+SUBDIR+=	mutt
 SUBDIR+=	mutt-ng
 SUBDIR+=	muttprint
 SUBDIR+=	muttvcquery
diff --git a/mutt/DEINSTALL b/mutt/DEINSTALL
new file mode 100644
index 0000000..253ac92
--- /dev/null
+++ b/mutt/DEINSTALL
@@ -0,0 +1,7 @@
+# $NetBSD: DEINSTALL,v 1.5 2015/09/03 14:49:02 wiz Exp $
+
+case ${STAGE} in
+DEINSTALL)
+	${RM} -f @DOCDIR@/samples
+	;;
+esac
diff --git a/mutt/DESCR b/mutt/DESCR
new file mode 100644
index 0000000..7319ded
--- /dev/null
+++ b/mutt/DESCR
@@ -0,0 +1,10 @@
+The Mutt E-Mail Client by Michael Elkins <me%cs.hmc.edu@localhost>
+
+``All mail clients suck.  This one just sucks less.'' -me, circa 1995
+
+Mutt is a small but very powerful text-based MIME mail client.
+Mutt is highly configurable, and is well suited to the mail power
+user with advanced features like key bindings, keyboard macros,
+mail threading, color, PGP and S/MIME, POP3, IMAP, various mailbox
+formats, regular expression searches and a powerful pattern matching
+language for selecting groups of messages.
diff --git a/mutt/INSTALL b/mutt/INSTALL
new file mode 100644
index 0000000..9dafd58
--- /dev/null
+++ b/mutt/INSTALL
@@ -0,0 +1,8 @@
+# $NetBSD: INSTALL,v 1.6 2015/09/03 14:49:02 wiz Exp $
+
+case ${STAGE} in
+POST-INSTALL)
+	${RM} -f @DOCDIR@/samples
+	${LN} -sf ../../examples/mutt @DOCDIR@/samples
+	;;
+esac
diff --git a/mutt/Makefile b/mutt/Makefile
new file mode 100644
index 0000000..fce0ef7
--- /dev/null
+++ b/mutt/Makefile
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.176 2016/03/05 11:28:49 jperkin Exp $
+
+DISTNAME=		mutt-1.5.24
+PKGREVISION=		3
+CATEGORIES=		mail
+MASTER_SITES=		ftp://ftp.mutt.org/pub/mutt/
+
+MAINTAINER=		tonio%NetBSD.org@localhost
+HOMEPAGE=		http://www.mutt.org/
+COMMENT=		Text-based MIME mail client with PGP & S/MIME support
+LICENSE=		gnu-gpl-v2 OR gnu-gpl-v3 # or newer
+
+.include "Makefile.common"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/mutt/Makefile.common b/mutt/Makefile.common
new file mode 100644
index 0000000..761208e
--- /dev/null
+++ b/mutt/Makefile.common
@@ -0,0 +1,55 @@
+# $NetBSD: Makefile.common,v 1.2 2016/02/25 15:00:51 jperkin Exp $
+#
+# used by mail/mutt/Makefile
+# used by mail/mutt-kz/Makefile
+
+.include "../../mk/bsd.prefs.mk"
+
+USE_PKGLOCALEDIR=	yes
+USE_TOOLS+=		gmake msgfmt perl
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=	--with-docdir=${PREFIX}/share/doc/mutt
+CONFIGURE_ARGS+=	--without-included-gettext
+CONFIGURE_ARGS+=	--enable-external-dotlock
+CONFIGURE_ARGS+=	--enable-pop
+CONFIGURE_ARGS+=	--enable-imap
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD"
+# Force sendmail to /usr/sbin to avoid postfix's
+# ${LOCALBASE}/sbin/sendmail.  Should be enabled on all platforms which
+# support mailwrapper.
+CONFIGURE_ENV+=		SENDMAIL=/usr/sbin/sendmail
+.endif
+
+CONFIGURE_ARGS.SunOS+=	--without-wc-funcs
+
+# There is a problem using /bin/sh on old NetBSD releases, so use /bin/ksh
+# there.
+#
+.if !empty(MACHINE_PLATFORM:MNetBSD-1.[0-5]*-*)
+CONFIGURE_ARGS+=	--with-exec-shell=/bin/ksh
+.endif
+
+.include "options.mk"
+
+LDFLAGS+=		${_STRIPFLAG_CC}
+
+DOCDIR=			${PREFIX}/share/doc/mutt
+EGDIR=			${PREFIX}/share/examples/mutt
+CONF_FILES=		${EGDIR}/Muttrc ${PKG_SYSCONFDIR}/Muttrc
+CONF_FILES+=		${EGDIR}/mime.types ${PKG_SYSCONFDIR}/mime.types
+FILES_SUBST+=		DOCDIR=${DOCDIR}
+INSTALLATION_DIRS+=	${DOCDIR} ${EGDIR}
+
+SUBST_CLASSES+=		paths
+SUBST_FILES.paths=	doc/Muttrc
+SUBST_VARS.paths+=	DOCDIR PREFIX
+SUBST_STAGE.paths=	pre-configure
+
+SPECIAL_PERMS+=	bin/mutt_dotlock ${REAL_ROOT_USER} mail 2551
+INSTALL_MAKE_FLAGS=	${MAKE_FLAGS} sysconfdir=${EGDIR}
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
diff --git a/mutt/PLIST b/mutt/PLIST
new file mode 100644
index 0000000..e36eb10
--- /dev/null
+++ b/mutt/PLIST
@@ -0,0 +1,113 @@
+@comment $NetBSD: PLIST,v 1.18 2015/09/12 15:25:53 joerg Exp $
+bin/flea
+bin/mutt
+bin/mutt_dotlock
+bin/muttbug
+bin/pgpewrap
+bin/pgpring
+${PLIST.smime}bin/smime_keys
+man/man1/flea.1
+man/man1/mutt.1
+man/man1/mutt_dotlock.1
+man/man1/muttbug.1
+man/man1/pgpewrap.1
+man/man1/pgpring.1
+man/man1/smime_keys.1
+man/man5/mutt-mbox.5
+man/man5/mutt-mmdf.5
+man/man5/muttrc.5
+share/doc/mutt/COPYRIGHT
+share/doc/mutt/ChangeLog
+share/doc/mutt/GPL
+share/doc/mutt/INSTALL
+share/doc/mutt/NEWS
+share/doc/mutt/PGP-Notes.txt
+share/doc/mutt/README
+share/doc/mutt/README.SECURITY
+share/doc/mutt/README.SSL
+share/doc/mutt/TODO
+share/doc/mutt/advancedusage.html
+share/doc/mutt/applying-patches.txt
+${PLIST.compressed_mbox}share/doc/mutt/compressed-folders.html
+share/doc/mutt/configuration.html
+share/doc/mutt/devel-notes.txt
+share/doc/mutt/gettingstarted.html
+share/doc/mutt/index.html
+share/doc/mutt/intro.html
+share/doc/mutt/manual.html
+share/doc/mutt/manual.txt
+share/doc/mutt/mimesupport.html
+share/doc/mutt/miscellany.html
+share/doc/mutt/optionalfeatures.html
+share/doc/mutt/patch-notes.txt
+share/doc/mutt/reference.html
+share/doc/mutt/security.html
+share/doc/mutt/smime-notes.txt
+share/doc/mutt/tuning.html
+share/examples/mutt/Mush.rc
+share/examples/mutt/Muttrc
+share/examples/mutt/Muttrc.dist
+share/examples/mutt/Pine.rc
+share/examples/mutt/Tin.rc
+share/examples/mutt/ca-bundle.crt
+share/examples/mutt/colors.default
+share/examples/mutt/colors.linux
+share/examples/mutt/gpg.rc
+share/examples/mutt/iconv/iconv.aix-3.2.5.rc
+share/examples/mutt/iconv/iconv.aix-4.1.5.rc
+share/examples/mutt/iconv/iconv.aix-4.2.0.rc
+share/examples/mutt/iconv/iconv.aix-4.3.2.rc
+share/examples/mutt/iconv/iconv.freebsd-3.3.rc
+share/examples/mutt/iconv/iconv.glibc-2.1.3.rc
+share/examples/mutt/iconv/iconv.glibc-2.1.90.rc
+share/examples/mutt/iconv/iconv.hpux-10.01.rc
+share/examples/mutt/iconv/iconv.hpux-10.20.rc
+share/examples/mutt/iconv/iconv.hpux-11.00.rc
+share/examples/mutt/iconv/iconv.irix-6.5.rc
+share/examples/mutt/iconv/iconv.osf1-4.0a.rc
+share/examples/mutt/iconv/iconv.osf1-4.0d.rc
+share/examples/mutt/iconv/iconv.solaris-2.4.rc
+share/examples/mutt/iconv/iconv.solaris-2.5.1.rc
+share/examples/mutt/iconv/iconv.solaris-2.6-cjk.rc
+share/examples/mutt/iconv/iconv.solaris-2.6.rc
+share/examples/mutt/iconv/iconv.solaris-2.7.rc
+share/examples/mutt/mime.types
+share/examples/mutt/mime.types.dist
+share/examples/mutt/mutt_xtitle
+share/examples/mutt/pgp2.rc
+share/examples/mutt/pgp5.rc
+share/examples/mutt/pgp6.rc
+share/examples/mutt/sample.mailcap
+share/examples/mutt/sample.muttrc
+share/examples/mutt/sample.muttrc-tlr
+share/examples/mutt/smime.rc
+share/examples/mutt/smime_keys_test.pl
+share/locale/bg/LC_MESSAGES/mutt.mo
+share/locale/ca/LC_MESSAGES/mutt.mo
+share/locale/cs/LC_MESSAGES/mutt.mo
+share/locale/da/LC_MESSAGES/mutt.mo
+share/locale/de/LC_MESSAGES/mutt.mo
+share/locale/el/LC_MESSAGES/mutt.mo
+share/locale/eo/LC_MESSAGES/mutt.mo
+share/locale/es/LC_MESSAGES/mutt.mo
+share/locale/et/LC_MESSAGES/mutt.mo
+share/locale/eu/LC_MESSAGES/mutt.mo
+share/locale/fr/LC_MESSAGES/mutt.mo
+share/locale/ga/LC_MESSAGES/mutt.mo
+share/locale/gl/LC_MESSAGES/mutt.mo
+share/locale/hu/LC_MESSAGES/mutt.mo
+share/locale/id/LC_MESSAGES/mutt.mo
+share/locale/it/LC_MESSAGES/mutt.mo
+share/locale/ja/LC_MESSAGES/mutt.mo
+share/locale/ko/LC_MESSAGES/mutt.mo
+share/locale/lt/LC_MESSAGES/mutt.mo
+share/locale/nl/LC_MESSAGES/mutt.mo
+share/locale/pl/LC_MESSAGES/mutt.mo
+share/locale/pt_BR/LC_MESSAGES/mutt.mo
+share/locale/ru/LC_MESSAGES/mutt.mo
+share/locale/sk/LC_MESSAGES/mutt.mo
+share/locale/sv/LC_MESSAGES/mutt.mo
+share/locale/tr/LC_MESSAGES/mutt.mo
+share/locale/uk/LC_MESSAGES/mutt.mo
+share/locale/zh_CN/LC_MESSAGES/mutt.mo
+share/locale/zh_TW/LC_MESSAGES/mutt.mo
diff --git a/mutt/distinfo b/mutt/distinfo
new file mode 100644
index 0000000..825a35f
--- /dev/null
+++ b/mutt/distinfo
@@ -0,0 +1,24 @@
+$NetBSD: distinfo,v 1.40 2016/02/22 12:13:26 wiz Exp $
+
+SHA1 (mutt-1.5.24.tar.gz) = 38a2da5eb01ff83a90a2caee28fa2e95dbfe6898
+RMD160 (mutt-1.5.24.tar.gz) = 7fe7e653c27c9b580f958493638c1248d0ad5591
+SHA512 (mutt-1.5.24.tar.gz) = f7fe7edf9d1701a8e92761b1f5e6ef2e3a3b513af7898872cbe36a8800714cb76945788a60d2008820c57bc5344a4147e2686f690da42cfc8a912e3a432452b1
+Size (mutt-1.5.24.tar.gz) = 3897115 bytes
+SHA1 (patch-1.5.24.rr.compressed.gz) = 8da54323dfc9c1049bf0411db2f552593793e99f
+RMD160 (patch-1.5.24.rr.compressed.gz) = 2bf71a26de195ce11ed4ffa25403363cab7c9b72
+Size (patch-1.5.24.rr.compressed.gz) = 10019 bytes
+SHA1 (patch-aa) = 59d89dce24110be2927c8a1ea1fa5b780d644372
+SHA1 (patch-ab) = 7c307068e129eb71ba251d175186dc9c5b171681
+SHA1 (patch-ac) = 40d119b7efed1a4622c42badc9ee97349b504044
+SHA1 (patch-ad) = 6db5792162a0752ee533f5cd4cb3896e0ca92344
+SHA1 (patch-ae) = 6534848a4c27d4a3830edd8d4e19d1181fe396d6
+SHA1 (patch-af) = edc107c535789919ba2cda5f81a4b640b6100b91
+SHA1 (patch-ag) = b7902d2412538f15bc25b123ca742c03a3dd3a12
+SHA1 (patch-ah) = dfe747c30a44bb309cccaca1bd5174fccc3c2bed
+SHA1 (patch-al) = 49542905cde263b8d4c79f71cce3759024c804a3
+SHA1 (patch-am) = f7f20860bccb63ed5464e3a1225719ffc3fa504f
+SHA1 (patch-an) = b9cc3e957bb1650c8e22c0edf0ce112f769664a1
+SHA1 (patch-ao) = a5dddb01d30f28337ca825c6461139c2d9f288d5
+SHA1 (patch-ap) = c6f79d5c4e19efdc15e9d5a59934da52b16b7a62
+SHA1 (patch-aq) = e363d8929ced9731a31af1137b111d3476a3d05d
+SHA1 (patch-crypt.c) = 05cc74fe4ff2543029d82cbeedc27302db9ec4a7
diff --git a/mutt/options.mk b/mutt/options.mk
new file mode 100644
index 0000000..72a2083
--- /dev/null
+++ b/mutt/options.mk
@@ -0,0 +1,187 @@
+# $NetBSD: options.mk,v 1.20 2016/02/25 15:00:51 jperkin Exp $
+
+# Global and legacy options
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.mutt
+PKG_OPTIONS_REQUIRED_GROUPS=	display
+PKG_OPTIONS_GROUP.display=	slang ncurses ncursesw curses
+PKG_SUPPORTED_OPTIONS=	debug gpgme idn ssl smime sasl
+PKG_SUPPORTED_OPTIONS+=	mutt-hcache tokyocabinet mutt-smtp
+PKG_SUPPORTED_OPTIONS+=	mutt-compressed-mbox
+PKG_SUPPORTED_OPTIONS+=	mutt-sidebar
+PKG_SUGGESTED_OPTIONS=	curses gpgme mutt-hcache mutt-smtp smime ssl
+# un-comment out the following lines whenever updating distinfo
+# and patches are up-to-date
+#PKG_SUGGESTED_OPTIONS+=	mutt-compressed-mbox
+#PKG_SUGGESTED_OPTIONS+=	mutt-sidebar
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Slang
+###
+.if !empty(PKG_OPTIONS:Mslang)
+.  include "../../devel/libslang/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-slang=${BUILDLINK_PREFIX.libslang}
+.endif
+
+###
+### ncurses
+###
+.if !empty(PKG_OPTIONS:Mncurses)
+USE_NCURSES=		yes
+.  include "../../devel/ncurses/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-curses=${BUILDLINK_PREFIX.ncurses}
+.endif
+
+###
+### SASLv2
+###
+.if !empty(PKG_OPTIONS:Msasl)
+.  include "../../security/cyrus-sasl/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-sasl=${BUILDLINK_PREFIX.cyrus-sasl}
+.endif
+
+### curses
+###
+.if !empty(PKG_OPTIONS:Mcurses)
+.  include "../../mk/curses.buildlink3.mk"
+OPSYSVARS+=			BUILDLINK_PASSTHRU_DIRS
+BUILDLINK_PASSTHRU_DIRS.SunOS+=	/usr/xpg4
+CONFIGURE_ARGS.SunOS+=		--with-curses=/usr/xpg4
+LDFLAGS.SunOS+=			-L/usr/xpg4/lib${LIBABISUFFIX}
+LDFLAGS.SunOS+=			${COMPILER_RPATH_FLAG}/usr/xpg4/lib${LIBABISUFFIX}
+.endif
+
+###
+### ncursesw
+###
+.if !empty(PKG_OPTIONS:Mncursesw)
+.  include "../../devel/ncursesw/buildlink3.mk"
+.else
+SUBST_CLASSES+=		curse
+SUBST_MESSAGE.curse=	Fixing mutt to avoid ncursesw
+SUBST_STAGE.curse=	post-patch
+SUBST_FILES.curse=	configure
+SUBST_SED.curse=	-e 's,for lib in ncurses ncursesw,for lib in ncurses,'
+.endif
+
+###
+### SSL
+###
+.if !empty(PKG_OPTIONS:Mssl)
+.  include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-ssl=${SSLBASE:Q}
+.else
+CONFIGURE_ARGS+=	--without-ssl
+.endif
+
+###
+### S/MIME
+###
+PLIST_VARS+=		smime
+.if !empty(PKG_OPTIONS:Msmime)
+USE_TOOLS+=		perl:run
+REPLACE_PERL+=		*.pl */*.pl
+.  include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-smime
+PLIST.smime=		yes
+.else
+CONFIGURE_ARGS+=	--disable-smime
+.endif
+
+###
+### Header cache
+###
+.if !empty(PKG_OPTIONS:Mmutt-hcache)
+.  if !empty(PKG_OPTIONS:Mtokyocabinet)
+.  include "../../databases/tokyocabinet/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-hcache
+CONFIGURE_ARGS+=	--enable-tokyocabinet
+CONFIGURE_ARGS+=	--without-gdbm
+CONFIGURE_ARGS+=	--without-bdb
+.  else
+BDB_ACCEPTED=		db4 db5
+BUILDLINK_TRANSFORM+=	l:db:${BDB_TYPE}
+.  include "../../mk/bdb.buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-hcache
+CONFIGURE_ARGS+=	--without-gdbm
+# BDB_INCLUDE_DIR_ and BDB_LIB_DIR don't have to be particularly accurate
+# since the real -I and -L flags are added by buildlink already.
+CONFIGURE_ENV+=		BDB_INCLUDE_DIR=${BDBBASE}/include
+CONFIGURE_ENV+=		BDB_LIB_DIR=${BDBBASE}/lib
+CONFIGURE_ENV+=		BDB_LIB=${BDB_LIBS:S/^-l//:M*:Q}
+.  endif
+.else
+CONFIGURE_ARGS+=	--disable-hcache
+.endif
+
+###
+### Compressed mail boxes
+###
+PLIST_VARS+=		compressed_mbox
+.if !empty(PKG_OPTIONS:Mmutt-compressed-mbox)
+PLIST.compressed_mbox=	yes
+PATCH_SITES+=		http://mutt.org.ua/download/${PKGNAME_NOREV}/
+PATCHFILES+=		patch-${PKGVERSION_NOREV}.rr.compressed.gz
+PATCH_DIST_STRIP=	-p1
+CONFIGURE_ARGS+=	--enable-compressed
+SUBST_CLASSES+=		compress
+SUBST_MESSAGE.compress=	Patch Makefile.in to avoid autoreconf for compress
+SUBST_STAGE.compress=	post-patch
+SUBST_FILES.compress=	Makefile.in
+SUBST_SED.compress=	-e 's,^mutt_SOURCES = ,mutt_SOURCES = compress.c ,'
+SUBST_SED.compress+=	-e 's,^EXTRA_DIST = ,EXTRA_DIST = compress.h ,'
+SUBST_SED.compress+=	-e 's,^mutt_OBJECTS = ,mutt_OBJECTS = compress.o ,'
+# add xsltproc to be able to regenerate the documentation
+BUILD_DEPENDS+=		libxslt-[0-9]*:../../textproc/libxslt
+.endif
+
+###
+### Internal SMTP relay support
+###
+.if !empty(PKG_OPTIONS:Mmutt-smtp)
+CONFIGURE_ARGS+=	--enable-smtp
+.else
+CONFIGURE_ARGS+=	--disable-smtp
+.endif
+
+###
+### Sidebar support
+###
+.if !empty(PKG_OPTIONS:Mmutt-sidebar)
+# http://www.lunar-linux.org/mutt-sidebar/
+PATCH_SITES+=		http://lunar-linux.org/~tchan/mutt/
+PATCHFILES+=		patch-1.5.23.sidebar.20140412.txt
+PATCH_DIST_STRIP=	-p1
+PATCH_FUZZ_FACTOR=	-F1
+.endif
+
+###
+### Internationalized Domain Names
+###
+.if !empty(PKG_OPTIONS:Midn)
+.  include "../../devel/libidn/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-idn=${BUILDLINK_PREFIX.libidn}
+.else
+CONFIGURE_ARGS+=	--with-idn=no
+.endif
+
+###
+### Enable debugging support
+###
+.if !empty(PKG_OPTIONS:Mdebug)
+CONFIGURE_ARGS+=	--enable-debug
+CFLAGS+= -g
+.endif
+
+###
+### gpgme support
+###
+.if !empty(PKG_OPTIONS:Mgpgme)
+.  include "../../security/gpgme/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-gpgme
+CONFIGURE_ARGS+=	--with-gpgme-prefix=${BUILDLINK_PREFIX.gpgme}
+.else
+CONFIGURE_ARGS+=	--disable-gpgme
+.endif
diff --git a/mutt/patches/patch-aa b/mutt/patches/patch-aa
new file mode 100644
index 0000000..e0ccd84
--- /dev/null
+++ b/mutt/patches/patch-aa
@@ -0,0 +1,18 @@
+$NetBSD: patch-aa,v 1.8 2015/09/03 14:49:02 wiz Exp $
+
+--- send.c.orig	Sun Feb  1 12:10:58 2004
++++ send.c
+@@ -1689,6 +1689,13 @@ full_fcc:
+     }
+   }
+ 
++#ifdef CRYPT_BACKEND_CLASSIC_PGP
++  {
++    /* Extend the PGP expiry time while messages are being sent. */
++    extern time_t PgpExptime;
++    PgpExptime = time (NULL) + PgpTimeout;
++  }
++#endif
+ 
+   rv = 0;
+   
diff --git a/mutt/patches/patch-ab b/mutt/patches/patch-ab
new file mode 100644
index 0000000..c0f545c
--- /dev/null
+++ b/mutt/patches/patch-ab
@@ -0,0 +1,42 @@
+$NetBSD: patch-ab,v 1.17 2015/09/03 21:04:34 wiz Exp $
+
+--- Makefile.in.orig	2015-08-30 17:24:26.000000000 +0000
++++ Makefile.in
+@@ -110,7 +110,7 @@ CONFIG_CLEAN_FILES = intl/Makefile hcach
+ CONFIG_CLEAN_VPATH_FILES =
+ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
+ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+-am_mutt_OBJECTS = addrbook.$(OBJEXT) alias.$(OBJEXT) attach.$(OBJEXT) \
++am_mutt_OBJECTS = mvchgat.$(OBJEXT) addrbook.$(OBJEXT) alias.$(OBJEXT) attach.$(OBJEXT) \
+ 	base64.$(OBJEXT) browser.$(OBJEXT) buffy.$(OBJEXT) \
+ 	color.$(OBJEXT) crypt.$(OBJEXT) cryptglue.$(OBJEXT) \
+ 	commands.$(OBJEXT) complete.$(OBJEXT) compose.$(OBJEXT) \
+@@ -329,7 +329,7 @@ DATADIRNAME = @DATADIRNAME@
+ DBX = @DBX@
+ DEBUGGER = @DEBUGGER@
+ DEFS = -DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
+-	-DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
++	-DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(localedir)\" \
+ 	-DHAVE_CONFIG_H=1
+ 
+ DEPDIR = @DEPDIR@
+@@ -799,6 +799,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc2231.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc3676.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc822.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mvchgat.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe_asprintf.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/score.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send.Po@am__quote@
+@@ -1338,11 +1339,6 @@ install-exec-hook:
+ 		rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;		\
+ 		ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
+ 	fi
+-	if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \
+-		chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \
+-		chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \
+-		{ echo "Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
+-	fi
+ 
+ install-data-local:
+ 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)
diff --git a/mutt/patches/patch-ac b/mutt/patches/patch-ac
new file mode 100644
index 0000000..16e549c
--- /dev/null
+++ b/mutt/patches/patch-ac
@@ -0,0 +1,17 @@
+$NetBSD: patch-ac,v 1.7 2015/09/03 14:49:02 wiz Exp $
+
+--- config.h.in.orig	2009-08-02 09:34:54 +0300
++++ config.h.in	2009-08-02 09:36:37 +0300
+@@ -442,6 +442,12 @@
+ /* Define to 1 if you have the `__argz_stringify' function. */
+ #undef HAVE___ARGZ_STRINGIFY
+ 
++/* Define to 1 if you have the `mvchgat' function. */
++#undef HAVE_MVCHGAT
++
++/* Define to 1 if you have the `mvwchgat' function. */
++#undef HAVE_MVWCHGAT
++
+ /* Is mail spooled to the user's home directory? If defined, MAILPATH should
+    be set to the filename of the spool mailbox relative the the home
+    directory. use: configure --with-homespool=FILE */
diff --git a/mutt/patches/patch-ad b/mutt/patches/patch-ad
new file mode 100644
index 0000000..c0f99e2
--- /dev/null
+++ b/mutt/patches/patch-ad
@@ -0,0 +1,32 @@
+$NetBSD: patch-ad,v 1.11 2015/09/03 21:04:34 wiz Exp $
+
+--- contrib/Makefile.in.orig	2015-08-30 17:24:26.000000000 +0000
++++ contrib/Makefile.in
+@@ -459,21 +459,20 @@ uninstall-am: uninstall-local
+ 
+ 
+ install-data-local:
+-	$(MKDIR_P) $(DESTDIR)$(docdir)/samples $(DESTDIR)$(docdir)/samples/iconv
++	$(MKDIR_P) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(sysconfdir)/iconv
+ 	for f in $(SAMPLES) ; do \
+-		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir)/samples ;	\
++		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(sysconfdir);	\
+ 	done
+ 	for f in $(srcdir)/iconv/*.rc ; do					\
+-		$(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/samples/iconv	  ;	\
++		$(INSTALL) -m 644 $$f $(DESTDIR)$(sysconfdir)/iconv	  ;	\
+ 	done
+ 
+ uninstall-local:
+ 	for f in $(SAMPLES) ; do \
+-		rm -f $(DESTDIR)$(docdir)/samples/$$f ; \
++		rm -f $(DESTDIR)$(sysconfdir)/$$f ; \
+ 	done
+-	-rm -rf $(DESTDIR)$(docdir)/samples/iconv
+-	-rmdir $(DESTDIR)$(docdir)/samples
+-	-rmdir $(DESTDIR)$(docdir)
++	-rm -rf $(DESTDIR)$(sysconfdir)/iconv
++	-rmdir $(DESTDIR)$(sysconfdir)
+ dist-hook: Makefile $(DISTFILES)
+ 	mkdir -p $(distdir)/iconv
+ 	for file in $(srcdir)/iconv/*.rc ; do					\
diff --git a/mutt/patches/patch-ae b/mutt/patches/patch-ae
new file mode 100644
index 0000000..cb7b5d6
--- /dev/null
+++ b/mutt/patches/patch-ae
@@ -0,0 +1,24 @@
+$NetBSD: patch-ae,v 1.6 2015/09/03 14:49:02 wiz Exp $
+
+Work around the broken IMAP implementation of Exchange 2010.
+Patch taken from here:
+
+http://dev.mutt.org/trac/ticket/3459
+
+--- imap/message.c.orig	2010-08-24 17:34:21.000000000 +0100
++++ imap/message.c	2011-02-03 13:17:56.000000000 +0000
+@@ -242,6 +242,14 @@
+       char *cmd;
+ 
+       fetchlast = msgend + 1;
++      /* Microsoft Exchange 2010 violates the IMAP protocol and 
++       * starts omitting messages if one FETCHes more than 2047 (or
++       * or somewhere around that number. We therefore split the
++       * FETCH into chunks of 2000 messages each. */
++      if (fetchlast - msgno - 1 > 2000)
++      {
++        fetchlast = msgno + 1 + 2000;
++      }
+       safe_asprintf (&cmd, "FETCH %d:%d (UID FLAGS INTERNALDATE RFC822.SIZE %s)",
+                      msgno + 1, fetchlast, hdrreq);
+       imap_cmd_start (idata, cmd);
diff --git a/mutt/patches/patch-af b/mutt/patches/patch-af
new file mode 100644
index 0000000..29a8eb1
--- /dev/null
+++ b/mutt/patches/patch-af
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.6 2015/09/03 14:49:02 wiz Exp $
+
+1.) On some systems, curses.h defines TRUE and FALSE, so conditionalise
+    them here to avoid compiler complaints about duplicate definitions.
+
+--- lib.h.orig	2014-03-12 16:03:45.000000000 +0000
++++ lib.h	2014-12-19 20:41:07.000000000 +0000
+@@ -54,8 +54,12 @@
+ #  define N_(a) a
+ # endif
+ 
+-# define TRUE 1
+-# define FALSE 0
++# ifndef TRUE
++#  define TRUE 1
++# endif
++# ifndef FALSE
++#  define FALSE 0
++# endif
+ 
+ # define HUGE_STRING	5120
+ # define LONG_STRING     1024
diff --git a/mutt/patches/patch-ag b/mutt/patches/patch-ag
new file mode 100644
index 0000000..30dfb84
--- /dev/null
+++ b/mutt/patches/patch-ag
@@ -0,0 +1,15 @@
+$NetBSD: patch-ag,v 1.9 2015/09/03 21:04:34 wiz Exp $
+
+--- doc/Makefile.in.orig	2015-08-30 17:24:26.000000000 +0000
++++ doc/Makefile.in
+@@ -642,8 +642,8 @@ install-data-local: makedoc-all instdoc
+ 	test x$(DOTLOCK_TARGET) = x || ./instdoc $(srcdir)/dotlock.man \
+ 		$(DESTDIR)$(mandir)/man1/mutt_dotlock.1
+ 	./instdoc muttrc.man $(DESTDIR)$(mandir)/man5/muttrc.5
+-	./instdoc $(srcdir)/mbox.man $(DESTDIR)$(mandir)/man5/mbox.5
+-	./instdoc $(srcdir)/mmdf.man $(DESTDIR)$(mandir)/man5/mmdf.5
++	./instdoc $(srcdir)/mbox.man $(DESTDIR)$(mandir)/man5/mutt-mbox.5
++	./instdoc $(srcdir)/mmdf.man $(DESTDIR)$(mandir)/man5/mutt-mmdf.5
+ 	$(MKDIR_P) $(DESTDIR)$(docdir)
+ 	for f in $(topsrcdir_DOCFILES) ; do \
+ 		$(INSTALL) -m 644 $(top_srcdir)/$$f $(DESTDIR)$(docdir) ; \
diff --git a/mutt/patches/patch-ah b/mutt/patches/patch-ah
new file mode 100644
index 0000000..8384247
--- /dev/null
+++ b/mutt/patches/patch-ah
@@ -0,0 +1,17 @@
+$NetBSD: patch-ah,v 1.6 2015/09/03 14:49:02 wiz Exp $
+
+mutt_curses.h refers to event_t from mutt,h, and SHORT_STRING from lib.h,
+so include those headers here.
+
+--- mutt_curses.h.orig	2008-11-11 21:55:47.000000000 +0200
++++ mutt_curses.h
+@@ -52,6 +52,9 @@
+ # include <curses.h>
+ #endif
+ 
++#include "lib.h" /* for SHORT_STRING */
++#include "mutt.h" /* for event_t */
++
+ #define M_ENTER_C '\n'
+ #define M_ENTER_S "\n"
+ 
diff --git a/mutt/patches/patch-al b/mutt/patches/patch-al
new file mode 100644
index 0000000..1d91948
--- /dev/null
+++ b/mutt/patches/patch-al
@@ -0,0 +1,22 @@
+$NetBSD: patch-al,v 1.9 2015/09/03 14:49:02 wiz Exp $
+
+--- configure.orig	2010-08-25 16:31:47.000000000 +0000
++++ configure
+@@ -7836,7 +7836,7 @@ fi
+ 
+         old_LIBS="$LIBS"
+         LIBS="$LIBS $MUTTLIBS"
+-        for ac_func in start_color typeahead bkgdset curs_set meta use_default_colors resizeterm
++        for ac_func in start_color typeahead bkgdset curs_set meta use_default_colors resizeterm mvchgat mvwchgat
+ do
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_func declaration" >&5
+@@ -8856,7 +8856,7 @@ fi
+ 
+ if test x$mutt_cv_setgid = xyes; then
+         DOTLOCK_GROUP='mail'
+-        DOTLOCK_PERMISSION=2755
++        DOTLOCK_PERMISSION=2555
+ else
+         DOTLOCK_GROUP=''
+         DOTLOCK_PERMISSION=755
diff --git a/mutt/patches/patch-am b/mutt/patches/patch-am
new file mode 100644
index 0000000..597eff5
--- /dev/null
+++ b/mutt/patches/patch-am
@@ -0,0 +1,14 @@
+$NetBSD: patch-am,v 1.2 2015/09/03 14:49:02 wiz Exp $
+
+Add change_folder_next option.
+
+--- mutt.h.orig	2007-08-29 02:44:16.000000000 +0900
++++ mutt.h	2007-12-06 17:36:02.000000000 +0900
+@@ -339,6 +339,7 @@
+   OPTBEEPNEW,
+   OPTBOUNCEDELIVERED,
+   OPTBRAILLEFRIENDLY,
++  OPTCHANGEFOLDERNEXT,
+   OPTCHECKMBOXSIZE,
+   OPTCHECKNEW,
+   OPTCOLLAPSEUNREAD,
diff --git a/mutt/patches/patch-an b/mutt/patches/patch-an
new file mode 100644
index 0000000..9054da2
--- /dev/null
+++ b/mutt/patches/patch-an
@@ -0,0 +1,18 @@
+$NetBSD: patch-an,v 1.1 2015/09/03 14:49:02 wiz Exp $
+
+--- init.h.orig	2010-09-15 15:39:31.000000000 +0000
++++ init.h
+@@ -355,6 +355,13 @@ struct option_t MuttVars[] = {
+   ** \fBNote:\fP It should only be set in case Mutt isn't able to determine the
+   ** character set used correctly.
+   */
++  { "change_folder_next", DT_BOOL, R_NONE, OPTCHANGEFOLDERNEXT, 0 },
++  /*
++  ** .pp
++  ** When this variable is set, the change-folder command will start at the
++  ** next folder after the current folder in your mailbox list instead of
++  ** starting at the first folder.
++  */
+   { "check_mbox_size",	DT_BOOL, R_NONE, OPTCHECKMBOXSIZE, 0 },
+   /*
+   ** .pp
diff --git a/mutt/patches/patch-ao b/mutt/patches/patch-ao
new file mode 100644
index 0000000..773be15
--- /dev/null
+++ b/mutt/patches/patch-ao
@@ -0,0 +1,18 @@
+$NetBSD: patch-ao,v 1.1 2015/09/03 14:49:02 wiz Exp $
+
+Add change_folder_next option.
+
+--- curs_main.c.orig	2007-12-06 17:32:01.000000000 +0900
++++ curs_main.c	2007-12-06 17:34:20.000000000 +0900
+@@ -1080,6 +1080,11 @@
+ 	}
+ 	else
+ 	{
++	  if (option (OPTCHANGEFOLDERNEXT) && Context && Context->path)
++	  {
++	    strfcpy (buf, Context->path, sizeof (buf));
++	    mutt_pretty_mailbox (buf, sizeof (buf));
++	  }
+ 	  mutt_buffy (buf, sizeof (buf));
+ 
+ 	  if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1)
diff --git a/mutt/patches/patch-ap b/mutt/patches/patch-ap
new file mode 100644
index 0000000..46630cc
--- /dev/null
+++ b/mutt/patches/patch-ap
@@ -0,0 +1,36 @@
+$NetBSD: patch-ap,v 1.1 2015/09/03 14:49:02 wiz Exp $
+
+--- doc/Muttrc.orig	2009-01-06 01:36:17.000000000 +0100
++++ doc/Muttrc
+@@ -23,7 +23,7 @@ macro index,pager,attach,compose \cb "\
+ "call urlview to extract URLs out of a message"
+ 
+ # Show documentation when pressing F1
+-macro generic,pager <F1> "<shell-escape> less /usr/local/share/doc/mutt/manual.txt<Enter>" "show Mutt documentation"
++macro generic,pager <F1> "<shell-escape> less @DOCDIR@/manual.txt<Enter>" "show Mutt documentation"
+ 
+ # show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
+ macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
+@@ -750,11 +750,11 @@ attachments   -I message/external-body
+ # filtered message is read from the standard output.
+ # 
+ # 
+-# set dotlock_program="/usr/local/bin/mutt_dotlock"
++# set dotlock_program="@PREFIX@/bin/mutt_dotlock"
+ #
+ # Name: dotlock_program
+ # Type: path
+-# Default: "/usr/local/bin/mutt_dotlock"
++# Default: "@PREFIX@/bin/mutt_dotlock"
+ # 
+ # 
+ # Contains the path of the mutt_dotlock(8) binary to be used by
+@@ -4472,7 +4472,7 @@ attachments   -I message/external-body
+ # Setting this variable will cause mutt to open a pipe to a command
+ # instead of a raw socket. You may be able to use this to set up
+ # preauthenticated connections to your IMAP/POP3/SMTP server. Example:
+-# set tunnel="ssh -q mailhost.net /usr/local/libexec/imapd"
++# set tunnel="ssh -q mailhost.net @PREFIX@/libexec/imapd"
+ # 
+ # Note: For this example to work you must be able to log in to the remote
+ # machine without having to enter a password.
diff --git a/mutt/patches/patch-aq b/mutt/patches/patch-aq
new file mode 100644
index 0000000..b4e2234
--- /dev/null
+++ b/mutt/patches/patch-aq
@@ -0,0 +1,32 @@
+$NetBSD: patch-aq,v 1.1 2015/09/03 14:49:02 wiz Exp $
+
+--- mvchgat.c.orig	2011-07-05 08:47:10.596708000 +0000
++++ mvchgat.c
+@@ -0,0 +1,27 @@
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#include "mutt.h"
++#include "mutt_curses.h"
++
++#ifndef USE_SLANG_CURSES
++#ifndef HAVE_MVWCHGAT
++int
++mvwchgat(WINDOW *win, int y, int x, int count, attr_t attr, short color,
++	const void *opts)
++{
++	wmove(win, y, x);
++	return wattr_set(win, attr, color, opts);
++}
++#endif
++
++#ifndef HAVE_MVCHGAT
++int
++mvchgat(int y, int x, int count, attr_t attr, short color,
++	const void *opts)
++{
++	return mvwchgat(stdscr, y, x, count, attr, color, opts);
++}
++#endif
++#endif
diff --git a/mutt/patches/patch-crypt.c b/mutt/patches/patch-crypt.c
new file mode 100644
index 0000000..45bb61a
--- /dev/null
+++ b/mutt/patches/patch-crypt.c
@@ -0,0 +1,124 @@
+$NetBSD: patch-crypt.c,v 1.1 2016/02/22 12:13:26 wiz Exp $
+
+# HG changeset patch
+# User Kevin McCarthy <kevin%8t8.us@localhost>
+# Date 1449022827 28800
+#      Tue Dec 01 18:20:27 2015 -0800
+# Node ID 5e5aff1782dc62044197c2230d346bd492706fbf
+# Parent  428a92464d5bccccda818bed598610db212fcf7c
+Loosen mutt_signed_handler() protocol value consistency check.  (closes #3639)
+
+Apparently, for S/MIME, some MUAs mismatch the protocol value of
+the multipart/signed and the content-type of the signature: putting
+"pkcs7-signature" in one and "x-pkcs7-signature" in the other.
+
+Change mutt_signed_handler() to independently verify the values of the
+protocol and the content-type.  This still checks for correct values but
+doesn't ensure they match between the two (for S/MIME).
+
+--- crypt.c.orig	2013-02-06 13:22:15.000000000 +0000
++++ crypt.c
+@@ -772,9 +772,8 @@ static void crypt_fetch_signatures (BODY
+ int mutt_signed_handler (BODY *a, STATE *s)
+ {
+   char tempfile[_POSIX_PATH_MAX];
+-  char *protocol;
+-  int protocol_major = TYPEOTHER;
+-  char *protocol_minor = NULL;
++  int signed_type;
++  int inconsistent = 0;
+   
+   BODY *b = a;
+   BODY **signatures = NULL;
+@@ -786,29 +785,44 @@ int mutt_signed_handler (BODY *a, STATE 
+   if (!WithCrypto)
+     return -1;
+ 
+-  protocol = mutt_get_parameter ("protocol", a->parameter);
+   a = a->parts;
+-
+-  /* extract the protocol information */
+-  
+-  if (protocol)
++  signed_type = mutt_is_multipart_signed (b);
++  if (!signed_type)
+   {
+-    char major[STRING];
+-    char *t;
+-
+-    if ((protocol_minor = strchr (protocol, '/'))) protocol_minor++;
+-    
+-    strfcpy (major, protocol, sizeof(major));
+-    if((t = strchr(major, '/')))
+-      *t = '\0';
+-    
+-    protocol_major = mutt_check_mime_type (major);
++    /* A null protocol value is already checked for in mutt_body_handler() */
++    state_printf (s, _("[-- Error: "
++                       "Unknown multipart/signed protocol %s! --]\n\n"),
++                  mutt_get_parameter ("protocol", b->parameter));
++    return mutt_body_handler (a, s);
+   }
+ 
+-  /* consistency check */
+-
+-  if (!(a && a->next && a->next->type == protocol_major && 
+-      !mutt_strcasecmp (a->next->subtype, protocol_minor)))
++  if (!(a && a->next))
++    inconsistent = 1;
++  else
++  {
++    switch (signed_type)
++    {
++      case SIGN:
++        if (a->next->type != TYPEMULTIPART ||
++            ascii_strcasecmp (a->next->subtype, "mixed"))
++          inconsistent = 1;
++        break;
++      case PGPSIGN:
++        if (a->next->type != TYPEAPPLICATION ||
++            ascii_strcasecmp (a->next->subtype, "pgp-signature"))
++          inconsistent = 1;
++        break;
++      case SMIMESIGN:
++        if (a->next->type != TYPEAPPLICATION ||
++            (ascii_strcasecmp (a->next->subtype, "x-pkcs7-signature") &&
++             ascii_strcasecmp (a->next->subtype, "pkcs7-signature")))
++          inconsistent = 1;
++        break;
++      default:
++        inconsistent = 1;
++    }
++  }
++  if (inconsistent)
+   {
+     state_attach_puts (_("[-- Error: "
+                          "Inconsistent multipart/signed structure! --]\n\n"),
+@@ -816,27 +830,6 @@ int mutt_signed_handler (BODY *a, STATE 
+     return mutt_body_handler (a, s);
+   }
+ 
+-  
+-  if ((WithCrypto & APPLICATION_PGP)
+-      && protocol_major == TYPEAPPLICATION
+-      && !ascii_strcasecmp (protocol_minor, "pgp-signature"))
+-    ;
+-  else if ((WithCrypto & APPLICATION_SMIME)
+-           && protocol_major == TYPEAPPLICATION
+-	   && !(ascii_strcasecmp (protocol_minor, "x-pkcs7-signature")
+-	       && ascii_strcasecmp (protocol_minor, "pkcs7-signature")))
+-    ;
+-  else if (protocol_major == TYPEMULTIPART
+-	   && !ascii_strcasecmp (protocol_minor, "mixed"))
+-    ;
+-  else
+-  {
+-    state_printf (s, _("[-- Error: "
+-                       "Unknown multipart/signed protocol %s! --]\n\n"),
+-                  protocol);
+-    return mutt_body_handler (a, s);
+-  }
+-  
+   if (s->flags & M_DISPLAY)
+   {
+     


Home | Main Index | Thread Index | Old Index