Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jan 2014 05:52:23 +0000 (UTC)
From:      Joe Marcus Clarke <marcus@FreeBSD.org>
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
Message-ID:  <201401050552.s055qNiK010017@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <hardy.schumacher@gmx.de>

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;
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401050552.s055qNiK010017>