From 3f28cac4794ae263398100ecd5aab12cb82615ec Mon Sep 17 00:00:00 2001
From: "Fernando J. Pereda" <ferdy@gentoo.org>
Date: Fri, 13 Apr 2007 11:32:29 +0000
Subject: New patchset to fix bug #174403. Remove -r1 since it contains a buggy
 compressed patch. Package-Manager: portage-2.1.2.2

---
 mail-client/mutt/ChangeLog                   |   9 +-
 mail-client/mutt/Manifest                    |  30 ++---
 mail-client/mutt/files/digest-mutt-1.5.15-r1 |   6 -
 mail-client/mutt/files/digest-mutt-1.5.15-r2 |   6 +
 mail-client/mutt/mutt-1.5.15-r1.ebuild       | 174 ---------------------------
 mail-client/mutt/mutt-1.5.15-r2.ebuild       | 172 ++++++++++++++++++++++++++
 6 files changed, 201 insertions(+), 196 deletions(-)
 delete mode 100644 mail-client/mutt/files/digest-mutt-1.5.15-r1
 create mode 100644 mail-client/mutt/files/digest-mutt-1.5.15-r2
 delete mode 100644 mail-client/mutt/mutt-1.5.15-r1.ebuild
 create mode 100644 mail-client/mutt/mutt-1.5.15-r2.ebuild

(limited to 'mail-client')

diff --git a/mail-client/mutt/ChangeLog b/mail-client/mutt/ChangeLog
index ba71728a8614..37a3bb631a20 100644
--- a/mail-client/mutt/ChangeLog
+++ b/mail-client/mutt/ChangeLog
@@ -1,6 +1,13 @@
 # ChangeLog for mail-client/mutt
 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-client/mutt/ChangeLog,v 1.106 2007/04/12 21:41:16 ferdy Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-client/mutt/ChangeLog,v 1.107 2007/04/13 11:32:29 ferdy Exp $
+
+*mutt-1.5.15-r2 (13 Apr 2007)
+
+  13 Apr 2007; Fernando J. Pereda <ferdy@gentoo.org> -mutt-1.5.15-r1.ebuild,
+  +mutt-1.5.15-r2.ebuild:
+  New patchset to fix bug #174403. Remove -r1 since it contains a buggy
+  compressed patch.
 
   12 Apr 2007; Fernando J. Pereda <ferdy@gentoo.org> mutt-1.5.15-r1.ebuild:
   Remove some deprecated options and use flags, thanks to exg.
diff --git a/mail-client/mutt/Manifest b/mail-client/mutt/Manifest
index e94a330e2e56..fadadfc5ea43 100644
--- a/mail-client/mutt/Manifest
+++ b/mail-client/mutt/Manifest
@@ -48,7 +48,7 @@ DIST mutt-1.5.13-gentoo-patches.tar.bz2 53418 RMD160 67274bef651c1c78d1e6878d8bb
 DIST mutt-1.5.13.tar.gz 3442681 RMD160 9327b7f928aad78a20c2395629113ac2519bb945 SHA1 6d5b88d33e1727bf0342c31f06d55d7a3d2d4e0a SHA256 e0481690c0caf23b5c88359b2dbac70308f8f138663e8fee482b163562fe8da9
 DIST mutt-1.5.14-gentoo-patches.tar.bz2 53898 RMD160 584cdf88e3fd0fea0a672ef5373bee0b95b0623f SHA1 6308bd600ac21ab19f1a5a0f1a624333a94cc6e0 SHA256 e71f0a6c2c62bca41280e64b2b4687ab9c468e4151d3ba3082125710a487a2f9
 DIST mutt-1.5.14.tar.gz 3441678 RMD160 ed4eeaf75d37757ed5b370e9763b6f8524df5ca7 SHA1 7be098c13302fab8a954095d17a9a64e1e1519c1 SHA256 9dbee28bd48a0f1779ba3b00f98dda74a3f629e8109f1842616d48b85013946a
