From owner-svn-ports-head@freebsd.org Sun May 28 14:27:26 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85AEDD85BC8; Sun, 28 May 2017 14:27:26 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48E761DCF; Sun, 28 May 2017 14:27:26 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4SERPWF035064; Sun, 28 May 2017 14:27:25 GMT (envelope-from crees@FreeBSD.org) Received: (from crees@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4SERPgp035062; Sun, 28 May 2017 14:27:25 GMT (envelope-from crees@FreeBSD.org) Message-Id: <201705281427.v4SERPgp035062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: crees set sender to crees@FreeBSD.org using -f From: Chris Rees Date: Sun, 28 May 2017 14:27:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r441912 - in head/mail/openwebmail: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 14:27:26 -0000 Author: crees Date: Sun May 28 14:27:25 2017 New Revision: 441912 URL: https://svnweb.freebsd.org/changeset/ports/441912 Log: Fix with new perl Submitted by: Bretislav Kubesa Added: head/mail/openwebmail/files/patch-fix-perl (contents, props changed) Modified: head/mail/openwebmail/Makefile Modified: head/mail/openwebmail/Makefile ============================================================================== --- head/mail/openwebmail/Makefile Sun May 28 12:11:47 2017 (r441911) +++ head/mail/openwebmail/Makefile Sun May 28 14:27:25 2017 (r441912) @@ -3,7 +3,7 @@ PORTNAME= openwebmail PORTVERSION= 2.53 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= http://openwebmail.acatysmoof.com/download/release/ \ http://openwebmail.org/openwebmail/download/release/ Added: head/mail/openwebmail/files/patch-fix-perl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/openwebmail/files/patch-fix-perl Sun May 28 14:27:25 2017 (r441912) @@ -0,0 +1,149 @@ +diff -ruN openwebmail/openwebmail-read.pl openwebmail-2.53_2/cgi-bin/openwebmail/openwebmail-read.pl +--- openwebmail/openwebmail-read.pl 2017-04-24 19:43:15.081986000 +0200 ++++ openwebmail/openwebmail-read.pl 2017-04-24 19:36:30.000000000 +0200 +@@ -861,7 +861,7 @@ + my $has_nontext_att=0; + + foreach my $attnumber (0 .. $#{$message{attachment}}) { +- next unless (defined %{$message{attachment}[$attnumber]}); ++ next unless (%{$message{attachment}[$attnumber]}); + $has_nontext_att++ if (defined ${$message{attachment}[$attnumber]}{'content-type'} && + ${$message{attachment}[$attnumber]}{'content-type'}!~/^text/i); + my $attcharset=$convfrom; +@@ -886,7 +886,7 @@ + + } else { # attmode==simple + # handle case to skip to next text/html attachment +- if ( defined %{$message{attachment}[$attnumber+1]} && ++ if ( ref($message{attachment}[$attnumber+1]) eq "HASH" && + (${$message{attachment}[$attnumber+1]}{boundary} eq + ${$message{attachment}[$attnumber]}{boundary}) ) { + +@@ -1508,7 +1508,7 @@ + return ($msgsize, $errmsg) if ($msgsize<=0); + ($message{header}, $message{body}, $message{attachment}) + =ow::mailparse::parse_rfc822block(\$block, "0", "all"); +- return 0 if (!defined @{$message{attachment}}); ++ return 0 if (!defined {$message{attachment}}); + + my @datas; + my $boundary = "----=OPENWEBMAIL_ATT_" . rand(); +diff -ruN openwebmail/openwebmail-send.pl openwebmail-2.53_2/cgi-bin/openwebmail/openwebmail-send.pl +--- openwebmail/openwebmail-send.pl 2017-04-24 19:43:15.085116000 +0200 ++++ openwebmail/openwebmail-send.pl 2017-04-24 19:28:00.000000000 +0200 +@@ -510,7 +510,7 @@ + } elsif ($message{'content-type'} =~ /^multipart/i) { + # If the first attachment is text, + # assume it's the body of a message in multi-part format +- if ( defined %{$message{attachment}[0]} && ++ if ( %{$message{attachment}[0]} && + ${$message{attachment}[0]}{'content-type'} =~ /^text/i ) { + if (${$message{attachment}[0]}{'content-transfer-encoding'} =~ /^quoted-printable/i) { + $body = decode_qp(${${$message{attachment}[0]}{r_content}}); +@@ -531,7 +531,7 @@ + # handle mail with both text and html version + # rename html to other name so if user in text compose mode, + # the modified/forwarded text won't be overridden by html again +- if ( defined %{$message{attachment}[1]} && ++ if ( %{$message{attachment}[1]} && + ${$message{attachment}[1]}{boundary} eq ${$message{attachment}[0]}{boundary} ) { + # rename html attachment in the same alternative group + if ( (${$message{attachment}[0]}{subtype}=~/alternative/i && +diff -ruN openwebmail/shares/getmessage.pl openwebmail-2.53_2/cgi-bin/openwebmail/shares/getmessage.pl +--- openwebmail/shares/getmessage.pl 2017-04-24 19:43:15.037505000 +0200 ++++ openwebmail/shares/getmessage.pl 2017-04-24 19:02:24.000000000 +0200 +@@ -89,7 +89,7 @@ + $message{status} =~ s/\s//g; + if ($message{'content-type'}=~/charset="?([^\s"';]*)"?\s?/i) { + $message{charset}=$1; +- } elsif (defined @{$message{attachment}}) { ++ } elsif (@{$message{attachment}}) { + my @att=@{$message{attachment}}; + foreach my $i (0 .. $#att) { + if (defined ${$att[$i]}{charset} && ${$att[$i]}{charset} ne '') { +diff -ruN openwebmail/shares/mailfilter.pl openwebmail-2.53_2/cgi-bin/openwebmail/shares/mailfilter.pl +--- openwebmail/shares/mailfilter.pl 2017-04-24 19:43:15.040213000 +0200 ++++ openwebmail/shares/mailfilter.pl 2017-04-24 19:02:37.000000000 +0200 +@@ -366,7 +366,7 @@ + $io_errcount++; $i--; next; + } + } +- if (!defined @{$r_attachments}) { ++ if (!@{$r_attachments}) { + ($header, $body, $r_attachments)=ow::mailparse::parse_rfc822block(\$currmessage); + } + +@@ -430,7 +430,7 @@ + $io_errcount++; $i--; next; + } + } +- if (!defined @{$r_attachments}) { ++ if (!@{$r_attachments}) { + ($header, $body, $r_attachments)=ow::mailparse::parse_rfc822block(\$currmessage); + } + # check attachments +@@ -638,7 +638,7 @@ + $io_errcount++; $i--; next; + } + } +- if (!defined @{$r_attachments}) { ++ if (!@{$r_attachments}) { + ($header, $body, $r_attachments)=ow::mailparse::parse_rfc822block(\$currmessage); + } + +diff -ruN openwebmail/shares/ow-shared.pl openwebmail-2.53_2/cgi-bin/openwebmail/shares/ow-shared.pl +--- openwebmail/shares/ow-shared.pl 2017-04-24 19:43:15.041206000 +0200 ++++ openwebmail/shares/ow-shared.pl 2017-04-24 19:21:59.000000000 +0200 +@@ -184,17 +184,18 @@ + use vars qw($_vars_used); + sub openwebmail_clearall { + # clear opentable in filelock.pl +- ow::filelock::closeall() if (defined %ow::filelock::opentable); ++ ow::filelock::closeall() if (%ow::filelock::opentable); + + # chdir back to openwebmail cgidir + chdir($config{'ow_cgidir'}) if ($config{'ow_cgidir'}); + + # clear gobal variable for persistent perl +- undef(%SIG) if (defined %SIG); +- undef(%config) if (defined %config); +- undef(%config_raw) if (defined %config_raw); ++ undef(%SIG) if (%SIG); ++ undef(%config) if (%config); ++ undef(%config_raw) if (%config_raw); ++ + undef($thissession) if (defined $thissession); +- undef(%icontext) if (defined %icontext); ++ undef(%icontext) if (%icontext); + + undef($default_logindomain) if (defined $default_logindomain); + undef($loginname) if (defined $loginname); +@@ -207,7 +208,7 @@ + undef($uuid) if (defined $uuid); + undef($ugid) if (defined $ugid); + undef($homedir) if (defined $homedir); +- undef(%prefs) if (defined %prefs); ++undef(%prefs) if (%prefs); + + undef($quotausage) if (defined $quotausage); + undef($quotalimit) if (defined $quotalimit); +@@ -1068,8 +1069,8 @@ + $user=get_user_by_virtualuser($loginuser); + if ($user eq "") { + my @domainlist=($logindomain); +- if (defined @{$config{'domain_equiv'}{'list'}{$logindomain}}) { +- push(@domainlist, @{$config{'domain_equiv'}{'list'}{$logindomain}}); ++ if (defined{$config{'domain_equiv'}{'list'}{$logindomain}}) { ++ push(@domainlist, defined{$config{'domain_equiv'}{'list'}{$logindomain}}); + } + foreach (@domainlist) { + $user=get_user_by_virtualuser("$loginuser\@$_"); +@@ -1698,7 +1699,7 @@ + + ########## IS_ADM ################################################ + sub is_vdomain_adm { +- if (defined @{$config{'vdomain_admlist'}}) { ++ if (@{$config{'vdomain_admlist'}}) { + foreach my $adm (@{$config{'vdomain_admlist'}}) { + return 1 if ($_[0] eq $adm); # $_[0] is the user + }