From owner-svn-ports-all@FreeBSD.ORG Sun Jan 5 05:52:24 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E009D43; Sun, 5 Jan 2014 05:52:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2451212B8; Sun, 5 Jan 2014 05:52:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s055qNrM010020; Sun, 5 Jan 2014 05:52:23 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s055qNiK010017; Sun, 5 Jan 2014 05:52:23 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <201401050552.s055qNiK010017@svn.freebsd.org> From: Joe Marcus Clarke Date: Sun, 5 Jan 2014 05:52:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r338746 - in head/ports-mgmt/portlint: . src X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 05:52:24 -0000 Author: marcus Date: Sun Jan 5 05:52:23 2014 New Revision: 338746 URL: http://svnweb.freebsd.org/changeset/ports/338746 Log: Update to 2.14.9. * Correct some unitialized problems that pop up with certain ports * Replace USE_DOS2UNIX with USES=dos2unix * Do not check for direct use of commands in OPTIONS descriptions Reported by: Hardy Schumacher Modified: head/ports-mgmt/portlint/Makefile head/ports-mgmt/portlint/src/portlint.pl Modified: head/ports-mgmt/portlint/Makefile ============================================================================== --- head/ports-mgmt/portlint/Makefile Sun Jan 5 02:00:58 2014 (r338745) +++ head/ports-mgmt/portlint/Makefile Sun Jan 5 05:52:23 2014 (r338746) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= portlint -PORTVERSION= 2.14.8 +PORTVERSION= 2.14.9 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none Modified: head/ports-mgmt/portlint/src/portlint.pl ============================================================================== --- head/ports-mgmt/portlint/src/portlint.pl Sun Jan 5 02:00:58 2014 (r338745) +++ head/ports-mgmt/portlint/src/portlint.pl Sun Jan 5 05:52:23 2014 (r338746) @@ -17,7 +17,7 @@ # OpenBSD and NetBSD will be accepted. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.302 2013/12/29 05:26:49 marcus Exp $ +# $MCom: portlint/portlint.pl,v 1.305 2014/01/05 05:50:13 marcus Exp $ # use strict; @@ -52,7 +52,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 14; -my $micro = 8; +my $micro = 9; sub l { '[{(]'; } sub r { '[)}]'; } @@ -207,6 +207,7 @@ my @varlist = qw( my %makevar; my $i = 0; for (split(/\n/, get_makevar(@varlist))) { + $_ =~ s/\0//; print "OK: makevar: $varlist[$i] = $_\n" if ($verbose); $makevar{$varlist[$i]} = $_; $i++; @@ -1082,7 +1083,7 @@ sub checkpatch { if ($whole =~ / /) { my $lineno = &linenumber($`); &perror("WARN", $file, $lineno, "patch contains ^M characters. ". - "Consider defining USE_DOS2UNIX to remove DOS line endings ". + "Consider defining USES=dos2unix to remove DOS line endings ". "from source files."); } @@ -1755,10 +1756,14 @@ sub checkmakefile { my $edate; if (($edate) = ($whole =~ m/\nEXPIRATION_DATE\??=[ \t]*([^\n]*)\n/)) { my $lineno = &linenumber($`); - if ($edate ne strftime("%Y-%m-%d", 0, 0, 0, - substr($edate, 8, 2), - substr($edate, 5, 2) - 1, - substr($edate, 0, 4) - 1900)) { + my $ndate = $edate; + if ($ndate eq '' || length $ndate < 10) { + $ndate = '0000-00-00'; + } + if ($ndate ne strftime("%Y-%m-%d", 0, 0, 0, + substr($ndate, 8, 2), + substr($ndate, 5, 2) - 1, + substr($ndate, 0, 4) - 1900)) { &perror("FATAL", $file, $lineno, "EXPIRATION_DATE ($edate) is ". "either not in YYYY-MM-DD format or it is not a valid ". "date."); @@ -1896,7 +1901,7 @@ ruby sed sh sort sysctl touch tr which x my $curline = $1; my $dte_test = $curline; $dte_test =~ s/^\s+//g; - if ($desktop_entries =~ /$dte_test$/) { + if ($desktop_entries =~ /\Q$dte_test\E$/) { next; } my $lineno = &linenumber($`); @@ -1913,6 +1918,7 @@ ruby sed sh sort sysctl touch tr which x && $curline !~ /^WX_COMPS(.)?=[^\n]+$i/m && $curline !~ /^ONLY_FOR_ARCHS_REASON(.)?=[^\n]+$i/m && $curline !~ /^NOT_FOR_ARCHS_REASON(.)?=[^\n]+$i/m + && $curline !~ /^[A-Z0-9_]+_DESC=[^\n]+$i/m && $curline !~ /^\s*#.+$/m && $curline !~ /\-\-$i/m && $curline !~ /^COMMENT(.)?=[^\n]+$i/m) { @@ -2154,8 +2160,7 @@ ruby sed sh sort sysctl touch tr which x # whole file: check for --build, --mandir, and --infodir # when GNU_CONFIGURE # - if (exists $makevar{GNU_CONFIGURE} && - $makevar{GNU_CONFIGURE} ne '' && + if ($makevar{GNU_CONFIGURE} ne '' && $makevar{CONFIGURE_ARGS} =~ /--(build|(man|info)dir)/) { &perror("WARN", $file, -1, "--build, --mandir, and --infodir ". "are not needed in CONFIGURE_ARGS as they are already set in ". @@ -2200,7 +2205,7 @@ ruby sed sh sort sysctl touch tr which x "CFLAGS+=... instead"); } - if (defined($cxxflags) && $cflags !~ /\$\{CXXFLAGS/) { + if (defined($cxxflags) && $cxxflags !~ /\$\{CXXFLAGS/) { &perror("FATAL", $file, -1, "CXXFLAGS are clobbered in ". "CONFIGURE_ENV. Alter CXXFLAGS in the Makefile with ". "CXXFLAGS+=... instead"); @@ -2800,7 +2805,7 @@ DISTFILES EXTRACT_ONLY # print "OK: checking second section of $file (PATCH*: optional).\n" if ($verbose); - $tmp = $sections[$idx]; + $tmp = $sections[$idx] // ''; if ($tmp =~ /(PATCH_SITES|PATCH_SITE_SUBDIR|PATCHFILES|PATCH_DIST_STRIP)/) { &checkearlier($file, $tmp, @varnames); @@ -2836,7 +2841,7 @@ PATCH_SITES PATCHFILES PATCH_DIST_STRIP # print "OK: checking third section of $file (MAINTAINER).\n" if ($verbose); - $tmp = $sections[$idx]; + $tmp = $sections[$idx] // ''; &checkearlier($file, $tmp, @varnames); &checkorder('MAINTAINER', $tmp, $file, qw( @@ -2940,7 +2945,7 @@ MAINTAINER COMMENT # print "OK: checking fifth section of $file (*_DEPENDS).\n" if ($verbose); - $tmp = $sections[$idx]; + $tmp = $sections[$idx] // ''; # Check for direct assignment of BUILD_DEPENDS to RUN_DEPENDS. if ($tmp =~ /\nRUN_DEPENDS=[ \t]*\${BUILD_DEPENDS}/) { @@ -3228,7 +3233,7 @@ TEST_DEPENDS FETCH_DEPENDS DEPENDS_TARGE if ($i ne '' && ! -f "files/$i.in") { &perror("FATAL", $file, -1, "$i listed in USE_RC_SUBR, ". "but files/$i.in is missing."); - } elsif ($i eq '' && $mvar ne '') { + } elsif ($i eq '' && $mvar && $mvar ne '') { &perror("WARN", $file, -1, "possible undefined make variable ". "$mvar used as the value for USE_RC_SUBR."); } @@ -3297,6 +3302,9 @@ sub checkorder { my(@items, $i, $j, $k, $invalidorder); print "OK: checking the order of $section section.\n" if ($verbose); + if (!defined($str)) { + $str = ''; + } @items = (); foreach my $i (split("\n", $str)) { @@ -3354,6 +3362,10 @@ sub checkearlier { my($file, $str, @varnames) = @_; my($i); + if (!defined($str)) { + $str = ''; + } + print "OK: checking items that has to appear earlier.\n" if ($verbose); foreach my $i (@varnames) { if ($str =~ /\n$i\??=/) { @@ -3448,6 +3460,8 @@ sub get_makevar { $result = `$cmd`; chomp $result; + $result =~ s/\n\n/\n\0\n/g; + return $result; } @@ -3458,6 +3472,8 @@ sub get_makevar_raw { $result = `$cmd`; chomp $result; + $result =~ s/\n\n/\n\0\n/g; + return $result; } @@ -3470,9 +3486,12 @@ sub is_predefined { $site_re =~ s,$subdir_re,/(.*)/,; if ($url =~ /$site_re/) { - &perror("WARN", $file, -1, "how about using ". - "\"\${MASTER_SITE_$predefined{$site}}\" with ". - "\"MASTER_SITE_SUBDIR=$1\", instead of \"$url\"?"); + my $pe = "how about using \"\${MASTER_SITE_$predefined{$site}}\" "; + if ($1) { + $pe .= "with \"MASTER_SITE_SUBDIR=$1\", "; + } + $pe .= "instead of \"$url\"?"; + &perror("WARN", $file, -1, $pe); return &TRUE; } }