diff -ruN mail/mutt/Makefile mail/mutt.new/Makefile --- mail/mutt/Makefile 2016-03-15 13:56:32.000000000 +0100 +++ mail/mutt.new/Makefile 2016-03-16 08:35:18.772982000 +0100 @@ -54,7 +54,7 @@ .if defined (LITE) OPTIONS_UNSET= NLS DOCS EXAMPLES .else -OPTIONS_DEFINE= COMPRESSED_FOLDERS SASL DEBUG DOCS EXAMPLES FLOCK \ +OPTIONS_DEFINE= COMPRESSED_FOLDERS SASL DEBUG DOCS EXAMPLES FLOCK FORCEBASE64 \ GPGME GREETING_PATCH HTML ICONV IDN IFDEF_PATCH \ IMAP_HEADER_CACHE LOCALES_FIX MAILBOX_MANPAGES \ MAILDIR_HEADER_CACHE MAILDIR_MTIME_PATCH \ @@ -72,6 +72,7 @@ COMPRESSED_FOLDERS_DESC= Compressed folders SASL_DESC= SASL authentication DEBUG_DESC= Debugging capabilities +FORCEBASE64_DESC= Force base64 encoding for compose FLOCK_DESC= flock() usage GPGME_DESC= Gpgme interface GREETING_PATCH_DESC= Greeting support @@ -282,6 +283,9 @@ post-install-NNTP-on: ${INSTALL_DATA} ${WRKSRC}/ChangeLog.nntp ${STAGEDIR}${DOCSDIR} +post-patch-FORCEBASE64-on: + @${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-forcebase64 + post-patch-GREETING_PATCH-on: @${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-greeting @@ -336,3 +340,4 @@ .endif .include + diff -ruN mail/mutt/files/extra-patch-forcebase64 mail/mutt.new/files/extra-patch-forcebase64 --- mail/mutt/files/extra-patch-forcebase64 1970-01-01 01:00:00.000000000 +0100 +++ mail/mutt.new/files/extra-patch-forcebase64 2016-02-09 15:12:03.637707000 +0100 @@ -0,0 +1,40 @@ +diff -rudp -x '*.orig' mutt-1.5.24-orig/init.h mutt-1.5.24/init.h +--- mutt-1.5.24-orig/init.h 2015-08-30 19:06:38.000000000 +0200 ++++ mutt-1.5.24/init.h 2016-02-09 13:48:24.757051459 +0100 +@@ -838,6 +838,11 @@ struct option_t MuttVars[] = { + ** sent to both the list and your address, resulting in two copies + ** of the same email for you. + */ ++ { "force_base64", DT_BOOL, R_NONE, OPTFORCEBASE64, 0 }, ++ /* ++ ** .pp ++ ** If you need to encode all text parts to base64, set this option. ++ */ + { "force_name", DT_BOOL, R_NONE, OPTFORCENAME, 0 }, + /* + ** .pp +diff -rudp -x '*.orig' mutt-1.5.24-orig/mutt.h mutt-1.5.24/mutt.h +--- mutt-1.5.24-orig/mutt.h 2015-08-30 19:06:38.000000000 +0200 ++++ mutt-1.5.24/mutt.h 2016-02-09 13:48:24.758051324 +0100 +@@ -339,6 +339,7 @@ enum + OPTFASTREPLY, + OPTFCCCLEAR, + OPTFOLLOWUPTO, ++ OPTFORCEBASE64, + OPTFORCENAME, + OPTFORWDECODE, + OPTFORWQUOTE, +diff -rudp -x '*.orig' mutt-1.5.24-orig/sendlib.c mutt-1.5.24/sendlib.c +--- mutt-1.5.24-orig/sendlib.c 2015-08-30 19:06:38.000000000 +0200 ++++ mutt-1.5.24/sendlib.c 2016-02-09 13:48:24.759051309 +0100 +@@ -1168,7 +1168,9 @@ static void mutt_set_encoding (BODY *b, + if (b->type == TYPETEXT) + { + char *chsname = mutt_get_body_charset (send_charset, sizeof (send_charset), b); +- if ((info->lobin && ascii_strncasecmp (chsname, "iso-2022", 8)) || info->linemax > 990 || (info->from && option (OPTENCODEFROM))) ++ if (option (OPTFORCEBASE64)) ++ b->encoding = ENCBASE64; ++ else if ((info->lobin && ascii_strncasecmp (chsname, "iso-2022", 8)) || info->linemax > 990 || (info->from && option (OPTENCODEFROM))) + b->encoding = ENCQUOTEDPRINTABLE; + else if (info->hibin) + b->encoding = option (OPTALLOW8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE;