View | Details | Raw Unified | Return to bug 200634
Collapse All | Expand All

(-)/usr/home/pi/myp/ports-mgmt/portlint/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD: head/ports-mgmt/portlint/Makefile 386646 2015-05-17 22:44:09Z marcus $
2
# $FreeBSD: head/ports-mgmt/portlint/Makefile 386646 2015-05-17 22:44:09Z marcus $
3
3
4
PORTNAME=	portlint
4
PORTNAME=	portlint
5
PORTVERSION=	2.16.4
5
PORTVERSION=	2.16.5
6
CATEGORIES=	ports-mgmt
6
CATEGORIES=	ports-mgmt
7
MASTER_SITES=	# none
7
MASTER_SITES=	# none
8
DISTFILES=	# none
8
DISTFILES=	# none
(-)/usr/home/pi/myp/ports-mgmt/portlint/src/portlint.pl (-18 / +18 lines)
Lines 967-973 Link Here
967
		$j = $1;
967
		$j = $1;
968
		$seen_depends{$j}++;
968
		$seen_depends{$j}++;
969
		if ($j ne 'DEPENDS' &&
969
		if ($j ne 'DEPENDS' &&
970
			$i =~ /^\${([A-Z_]+DEPENDS)}\s*$/ &&
970
			$i =~ /^\$\{([A-Z_]+DEPENDS)}\s*$/ &&
971
			$seen_depends{$1} &&
971
			$seen_depends{$1} &&
972
			$j ne $1)
972
			$j ne $1)
973
		{
973
		{
Lines 987-993 Link Here
987
987
988
			print "OK: checking dependency value for $j.\n"
988
			print "OK: checking dependency value for $j.\n"
989
				if ($verbose);
989
				if ($verbose);
990
			if ($k =~ /\${((PATCH_|EXTRACT_|LIB_|BUILD_|RUN_|TEST_|FETCH_)*DEPENDS)}/) {
990
			if ($k =~ /\$\{((PATCH_|EXTRACT_|LIB_|BUILD_|RUN_|TEST_|FETCH_)*DEPENDS)}/) {
991
				&perror("WARN", $file, -1, "do not set $j to $k. ".
991
				&perror("WARN", $file, -1, "do not set $j to $k. ".
992
					"Instead, explicity list out required $j dependencies.");
992
					"Instead, explicity list out required $j dependencies.");
993
			}
993
			}
Lines 1016-1022 Link Here
1016
			}
1016
			}
1017
1017
1018
			# Check for ${SITE_PERL} in depends
1018
			# Check for ${SITE_PERL} in depends
