Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jun 2004 09:48:47 +0200 (CEST)
From:      Udo Schweigert <udo.schweigert@siemens.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/68359: maintainer-update of mail/mutt-devel
Message-ID:  <200406260748.i5Q7mlo7063564@alaska.cert.siemens.com>
Resent-Message-ID: <200406260750.i5Q7o45d005385@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         68359
>Category:       ports
>Synopsis:       maintainer-update of mail/mutt-devel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 26 07:50:04 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Udo Schweigert
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
>Environment:

>Description:

Maintainer update of mail/mutt-devel:

	- Add WITH_MUTT_MAILDIR_MTIME_PATCH knob (Obtained from wiki.mutt.org)

	- Add the hide_thread_subject function (Obtained from wiki.mutt.org)

	- Add the conditional_date function (Obtained from wiki.mutt.org)

	- Fix usage of the AUTOtools (to be compliant with mutt's cvs tree,
	   i.e. the next version of mutt-devel)

	- Bump PORTREVISION.


>How-To-Repeat:
>Fix:

diff -ru  /usr/ports/mail/mutt-devel/Makefile ./Makefile
--- /usr/ports/mail/mutt-devel/Makefile	Sat Jun 12 15:01:36 2004
+++ ./Makefile	Sat Jun 26 09:39:03 2004
@@ -78,10 +78,13 @@
 #
 # If you want to use the ifdef feature define:
 #  WITH_MUTT_IFDEF_PATCH
+#
+# If you want to have the Maildir mtime patch define:
+#  WITH_MUTT_MAILDIR_MTIME_PATCH
 
 PORTNAME=	mutt-devel
 PORTVERSION=	1.5.6
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES+=	mail ipv6
 .if defined(WITH_MUTT_NNTP)
 CATEGORIES+=	news
@@ -121,8 +124,8 @@
 .endif
 
 USE_REINPLACE=	yes
-USE_AUTOMAKE_VER=	18
-USE_AUTOCONF_VER=	259
+USE_AUTOMAKE_VER=	15
+USE_AUTOCONF_VER=	253
 USE_OPENSSL=	yes
 
 PLIST=		${WRKDIR}/PLIST
@@ -220,6 +223,14 @@
 pre-configure::
 	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-maildir-header-cache
 .endif
+.if defined(WITH_MUTT_MAILDIR_MTIME_PATCH)
+pre-configure::
+.if defined(WITH_MUTT_NNTP)
+	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-maildir-mtime-nntp
+.else
+	@${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-maildir-mtime
+.endif
+.endif
 
 .if ! defined(WITHOUT_MUTT_PGP_PATCH)
 SGML_NEEDED=	yes
@@ -401,6 +412,16 @@
 	@${ECHO} "Please be aware that this - at the moment - could result in" >> ${PKGMESSAGE}
 	@${ECHO} "incorrect display of message flags if there is another client" >> ${PKGMESSAGE}
 	@${ECHO} "simultaneously using the same mailbox." >> ${PKGMESSAGE}
+	@${ECHO} "====================================================" >> ${PKGMESSAGE}
+.endif
+.if defined(WITH_MUTT_MAILDIR_HEADER_CACHE) && defined(WITH_MUTT_MAILDIR_MTIME_PATCH)
+	@${ECHO} "====================================================" >> ${PKGMESSAGE}
+	@${ECHO} "You have installed ${PORTNAME} with the Maildir header" >> ${PKGMESSAGE}
+	@${ECHO} "cache and the MAILDIR_MTIME_PATCH enabled." >> ${PKGMESSAGE}
+	@${ECHO}  >> ${PKGMESSAGE}
+	@${ECHO} "For this to work you may have to delete your old" >> ${PKGMESSAGE}
+	@${ECHO} "Maildir header cache or otherwise you may face" >> ${PKGMESSAGE}
+	@${ECHO} "an \"Out of memory\" error." >> ${PKGMESSAGE}
 	@${ECHO} "====================================================" >> ${PKGMESSAGE}
 .endif
 .if !defined(BATCH)
diff -ru  /usr/ports/mail/mutt-devel/files/extra-patch-maildir-mtime ./files/extra-patch-maildir-mtime
--- /usr/ports/mail/mutt-devel/files/extra-patch-maildir-mtime	Thu Jan  1 01:00:00 1970
+++ ./files/extra-patch-maildir-mtime	Wed Jun 23 13:13:48 2004
@@ -0,0 +1,82 @@
+--- PATCHES Dec 2002 17:44:54 -0000	3.6
++++ PATCHES Feb 2004 13:19:42 -0000
+@@ -0,0 +1 @@
++patch-1.5.6.dw.maildir-mtime.1
+--- browser.c Sep 2003 13:03:25 -0000	3.9
++++ browser.c Feb 2004 13:19:42 -0000
+@@ -29,2 +29,3 @@
+ #endif
++#include "mx.h"
+ 
+@@ -304,4 +305,6 @@ folder_format_str (char *dest, size_t de
+ static void add_folder (MUTTMENU *m, struct browser_state *state,
+-			const char *name, const struct stat *s, int new)
++			const char *name, const struct stat *s, BUFFY *mbuf)
+ {
++  int new = (mbuf) ? mbuf->new : 0;
++
+   if (state->entrylen == state->entrymax)
+@@ -317,2 +320,5 @@ static void add_folder (MUTTMENU *m, str
+ 
++  if (mbuf && mbuf->magic == M_MAILDIR && mbuf->mtime)
++    s->st_mtime = mbuf->mtime;
++
+   if (s != NULL)
+@@ -411,3 +417,3 @@ static int examine_directory (MUTTMENU *
+       tmp = tmp->next;
+-    add_folder (menu, state, de->d_name, &s, (tmp) ? tmp->new : 0);
++    add_folder (menu, state, de->d_name, &s, tmp);
+   }
+@@ -435,3 +441,3 @@ static int examine_mailboxes (MUTTMENU *
+     {
+-      add_folder (menu, state, tmp->path, NULL, tmp->new);
++      add_folder (menu, state, tmp->path, NULL, tmp);
+       continue;
+@@ -442,3 +448,3 @@ static int examine_mailboxes (MUTTMENU *
+     {
+-      add_folder (menu, state, tmp->path, NULL, tmp->new);
++      add_folder (menu, state, tmp->path, NULL, tmp);
+       continue;
+@@ -456,3 +462,3 @@ static int examine_mailboxes (MUTTMENU *
+ 
+-    add_folder (menu, state, buffer, &s, tmp->new);
++    add_folder (menu, state, buffer, &s, tmp);
+   }
+--- buffy.c Feb 2004 17:50:43 -0000	3.9
++++ buffy.c Feb 2004 13:19:42 -0000
+@@ -229,2 +229,3 @@ int mutt_parse_mailboxes (BUFFER *path, 
+     (*tmp)->newly_created = 0;
++    (*tmp)->mtime = 0;
+ 
+@@ -260,2 +261,3 @@ int mutt_buffy_check (int force)
+   struct stat sb;
++  struct stat smd;
+   struct dirent *de;
+@@ -299,2 +301,3 @@ int mutt_buffy_check (int force)
+     tmp->new = 0;
++    tmp->mtime = 0;
+ 
+@@ -383,6 +386,13 @@ int mutt_buffy_check (int force)
+ 	  {
+-	    /* one new and undeleted message is enough */
+-	    BuffyCount++;
+-	    tmp->new = 1;
+-	    break;
++	    if (!tmp->new)
++	    {
++	      /* one new and undeleted message is enough */
++	      BuffyCount++;
++	      tmp->new = 1;
++	    }
++	    snprintf (path, sizeof (path), "%s/new/%s", tmp->path, de->d_name);
++	    if (!stat (path, &smd) && smd.st_mtime > tmp->mtime)
++	    {
++	      tmp->mtime = smd.st_mtime;
++	    }
+ 	  }
+--- buffy.h Dec 2002 11:19:39 -0000	3.2
++++ buffy.h Feb 2004 13:19:42 -0000
+@@ -29,2 +29,3 @@ typedef struct buffy_t
+   struct buffy_t *next;
++  time_t mtime;			/* for maildirs...time of newest entry */
+   short new;			/* mailbox has new mail */
diff -ru  /usr/ports/mail/mutt-devel/files/extra-patch-maildir-mtime-nntp ./files/extra-patch-maildir-mtime-nntp
--- /usr/ports/mail/mutt-devel/files/extra-patch-maildir-mtime-nntp	Thu Jan  1 01:00:00 1970
+++ ./files/extra-patch-maildir-mtime-nntp	Wed Jun 23 13:13:48 2004
@@ -0,0 +1,144 @@
+--- PATCHES Dec 2002 17:44:54 -0000	3.6
++++ PATCHES Feb 2004 13:19:42 -0000
+@@ -0,0 +1 @@
++patch-1.5.6.dw.maildir-mtime.1
+--- browser.c.orig	Wed Jun 23 12:55:45 2004
++++ browser.c	Wed Jun 23 13:00:45 2004
+@@ -30,6 +30,7 @@
+ #ifdef USE_NNTP
+ #include "nntp.h"
+ #endif
++#include "mx.h"
+ 
+ #include <stdlib.h>
+ #include <dirent.h>
+@@ -424,8 +425,10 @@
+ 
+ static void add_folder (MUTTMENU *m, struct browser_state *state,
+ 			const char *name, const struct stat *s,
+-			void *data, int new)
++			void *data, BUFFY *mbuf)
+ {
++  int new = (mbuf) ? mbuf->new : 0;
++
+   if (state->entrylen == state->entrymax)
+   {
+     /* need to allocate more space */
+@@ -437,6 +440,9 @@
+       m->data = state->entry;
+   }
+ 
++  if (mbuf && mbuf->magic == M_MAILDIR && mbuf->mtime)
++    s->st_mtime = mbuf->mtime;
++
+   if (s != NULL)
+   {
+     (state->entry)[state->entrylen].mode = s->st_mode;
+@@ -495,7 +501,7 @@
+ 	continue;
+       if (!((regexec (Mask.rx, data->group, 0, NULL, 0) == 0) ^ Mask.not))
+ 	continue;
+-      add_folder (menu, state, data->group, NULL, data, data->new);
++      add_folder (menu, state, data->group, NULL, data, tmp);
+     }
+   }
+   else
+@@ -561,7 +567,7 @@
+     tmp = Incoming;
+     while (tmp && mutt_strcmp (buffer, tmp->path))
+       tmp = tmp->next;
+-    add_folder (menu, state, de->d_name, &s, NULL, (tmp) ? tmp->new : 0);
++    add_folder (menu, state, de->d_name, &s, NULL, tmp);
+   }
+   closedir (dp);
+   }
+@@ -589,7 +595,7 @@
+     {
+       if ((data = (NNTP_DATA *) tmp->data) != NULL && (data->new ||
+ 	  (data->subscribed && (!option (OPTSHOWONLYUNREAD) || data->unread))))
+-      add_folder (menu, state, data->group, NULL, data, data->new);
++      add_folder (menu, state, data->group, NULL, data, tmp);
+     }
+   }
+   else
+@@ -608,21 +614,21 @@
+ #ifdef USE_IMAP
+       if (mx_is_imap (tmp->path))
+       {
+-	add_folder (menu, state, tmp->path, NULL, NULL, tmp->new);
++	add_folder (menu, state, tmp->path, NULL, NULL, tmp);
+ 	continue;
+       }
+ #endif
+ #ifdef USE_POP
+       if (mx_is_pop (tmp->path))
+       {
+-	add_folder (menu, state, tmp->path, NULL, NULL, tmp->new);
++	add_folder (menu, state, tmp->path, NULL, NULL, tmp);
+ 	continue;
+       }
+ #endif
+ #ifdef USE_NNTP
+       if (mx_is_nntp (tmp->path))
+       {
+-	add_folder (menu, state, tmp->path, NULL, NULL, tmp->new);
++	add_folder (menu, state, tmp->path, NULL, NULL, tmp);
+ 	continue;
+       }
+ #endif
+@@ -636,7 +642,7 @@
+       strfcpy (buffer, NONULL(tmp->path), sizeof (buffer));
+       mutt_pretty_mailbox (buffer);
+ 
+-      add_folder (menu, state, buffer, &s, NULL, tmp->new);
++      add_folder (menu, state, buffer, &s, NULL, tmp);
+     }
+     while ((tmp = tmp->next));
+   }
+@@ -1555,7 +1561,7 @@
+ 		if (regexec (rx, nd->group, 0, NULL, 0) == 0)
+ 		{
+ 		  mutt_newsgroup_subscribe (news, nd->group);
+-		  add_folder (menu, &state, nd->group, NULL, nd, nd->new);
++		  add_folder (menu, &state, nd->group, NULL, nd, nd);
+ 		}
+ 	      }
+ 	    }
+--- buffy.c Feb 2004 17:50:43 -0000	3.9
++++ buffy.c Feb 2004 13:19:42 -0000
+@@ -229,2 +229,3 @@ int mutt_parse_mailboxes (BUFFER *path, 
+     (*tmp)->newly_created = 0;
++    (*tmp)->mtime = 0;
+ 
+@@ -260,2 +261,3 @@ int mutt_buffy_check (int force)
+   struct stat sb;
++  struct stat smd;
+   struct dirent *de;
+@@ -299,2 +301,3 @@ int mutt_buffy_check (int force)
+     tmp->new = 0;
++    tmp->mtime = 0;
+ 
+@@ -383,6 +386,13 @@ int mutt_buffy_check (int force)
+ 	  {
+-	    /* one new and undeleted message is enough */
+-	    BuffyCount++;
+-	    tmp->new = 1;
+-	    break;
++	    if (!tmp->new)
++	    {
++	      /* one new and undeleted message is enough */
++	      BuffyCount++;
++	      tmp->new = 1;
++	    }
++	    snprintf (path, sizeof (path), "%s/new/%s", tmp->path, de->d_name);
++	    if (!stat (path, &smd) && smd.st_mtime > tmp->mtime)
++	    {
++	      tmp->mtime = smd.st_mtime;
++	    }
+ 	  }
+--- buffy.h Dec 2002 11:19:39 -0000	3.2
++++ buffy.h Feb 2004 13:19:42 -0000
+@@ -29,2 +29,3 @@ typedef struct buffy_t
+   struct buffy_t *next;
++  time_t mtime;			/* for maildirs...time of newest entry */
+   short new;			/* mailbox has new mail */
diff -ru  /usr/ports/mail/mutt-devel/files/patch-04 ./files/patch-04
--- /usr/ports/mail/mutt-devel/files/patch-04	Tue Feb 29 10:52:30 2000
+++ ./files/patch-04	Sat Jun 26 09:29:33 2004
@@ -1,16 +1,6 @@
 --- configure.orig	Tue Jan 18 14:19:14 2000
 +++ configure	Tue Feb 29 01:47:49 2000
-@@ -1925,6 +1925,9 @@
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
- char $ac_func();
-+#ifdef __FreeBSD__
-+#define bkgdset initscr
-+#endif
- 
- int main() {
- 
-@@ -5710,7 +5713,7 @@
+@@ -5710,7 +5710,7 @@
  s%@FFLAGS@%$FFLAGS%g
  s%@DEFS@%$DEFS%g
  s%@LDFLAGS@%$LDFLAGS%g
diff -ru  /usr/ports/mail/mutt-devel/files/patch-date-conditional ./files/patch-date-conditional
--- /usr/ports/mail/mutt-devel/files/patch-date-conditional	Thu Jan  1 01:00:00 1970
+++ ./files/patch-date-conditional	Thu Jun 24 11:50:16 2004
@@ -0,0 +1,146 @@
+--- PATCHES~	never
++++ PATCHES	Thu Jun 13 16:25:05 CDT 2002
+@@ -1,0 +1 @@
++dgc.deepif.1
+diff -Pur mutt-1.5.1-base/muttlib.c mutt-1.5.1/muttlib.c
+--- muttlib.c	Tue Mar 26 16:47:06 2002
++++ muttlib.c	Thu Jun 13 15:28:20 2002
+@@ -978,6 +978,12 @@
+ 	count = 0;
+         while (count < sizeof (ifstring) && *src && *src != '?' && *src != '&')
+ 	{
++	  if (*src == '\\')
++	  {
++	    src++;
++	    if (!*src)
++	      break;
++	  }
+           *cp++ = *src++;
+ 	  count++;
+ 	}
+@@ -990,7 +996,13 @@
+ 	count = 0;
+ 	while (count < sizeof (elsestring) && *src && *src != '?')
+ 	{
+-	  *cp++ = *src++;
++	  if (*src == '\\')
++	  {
++	    src++;
++	    if (!*src)
++	      break;
++	  }
++          *cp++ = *src++;
+ 	  count++;
+ 	}
+ 	*cp = 0;
+Index: PATCHES
+===================================================================
+--- PATCHES	(revision 22)
++++ PATCHES	(revision 22)
+@@ -1,0 +1 @@
++patch-1.5.0.ats.date_conditional.1
+Index: muttlib.c
+===================================================================
+--- muttlib.c	(revision 22)
++++ muttlib.c	(revision 22)
+@@ -944,7 +944,16 @@
+       if (*src == '?')
+       {
+ 	flags |= M_FORMAT_OPTIONAL;
+-	src++;
++	ch = *(++src); /* save the character to switch on */
++	cp = prefix;
++	++src;
++	count = 0;
++	while (count < sizeof (prefix) && *src != '?')
++	{
++	  *cp++ = *src++;
++	  count++;
++	}
++	*cp = 0;
+       }
+       else
+       {
+@@ -960,12 +969,12 @@
+ 	  count++;
+ 	}
+ 	*cp = 0;
+-      }
+ 
+-      if (!*src)
+-	break; /* bad format */
++	if (!*src)
++	  break; /* bad format */
+ 
+-      ch = *src++; /* save the character to switch on */
++	ch = *src++; /* save the character to switch on */
++      }
+ 
+       if (flags & M_FORMAT_OPTIONAL)
+       {
+--- hdrline.c.orig	Thu Jun 24 11:16:36 2004
++++ hdrline.c	Thu Jun 24 11:43:28 2004
+@@ -316,6 +316,63 @@
+ 	const char *cp;
+ 	struct tm *tm; 
+ 	time_t T;
++	int i = 0, invert = 0;
++
++	if (optional && (op == '[' || op == '(')) {
++	  char *is;
++          int d;
++	  T = time(NULL);
++	  d = T % 86400;
++	  T -= (op == '(') ? hdr->received : hdr->date_sent;
++
++	  is = (char *)prefix;
++	  if( *is == '>' ) {
++	    invert = 1;
++	    ++is;
++	  }
++
++	  while( *is && *is != '?' ) {
++	    int t = strtol (is, &is, 10);
++	    switch (*(is++)) {
++	      case '?':
++		break;
++	      case 'y':
++		t *= 365 * 24 * 60 * 60;
++		break;
++	      case 'M':
++		t *= 30 * 24 * 60 * 60;
++		break;
++	      case 'w':
++		t *= 7 * 24 * 60 * 60;
++		break;
++	      case 'd':
++		t *= 24 * 60 * 60;
++		break;
++	      case 't':
++		if (t > 1) {
++		  t = (t-1) * 24 * 60 * 60;
++		} else {
++		  t = 0;
++		}
++		t += d;
++		break;
++	      case 'h':
++		t *= 60 * 60;
++		break;
++	      case 'm':
++		t *= 60;
++		break;
++	    }
++	    i += t;
++	  }
++
++	  if (i < 0)
++	    i *= -1;
++
++	  if( (T > i || T < -1*i) ^ invert )
++	    optional = 0;
++	  break;
++	}
+ 
+ 	p = dest;
+ 
diff -ru  /usr/ports/mail/mutt-devel/files/patch-threadsubject ./files/patch-threadsubject
--- /usr/ports/mail/mutt-devel/files/patch-threadsubject	Thu Jan  1 01:00:00 1970
+++ ./files/patch-threadsubject	Wed Jun 23 08:56:20 2004
@@ -0,0 +1,51 @@
+From:
+
+http://www.elho.net/dev/mutt/patch-1.5.6.eh.thread_subject.1
+
+diff -ru mutt-1.5.6.orig/init.h mutt-1.5.6/init.h
+--- init.h	2004-02-01 18:15:17.000000000 +0100
++++ init.h	2004-06-21 22:58:49.000000000 +0200
+@@ -704,6 +704,13 @@
+   ** When set, mutt will not show the presence of missing messages in the
+   ** thread tree.
+   */
++  { "hide_thread_subject", DT_BOOL, R_TREE|R_INDEX, OPTHIDETHREADSUBJECT, 1 },
++  /*
++  ** .pp
++  ** When set, mutt will not show the subject of messages in the thread
++  ** tree that have the same subject as their parent or closest previously
++  ** displayed sibling.
++  */
+   { "hide_top_limited",	DT_BOOL, R_TREE|R_INDEX, OPTHIDETOPLIMITED, 0 },
+   /*
+   ** .pp
+diff -ru mutt-1.5.6.orig/mutt.h mutt-1.5.6/mutt.h
+--- mutt.h	2004-02-01 18:15:17.000000000 +0100
++++ mutt.h	2004-06-21 22:48:35.000000000 +0200
+@@ -351,6 +351,7 @@
+   OPTHIDDENHOST,
+   OPTHIDELIMITED,
+   OPTHIDEMISSING,
++  OPTHIDETHREADSUBJECT,
+   OPTHIDETOPLIMITED,
+   OPTHIDETOPMISSING,
+   OPTIGNORELISTREPLYTO,
+diff -ru mutt-1.5.6.orig/PATCHES mutt-1.5.6/PATCHES
+--- PATCHES	2004-02-01 18:42:47.000000000 +0100
++++ PATCHES	2004-06-21 21:54:50.000000000 +0200
+@@ -0,0 +1 @@
++patch-1.5.6.eh.thread_subject.1
+diff -ru mutt-1.5.6.orig/thread.c mutt-1.5.6/thread.c
+--- thread.c	2004-02-01 18:10:58.000000000 +0100
++++ thread.c	2004-06-21 22:51:35.000000000 +0200
+@@ -41,6 +41,10 @@
+ {
+   THREAD *tmp, *tree = hdr->thread;
+ 
++  /* if the user disabled subject hiding, display it */
++  if (!option (OPTHIDETHREADSUBJECT))
++    return (1);
++
+   /* if our subject is different from our parent's, display it */
+   if (hdr->subject_changed)
+     return (1);
diff -ru  /usr/ports/mail/mutt-devel/scripts/generate-plist ./scripts/generate-plist
--- /usr/ports/mail/mutt-devel/scripts/generate-plist	Sat Jun 12 15:01:36 2004
+++ ./scripts/generate-plist	Wed Jun 23 08:16:31 2004
@@ -131,7 +131,7 @@
   fi
 
   if [ "$MUTT_HTML" = "yes" ]; then
-    html=371
+    html=372
     if [ "$MUTT_COMPRESSED_FOLDERS" = "yes" ]; then
       html=$(($html + 5))
     fi
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406260748.i5Q7mlo7063564>