summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kuhn <wuodan@hispeed.ch>2012-07-31 19:24:24 +0200
committerStefan Kuhn <wuodan@hispeed.ch>2012-07-31 19:24:24 +0200
commit1c4f7726221b04335b42464e6ba5ae40e091a3ee (patch)
treef64964d5da441a2af5b4441376e14caa8525a8f2
parentdeleted sys-apps/seabios because bug #415665 is RESOLVED WONTFIX (diff)
downloadwuodan-1c4f7726221b04335b42464e6ba5ae40e091a3ee.tar.gz
wuodan-1c4f7726221b04335b42464e6ba5ae40e091a3ee.tar.bz2
wuodan-1c4f7726221b04335b42464e6ba5ae40e091a3ee.zip
mail-client/mutt-kz update after IRC discussions/fixes
-rw-r--r--mail-client/mutt-kz/Manifest10
-rw-r--r--mail-client/mutt-kz/files/Muttrc9
-rw-r--r--mail-client/mutt-kz/files/mutt-kz-0_pre20120627-progress-bar.patch123
-rw-r--r--mail-client/mutt-kz/files/mutt-kz-0_pre20120627-severe-warnings.patch16
-rw-r--r--mail-client/mutt-kz/metadata.xml1
-rw-r--r--mail-client/mutt-kz/mutt-kz-0_pre20120627.ebuild244
-rw-r--r--mail-client/mutt-kz/mutt-kz-9999.ebuild263
7 files changed, 398 insertions, 268 deletions
diff --git a/mail-client/mutt-kz/Manifest b/mail-client/mutt-kz/Manifest
index b1a8d09..033d735 100644
--- a/mail-client/mutt-kz/Manifest
+++ b/mail-client/mutt-kz/Manifest
@@ -1,5 +1,7 @@
-AUX Muttrc 667 RMD160 0405e73c6a4122869ce9a9bd408068d316740b71 SHA1 e30c96e6f21a30fe576abcb3be65a34accf4e11f SHA256 932940db69c951caaa87a17ee98a8e2262aeadf1e978f6d671b642184c5d545f
+AUX Muttrc 948 RMD160 22a77982581ff2823a880cfc9364085682e959f9 SHA1 fd94c7a2621c98bb79a4f5f87c6f733b9426c6a8 SHA256 1b4b6b99421e9b72498899520080a0557a42c05701e31b22cb0adb2a86112581
AUX Muttrc.mbox 486 RMD160 0f692c9d3a7591f3a0611529616aa94a5c62a641 SHA1 9e231303fe9fb2fe80542115ceefb972c7b11d5a SHA256 10b251f88ccc5d4c95c96ab17b6ab6a30a16d6590ab896a60037f869fc4d44a0
-DIST mutt-1.5.21-gentoo-patches-r13.tar.bz2 88784 RMD160 a38a1021bb73bf88e6111f4ba5358c3da49b3797 SHA1 b54f429889e8373ea769a4ba984d3b371f669e39 SHA256 ecd3749e0238b80bb6b667a5a0ea891f8192872555592d5048e6bca76541d02b
-EBUILD mutt-kz-9999.ebuild 8185 RMD160 60c4de12386b8d9bde4e9ab74a0a2560502fa01d SHA1 6215396c8218738a57594d427746250528dc8c8b SHA256 d6ca5685ddc16673705ed84325340ca7240b60f225fb5f949cb73a5b34cf6fe5
-MISC metadata.xml 729 RMD160 649554cfa97d6e030d8f5e694c09c8c8bc6f53d7 SHA1 3e89088aaf84669b5f7bd1bfc606feded282ee9a SHA256 0e919d977db5e233800e917b7242f3148d86999424f3d605eb7900014e2137e3
+AUX mutt-kz-0_pre20120627-progress-bar.patch 3852 RMD160 5d8e359f5e085515dfc88e63e999081b69efdad1 SHA1 da92f25f2296fd1f2c16658bfb3fee4b04a3ed19 SHA256 74bd859c480fb5252a0c529ff99277dc496869681c3b6c07da7748535a131cda
+AUX mutt-kz-0_pre20120627-severe-warnings.patch 456 RMD160 7d9af15839203fe6f1ba471e037fd6380e116084 SHA1 199f91b38d0f5b81e78ae4e58d05d1feca9f2a49 SHA256 9a54400f28c3584e561e43d92c674f45d74e6c8b23cd3f6c78a50509d8f27b90
+DIST mutt-kz-0_pre20120627.tar.gz 2274196 RMD160 dd7a549ee25c9a7e4967e4dac1b8841243f306b9 SHA1 6f2f7c39e50830e0a984b06b82fd01cf2ad6aed7 SHA256 79287df66dbf81c5da4d3d99f6ca648f27bab7a66d987f63e75f1fb7538c0c05
+EBUILD mutt-kz-0_pre20120627.ebuild 7146 RMD160 75a95e21433c1da92fe9aa29eaca93cd6344e494 SHA1 ecae2a28f57fef09c0c4f58c67549891ae32f4c9 SHA256 17ad7050e778c063ecf69d3e608efad6d9900ee33f717fab3146f878e7632af2
+MISC metadata.xml 660 RMD160 e327aba2910b65f213d7b2b4453834fb086da19f SHA1 ab2bc7efffa665b506aaf7c7e3cd2205046bebf3 SHA256 e4581f073574ef5dc20122a6b2c0a4879c41cd92d3bf77c0b31d4c067f4c3340
diff --git a/mail-client/mutt-kz/files/Muttrc b/mail-client/mutt-kz/files/Muttrc
index 6f0d63e..6cd595b 100644
--- a/mail-client/mutt-kz/files/Muttrc
+++ b/mail-client/mutt-kz/files/Muttrc
@@ -17,3 +17,12 @@ set move=no
# one for maildir-style folders.
set index_format="%4C %Z %{%b %d} %-16.16L %s"
+
+# set some defaults for the sidebar feature, it's integrated anyway
+set sidebar_width = 35
+set sidebar_visible = yes
+# color sidebar_new yellow default
+bind index <left> sidebar-prev
+bind index <right> sidebar-next
+bind index <space> sidebar-open
+bind index <Esc>S sidebar-toggle
diff --git a/mail-client/mutt-kz/files/mutt-kz-0_pre20120627-progress-bar.patch b/mail-client/mutt-kz/files/mutt-kz-0_pre20120627-progress-bar.patch
new file mode 100644
index 0000000..67629a0
--- /dev/null
+++ b/mail-client/mutt-kz/files/mutt-kz-0_pre20120627-progress-bar.patch
@@ -0,0 +1,123 @@
+Adds the Gentoo specific progress bar that is used in Gentoo's Mutt guide.
+Proposed upstreams in https://github.com/karelzak/mutt-kz/pull/23
+diff --git a/PATCHES b/PATCHES
+index e69de29..785edd0 100644
+--- a/PATCHES
++++ b/PATCHES
+@@ -0,0 +1 @@
++patch-1.5.20hg.pdmef.progress.vl.2
+diff --git a/color.c b/color.c
+index 9a3a552..f7db847 100644
+--- a/color.c
++++ b/color.c
+@@ -96,6 +96,7 @@ static const struct mapping_t Fields[] =
+ { "sidebar_new", MT_COLOR_NEW },
+ { "sidebar_flagged", MT_COLOR_FLAGGED },
+ { "sidebar", MT_COLOR_SIDEBAR },
++ { "progress", MT_COLOR_PROGRESS },
+ { NULL, 0 }
+ };
+
+diff --git a/curs_lib.c b/curs_lib.c
+index e5a0113..c5ee2e6 100644
+--- a/curs_lib.c
++++ b/curs_lib.c
+@@ -390,6 +390,52 @@ void mutt_progress_init (progress_t* progress, const char *msg,
+ mutt_progress_update (progress, 0, 0);
+ }
+
++static void message_bar (int percent, const char *fmt, ...)
++{
++ va_list ap;
++ char buf[STRING], buf2[STRING];
++ int w = percent * COLS / 100;
++ size_t l;
++
++ va_start (ap, fmt);
++ vsnprintf (buf, sizeof (buf), fmt, ap);
++ l = mutt_strwidth (buf);
++ va_end (ap);
++
++ mutt_format_string(buf2, sizeof (buf2),
++ 0, COLS-2, FMT_LEFT, 0, buf, sizeof (buf), 0);
++
++ move (LINES - 1, 0);
++
++ if (l < w)
++ {
++ SETCOLOR(MT_COLOR_PROGRESS);
++ addstr (buf2);
++ w -= l;
++ while (w--)
++ addch(' ');
++ SETCOLOR(MT_COLOR_NORMAL);
++ clrtoeol ();
++ mutt_refresh();
++ }
++ else
++ {
++ size_t bw;
++ char ch;
++ int off = mutt_wstr_trunc (buf2, sizeof (buf2), w, &bw);
++
++ ch = buf2[off];
++ buf2[off] = 0;
++ SETCOLOR(MT_COLOR_PROGRESS);
++ addstr (buf2);
++ buf2[off] = ch;
++ SETCOLOR(MT_COLOR_NORMAL);
++ addstr (&buf2[off]);
++ clrtoeol ();
++ mutt_refresh();
++ }
++}
++
+ void mutt_progress_update (progress_t* progress, long pos, int percent)
+ {
+ char posstr[SHORT_STRING];
+@@ -440,16 +486,16 @@ void mutt_progress_update (progress_t* progress, long pos, int percent)
+
+ if (progress->size > 0)
+ {
+- mutt_message ("%s %s/%s (%d%%)", progress->msg, posstr, progress->sizestr,
+- percent > 0 ? percent :
+- (int) (100.0 * (double) progress->pos / progress->size));
++ message_bar (percent > 0 ? percent : (int) (100.0 * (double) progress->pos / progress->size),
++ "%s %s/%s (%d%%)", progress->msg, posstr, progress->sizestr,
++ percent > 0 ? percent : (int) (100.0 * (double) progress->pos / progress->size));
+ }
+ else
+ {
+ if (percent > 0)
+- mutt_message ("%s %s (%d%%)", progress->msg, posstr, percent);
++ message_bar (percent, "%s %s (%d%%)", progress->msg, posstr, percent);
+ else
+- mutt_message ("%s %s", progress->msg, posstr);
++ mutt_message ("%s %s", progress->msg, posstr);
+ }
+ }
+
+diff --git a/doc/manual.xml.head b/doc/manual.xml.head
+index 0d95886..025af03 100644
+--- a/doc/manual.xml.head
++++ b/doc/manual.xml.head
+@@ -2641,6 +2641,7 @@ specify one or the other).
+ <listitem><para>markers (the <quote>+</quote> markers at the beginning of wrapped lines in the pager)</para></listitem>
+ <listitem><para>message (informational messages)</para></listitem>
+ <listitem><para>normal</para></listitem>
++<listitem><para>progress (visual progress bar)</para></listitem>
+ <listitem><para>quoted (text matching <link linkend="quote-regexp">$quote_regexp</link> in the body of a message)</para></listitem>
+ <listitem><para>quoted1, quoted2, ..., quoted<emphasis>N</emphasis> (higher levels of quoting)</para></listitem>
+ <listitem><para>search (highlighting of words in the pager)</para></listitem>
+diff --git a/mutt_curses.h b/mutt_curses.h
+index cb1acf2..b915fd7 100644
+--- a/mutt_curses.h
++++ b/mutt_curses.h
+@@ -128,6 +128,7 @@ enum
+ MT_COLOR_SIDEBAR,
+ MT_COLOR_UNDERLINE,
+ MT_COLOR_INDEX,
++ MT_COLOR_PROGRESS,
+ MT_COLOR_NEW,
+ MT_COLOR_FLAGGED,
+ MT_COLOR_MAX
diff --git a/mail-client/mutt-kz/files/mutt-kz-0_pre20120627-severe-warnings.patch b/mail-client/mutt-kz/files/mutt-kz-0_pre20120627-severe-warnings.patch
new file mode 100644
index 0000000..cb2a753
--- /dev/null
+++ b/mail-client/mutt-kz/files/mutt-kz-0_pre20120627-severe-warnings.patch
@@ -0,0 +1,16 @@
+Fixes for QA notices about severe warning
+* mh.c:1415:2: warning: implicit declaration of function ‘nm_update_filename’
+see upstream bugs #22/#23 at https://github.com/karelzak/mutt-kz/issues?state=open
+--- mh.c 2012-07-29 16:16:46.076000048 +0200
++++ mh.c 2012-07-29 16:17:32.579999940 +0200
+@@ -54,6 +54,10 @@
+ #include <sys/time.h>
+ #endif
+
++#ifdef USE_NOTMUCH
++#include "mutt_notmuch.h"
++#endif
++
+ #define INS_SORT_THRESHOLD 6
+
+ struct maildir
diff --git a/mail-client/mutt-kz/metadata.xml b/mail-client/mutt-kz/metadata.xml
index 686bcd9..f710742 100644
--- a/mail-client/mutt-kz/metadata.xml
+++ b/mail-client/mutt-kz/metadata.xml
@@ -9,7 +9,6 @@
<flag name="gpg">Enable support for <pkg>app-crypt/gpgme</pkg></flag>
<flag name="notmuch">Enable support for <pkg>net-mail/notmuch</pkg></flag>
<flag name="pop">Enable support for pop</flag>
- <flag name="sidebar">Use the vanilla tree + sidebar patch</flag>
<flag name="smime">Enable support for smime</flag>
<flag name="smtp">Enable support for smtp</flag>
<flag name="tokyocabinet">Enable tokyocabinet database backend for header
diff --git a/mail-client/mutt-kz/mutt-kz-0_pre20120627.ebuild b/mail-client/mutt-kz/mutt-kz-0_pre20120627.ebuild
new file mode 100644
index 0000000..6099330
--- /dev/null
+++ b/mail-client/mutt-kz/mutt-kz-0_pre20120627.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils autotools vcs-snapshot
+
+DESCRIPTION="A fork of mutt, the small but very powerful text-based mail client"
+HOMEPAGE="https://github.com/karelzak/mutt-kz/wiki/"
+GIT_REPO_URI="http://github.com/karelzak/${PN}"
+GIT_COMMIT="12a7ab46c9155d674cf6f249e831983647f4b47c"
+SRC_URI="${GIT_REPO_URI}/tarball/${GIT_COMMIT} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# added IUSE-DEFAULTS for sane default flags with gentoo mutt tutorial
+# activated "+imap +smtp"
+# TODO: implement "prefix" flag like in original mutt. Must test it first.
+# TODO: test mbox flag
+IUSE="berkdb crypt debug doc gdbm gnutls gpg idn +imap notmuch mbox nls pop
+qdbm sasl smime +smtp ssl tokyocabinet"
+
+# prohibit use flag combinations which make no sense
+# vanilla mutt gives some flags preference over others instead of this!
+# mutex for "gnutls ssl"
+REQUIRED_USE="${REQUIRED_USE}
+ gnutls? ( !ssl )
+ ssl? ( !gnutls )"
+# mutex for "berkdb gdbm qdbm tokyocabinet"
+# no mutex for berkdm and gdbm, they are most likely in profile
+# TODO: find out if any of these is even used with notmuch
+REQUIRED_USE="${REQUIRED_USE}
+ qdbm? ( ^^ ( berkdb gdbm qdbm tokyocabinet ) )
+ tokyocabinet? ( ^^ ( berkdb gdbm qdbm tokyocabinet ) )"
+
+# dependencies used several times
+RDEPEND_PROTOCOL="
+ gnutls? ( >=net-libs/gnutls-1.0.17 )
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ sasl? ( >=dev-libs/cyrus-sasl-2 )"
+
+RDEPEND="
+ app-misc/mime-types
+ !mail-client/mutt
+ >=sys-libs/ncurses-5.2
+ gpg? ( >=app-crypt/gpgme-0.9.0 )
+ idn? ( net-dns/libidn )
+ imap? ( ${RDEPEND_PROTOCOL} )
+ pop? ( ${RDEPEND_PROTOCOL} )
+ smime? ( >=dev-libs/openssl-0.9.6 )
+ smtp? ( ${RDEPEND_PROTOCOL} )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ !tokyocabinet? (
+ qdbm? ( dev-db/qdbm )
+ !qdbm? (
+ gdbm? ( sys-libs/gdbm )
+ !gdbm? ( berkdb? ( >=sys-libs/db-4 ) )
+ )
+ )"
+# unsure on mutt flag for net-mail/notmuch
+# unsure on crypt dependency too
+RDEPEND="${RDEPEND}
+ notmuch? (
+ net-mail/notmuch[mutt]
+ crypt? ( net-mail/notmuch[crypt] )
+ )"
+DEPEND="${RDEPEND}
+ net-mail/mailbase
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxml2
+ dev-libs/libxslt
+ || ( www-client/w3m www-client/elinks www-client/lynx )
+ )"
+
+MY_PN="mutt"
+
+src_prepare() {
+ # patch for a QA severe warning
+ # add Gentoo's progress bar, used in the sample .muttrc
+ epatch "${FILESDIR}/${P}"-severe-warnings.patch \
+ "${FILESDIR}/${P}"-progress-bar.patch
+
+ # patch version string for bug reports
+ sed -i -e 's/"Mutt %s (%s)"/"Mutt-KZ %s (%s, Gentoo '"${PVR}"')"/' \
+ muttlib.c || die "failed patching Gentoo version"
+
+ # allow user patches
+ epatch_user
+
+ # 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 "sed failed"
+ fi
+}
+
+src_configure() {
+ local myconf="
+ $(use_enable crypt pgp) \
+ $(use_enable debug) \
+ $(use_enable gpg gpgme) \
+ $(use_enable imap) \
+ $(use_enable nls) \
+ $(use_enable notmuch) \
+ $(use_enable pop) \
+ $(use_enable smime) \
+ $(use_enable smtp) \
+ $(use_with idn) \
+ $(use_with !notmuch mixmaster) \
+ --enable-external-dotlock \
+ --enable-nfs-fix \
+ --sysconfdir="${EPREFIX}"/etc/${MY_PN} \
+ --with-curses \
+ --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --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
+
+ einfo "### myconf ###"
+ einfo $myconf
+ einfo "### myconf ###"
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use mbox; then
+ insinto /etc/"${MY_PN}"
+ newins "${FILESDIR}"/Muttrc.mbox Muttrc
+ else
+ insinto /etc/"${MY_PN}"
+ doins "${FILESDIR}"/Muttrc
+ fi
+
+ # A newer file is provided by app-misc/mime-types. So we link it.
+ rm "${ED}"/etc/${MY_PN}/mime.types || die "Failed to delete file."
+ dosym /etc/mime.types /etc/${MY_PN}/mime.types
+
+ # A man-page is always handy, so fake one
+ if use !doc; then
+ emake -C doc muttrc.man
+ # make the fake slightly better, bug #413405
+ sed -e 's#@docdir@/manual.txt#http://www.mutt.org/doc/devel/manual.html#' \
+ -e 's#in @docdir@,#at http://www.mutt.org/,#' \
+ -e "s#@sysconfdir@#${EPREFIX}/etc/${MY_PN}#" \
+ -e "s#@bindir@#${EPREFIX}/usr/bin#" \
+ doc/mutt.man > mutt.1 || die "sed failed"
+ newman doc/muttbug.man flea.1
+ newman doc/muttrc.man muttrc.5
+ doman mutt.1
+ else
+ # nuke manpages that should be provided by an MTA, bug #177605
+ rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \
+ || die "failed to remove files, please file a bug"
+ 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://www.gentoo.org/doc/en/guide-to-mutt.xml"
+ echo
+
+ if use berkdb && use gdbm; then
+ # berkdb and gdbm are likely to be activated both through profile
+ elog "Info: both berkdb and gdbm are active - gdbm is used."
+ echo
+ fi
+
+ if use notmuch ; then
+ # TODO: document a config that works out of the box with notmuch, please help ;)
+ elog "Note that you can use notmuch specific mutt config file, see -F <config> in"
+ elog "\"man mutt\" and also \"man muttrc\". It's also recomended to run \"notmuch setup\""
+ elog "and \"notmuch new\"."
+ echo
+ fi
+}
+
+pkg_info() {
+ einfo "`"${MY_PN}" -v`"
+}
diff --git a/mail-client/mutt-kz/mutt-kz-9999.ebuild b/mail-client/mutt-kz/mutt-kz-9999.ebuild
deleted file mode 100644
index 8875c6d..0000000
--- a/mail-client/mutt-kz/mutt-kz-9999.ebuild
+++ /dev/null
@@ -1,263 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=4
-
-inherit eutils git-2 autotools
-
-MUTT_PV="1.5.21"
-MUTT_PVR="1.5.21-r10"
-MUTT_P="mutt-${MUTT_PV}"
-PATCHSET_REV="-r13"
-
-DESCRIPTION="A forx of mutt, the small but very powerful text-based mail client"
-HOMEPAGE="https://github.com/karelzak/mutt-kz/wiki/"
-SRC_URI="mirror://gentoo/${MUTT_P}-gentoo-patches${PATCHSET_REV}.tar.bz2
- http://dev.gentoo.org/~grobian/distfiles/${MUTT_P}-gentoo-patches${PATCHSET_REV}.tar.bz2"
-EGIT_REPO_URI="git://github.com/karelzak/${PN}.git"
-
-IUSE="berkdb crypt debug doc gdbm gnutls gpg idn imap notmuch mbox nls pop qdbm sasl selinux sidebar smime smtp ssl tokyocabinet"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~x86"
-RDEPEND="
- app-misc/mime-types
- !mail-client/mutt
- >=sys-libs/ncurses-5.2
- gpg? ( >=app-crypt/gpgme-0.9.0 )
- idn? ( net-dns/libidn )
- imap? (
- gnutls? ( >=net-libs/gnutls-1.0.17 )
- !gnutls? ( ssl? ( >=dev-libs/openssl-0.9.6 ) )
- sasl? ( >=dev-libs/cyrus-sasl-2 )
- )
- notmuch? ( net-mail/notmuch )
- pop? (
- gnutls? ( >=net-libs/gnutls-1.0.17 )
- !gnutls? ( ssl? ( >=dev-libs/openssl-0.9.6 ) )
- sasl? ( >=dev-libs/cyrus-sasl-2 )
- )
- selinux? ( sec-policy/selinux-mutt )
- smime? ( >=dev-libs/openssl-0.9.6 )
- smtp? (
- gnutls? ( >=net-libs/gnutls-1.0.17 )
- !gnutls? ( ssl? ( >=dev-libs/openssl-0.9.6 ) )
- sasl? ( >=dev-libs/cyrus-sasl-2 )
- )
- tokyocabinet? ( dev-db/tokyocabinet )
- !tokyocabinet? (
- qdbm? ( dev-db/qdbm )
- !qdbm? (
- gdbm? ( sys-libs/gdbm )
- !gdbm? ( berkdb? ( >=sys-libs/db-4 ) )
- )
- )"
-DEPEND="${RDEPEND}
- net-mail/mailbase
- doc? (
- app-text/docbook-xsl-stylesheets
- dev-libs/libxml2
- dev-libs/libxslt
- || ( www-client/lynx www-client/w3m www-client/elinks )
- )"
-
-PATCHDIR="${WORKDIR}"/${MUTT_P}-gentoo-patches${PATCHSET_REV}
-# most patches for regular mutt do not work, so let's just exclude them for now
-EPATCH_EXCLUDE="02-compressed.patch 03-progress-bar.patch 04-xterm-titles.patch
-06-nntp.patch 07-quote.patch 08-initials.patch 09-smarttime.patch
-10-change_folder_next.patch 11-change_subject.patch 12-trash-folder.patch
-13-pgp-verbose-mime.patch 14-pgp-display-signature.patch
-sidebar.patch sidebar-utf8.patch sidebar-dotpathsep.patch"
-
-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-${MUTT_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}"/gpgme-1.2.0.patch
- epatch "${PATCHDIR}"/emptycharset-segfault.patch
- epatch "${PATCHDIR}"/gpgkeyverify-segfault.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
- if use sidebar ; then
- epatch "${PATCHDIR}"/sidebar.patch
- epatch "${PATCHDIR}"/sidebar-utf8.patch
- epatch "${PATCHDIR}"/sidebar-dotpathsep.patch
- fi
-
- # patch version string for bug reports
- sed -i -e 's/"Mutt %s (%s)"/"Mutt-KZ %s (%s, Gentoo '"${PVR}"')"/' \
- muttlib.c || die "failed patching in Gentoo version"
-
- # allow user patches
- epatch_user
-
- # 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 notmuch) \
- $(use_enable pop) \
- $(use_enable smime) \
- $(use_enable smtp) \
- $(use_with idn) \
- $(use_with !notmuch mixmaster) \
- --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
-
- echo "### myconf ###"
- echo $myconf
- echo "### myconf ###"
-
- 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, so fake one
- if use !doc; then
- make -C doc DESTDIR="${D}" muttrc.man || die
- # make the fake slightly better, bug #413405
- sed -e 's#@docdir@/manual.txt#http://www.mutt.org/doc/devel/manual.html#' \
- -e 's#in @docdir@,#at http://www.mutt.org/,#' \
- -e "s#@sysconfdir@#${EPREFIX}/etc/${PN}#" \
- -e "s#@bindir@#${EPREFIX}/usr/bin#" \
- doc/mutt.man > mutt.1
- cp doc/muttbug.man flea.1
- cp doc/muttrc.man muttrc.5
- doman mutt.1 flea.1 muttrc.5
- 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://www.gentoo.org/doc/en/guide-to-mutt.xml"
- echo
-}
-
-pkg_info()
-{
- einfo "`mutt -v`"
-}