git: 672ab3228505 - main - mail/exim: merge exiqgrep perl syntax fix from upstream

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Mon, 28 Mar 2022 16:41:29 UTC
The branch main has been updated by fluffy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=672ab322850511daa7bfebbee1c0b8c675b01e9e

commit 672ab322850511daa7bfebbee1c0b8c675b01e9e
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2022-03-28 16:39:29 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2022-03-28 16:39:29 +0000

    mail/exim: merge exiqgrep perl syntax fix from upstream
    
    Reported by:    David Siebörger
    Sponsored by:   Netzkommune GmbH
---
 mail/exim/Makefile                                 |  2 +-
 ...5_35-Exiqgrep-check-arg-parsing.-Bug-2821.patch | 25 ++++++++++++++++++----
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index 9cd6deadcc29..614fd1f88b0a 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	exim
 PORTVERSION?=	${EXIM_VERSION}
-PORTREVISION?=	2
+PORTREVISION?=	3
 CATEGORIES=	mail
 MASTER_SITES=	EXIM:exim
 MASTER_SITE_SUBDIR=	/exim4/:exim \
diff --git a/mail/exim/files/debian/75_35-Exiqgrep-check-arg-parsing.-Bug-2821.patch b/mail/exim/files/debian/75_35-Exiqgrep-check-arg-parsing.-Bug-2821.patch
index ec056eec9b79..c226354d5e8e 100644
--- a/mail/exim/files/debian/75_35-Exiqgrep-check-arg-parsing.-Bug-2821.patch
+++ b/mail/exim/files/debian/75_35-Exiqgrep-check-arg-parsing.-Bug-2821.patch
@@ -11,15 +11,32 @@ diff --git a/src/exiqgrep.src b/src/exiqgrep.src
 index c8762df47..04602da68 100644
 --- a/src/exiqgrep.src
 +++ b/src/exiqgrep.src
-@@ -53,7 +53,7 @@ if ($ARGV[0] eq '--version') {
+@@ -53,12 +53,14 @@ if ($ARGV[0] eq '--version') {
          exit 0;
  }
  
 -getopts('hf:r:y:o:s:C:zxlibRcaG:',\%opt);
-+if (!getopts('hf:r:y:o:s:C:zxlibRcaG:',\%opt) { &help; exit;}
- if ($ARGV[0]) { &help; exit;}
- if ($opt{h}) { &help; exit;}
+-if ($ARGV[0]) { &help; exit;}
+-if ($opt{h}) { &help; exit;}
++if (!getopts('hf:r:y:o:s:C:zxlibRcaG:E:',\%opt)) { &help; exit; }
++if ($opt{h}) { &help; exit; }
++if ($ARGV[0] || !($opt{f} || $opt{r} || $opt{s} || $opt{y} || $opt{o} || $opt{z} || $opt{x} || $opt{c}))
++   { &help; exit(1); }
  if ($opt{a}) { $eargs = '-bp'; }
+ if ($opt{C} && -e $opt{C} && -f $opt{C} && -R $opt{C}) { $eargs .= ' -C '.$opt{C}; }
+ if ($opt{G}) { $eargs .= ' -qG'.$opt{G}; }
++if ($opt{E}) { $exim = $opt{E}; }
+ 
+ # Read message queue output into hash
+ &collect();
+@@ -75,6 +77,7 @@ Exim message queue display utility.
+ 
+ 	-h		This help message.
+ 	-C		Specify which exim.conf to use.
++	-E		Specify exim binary to use.
+ 
+ Selection criteria:
+ 	-f <regexp>	Match sender address sender (field is "< >" wrapped)
 -- 
 2.34.1