-DIST mutt-1.5.15-gentoo-patches-r1.tar.bz2 75096 RMD160 1e70e5cb99ec609bd67a4578ad0d084cbe0d8e56 SHA1 9cb7b827fecbf59d9800d6df62de05a1a6b03984 SHA256 76eddfd760f4db2e9bdc48c0d66317daf7bdc13971e7175ed31400223cfa7eab
+DIST mutt-1.5.15-gentoo-patches-r2.tar.bz2 65582 RMD160 c370adb2aaa1ddbfb6fba0b7bb3318e9abeed625 SHA1 2ef0e193d963d52395df6d89281df7c3ec36c8bc SHA256 7b16fb3db479d4d112db3f383e28b4680fd3c435e074b11dee640676039d8987
 DIST mutt-1.5.15.tar.gz 3517899 RMD160 0cc084d2fcdabc0bc41632fcff90703c206de3db SHA1 1adabf6e07e099bb664c83e3c0100bbbdfec7a9a SHA256 03fa1f45d4743cd395b634d19aebbc2c1918cf6b683e0af51076ccc79f643a9a
 DIST mutt-1.5.4-imap-fcc-status.patch 380 RMD160 cbeac806b610bcd945bf3b52120a8aa2aba27df3 SHA1 6567f4c9fac3ca52f13c23aed2e3aa017b49e25f SHA256 22cb4e1625ae2d22f94e8d815cb3515db75801f8a4cb9e4f047c4fb4ded8757c
 DIST mutt-1.5.7-mixmaster+nntp.patch 310 RMD160 38e42b700d1badb3d39550ada6eb08cb122480a0 SHA1 996f1f922d8150ce9b70b484877fe22ec8d463dd SHA256 e035b746f391aaba51b2e0917ecf4c60db7c81546a9b54f06881cf75410575da
@@ -82,14 +82,14 @@ EBUILD mutt-1.5.14.ebuild 4477 RMD160 854063ac3471204336557b95f2f0b84db782e1a7 S
 MD5 6886b5dc7a2af8f34dae30df116faf2e mutt-1.5.14.ebuild 4477
 RMD160 854063ac3471204336557b95f2f0b84db782e1a7 mutt-1.5.14.ebuild 4477
 SHA256 cc27d01f1d3d727b37c9b9dad92fff1afd9600301238d195cbcb69d47244bb29 mutt-1.5.14.ebuild 4477
-EBUILD mutt-1.5.15-r1.ebuild 4625 RMD160 d8befb9b5d33902b2f866674179ef70740c924b0 SHA1 6ad7ab6400db8a34883d725673659af3e714da2b SHA256 80d9a1251e871c47aa0827e66e9e9a750d156fac34941c2689c178e1243ee791
-MD5 e3b27695b78227cded7e1d9c857425ca mutt-1.5.15-r1.ebuild 4625
-RMD160 d8befb9b5d33902b2f866674179ef70740c924b0 mutt-1.5.15-r1.ebuild 4625
-SHA256 80d9a1251e871c47aa0827e66e9e9a750d156fac34941c2689c178e1243ee791 mutt-1.5.15-r1.ebuild 4625
-MISC ChangeLog 25458 RMD160 20d23cc1aee9c76fac64cdbdb84dd0697b8645ff SHA1 91f4c36271ac882db71aed2c8afb8a6cec81ab4d SHA256 a53fae351f2a3e20059a78b8a884ba1b7343cbed235925a53dcf75b4cc0ad491
-MD5 702e641c1f16dd0482aba94ddcafba63 ChangeLog 25458
-RMD160 20d23cc1aee9c76fac64cdbdb84dd0697b8645ff ChangeLog 25458
-SHA256 a53fae351f2a3e20059a78b8a884ba1b7343cbed235925a53dcf75b4cc0ad491 ChangeLog 25458
+EBUILD mutt-1.5.15-r2.ebuild 4528 RMD160 2359d39b6d5758d977b1cbfce4c320dc0abb0ed7 SHA1 9a34328905989c05c7ebc5892c0e8151433897b0 SHA256 37c613bcdc54cef3d93b013c6cb792deb2be3ca2de85765a937323bae5041264
+MD5 1eb11e8a227f9913a0d2e7ebc3fa8c31 mutt-1.5.15-r2.ebuild 4528
+RMD160 2359d39b6d5758d977b1cbfce4c320dc0abb0ed7 mutt-1.5.15-r2.ebuild 4528
+SHA256 37c613bcdc54cef3d93b013c6cb792deb2be3ca2de85765a937323bae5041264 mutt-1.5.15-r2.ebuild 4528
+MISC ChangeLog 25685 RMD160 d45591f52fdd1001b1ef658989e77d2b8e3cfe7f SHA1 56a81242c97ec6a394fcb353a0a162755a925a11 SHA256 20887d766e6e64f8679f3c35375faadbced3d1b16794168e1b22ca6a59501021
+MD5 f54b279b57c9c619fab693188c36a40d ChangeLog 25685
+RMD160 d45591f52fdd1001b1ef658989e77d2b8e3cfe7f ChangeLog 25685
+SHA256 20887d766e6e64f8679f3c35375faadbced3d1b16794168e1b22ca6a59501021 ChangeLog 25685
 MISC metadata.xml 344 RMD160 6fb7283d0c812896b18cf91969a744fe9f34f57a SHA1 6a2f5f2822e49aadad2f8b16b8a565f627cc697f SHA256 9241b10ef441b7a14e730c2feff17fa387c48291caa52e788acca2befc4ad480
 MD5 cb5fc428c975ffb2fc20fc8c577cca9a metadata.xml 344
 RMD160 6fb7283d0c812896b18cf91969a744fe9f34f57a metadata.xml 344
@@ -112,13 +112,13 @@ SHA256 e79af34a5a8d834a2f5556020b501596f7bdc9a82eaf73896e2e60ebac2a029a files/di
 MD5 98ed952eb41aad4b8304e129ef1ac02e files/digest-mutt-1.5.14 518
 RMD160 c53753fa9da1428429f7a1c98d9a9346da362272 files/digest-mutt-1.5.14 518
 SHA256 0befea25b5cd922f96a15398408503be2d2e7935197a6d53270dd4ac42d19fb4 files/digest-mutt-1.5.14 518
-MD5 12c96c3f4afe4c2c4b030374148c1975 files/digest-mutt-1.5.15-r1 527
-RMD160 e7e4744dcd72e71eafb8f65371b9c66095d3b371 files/digest-mutt-1.5.15-r1 527
-SHA256 4fb1da114e5f44603003b8d643dc5e45138ab8e1f45e6de39271096b13feb56e files/digest-mutt-1.5.15-r1 527
+MD5 a9943e60846230db9db4f81110ae3844 files/digest-mutt-1.5.15-r2 527
+RMD160 dd722d68bd3f536a52488918f8256828887e8921 files/digest-mutt-1.5.15-r2 527
+SHA256 dc27ec1f685f76f03b11ef2dfdc78868893a9be351276d98b87efa32d90a0c44 files/digest-mutt-1.5.15-r2 527
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2.2 (GNU/Linux)
 
-iD8DBQFGHqeIViELBEf1JB0RAjveAJ9bbTMitIRbwFVyeaUJnSGf9ayURQCfUTLw
-mR4aJOSLL+osq9hNkOiW28g=
-=1Yvs
+iD8DBQFGH2pdViELBEf1JB0RAkTIAJ9LcLtTpfGPE/bSKXtZrgfGEqjxBACfZkF2
+g0D9kSrPyayNcyHOjYXtShY=
+=6GVK
 -----END PGP SIGNATURE-----
