Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Dec 2020 19:22:09 +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: r559405 - in head/ports-mgmt/portlint: . src
Message-ID:  <202012271922.0BRJM9Nu089788@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcus
Date: Sun Dec 27 19:22:08 2020
New Revision: 559405
URL: https://svnweb.freebsd.org/changeset/ports/559405

Log:
  Updqte to 2.19.4.
  
  * Correct path to apache.mk [1]
  * Warn if one declares USE_LDCONFIG without a properly named shared object [2]
  * Allow make use-before-declare lazy evaluation in dependencies [3]
  
  PR:		252003 [1]
  		252181 [2]
  		244239 [3]
  Submitted by:	brnrd [1]

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 Dec 27 19:05:28 2020	(r559404)
+++ head/ports-mgmt/portlint/Makefile	Sun Dec 27 19:22:08 2020	(r559405)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	portlint
-PORTVERSION=	2.19.3
+PORTVERSION=	2.19.4
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none

Modified: head/ports-mgmt/portlint/src/portlint.pl
==============================================================================
--- head/ports-mgmt/portlint/src/portlint.pl	Sun Dec 27 19:05:28 2020	(r559404)
+++ head/ports-mgmt/portlint/src/portlint.pl	Sun Dec 27 19:22:08 2020	(r559405)
@@ -15,7 +15,7 @@
 # was removed.
 #
 # $FreeBSD$
-# $MCom: portlint/portlint.pl,v 1.519 2020/11/29 17:21:16 jclarke Exp $
+# $MCom: portlint/portlint.pl,v 1.522 2020/12/27 19:19:02 jclarke Exp $
 #
 
 use strict;
@@ -50,7 +50,7 @@ $portdir = '.';
 # version variables
 my $major = 2;
 my $minor = 19;
-my $micro = 3;
+my $micro = 4;
 
 # default setting - for FreeBSD
 my $portsdir = '/usr/ports';
@@ -596,6 +596,7 @@ sub checkplist {
 	my $owner_seen = 0;
 	my $group_seen = 0;
 	my $found_so = 0;
+	my $found_naked_so = 0;
 
 	# Variables that are allowed to be out-of-sync in the XXXDIR check.
 	# E.g., %%PORTDOCS%%%%RUBY_MODDOCDIR%% will be OK because there is
@@ -807,12 +808,14 @@ sub checkplist {
 				"into libdata/pkgconfig for them to be found by pkg-config.");
 		}
 
-		if ($_ =~ m|lib[^\/]+\.so(\.\d+)?$| &&
+		if ($_ =~ m|lib[^\/]+\.so\.\d+$| &&
 			$makevar{USE_LDCONFIG} eq '') {
 			&perror("WARN", $file, $., "installing shared libraries, ".
 				"please define USE_LDCONFIG as appropriate");
-		} elsif ($_ =~ m|lib[^\/]+\.so(\.\d+)?$|) {
+		} elsif ($_ =~ m|lib[^\/]+\.so\.\d+$|) {
 			$found_so++;
+		} elsif ($_ =~ m|lib[^\/]+\.so$|) {
+			$found_naked_so++;
 		}
 
 		if ($_ =~ m|^share/icons/.*/| &&
@@ -947,8 +950,14 @@ sub checkplist {
 	}
 
 	if ($makevar{USE_LDCONFIG} ne '' && !$found_so) {
-		&perror("WARN", $file, -1, "You have defined USE_LDCONFIG, but this ".
-			"port does not install any shared objects.");
+		if ($found_naked_so) {
+			&perror("WARN", $file, -1, "You have defined USE_LDCONFIG, but this ".
+				"port does not install shared objects in the format lib*.so.[0-9] ".
+				"which ldconfig(8) needs to register them in the hints file.");
+		} else {
+			&perror("WARN", $file, -1, "You have defined USE_LDCONFIG, but this ".
+				"port does not install any shared objects.");
+		}
 	}
 
 	close(IN);
@@ -1142,10 +1151,9 @@ sub check_depends_syntax {
 				if ($verbose);
 			next;
 		} elsif ($j ne 'DEPENDS' && $i =~ /^\$\{([A-Z_]+DEPENDS)}\s*$/ && !$seen_depends{$1}) {
-			# XXX: technically we don't need this elsif block (we could remove the seen_depends check above)
-			# but I don't like that one can use a variable before they've declared it.
-			#&perror("FATAL", $file, -1, "$j points to ${dtype}DEPENDS which has not yet been defined.");
-			print "OK: (kinda) $j refers to $1 (which hasn't been declared yet, but it will work), skipping checks.\n"
+			# make(1) does lazy variable evaluation, so we can use a variable before it is
+			# declared.  However, portlint scans line by line.  Allow this behavior.
+			print "OK: $j refers to $1 (which hasn't been declared yet, but it will work), skipping checks.\n"
 			    if ($verbose);
 			next;
 		}
@@ -1311,7 +1319,7 @@ sub check_depends_syntax {
 				&perror("FATAL", $file, -1, "do not depend on any apache ".
 					"port in *_DEPENDS directly.  ".
 					"Instead use USE_APACHE=VERSION, where VERSION can be ".
-					"found in \${PORTSDIR}/Mk/bsd.apache.mk.");
+					"found in \${PORTSDIR}/Mk/Uses/apache.mk.");
 			}
 
 			# Check for over-specific shared library dependencies



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