diff options
author | Stefan Kuhn (Wuodan) <wuodan-gentoo@hispeed.ch> | 2012-08-02 21:45:51 +0200 |
---|---|---|
committer | Stefan Kuhn (Wuodan) <wuodan-gentoo@hispeed.ch> | 2012-08-02 21:45:51 +0200 |
commit | d82f9250325bece393396913664d3e114ffd46b9 (patch) | |
tree | 58d910a5b7f2db019b268910c8b4d6688ab7e871 /mail-client | |
parent | games-board/cockatrice: New ebuild games-board/cockatrice for bug #424273 (diff) | |
download | sunrise-d82f9250325bece393396913664d3e114ffd46b9.tar.gz sunrise-d82f9250325bece393396913664d3e114ffd46b9.tar.bz2 sunrise-d82f9250325bece393396913664d3e114ffd46b9.zip |
mail-client/mutt-kz: New Ebuild for bug #427334 thanks to everyone on sunrise IRC
Diffstat (limited to 'mail-client')
-rw-r--r-- | mail-client/mutt-kz/ChangeLog | 13 | ||||
-rw-r--r-- | mail-client/mutt-kz/Manifest | 8 | ||||
-rw-r--r-- | mail-client/mutt-kz/files/Muttrc | 28 | ||||
-rw-r--r-- | mail-client/mutt-kz/files/Muttrc.mbox | 9 | ||||
-rw-r--r-- | mail-client/mutt-kz/files/mutt-kz-0_pre20120627-progress-bar.patch | 123 | ||||
-rw-r--r-- | mail-client/mutt-kz/files/mutt-kz-0_pre20120627-severe-warnings.patch | 16 | ||||
-rw-r--r-- | mail-client/mutt-kz/metadata.xml | 16 | ||||
-rw-r--r-- | mail-client/mutt-kz/mutt-kz-0_pre20120627.ebuild | 218 |
8 files changed, 431 insertions, 0 deletions
diff --git a/mail-client/mutt-kz/ChangeLog b/mail-client/mutt-kz/ChangeLog new file mode 100644 index 000000000..54d236a1e --- /dev/null +++ b/mail-client/mutt-kz/ChangeLog @@ -0,0 +1,13 @@ +# ChangeLog for mail-client/mutt-kz +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*mutt-kz-0_pre20120627 (02 Aug 2012) + + 02 Aug 2012; Stefan Kuhn (Wuodan) wuodan-gentoo@hispeed.ch + +mutt-kz-0_pre20120627.ebuild, + +files/mutt-kz-0_pre20120627-progress-bar.patch, + +files/mutt-kz-0_pre20120627-severe-warnings.patch, +files/Muttrc, + +files/Muttrc.mbox, +metadata.xml: + New Ebuild for bug #427334 thanks to everyone on sunrise IRC + diff --git a/mail-client/mutt-kz/Manifest b/mail-client/mutt-kz/Manifest new file mode 100644 index 000000000..641ea98f5 --- /dev/null +++ b/mail-client/mutt-kz/Manifest @@ -0,0 +1,8 @@ +AUX Muttrc 948 RMD160 22a77982581ff2823a880cfc9364085682e959f9 SHA1 fd94c7a2621c98bb79a4f5f87c6f733b9426c6a8 SHA256 1b4b6b99421e9b72498899520080a0557a42c05701e31b22cb0adb2a86112581 +AUX Muttrc.mbox 486 RMD160 0f692c9d3a7591f3a0611529616aa94a5c62a641 SHA1 9e231303fe9fb2fe80542115ceefb972c7b11d5a SHA256 10b251f88ccc5d4c95c96ab17b6ab6a30a16d6590ab896a60037f869fc4d44a0 +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 6199 RMD160 ee7d19ece19d0d7923279054ccf02e41756dbd11 SHA1 0d9b50f1a7f75d8eaae3fbc08cddcbb6b24361e0 SHA256 90bf79be6f71e40847817b47f77b2e60650b0c12424b3345c5a31dd5ec7734e8 +MISC ChangeLog 473 RMD160 e57934a52e39dd6d282b1e7c44bda1647860ca1a SHA1 e1982b15c2646f23a9d2551d87cfa263e5d9cc22 SHA256 134127473a8fe3ae24bd5f17f2dc0c5d892bfa78eb5459aca081ebf59074655d +MISC metadata.xml 646 RMD160 0d914446770daa63f88535de1a61211397f57015 SHA1 7009fd07ad01a7a5f07f8b4efde7d39eaedbcac9 SHA256 a7bcb295348661e5becc0a34705e80f72a5bdd0eb0c7d6d4c8319c8e13ff8d25 diff --git a/mail-client/mutt-kz/files/Muttrc b/mail-client/mutt-kz/files/Muttrc new file mode 100644 index 000000000..6cd595b17 --- /dev/null +++ b/mail-client/mutt-kz/files/Muttrc @@ -0,0 +1,28 @@ +# 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" + +# 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/Muttrc.mbox b/mail-client/mutt-kz/files/Muttrc.mbox new file mode 100644 index 000000000..1382a374e --- /dev/null +++ b/mail-client/mutt-kz/files/Muttrc.mbox @@ -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-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 000000000..67629a00e --- /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 000000000..cb2a753e9 --- /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 new file mode 100644 index 000000000..30706ab51 --- /dev/null +++ b/mail-client/mutt-kz/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-wanted@gentoo.org</email> + </maintainer> + <use> + <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="smime">Enable support for smime</flag> + <flag name="smtp">Enable support for smtp</flag> + <flag name="tokyocabinet">Enable tokyocabinet database backend for header + caching</flag> + </use> +</pkgmetadata> 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 000000000..f69ba3d27 --- /dev/null +++ b/mail-client/mutt-kz/mutt-kz-0_pre20120627.ebuild @@ -0,0 +1,218 @@ +# 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 ~x86" + +# 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" + +# dependencies used several times +RDEPEND_PROTOCOL=" + gnutls? ( >=net-libs/gnutls-1.0.17 ) + !gnutls? ( 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 if mailbase only belongs to DEPEND +# unsure on mutt flag for net-mail/notmuch +# unsure on crypt dependency too +RDEPEND="${RDEPEND} + net-mail/mailbase + notmuch? ( + net-mail/notmuch[mutt] + crypt? ( net-mail/notmuch[crypt] ) + )" +DEPEND="${RDEPEND} + 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+=" --enable-fcntl --disable-flock" + ;; + *) + 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+=" --enable-hcache \ + --with-tokyocabinet --without-qdbm --without-gdbm --without-bdb" + elif use qdbm; then + myconf+=" --enable-hcache \ + --without-tokyocabinet --with-qdbm --without-gdbm --without-bdb" + elif use gdbm ; then + myconf+=" --enable-hcache \ + --without-tokyocabinet --without-qdbm --with-gdbm --without-bdb" + elif use berkdb; then + myconf+=" --enable-hcache \ + --without-tokyocabinet --without-qdbm --without-gdbm --with-bdb" + else + 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+=" --with-gnutls" + elif use ssl; then + myconf+=" --with-ssl" + fi + # not sure if this should be mutually exclusive with the other two + myconf+=" $(use_with sasl)" + else + myconf+=" --without-gnutls --without-ssl --without-sasl" + fi + + if use mbox; then + myconf+=" --with-mailpath=${EPREFIX}/var/spool/mail" + else + myconf+=" --with-homespool=Maildir" + fi + + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + insinto /etc/"${MY_PN}" + if use mbox; then + newins "${FILESDIR}"/Muttrc.mbox Muttrc + else + 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 ChangeLog NEWS OPS* PATCHES README* TODO +} + +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 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`" +} |