diff options
author | wiz <wiz> | 2016-10-10 19:26:31 +0000 |
---|---|---|
committer | wiz <wiz> | 2016-10-10 19:26:31 +0000 |
commit | 8bf923f58115d6f3947caab0878fcbe7106dffac (patch) | |
tree | 5827400e8a3d94290f5b7aaa73a681dc03f5750f /mail | |
parent | 22a76d8e53d6d83a03dc8018107612820335d50e (diff) | |
download | pkgsrc-8bf923f58115d6f3947caab0878fcbe7106dffac.tar.gz |
Apply upstream patch:
forgotten-attachment: fix empty regex expression
The original regex was of the form "abc(|def)" to check for both "abc"
and "abcdef". Unfortunately, the regex libraries on BSDs/MacOS don't
like this use of an empty sub-expression.
Expanding the regex to: "(abc|abcdef)" fixes the problem.
https://github.com/neomutt/neomutt/commit/3bc69ca25077b171f1ae9beee484629c5b5c6482
Bump PKGREVISION.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/neomutt/Makefile | 4 | ||||
-rw-r--r-- | mail/neomutt/distinfo | 7 | ||||
-rw-r--r-- | mail/neomutt/patches/patch-doc_manual.xml.head | 24 | ||||
-rw-r--r-- | mail/neomutt/patches/patch-doc_muttrc.forgotten-attachment | 23 | ||||
-rw-r--r-- | mail/neomutt/patches/patch-init.c | 39 | ||||
-rw-r--r-- | mail/neomutt/patches/patch-init.h | 23 | ||||
-rw-r--r-- | mail/neomutt/patches/patch-send.c | 23 |
7 files changed, 140 insertions, 3 deletions
diff --git a/mail/neomutt/Makefile b/mail/neomutt/Makefile index e08041e348e..e2d36645982 100644 --- a/mail/neomutt/Makefile +++ b/mail/neomutt/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.14 2016/10/06 16:30:18 wiz Exp $ +# $NetBSD: Makefile,v 1.15 2016/10/10 19:26:31 wiz Exp $ DISTNAME= neomutt-20161003 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_GITHUB:=neomutt/} GITHUB_TAG= ${DISTNAME} diff --git a/mail/neomutt/distinfo b/mail/neomutt/distinfo index f4698e8379a..08275b80bac 100644 --- a/mail/neomutt/distinfo +++ b/mail/neomutt/distinfo @@ -1,9 +1,14 @@ -$NetBSD: distinfo,v 1.10 2016/10/06 16:27:15 wiz Exp $ +$NetBSD: distinfo,v 1.11 2016/10/10 19:26:31 wiz Exp $ SHA1 (neomutt-20161003.tar.gz) = d0849c7efaa7e099b17137d8f5f90b9a201142f1 RMD160 (neomutt-20161003.tar.gz) = c69fe3dba35c3341987b6eb21b4bc0a1eb546762 SHA512 (neomutt-20161003.tar.gz) = f3b42e0bf12038bfdce20db30d2ac4ee60a4ce317894ff035a4180a53d0899936aef6f809c52ef8786eab6b247e98ae244578d00a5dafb44e04f4b3ccc84b592 Size (neomutt-20161003.tar.gz) = 2656280 bytes +SHA1 (patch-doc_manual.xml.head) = c569f4d51781ecb5e980e83e6f8cde9cdb97a189 +SHA1 (patch-doc_muttrc.forgotten-attachment) = 185086380ac27b02e8f39e611d8de5461c1af8b0 SHA1 (patch-hash.c) = 63df8e500d91f0dffb24801b84dc7155539d34a5 SHA1 (patch-hash.h) = ddc94cfaeead9800f5f902de9f4255803122463d SHA1 (patch-headers.c) = 8d985b9dfc717c5c30e9fb314c33b35d61dcaf56 +SHA1 (patch-init.c) = 607da46758dcf4ee85644926f5d33f821b2f6713 +SHA1 (patch-init.h) = f2cfba5e802527d546623dbf01d5f2a8b1552cf3 +SHA1 (patch-send.c) = 16ed40585b04e136d96eb20e12caa2855c856b23 diff --git a/mail/neomutt/patches/patch-doc_manual.xml.head b/mail/neomutt/patches/patch-doc_manual.xml.head new file mode 100644 index 00000000000..76bb3b9955e --- /dev/null +++ b/mail/neomutt/patches/patch-doc_manual.xml.head @@ -0,0 +1,24 @@ +$NetBSD: patch-doc_manual.xml.head,v 1.1 2016/10/10 19:26:31 wiz Exp $ + +forgotten-attachment: fix empty regex expression + +The original regex was of the form "abc(|def)" to check for both "abc" +and "abcdef". Unfortunately, the regex libraries on BSDs/MacOS don't +like this use of an empty sub-expression. + +Expanding the regex to: "(abc|abcdef)" fixes the problem. + +https://github.com/neomutt/neomutt/commit/3bc69ca25077b171f1ae9beee484629c5b5c6482 + + +--- doc/manual.xml.head.orig 2016-10-03 11:27:32.000000000 +0000 ++++ doc/manual.xml.head +@@ -10142,7 +10142,7 @@ set pgp_encrypt_self = "no" + <row> + <entry><literal>attach_keyword</literal></entry> + <entry>regular expression</entry> +- <entry><literal>\\<attach(|ed|ments?)\\></literal></entry> ++ <entry><literal>\\<(attach|attached|attachments?)\\></literal></entry> + </row> + <row> + <entry><literal>abort_noattach</literal></entry> diff --git a/mail/neomutt/patches/patch-doc_muttrc.forgotten-attachment b/mail/neomutt/patches/patch-doc_muttrc.forgotten-attachment new file mode 100644 index 00000000000..c394b1da315 --- /dev/null +++ b/mail/neomutt/patches/patch-doc_muttrc.forgotten-attachment @@ -0,0 +1,23 @@ +$NetBSD: patch-doc_muttrc.forgotten-attachment,v 1.1 2016/10/10 19:26:31 wiz Exp $ + +forgotten-attachment: fix empty regex expression + +The original regex was of the form "abc(|def)" to check for both "abc" +and "abcdef". Unfortunately, the regex libraries on BSDs/MacOS don't +like this use of an empty sub-expression. + +Expanding the regex to: "(abc|abcdef)" fixes the problem. + +https://github.com/neomutt/neomutt/commit/3bc69ca25077b171f1ae9beee484629c5b5c6482 + +--- doc/muttrc.forgotten-attachment.orig 2016-10-03 11:27:32.000000000 +0000 ++++ doc/muttrc.forgotten-attachment +@@ -16,7 +16,7 @@ set abort_noattach = no + # Search for the following regular expression in the body of the email + + # English: attach, attached, attachment, attachments +-set attach_keyword = "\\<attach(|ed|ments?)\\>" ++set attach_keyword = "\\<(attach|attached|attachments?)\\>" + + # Nederlands: + # set attach_keyword = "\\<(bijvoegen|bijgevoegd|bijlage|bijlagen)\\>" diff --git a/mail/neomutt/patches/patch-init.c b/mail/neomutt/patches/patch-init.c new file mode 100644 index 00000000000..6f8b6852717 --- /dev/null +++ b/mail/neomutt/patches/patch-init.c @@ -0,0 +1,39 @@ +$NetBSD: patch-init.c,v 1.1 2016/10/10 19:26:31 wiz Exp $ + +forgotten-attachment: fix empty regex expression + +The original regex was of the form "abc(|def)" to check for both "abc" +and "abcdef". Unfortunately, the regex libraries on BSDs/MacOS don't +like this use of an empty sub-expression. + +Expanding the regex to: "(abc|abcdef)" fixes the problem. + +https://github.com/neomutt/neomutt/commit/3bc69ca25077b171f1ae9beee484629c5b5c6482 + +--- init.c.orig 2016-10-03 11:27:32.000000000 +0000 ++++ init.c +@@ -1704,6 +1704,7 @@ static void mutt_restore_default (struct + + if (p->init) + { ++ int retval; + char *s = (char *) p->init; + + pp->rx = safe_calloc (1, sizeof (regex_t)); +@@ -1715,10 +1716,15 @@ static void mutt_restore_default (struct + s++; + pp->not = 1; + } +- if (REGCOMP (pp->rx, s, flags) != 0) ++ retval = REGCOMP (pp->rx, s, flags); ++ if (retval != 0) + { ++ char msgbuf[STRING]; ++ regerror (retval, pp->rx, msgbuf, sizeof (msgbuf)); + fprintf (stderr, _("mutt_restore_default(%s): error in regexp: %s\n"), + p->option, pp->pattern); ++ fprintf (stderr, "%s\n", msgbuf); ++ mutt_sleep (0); + FREE (&pp->pattern); + FREE (&pp->rx); + } diff --git a/mail/neomutt/patches/patch-init.h b/mail/neomutt/patches/patch-init.h new file mode 100644 index 00000000000..022ae60ff3c --- /dev/null +++ b/mail/neomutt/patches/patch-init.h @@ -0,0 +1,23 @@ +$NetBSD: patch-init.h,v 1.1 2016/10/10 19:26:31 wiz Exp $ + +forgotten-attachment: fix empty regex expression + +The original regex was of the form "abc(|def)" to check for both "abc" +and "abcdef". Unfortunately, the regex libraries on BSDs/MacOS don't +like this use of an empty sub-expression. + +Expanding the regex to: "(abc|abcdef)" fixes the problem. + +https://github.com/neomutt/neomutt/commit/3bc69ca25077b171f1ae9beee484629c5b5c6482 + +--- init.h.orig 2016-10-03 11:27:32.000000000 +0000 ++++ init.h +@@ -267,7 +267,7 @@ struct option_t MuttVars[] = { + ** .pp + ** For an explanation of ``soft-fill'', see the $$index_format documentation. + */ +- { "attach_keyword", DT_RX, R_NONE, UL &AttachKeyword, UL "\\<attach(|ed|ments?)\\>" }, ++ { "attach_keyword", DT_RX, R_NONE, UL &AttachKeyword, UL "\\<(attach|attached|attachments?)\\>" }, + /* + ** .pp + ** If $abort_noattach is not set to no, then the body of the message diff --git a/mail/neomutt/patches/patch-send.c b/mail/neomutt/patches/patch-send.c new file mode 100644 index 00000000000..6fd55d6f366 --- /dev/null +++ b/mail/neomutt/patches/patch-send.c @@ -0,0 +1,23 @@ +$NetBSD: patch-send.c,v 1.1 2016/10/10 19:26:31 wiz Exp $ + +forgotten-attachment: fix empty regex expression + +The original regex was of the form "abc(|def)" to check for both "abc" +and "abcdef". Unfortunately, the regex libraries on BSDs/MacOS don't +like this use of an empty sub-expression. + +Expanding the regex to: "(abc|abcdef)" fixes the problem. + +https://github.com/neomutt/neomutt/commit/3bc69ca25077b171f1ae9beee484629c5b5c6482 + +--- send.c.orig 2016-10-03 11:27:32.000000000 +0000 ++++ send.c +@@ -1902,7 +1902,7 @@ main_loop: + /* if the abort is automatic, print an error message */ + if (quadoption (OPT_ATTACH) == MUTT_YES) + { +- mutt_error _("Message contains text matching \"attach_keyword\". Not sending."); ++ mutt_error _("Message contains text matching \"$attach_keyword\". Not sending."); + } + goto main_loop; + } |