aboutsummaryrefslogtreecommitdiff
path: root/mail/mutt-devel
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2010-09-25 22:13:12 +0000
committerWesley Shields <wxs@FreeBSD.org>2010-09-25 22:13:12 +0000
commit10d4594363eb497bac356614a28324fafd99c237 (patch)
treeb29e38909fefa44abe2058937bfbbf0e6af421df /mail/mutt-devel
parent8f1a91c2591ea6e72ed954da4255fe40af2ba9d0 (diff)
downloadports-10d4594363eb497bac356614a28324fafd99c237.tar.gz
ports-10d4594363eb497bac356614a28324fafd99c237.zip
Notes
Diffstat (limited to 'mail/mutt-devel')
-rw-r--r--mail/mutt-devel/files/extra-patch-greeting160
-rw-r--r--mail/mutt-devel/files/patch-buffy.c0
-rw-r--r--mail/mutt-devel/files/patch-mutt-ssl.c0
-rw-r--r--mail/mutt-devel/files/patch-pgp134
4 files changed, 294 insertions, 0 deletions
diff --git a/mail/mutt-devel/files/extra-patch-greeting b/mail/mutt-devel/files/extra-patch-greeting
new file mode 100644
index 000000000000..a1f4bc113156
--- /dev/null
+++ b/mail/mutt-devel/files/extra-patch-greeting
@@ -0,0 +1,160 @@
+diff -urN mutt-1.5.19/globals.h mutt-1.5.19-vc/globals.h
+--- mutt-1.5.19/globals.h 2009-01-04 01:27:10.000000000 +0200
++++ mutt-1.5.19-vc/globals.h 2009-02-09 19:30:31.000000000 +0200
+@@ -52,6 +52,7 @@
+ WHERE char *FolderFormat;
+ WHERE char *ForwFmt;
+ WHERE char *Fqdn;
++WHERE char *Greeting;
+ WHERE char *HdrFmt;
+ WHERE char *HistFile;
+ WHERE char *Homedir;
+diff -urN mutt-1.5.19/hdrline.c mutt-1.5.19-vc/hdrline.c
+--- mutt-1.5.19/hdrline.c 2009-01-05 21:20:53.000000000 +0200
++++ mutt-1.5.19-vc/hdrline.c 2009-02-09 19:30:31.000000000 +0200
+@@ -741,3 +741,62 @@
+ {
+ mutt_FormatString (dst, dstlen, 0, s, hdr_format_str, (unsigned long) hfi, flags);
+ }
++
++/* %n = recipient name
++ * %u = user (login) name of recipient
++ * %v = first name of recipient */
++const char *
++greeting_string (char *dest,
++ size_t destlen,
++ size_t col,
++ char op,
++ const char *src,
++ const char *prefix,
++ const char *ifstring,
++ const char *elsestring,
++ unsigned long data,
++ format_flag flags)
++{
++ HEADER *hdr = (HEADER *)data;
++ char *p, buf2[SHORT_STRING];
++
++ dest[0] = '\0';
++ switch (op)
++ {
++ case 'n':
++ mutt_format_s (dest, destlen, prefix, mutt_get_name (hdr->env->to));
++ break;
++
++ case 'u':
++ if (hdr->env->to)
++ {
++ strfcpy (buf2, mutt_addr_for_display (hdr->env->to), sizeof (buf2));
++ if ((p = strpbrk (buf2, "%@")))
++ *p = '\0';
++ }
++ else
++ buf2[0] = '\0';
++ mutt_format_s (dest, destlen, prefix, buf2);
++ break;
++
++ case 'v':
++ if (hdr->env->to)
++ mutt_format_s (buf2, sizeof (buf2), prefix, mutt_get_name (hdr->env->to));
++ else if (hdr->env->cc)
++ mutt_format_s (buf2, sizeof (buf2), prefix, mutt_get_name (hdr->env->cc));
++ else
++ *buf2 = '\0';
++ if ((p = strpbrk (buf2, " %@")))
++ *p = '\0';
++ mutt_format_s (dest, destlen, prefix, buf2);
++ break;
++
++ default:
++ snprintf (dest, destlen, "%%%s%c", prefix, op);
++ break;
++ }
++ if (flags & M_FORMAT_OPTIONAL)
++ mutt_FormatString (dest, destlen, col, elsestring, greeting_string, data, flags);
++
++ return(src);
++}
+diff -urN mutt-1.5.19/init.h mutt-1.5.19-vc/init.h
+--- mutt-1.5.19/init.h 2009-01-05 21:20:53.000000000 +0200
++++ mutt-1.5.19-vc/init.h 2009-02-09 19:30:31.000000000 +0200
+@@ -745,6 +745,22 @@
+ ** .pp
+ ** This setting defaults to the contents of the environment variable \fC$$$EMAIL\fP.
+ */
++ { "greeting", DT_STR, R_NONE, UL &Greeting, UL "" },
++ /*
++ ** .pp
++ ** When set, this is the string that will precede every message as a
++ ** greeting phrase to the recipients.
++ ** .pp
++ ** ``Format strings'' are similar to the strings used in the ``C''
++ ** function printf to format output (see the man page for more detail).
++ ** The following sequences are defined in Mutt:
++ ** .pp
++ ** .dl
++ ** .dt %n .dd recipient name
++ ** .dt %u .dd user (login) name of recipient
++ ** .dt %v .dd first name of recipient
++ ** .de
++ */
+ { "gecos_mask", DT_RX, R_NONE, UL &GecosMask, UL "^[^,]*" },
+ /*
+ ** .pp
+diff -urN mutt-1.5.19/PATCHES mutt-1.5.19-vc/PATCHES
+--- mutt-1.5.19/PATCHES 2008-03-19 22:07:06.000000000 +0200
++++ mutt-1.5.19-vc/PATCHES 2009-02-09 19:30:31.000000000 +0200
+@@ -0,0 +1 @@
++vc.greeting
+diff -urN mutt-1.5.19/protos.h mutt-1.5.19-vc/protos.h
+--- mutt-1.5.19/protos.h 2009-01-05 21:20:53.000000000 +0200
++++ mutt-1.5.19-vc/protos.h 2009-02-09 19:32:15.000000000 +0200
+@@ -526,6 +526,9 @@
+ void ci_bounce_message (HEADER *, int *);
+ int ci_send_message (int, HEADER *, char *, CONTEXT *, HEADER *);
+
++const char *greeting_string (char *, size_t, size_t, char, const char *, const char *,
++ const char *, const char *, unsigned long, format_flag);
++
+ /* prototypes for compatibility functions */
+
+ #ifndef HAVE_SETENV
+diff -urN mutt-1.5.19/send.c mutt-1.5.19-vc/send.c
+--- mutt-1.5.19/send.c.orig 2010-09-17 16:49:09.000000000 +0200
++++ mutt-1.5.19-vc/send.c 2010-09-17 16:53:15.000000000 +0200
+@@ -469,6 +469,18 @@
+ }
+ }
+
++void mutt_make_greeting (HEADER *hdr, FILE *out, int flags)
++{
++ char buffer[STRING];
++ if (Greeting)
++ {
++ mutt_FormatString(buffer, sizeof(buffer), 0, Greeting, greeting_string,
++ (unsigned long) hdr, flags);
++ fputs(buffer, out);
++ fputc ('\n', out);
++ }
++}
++
+ void mutt_make_post_indent (CONTEXT *ctx, HEADER *cur, FILE *out)
+ {
+ char buffer[STRING];
+@@ -1003,7 +1015,6 @@
+ }
+ }
+
+-
+ /* look through the recipients of the message we are replying to, and if
+ we find an address that matches $alternates, we use that as the default
+ from field */
+@@ -1439,6 +1450,8 @@
+ if (option (OPTHDRS))
+ process_user_header (msg->env);
+
++ mutt_make_greeting(msg, tempfp, flags);
++
+ if (flags & SENDBATCH)
+ mutt_copy_stream (stdin, tempfp);
+
diff --git a/mail/mutt-devel/files/patch-buffy.c b/mail/mutt-devel/files/patch-buffy.c
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/mail/mutt-devel/files/patch-buffy.c
+++ /dev/null
diff --git a/mail/mutt-devel/files/patch-mutt-ssl.c b/mail/mutt-devel/files/patch-mutt-ssl.c
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/mail/mutt-devel/files/patch-mutt-ssl.c
+++ /dev/null
diff --git a/mail/mutt-devel/files/patch-pgp b/mail/mutt-devel/files/patch-pgp
new file mode 100644
index 000000000000..b7d0f36bf499
--- /dev/null
+++ b/mail/mutt-devel/files/patch-pgp
@@ -0,0 +1,134 @@
+--- crypt-gpgme.c~ 2010-09-10 07:41:33.584316201 +1000
++++ crypt-gpgme.c 2010-09-10 08:22:32.948976728 +1000
+@@ -2003,12 +2003,14 @@
+ {
+ if (!mutt_strncmp ("-----BEGIN PGP ", buf, 15))
+ {
+- if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
++ if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) ||
++ !mutt_strcmp ("MESSAGE-----\r\n", buf + 15))
+ {
+ enc = 1;
+ break;
+ }
+- else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
++ else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) ||
++ !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15))
+ {
+ sgn = 1;
+ break;
+@@ -2128,7 +2130,8 @@
+ continue;
+ }
+
+- if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n"))
++ if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") ||
++ !mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n"))
+ break;
+
+ if (armor_header)
+@@ -2196,14 +2199,17 @@
+ clearsign = 0;
+ start_pos = last_pos;
+
+- if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
++ if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) ||
++ !mutt_strcmp ("MESSAGE-----\r\n", buf + 15))
+ needpass = 1;
+- else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
++ else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) ||
++ !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15))
+ {
+ clearsign = 1;
+ needpass = 0;
+ }
+- else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
++ else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) ||
++ !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15))
+ {
+ needpass = 0;
+ pgp_keyblock = 1;
+--- pgp.c~ 2009-05-31 03:20:08.000000000 +1000
++++ pgp.c 2010-09-10 08:27:40.317064142 +1000
+@@ -219,7 +219,8 @@
+ continue;
+ }
+
+- if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
++ if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0 ||
++ mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n") == 0)
+ break;
+
+ if (armor_header)
+@@ -287,14 +288,17 @@
+ clearsign = 0;
+ start_pos = last_pos;
+
+- if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
++ if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 ||
++ mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0)
+ needpass = 1;
+- else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
++ else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 ||
++ mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0)
+ {
+ clearsign = 1;
+ needpass = 0;
+ }
+- else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
++ else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) ||
++ !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15))
+ {
+ needpass = 0;
+ pgp_keyblock = 1;
+@@ -327,10 +331,14 @@
+
+ fputs (buf, tmpfp);
+
+- if ((needpass && mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0) ||
+- (!needpass
+- && (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0
+- || mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0)))
++ if ((needpass &&
++ (mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0 ||
++ mutt_strcmp ("-----END PGP MESSAGE-----\r\n", buf) == 0)) ||
++ (!needpass &&
++ (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 ||
++ mutt_strcmp ("-----END PGP SIGNATURE-----\r\n", buf) == 0 ||
++ mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0 ||
++ mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\r\n",buf) == 0)))
+ break;
+ /* remember optional Charset: armor header as defined by RfC4880 */
+ if (mutt_strncmp ("Charset: ", buf, 9) == 0)
+@@ -554,11 +562,14 @@
+ {
+ if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0)
+ {
+- if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
++ if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 ||
++ mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0)
+ enc = 1;
+- else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
++ else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 ||
++ mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0)
+ sgn = 1;
+- else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
++ else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0 ||
++ mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15) == 0)
+ key = 1;
+ }
+ }
+@@ -1067,9 +1078,11 @@
+ */
+ while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL)
+ {
+- if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0)
++ if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0 ||
++ mutt_strcmp ("-----BEGIN PGP MESSAGE-----\r\n", buffer) == 0)
+ fputs ("-----BEGIN PGP SIGNATURE-----\n", fp);
+- else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0)
++ else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0 ||
++ mutt_strcmp("-----END PGP MESSAGE-----\r\n", buffer) == 0)
+ fputs ("-----END PGP SIGNATURE-----\n", fp);
+ else
+ fputs (buffer, fp);