From 9d1fe53d43487df8a3768b14d50daca3799c5a2f Mon Sep 17 00:00:00 2001 From: Donnie Berkholz Date: Sun, 26 Jun 2011 20:35:49 -0500 Subject: mutt: move sidebar patches to FILESDIR to avoid custom patchball. --- mail-client/mutt/Manifest | 6 ++- mail-client/mutt/files/sidebar-dotted.patch | 70 +++++++++++++++++++++++++ mail-client/mutt/files/sidebar-sorted.patch | 81 +++++++++++++++++++++++++++++ mail-client/mutt/mutt-1.5.21-r3.ebuild | 6 +-- 4 files changed, 158 insertions(+), 5 deletions(-) create mode 100644 mail-client/mutt/files/sidebar-dotted.patch create mode 100644 mail-client/mutt/files/sidebar-sorted.patch (limited to 'mail-client') diff --git a/mail-client/mutt/Manifest b/mail-client/mutt/Manifest index caeacbe..803aa75 100644 --- a/mail-client/mutt/Manifest +++ b/mail-client/mutt/Manifest @@ -5,8 +5,10 @@ AUX 1.5.21-write_postponed.patch 13650 RMD160 eaa96e52253d880aeabfc382f15150e0a7 AUX Muttrc 667 RMD160 0405e73c6a4122869ce9a9bd408068d316740b71 SHA1 e30c96e6f21a30fe576abcb3be65a34accf4e11f SHA256 932940db69c951caaa87a17ee98a8e2262aeadf1e978f6d671b642184c5d545f AUX Muttrc.mbox 486 RMD160 0f692c9d3a7591f3a0611529616aa94a5c62a641 SHA1 9e231303fe9fb2fe80542115ceefb972c7b11d5a SHA256 10b251f88ccc5d4c95c96ab17b6ab6a30a16d6590ab896a60037f869fc4d44a0 AUX mutt-1.5.17-parallel-make.patch 936 RMD160 f6a216d9ff06ae55d9569e05632b60332cf49ebe SHA1 0a9b98b37987ffa10039424bb6f5849a08dbb168 SHA256 3ecc199b83f6fa747d342694d8ffacf0aedd4590e0d9943c9b6004c31cbdb931 +AUX sidebar-dotted.patch 2604 RMD160 8463797c67094ae122f828af632954dd94314229 SHA1 b01cf833f04e092240728e7308ca9917b6e3a99b SHA256 044d09cb132e740706bd3a3bb8dffebbd3361874972b5d712e0c49a95c3d4476 +AUX sidebar-sorted.patch 2304 RMD160 80e738234985f623a7d6d88249bb92ad677778e0 SHA1 54cb51ed660c01e7dced958b90ab1504157547b8 SHA256 0361cb04ff84f08d42fad22eb34a252253113b0d3b92d474b3498cebf360aa08 AUX slang.patch 493 RMD160 16dcedee86fe91ecac48ec5be8a6f67798ef7ac0 SHA1 f913e8c717f76186b0edc8856bf02a167d540c70 SHA256 040c8b63b2d805dae800fa9b1826d158b7104641339cee9a404985616b3502c7 -DIST mutt-1.5.21-gentoo-patches-r3.tar.bz2 73247 RMD160 5e658dce6e2e93193808f88490f83672f629e6d3 SHA1 e2a27668c6327597f90d9abe4ea2869fb216b397 SHA256 d61dccc0eb5179036d1108a70601ff43367dbe70d162c3042c376acd2a87daf0 +DIST mutt-1.5.21-gentoo-patches-r2.tar.bz2 72256 RMD160 cd028c7d12e1885d8ea98ff60554a5fbf98e1922 SHA1 28ef259d8a964bbe46f72169ab597825819f244e SHA256 0ad8dcfbcb5b31321c7e96909d53a5d1e8e2f69241f9ddb0f36f69cf086ed615 DIST mutt-1.5.21.tar.gz 3716886 RMD160 b235a42972ae410592253cdc117a90baf279f47a SHA1 a8475f2618ce5d5d33bff85c0affdf21ab1d76b9 SHA256 2141f36e8d0f4f71c9ca6780001e7cc679fe313e643953fc07f001223e67c4a0 -EBUILD mutt-1.5.21-r3.ebuild 7896 RMD160 a064a94b727c0fa3dbbae34492712d181fe4d140 SHA1 fc35d77ca790b67e082f27641e7221ac8d606e9b SHA256 0e8eefea56abfc5a8a2dad42d43943b94165410fb9acb7652653680536d419d5 +EBUILD mutt-1.5.21-r3.ebuild 7896 RMD160 906910fdf98bb7981044007692a073f396fe59a3 SHA1 fc81b11bcfb56791d827dde54b451038baf269e3 SHA256 18aeeee854d77612b73739b437a1981ef89667e91e2ef10bafa2dd5a30b2767a MISC ChangeLog 48499 RMD160 6e416e0da020639c4254c26a23c0e653241c5d7f SHA1 ed9c0af2c86b929ae363695790ae21234d854559 SHA256 8e3dd35c0f68d7474ddd71dd1e7f8cada79df3f59df1363a8b48a5bf6d156139 diff --git a/mail-client/mutt/files/sidebar-dotted.patch b/mail-client/mutt/files/sidebar-dotted.patch new file mode 100644 index 0000000..95150b2 --- /dev/null +++ b/mail-client/mutt/files/sidebar-dotted.patch @@ -0,0 +1,70 @@ +From: Evgeni Golov +License: 3-BSD + +When using IMAP, a '.' is often used as a separator instead of '/'. +This patch enables mutt to find these dots and +1. correctly intend the dir in the sidebar +2. if "sidebar_shortpath" is set, shorten the dir to the part after + the last dot + +I hope, it's usefull for someone ;) + +Index: mutt-1.5.18/sidebar.c +=================================================================== +--- mutt-1.5.18.orig/sidebar.c 2008-11-06 18:36:26.000000000 +0100 ++++ mutt-1.5.18/sidebar.c 2008-11-06 18:37:18.000000000 +0100 +@@ -255,14 +255,23 @@ + int i; + tmp_folder_name = tmp->path + strlen(Maildir); + for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) { +- if (tmp_folder_name[i] == '/') sidebar_folder_depth++; ++ if (tmp_folder_name[i] == '/' || tmp_folder_name[i] == '.') sidebar_folder_depth++; + } + if (sidebar_folder_depth > 0) { +- sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1); ++ if (option(OPTSIDEBARSHORTPATH)) { ++ tmp_folder_name = strrchr(tmp->path, '.'); ++ if (tmp_folder_name == NULL) ++ tmp_folder_name = tmp->path; ++ else ++ tmp_folder_name++; ++ } ++ else ++ tmp_folder_name = tmp->path; ++ sidebar_folder_name = malloc(strlen(basename(tmp_folder_name)) + sidebar_folder_depth + 1); + for (i=0; i < sidebar_folder_depth; i++) + sidebar_folder_name[i]=' '; + sidebar_folder_name[i]=0; +- strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth); ++ strncat(sidebar_folder_name, basename(tmp_folder_name), strlen(basename(tmp_folder_name)) + sidebar_folder_depth); + } + } + printw( "%.*s", SidebarWidth - delim_len + 1, +Index: mutt-1.5.18/init.h +=================================================================== +--- mutt-1.5.18.orig/init.h 2008-11-06 18:37:26.000000000 +0100 ++++ mutt-1.5.18/init.h 2008-11-06 18:37:47.000000000 +0100 +@@ -1548,6 +1548,11 @@ + ** .pp + ** The width of the sidebar. + */ ++ { "sidebar_shortpath", DT_BOOL, R_BOTH, OPTSIDEBARSHORTPATH, 0 }, ++ /* ++ ** .pp ++ ** Should the sidebar shorten the path showed. ++ */ + { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0}, + /* + ** .pp +Index: mutt-1.5.18/mutt.h +=================================================================== +--- mutt-1.5.18.orig/mutt.h 2008-11-06 18:37:55.000000000 +0100 ++++ mutt-1.5.18/mutt.h 2008-11-06 18:38:10.000000000 +0100 +@@ -438,6 +438,7 @@ + OPTSAVENAME, + OPTSCORE, + OPTSIDEBAR, ++ OPTSIDEBARSHORTPATH, + OPTSIGDASHES, + OPTSIGONTOP, + OPTSORTRE, diff --git a/mail-client/mutt/files/sidebar-sorted.patch b/mail-client/mutt/files/sidebar-sorted.patch new file mode 100644 index 0000000..8a164dd --- /dev/null +++ b/mail-client/mutt/files/sidebar-sorted.patch @@ -0,0 +1,81 @@ +From: Evgeni Golov +License: 3-BSD + +When using IMAP and imap_check_subscribed, the server reports the +dirs in a random order. +This patch introduces a new option, sidebar_sort. Which, when it is +set, sorts the dirs in the sidebar alphabetically. + +I hope, it's usefull for someone ;) + +PS: This has to be applied ontop of my sidebar-dotted patch, but it +should be easy to adopt it to a vanilla mutt. + +Index: mutt-1.5.18/sidebar.c +=================================================================== +--- mutt-1.5.18.orig/sidebar.c 2008-11-06 18:58:19.000000000 +0100 ++++ mutt-1.5.18/sidebar.c 2008-11-06 18:59:16.000000000 +0100 +@@ -54,6 +54,35 @@ + for ( ; tmp->next != 0; tmp = tmp->next ) + tmp->next->prev = tmp; + ++ if (option(OPTSIDEBARSORT)) { ++ int needsort=1; ++ BUFFY *prev; ++ BUFFY *next; ++ BUFFY *tmp2; ++ while (needsort==1) { ++ needsort=0; ++ tmp = Incoming; ++ for ( ; tmp ; tmp=tmp->next ) { ++ if (tmp->next != NULL && strcmp(tmp->path, tmp->next->path) > 0) { ++ needsort=1; ++ prev = tmp->prev; ++ next = tmp->next; ++ if (prev != NULL) ++ prev->next = next; ++ else ++ Incoming = next; ++ next->prev = prev; ++ tmp2 = next->next; ++ next->next = tmp; ++ tmp->prev = next; ++ tmp->next = tmp2; ++ if (tmp2 != NULL) ++ tmp2->prev = tmp; ++ } ++ } ++ } ++ } ++ + if ( TopBuffy == 0 && BottomBuffy == 0 ) + TopBuffy = Incoming; + if ( BottomBuffy == 0 ) { +Index: mutt-1.5.18/init.h +=================================================================== +--- mutt-1.5.18.orig/init.h 2008-11-06 18:58:19.000000000 +0100 ++++ mutt-1.5.18/init.h 2008-11-06 18:58:19.000000000 +0100 +@@ -1553,6 +1553,11 @@ + ** .pp + ** Should the sidebar shorten the path showed. + */ ++ { "sidebar_sort", DT_BOOL, R_BOTH, OPTSIDEBARSORT, 0 }, ++ /* ++ ** .pp ++ ** Should the sidebar be sorted. ++ */ + { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0}, + /* + ** .pp +Index: mutt-1.5.18/mutt.h +=================================================================== +--- mutt-1.5.18.orig/mutt.h 2008-11-06 18:58:19.000000000 +0100 ++++ mutt-1.5.18/mutt.h 2008-11-06 18:58:19.000000000 +0100 +@@ -439,6 +439,7 @@ + OPTSCORE, + OPTSIDEBAR, + OPTSIDEBARSHORTPATH, ++ OPTSIDEBARSORT, + OPTSIGDASHES, + OPTSIGONTOP, + OPTSORTRE, diff --git a/mail-client/mutt/mutt-1.5.21-r3.ebuild b/mail-client/mutt/mutt-1.5.21-r3.ebuild index 868d299..169d9a4 100644 --- a/mail-client/mutt/mutt-1.5.21-r3.ebuild +++ b/mail-client/mutt/mutt-1.5.21-r3.ebuild @@ -6,7 +6,7 @@ EAPI="3" inherit eutils flag-o-matic autotools -PATCHSET_REV="-r3" +PATCHSET_REV="-r2" DESCRIPTION="A small but very powerful text-based mail client" HOMEPAGE="http://www.mutt.org" @@ -103,10 +103,10 @@ src_prepare() { epatch "${PATCHDIR}"/sidebar.patch # From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523774 # sidebar-dotted handles Courier IMAP folders correctly - epatch "${PATCHDIR}"/sidebar-dotted.patch + epatch "${FILESDIR}"/sidebar-dotted.patch # sidebar-sorted will sort IMAP folders instead of randomly # displaying them - epatch "${PATCHDIR}"/sidebar-sorted.patch + epatch "${FILESDIR}"/sidebar-sorted.patch fi # patch version string for bug reports -- cgit v1.2.3-65-gdbad