diff --git a/mail-client/mutt/files/digest-mutt-1.5.15-r1 b/mail-client/mutt/files/digest-mutt-1.5.15-r1
deleted file mode 100644
index b41ec091ebed..000000000000
--- a/mail-client/mutt/files/digest-mutt-1.5.15-r1
+++ /dev/null
@@ -1,6 +0,0 @@
-MD5 af56827dcd36aa8454aec7a0214e47c4 mutt-1.5.15-gentoo-patches-r1.tar.bz2 75096
-RMD160 1e70e5cb99ec609bd67a4578ad0d084cbe0d8e56 mutt-1.5.15-gentoo-patches-r1.tar.bz2 75096
-SHA256 76eddfd760f4db2e9bdc48c0d66317daf7bdc13971e7175ed31400223cfa7eab mutt-1.5.15-gentoo-patches-r1.tar.bz2 75096
-MD5 b2c1eb45fd958f6589ee52a98f2a3ce1 mutt-1.5.15.tar.gz 3517899
-RMD160 0cc084d2fcdabc0bc41632fcff90703c206de3db mutt-1.5.15.tar.gz 3517899
-SHA256 03fa1f45d4743cd395b634d19aebbc2c1918cf6b683e0af51076ccc79f643a9a mutt-1.5.15.tar.gz 3517899
diff --git a/mail-client/mutt/files/digest-mutt-1.5.15-r2 b/mail-client/mutt/files/digest-mutt-1.5.15-r2
new file mode 100644
index 000000000000..04987edc05d6
--- /dev/null
+++ b/mail-client/mutt/files/digest-mutt-1.5.15-r2
@@ -0,0 +1,6 @@
+MD5 22865adfcd65a74b507ac6afa0e4bf1c mutt-1.5.15-gentoo-patches-r2.tar.bz2 65582
+RMD160 c370adb2aaa1ddbfb6fba0b7bb3318e9abeed625 mutt-1.5.15-gentoo-patches-r2.tar.bz2 65582
+SHA256 7b16fb3db479d4d112db3f383e28b4680fd3c435e074b11dee640676039d8987 mutt-1.5.15-gentoo-patches-r2.tar.bz2 65582
+MD5 b2c1eb45fd958f6589ee52a98f2a3ce1 mutt-1.5.15.tar.gz 3517899
+RMD160 0cc084d2fcdabc0bc41632fcff90703c206de3db mutt-1.5.15.tar.gz 3517899
+SHA256 03fa1f45d4743cd395b634d19aebbc2c1918cf6b683e0af51076ccc79f643a9a mutt-1.5.15.tar.gz 3517899
diff --git a/mail-client/mutt/mutt-1.5.15-r1.ebuild b/mail-client/mutt/mutt-1.5.15-r1.ebuild
deleted file mode 100644
index 67e6848d9bee..000000000000
--- a/mail-client/mutt/mutt-1.5.15-r1.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-client/mutt/mutt-1.5.15-r1.ebuild,v 1.2 2007/04/12 21:41:16 ferdy Exp $
-
-inherit eutils flag-o-matic autotools
-
-PATCHSET_REV="-r1"
-
-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? (
-		mirror://gentoo/${P}-gentoo-patches${PATCHSET_REV}.tar.bz2
-	)"
-IUSE="berkdb crypt debug gdbm gnutls gpgme idn imap mbox nls nntp pop qdbm sasl
-smime smtp ssl vanilla"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-RDEPEND=">=sys-libs/ncurses-5.2
-	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 )
-	gpgme?   ( >=app-crypt/gpgme-0.9.0 )
-	smime?   ( >=dev-libs/openssl-0.9.6 )
-	app-misc/mime-types"
-DEPEND="${RDEPEND}
-	net-mail/mailbase
-	!vanilla? (
-		dev-libs/libxml2
-		dev-libs/libxslt
-		app-text/docbook-xsl-stylesheets
-		|| ( www-client/lynx www-client/w3m )
-	)"
-
-PATCHDIR="${WORKDIR}"/${P}-gentoo-patches${PATCHSET_REV}
-
-src_unpack() {
-	unpack ${A} && cd "${S}" || die "unpack failed"
-
-	if ! use vanilla ; then
-		epatch "${FILESDIR}"/${P}-parallel-make.patch
-
-		if ! use nntp ; then
-			rm "${PATCHDIR}"/07-nntp.patch
-		fi
-
-		for p in "${PATCHDIR}"/*.patch ; do
-			epatch "${p}"
-		done
-
-		AT_M4DIR="m4" eautoreconf
-	fi
-}
-
-src_compile() {
-	declare myconf="
-		$(use_enable nls) \
-		$(use_enable 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=/etc/${PN} \
-		--with-docdir=/usr/share/doc/${PN}-${PVR} \
-		--with-regex \
-		--disable-fcntl --enable-flock \
-		--enable-nfs-fix --enable-external-dotlock \
-		--with-mixmaster"
-
-	# See Bug #22787
-	unset WANT_AUTOCONF_2_5 WANT_AUTOCONF
-
-	# mutt prioritizes gdbm over bdb, so we will too.
-	# hcache feature requires at least one database is in USE.
-	if use qdbm; then
-		myconf="${myconf} --enable-hcache \
-		--with-qdbm --without-gdbm --without-bdb"
-	elif use gdbm ; then
-		myconf="${myconf} --enable-hcache \
-			--without-qdbm --with-gdbm --without-bdb"
-	elif use berkdb; then
-		myconf="${myconf} --enable-hcache \
-			--without-gdbm --without-qdbm --with-bdb"
-	else
-		myconf="${myconf} --disable-hcache \
-			--without-qdbm --without-gdbm --without-bdb"
-	fi
-
-	# there's no need for gnutls, ssl or sasl without either pop or imap.
-	# in fact mutt's configure will bail if you do:
-	#   --without-pop --without-imap --with-ssl
-	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
-
-	# See Bug #11170
-	case ${ARCH} in
-		alpha|ppc) replace-flags "-O[3-9]" "-O2" ;;
-	esac
-
-	if use mbox; then
-		myconf="${myconf} --with-mailpath=/var/spool/mail"
-	else
-		myconf="${myconf} --with-homespool=Maildir"
-	fi
-
-	if ! use vanilla; then
-		# rr.compressed patch
-		myconf="${myconf} --enable-compressed"
-
-		# nntp patch
-		myconf="${myconf} $(use_enable nntp)"
-	fi
-
-	econf ${myconf} || die "configure failed"
-	emake || die "make failed"
-}
-
-src_install() {
-	make DESTDIR="${D}" install || die "install failed"
-	find ${D}/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 "${D}"/etc/${PN}/mime.types
-	dosym /etc/mime.types /etc/${PN}/mime.types
-
-	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://www.gentoo.org/doc/en/guide-to-mutt.xml"
-	echo
-}
diff --git a/mail-client/mutt/mutt-1.5.15-r2.ebuild b/mail-client/mutt/mutt-1.5.15-r2.ebuild
new file mode 100644
index 000000000000..bd4908793951
--- /dev/null
+++ b/mail-client/mutt/mutt-1.5.15-r2.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-client/mutt/mutt-1.5.15-r2.ebuild,v 1.1 2007/04/13 11:32:29 ferdy Exp $
+
+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
+	!vanilla? (
+		mirror://gentoo/${P}-gentoo-patches${PATCHSET_REV}.tar.bz2
+	)"
+IUSE="berkdb crypt debug gdbm gnutls gpgme idn imap mbox nls nntp pop qdbm sasl
+smime smtp ssl vanilla"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+RDEPEND=">=sys-libs/ncurses-5.2
+	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 )
+	gpgme?   ( >=app-crypt/gpgme-0.9.0 )
+	smime?   ( >=dev-libs/openssl-0.9.6 )
+	app-misc/mime-types"
+DEPEND="${RDEPEND}
+	net-mail/mailbase
+	!vanilla? (
+		dev-libs/libxml2
+		dev-libs/libxslt
+		app-text/docbook-xsl-stylesheets
+		|| ( www-client/lynx www-client/w3m )
+	)"
+
+PATCHDIR="${WORKDIR}"/${P}-gentoo-patches${PATCHSET_REV}
+
+src_unpack() {
+	unpack ${A} && cd "${S}" || die "unpack failed"
+
+	if ! use vanilla ; then
+		epatch "${FILESDIR}"/${P}-parallel-make.patch
+
+		if ! use nntp ; then
+			rm "${PATCHDIR}"/07-nntp.patch
+		fi
+
+		for p in "${PATCHDIR}"/*.patch ; do
+			epatch "${p}"
+		done
+
+		AT_M4DIR="m4" eautoreconf
+	fi
+}
+
+src_compile() {
+	declare myconf="
+		$(use_enable nls) \
+		$(use_enable 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=/etc/${PN} \
+		--with-docdir=/usr/share/doc/${PN}-${PVR} \
+		--with-regex \
+		--disable-fcntl --enable-flock \
+		--enable-nfs-fix --enable-external-dotlock \
+		--with-mixmaster"
+
+	# See Bug #22787
+	unset WANT_AUTOCONF_2_5 WANT_AUTOCONF
+
+	# mutt prioritizes gdbm over bdb, so we will too.
+	# hcache feature requires at least one database is in USE.
+	if use qdbm; then
+		myconf="${myconf} --enable-hcache \
+		--with-qdbm --without-gdbm --without-bdb"
+	elif use gdbm ; then
+		myconf="${myconf} --enable-hcache \
+			--without-qdbm --with-gdbm --without-bdb"
+	elif use berkdb; then
+		myconf="${myconf} --enable-hcache \
+			--without-gdbm --without-qdbm --with-bdb"
+	else
+		myconf="${myconf} --disable-hcache \
+			--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
+
+	# See Bug #11170
+	case ${ARCH} in
+		alpha|ppc) replace-flags "-O[3-9]" "-O2" ;;
+	esac
+
+	if use mbox; then
+		myconf="${myconf} --with-mailpath=/var/spool/mail"
+	else
+		myconf="${myconf} --with-homespool=Maildir"
+	fi
+
+	if ! use vanilla; then
+		# rr.compressed patch
+		myconf="${myconf} --enable-compressed"
+
+		# nntp patch
+		myconf="${myconf} $(use_enable nntp)"
+	fi
+
+	econf ${myconf} || die "configure failed"
+	emake || die "make failed"
+}
+
+src_install() {
+	make DESTDIR="${D}" install || die "install failed"
+	find "${D}"/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 "${D}"/etc/${PN}/mime.types
+	dosym /etc/mime.types /etc/${PN}/mime.types
+
+	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://www.gentoo.org/doc/en/guide-to-mutt.xml"
+	echo
+}
-- 
cgit v1.2.3-65-gdbad