diff -ruN backuppc.orig/files/patch-lib_BackupPC_Lib.pm backuppc/files/patch-lib_BackupPC_Lib.pm --- backuppc.orig/files/patch-lib_BackupPC_Lib.pm 1970-01-01 03:00:00.000000000 +0300 +++ backuppc/files/patch-lib_BackupPC_Lib.pm 2016-11-08 11:09:16.000000000 +0300 @@ -0,0 +1,20 @@ +--- lib/BackupPC/Lib.pm.orig 2016-11-08 08:08:02 UTC ++++ lib/BackupPC/Lib.pm +@@ -1261,7 +1261,7 @@ sub cmdVarSubstitute + # + # Replace scalar variables first + # +- $arg =~ s[\${(\w+)}(\+?)]{ ++ $arg =~ s[\$\{(\w+)}(\+?)]{ + exists($vars->{$1}) && ref($vars->{$1}) ne "ARRAY" + ? ($2 eq "+" ? $bpc->shellEscape($vars->{$1}) : $vars->{$1}) + : "\${$1}$2" +@@ -1270,7 +1270,7 @@ sub cmdVarSubstitute + # Now replicate any array arguments; this just works for just one + # array var in each argument. + # +- if ( $arg =~ m[(.*)\${(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) { ++ if ( $arg =~ m[(.*)\$\{(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) { + my $pre = $1; + my $var = $2; + my $esc = $3; diff -ruN backuppc.orig/Makefile backuppc/Makefile --- backuppc.orig/Makefile 2016-11-08 10:51:33.455558000 +0300 +++ backuppc/Makefile 2016-11-08 11:40:18.735632000 +0300 @@ -3,7 +3,7 @@ PORTNAME= backuppc PORTVERSION= 3.3.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils MASTER_SITES= SF DISTNAME= BackupPC-${PORTVERSION} @@ -134,4 +134,10 @@ ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/backuppc ${CP} ${WRKSRC}/update.pl ${STAGEDIR}${PREFIX}/libexec/backuppc/update.pl -.include +.include + +.if ${PERL_LEVEL} >= 502200 +RUN_DEPENDS+= p5-CGI>0:www/p5-CGI +.endif + +.include