1019
			if ($m{'dep'} =~ m|^(\${SITE_PERL}/.*)$|) {
1019
			if ($m{'dep'} =~ m|^(\$\{SITE_PERL}/.*)$|) {
1020
				&perror("WARN", $file, -1, "dependency to $1 ".
1020
				&perror("WARN", $file, -1, "dependency to $1 ".
1021
					"listed in $j. consider using p5-Example-Package-Name>=0.  See ".
1021
					"listed in $j. consider using p5-Example-Package-Name>=0.  See ".
1022
					"http://www.freebsd.org/doc/en/books/porters-handbook/using-perl.html".
1022
					"http://www.freebsd.org/doc/en/books/porters-handbook/using-perl.html".
Lines 1038-1044 Link Here
1038
			}
1038
			}
1039
1039
1040
			# check USES=gmake
1040
			# check USES=gmake
1041
			if ($m{'dep'} =~ /^(gmake|\${GMAKE})$/) {
1041
			if ($m{'dep'} =~ /^(gmake|\$\{GMAKE})$/) {
1042
				&perror("WARN", $file, -1, "dependency to $1 ".
1042
				&perror("WARN", $file, -1, "dependency to $1 ".
1043
					"listed in $j. consider using ".
1043
					"listed in $j. consider using ".
1044
					"USES[+]=gmake.");
1044
					"USES[+]=gmake.");
Lines 1074-1080 Link Here
1074
			}
1074
			}
1075
1075
1076
			# check for PREFIX
1076
			# check for PREFIX
1077
			if ($m{'dep'} =~ /\${PREFIX}/) {
1077
			if ($m{'dep'} =~ /\$\{PREFIX}/) {
1078
				&perror("FATAL", $file, -1, "\${PREFIX} must not be ".
1078
				&perror("FATAL", $file, -1, "\${PREFIX} must not be ".
1079
					"contained in *_DEPENDS. ".
1079
					"contained in *_DEPENDS. ".
1080
					"use \${LOCALBASE} instead.");
1080
					"use \${LOCALBASE} instead.");
Lines 1103-1109 Link Here
1103
1103
1104
			# Check port dir existence
1104
			# Check port dir existence
1105
			$k = $m{'dir'};
1105
			$k = $m{'dir'};
1106
			$k =~ s/\${PORTSDIR}/$ENV{'PORTSDIR'}/;
1106
			$k =~ s/\$\{PORTSDIR}/$ENV{'PORTSDIR'}/;
1107
			$k =~ s/\$[\({]PORTSDIR[\)}]/$ENV{'PORTSDIR'}/;
1107
			$k =~ s/\$[\({]PORTSDIR[\)}]/$ENV{'PORTSDIR'}/;
1108
			if (! -d $k) {
1108
			if (! -d $k) {
1109
				&perror("WARN", $file, -1, "no port directory $k ".
1109
				&perror("WARN", $file, -1, "no port directory $k ".
Lines 1240-1246 Link Here
1240
	#
1240
	#
1241
	if ($parenwarn) {
1241
	if ($parenwarn) {
1242
		print "OK: checking for empty(\${VARIABLE}).\n" if ($verbose);
1242
		print "OK: checking for empty(\${VARIABLE}).\n" if ($verbose);
1243
		if ($whole =~ /empty\(\${[\w\d]+/) {
1243
		if ($whole =~ /empty\(\$\{[\w\d]+/) {
1244
			my $lineno = &linenumber($`);
1244
			my $lineno = &linenumber($`);
1245
			&perror("WARN", $file, $lineno, "use empty(VARIABLE), instead of ".
1245
			&perror("WARN", $file, $lineno, "use empty(VARIABLE), instead of ".
1246
				"empty(\${VARIABLE}).");
1246
				"empty(\${VARIABLE}).");
Lines 1532-1538 Link Here
1532
	#
1532
	#
1533
	print "OK: checking DESKTOP_ENTRIES for \${TRUE}/\${FALSE}.\n" if ($verbose);
1533
	print "OK: checking DESKTOP_ENTRIES for \${TRUE}/\${FALSE}.\n" if ($verbose);
1534
	$desktop_entries = &get_makevar_raw('DESKTOP_ENTRIES');
1534
	$desktop_entries = &get_makevar_raw('DESKTOP_ENTRIES');
1535
	if ($desktop_entries =~ /\${TRUE}/ or $desktop_entries =~ /\${FALSE}/ or
1535
	if ($desktop_entries =~ /\$\{TRUE}/ or $desktop_entries =~ /\$\{FALSE}/ or
1536
	    $desktop_entries =~ /\"true\"/ or $desktop_entries =~ /\"false\"/) {
1536
	    $desktop_entries =~ /\"true\"/ or $desktop_entries =~ /\"false\"/) {
1537
		&perror("FATAL", $file, -1, "Use true/false (without quotes) instead of \${TRUE}/\${FALSE} in DESKTOP_ENTRIES.");
1537
		&perror("FATAL", $file, -1, "Use true/false (without quotes) instead of \${TRUE}/\${FALSE} in DESKTOP_ENTRIES.");
1538
	}
1538
	}
Lines 1905-1911 Link Here
1905
	#
1905
	#
1906
	print "OK: checking for compression arguments passed to \${GZIP_CMD}.\n"
1906
	print "OK: checking for compression arguments passed to \${GZIP_CMD}.\n"
1907
		if ($verbose);
1907
		if ($verbose);
1908
	if ($j =~ /\${GZIP_CMD}\s+-(\w+(\s+-)?)*(\d)/) {
1908
	if ($j =~ /\$\{GZIP_CMD}\s+-(\w+(\s+-)?)*(\d)/) {
1909
		my $lineno = &linenumber($`);
1909
		my $lineno = &linenumber($`);
1910
		&perror("WARN", $file, $lineno, "possible use of \"\${GZIP_CMD} -$3\" ".
1910
		&perror("WARN", $file, $lineno, "possible use of \"\${GZIP_CMD} -$3\" ".
1911
			"found. \${GZIP_CMD} includes \"-\${GZIP}\" which ".
1911
			"found. \${GZIP_CMD} includes \"-\${GZIP}\" which ".
Lines 1916-1922 Link Here
1916
	# whole file: ${CHMOD} used
1916
	# whole file: ${CHMOD} used
1917
	#
1917
	#
1918
	print "OK: checking for \${CHMOD}.\n" if ($verbose);
1918
	print "OK: checking for \${CHMOD}.\n" if ($verbose);
1919
	if ($j =~ /\n\s*\${CHMOD}/) {
1919
	if ($j =~ /\n\s*\$\{CHMOD}/) {
1920
		my $lineno = &linenumber($`);
1920
		my $lineno = &linenumber($`);
1921
		&perror("WARN", $file, $lineno, "possible use of \"\${CHMOD}\" ".
1921
		&perror("WARN", $file, $lineno, "possible use of \"\${CHMOD}\" ".
1922
			"found. Use @(owner,group,mode) syntax or \@owner/\@group ".
1922
			"found. Use @(owner,group,mode) syntax or \@owner/\@group ".
Lines 1927-1933 Link Here
1927
	# whole file: ${INSTALL} -o | -g used
1927
	# whole file: ${INSTALL} -o | -g used
1928
	#
1928
	#
1929
	print "OK: checking for \${INSTALL} -o | -g.\n" if ($verbose);
1929
	print "OK: checking for \${INSTALL} -o | -g.\n" if ($verbose);
1930
	if ($j =~ /\n\s*\${INSTALL}(.*-\b(o|g)\b.*)/) {
1930
	if ($j =~ /\n\s*\$\{INSTALL}(.*-\b(o|g)\b.*)/) {
1931
		my $lineno = &linenumber($`);
1931
		my $lineno = &linenumber($`);
1932
		&perror("WARN", $file, $lineno, "possible use of \"\${INSTALL} -o | -g\" ".
1932
		&perror("WARN", $file, $lineno, "possible use of \"\${INSTALL} -o | -g\" ".
1933
			"found. Use @(owner,group,mode) syntax or \@owner/\@group ".
1933
			"found. Use @(owner,group,mode) syntax or \@owner/\@group ".
Lines 1939-1945 Link Here
1939
	#
1939
	#
1940
	print "OK: checking for \${MKDIR} -p.\n"
1940
	print "OK: checking for \${MKDIR} -p.\n"
1941
		if ($verbose);
1941
		if ($verbose);
1942
	if ($j =~ /\${MKDIR}\s+-p/) {
1942
	if ($j =~ /\$\{MKDIR}\s+-p/) {
1943
		my $lineno = &linenumber($`);
1943
		my $lineno = &linenumber($`);
1944
		&perror("WARN", $file, $lineno, "possible use of \"\${MKDIR} -p\" ".
1944
		&perror("WARN", $file, $lineno, "possible use of \"\${MKDIR} -p\" ".
1945
			"found. \${MKDIR} includes ".
1945
			"found. \${MKDIR} includes ".
Lines 1963-1969 Link Here
1963
	#
1963
	#
1964
	print "OK: checking for instances of \${MACHINE_ARCH} being test.\n"
1964
	print "OK: checking for instances of \${MACHINE_ARCH} being test.\n"
1965
		if ($verbose);
1965
		if ($verbose);
1966
	if ($j =~ /\${MACHINE_ARCH}\s*[!=]=/) {
1966
	if ($j =~ /\$\{MACHINE_ARCH}\s*[!=]=/) {
1967
		my $lineno = &linenumber($`);
1967
		my $lineno = &linenumber($`);
1968
		&perror("FATAL", $file, $lineno, "MACHINE_ARCH should never be tested ".
1968
		&perror("FATAL", $file, $lineno, "MACHINE_ARCH should never be tested ".
1969
			"directly; use ARCH instead.");
1969
			"directly; use ARCH instead.");
Lines 1987-1993 Link Here
1987
	#
1987
	#
1988
	# whole file: ${LOCALBASE}/lib/perl5/site_perl
1988
	# whole file: ${LOCALBASE}/lib/perl5/site_perl
1989
	#
1989
	#
1990
	if ($j =~ m'\${(?:LOCALBASE|PREFIX)}/lib/perl5/site_perl') {
1990
	if ($j =~ m'\$\{(?:LOCALBASE|PREFIX)}/lib/perl5/site_perl') {
1991
		my $lineno = &linenumber($`);
1991
		my $lineno = &linenumber($`);
1992
		if ($1 !~ /PREFIX/) {
1992
		if ($1 !~ /PREFIX/) {
1993
			&perror("WARN", $file, $lineno, "possible use of \"\${LOCALBASE}/lib/perl5/site_perl\" ".
1993
			&perror("WARN", $file, $lineno, "possible use of \"\${LOCALBASE}/lib/perl5/site_perl\" ".
Lines 2001-2013 Link Here
2001
	#
2001
	#
2002
	# whole file: check for misuse of STAGE with SITE_PERL and SITE_ARCH
2002
	# whole file: check for misuse of STAGE with SITE_PERL and SITE_ARCH
2003
	#
2003
	#
2004
	if ($j =~ m'\${STAGEDIR}\${SITE_PERL}') {
2004
	if ($j =~ m'\$\{STAGEDIR}\$\{SITE_PERL}') {
2005
		my $lineno = &linenumber($`);
2005
		my $lineno = &linenumber($`);
2006
		&perror("WARN", $file, $lineno, "\${STAGEDIR}\${SITE_PERL} should be ".
2006
		&perror("WARN", $file, $lineno, "\${STAGEDIR}\${SITE_PERL} should be ".
2007
			"replaced by \${STAGEDIR}\${PREFIX}/\${SITE_PERL_REL}.");
2007
			"replaced by \${STAGEDIR}\${PREFIX}/\${SITE_PERL_REL}.");
2008
	}
2008
	}
2009
2009
2010
	if ($j =~ m'\${STAGEDIR}\${SITE_ARCH}') {
2010
	if ($j =~ m'\$\{STAGEDIR}\$\{SITE_ARCH}') {
2011
		my $lineno = &linenumber($`);
2011
		my $lineno = &linenumber($`);
2012
		&perror("WARN", $file, $lineno, "\${STAGEDIR}\${SITE_ARCH} should be ".
2012
		&perror("WARN", $file, $lineno, "\${STAGEDIR}\${SITE_ARCH} should be ".
2013
			"replaced by \${STAGEDIR}\${PREFIX}/\${SITE_ARCH_REL}.");
2013
			"replaced by \${STAGEDIR}\${PREFIX}/\${SITE_ARCH_REL}.");
Lines 2844-2850 Link Here
2844
	$tmp = $sections[$idx] // '';
2844
	$tmp = $sections[$idx] // '';
2845
2845
2846
	# Check for direct assignment of BUILD_DEPENDS to RUN_DEPENDS.
2846
	# Check for direct assignment of BUILD_DEPENDS to RUN_DEPENDS.
2847
	if ($tmp =~ /\nRUN_DEPENDS=[ \t]*\${BUILD_DEPENDS}/) {
2847
	if ($tmp =~ /\nRUN_DEPENDS=[ \t]*\$\{BUILD_DEPENDS}/) {
2848
		&perror("FATAL", $file, -1, "RUN_DEPENDS should not be set to ".
2848
		&perror("FATAL", $file, -1, "RUN_DEPENDS should not be set to ".
2849
			"\${BUILD_DEPENDS} as \${BUILD_DEPENDS} includes other ".
2849
			"\${BUILD_DEPENDS} as \${BUILD_DEPENDS} includes other ".
2850
			"implicit dependencies.  Instead, copy the explicit dependencies ".
2850
			"implicit dependencies.  Instead, copy the explicit dependencies ".
Lines 2956-2962 Link Here
2956
2956
2957
	# various MAN'uals related checks
2957
	# various MAN'uals related checks
2958
	if ($makevar{USE_PERL5} =~ /\b(configure|modbuild|modbuildtiny)\b/
2958
	if ($makevar{USE_PERL5} =~ /\b(configure|modbuild|modbuildtiny)\b/
2959
		&& $tmp =~ /\nMAN3PREFIX=\s*\${PREFIX}\/lib\/perl5\/\${PERL_VER/) {
2959
		&& $tmp =~ /\nMAN3PREFIX=\s*\$\{PREFIX}\/lib\/perl5\/\$\{PERL_VER/) {
2960
		&perror("WARN", $file, -1, "MAN3PREFIX is ".
2960
		&perror("WARN", $file, -1, "MAN3PREFIX is ".
2961
			"\"\${PREFIX}/lib/perl5/\${PERL_VERSION}\" ".
2961
			"\"\${PREFIX}/lib/perl5/\${PERL_VERSION}\" ".
2962
			"when USE_PERL5=configure|modbuild|modbuildtiny is set.  You do not need to specify it.");
2962
			"when USE_PERL5=configure|modbuild|modbuildtiny is set.  You do not need to specify it.");

Return to bug 200634