aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt/portlint
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2007-08-18 01:11:40 +0800
committermarcus <marcus@FreeBSD.org>2007-08-18 01:11:40 +0800
commit15a211471645ace9b3a4edbe1cd131c480b219f7 (patch)
tree525c0e7677e01fae58b633ab4ee35788fda54507 /ports-mgmt/portlint
parent62dce384408aefd01dcd44f1f01b41e3bf47b5bb (diff)
downloadfreebsd-ports-gnome-15a211471645ace9b3a4edbe1cd131c480b219f7.tar.gz
freebsd-ports-gnome-15a211471645ace9b3a4edbe1cd131c480b219f7.tar.zst
freebsd-ports-gnome-15a211471645ace9b3a4edbe1cd131c480b219f7.zip
Update to 2.9.5.
* Consolidate lines that end in a '\' followed by an empty line into one newline prior to splitting the Makefile into sections. This will more properly catch section-related errors [1] * Properly check pkg-config files when they contain an embedded '.' [2] * Allow pkg-plist directive @cwd by itself which means to change the working directory back to the original PREFIX [3] * Beef up the warnings around DOCSDIR, EXAMPLESDIR, and DATADIR so that users don't just use these macros without knowing if they are safe [3] * Check for use of --mandir and --infodir [4] PR: 112332 [1] 115455 [4] Submitted by: rafan [4] sat [2] Requested by: pav [3]
Diffstat (limited to 'ports-mgmt/portlint')
-rw-r--r--ports-mgmt/portlint/Makefile2
-rw-r--r--ports-mgmt/portlint/src/portlint.pl39
2 files changed, 34 insertions, 7 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile
index 02524b760ec0..3ab35337f56c 100644
--- a/ports-mgmt/portlint/Makefile
+++ b/ports-mgmt/portlint/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= portlint
-PORTVERSION= 2.9.4
+PORTVERSION= 2.9.5
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index abf849f7ee9d..a7e05508924d 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -17,7 +17,7 @@
# OpenBSD and NetBSD will be accepted.
#
# $FreeBSD$
-# $MCom: portlint/portlint.pl,v 1.137 2007/06/09 19:00:58 marcus Exp $
+# $MCom: portlint/portlint.pl,v 1.143 2007/08/17 17:04:56 marcus Exp $
#
use vars qw/ $opt_a $opt_A $opt_b $opt_C $opt_c $opt_g $opt_h $opt_t $opt_v $opt_M $opt_N $opt_B $opt_V /;
@@ -46,7 +46,7 @@ $portdir = '.';
# version variables
my $major = 2;
my $minor = 9;
-my $micro = 4;
+my $micro = 5;
sub l { '[{(]'; }
sub r { '[)}]'; }
@@ -187,6 +187,7 @@ my @varlist = qw(
INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER
PLIST_FILES OPTIONS INSTALLS_OMF USE_GETTEXT USE_RC_SUBR
DIST_SUBDIR ALLFILES IGNOREFILES CHECKSUM_ALGORITHMS INSTALLS_ICONS
+ GNU_CONFIGURE CONFIGURE_ARGS
);
my $cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", @varlist);
@@ -745,6 +746,9 @@ sub checkplist {
&perror("WARN", $file, $., "\@$1 should not be needed");
} elsif ($_ =~ /^\@(dirrm|option)/) {
; # no check made
+ } elsif ($_ eq "\@cwd") {
+ ; # @cwd by itself means change directory back to the original
+ # PREFIX.
} else {
&perror("WARN", $file, $.,
"unknown pkg-plist directive \"$_\"");
@@ -773,7 +777,7 @@ sub checkplist {
"for more details.");
}
- if ($_ =~ m|lib/pkgconfig/[^\.]+.pc$|) {
+ if ($_ =~ m|lib/pkgconfig/[^\/]+.pc$|) {
&perror("FATAL", $file, $., "installing pkg-config files into ".
"lib/pkgconfig. All pkg-config files must be installed ".
"into libdata/pkgconfig for them to be found by pkg-config.");
@@ -829,20 +833,32 @@ sub checkplist {
}
if ($_ =~ /^(\%\%PORTDOCS\%\%)?share\/doc\//) {
- &perror("WARN", $file, $., "consider using DOCSDIR macro");
+ &perror("WARN", $file, $., "IFF your port is DOCSDIR-safe ".
+ "(that is, a user can override EXAMPLESDIR when building ".
+ "this port and the port will still work correctly) ".
+ "consider using DOCSDIR macro; if you are unsure if this ".
+ "this port is DOCSDIR-safe, then ignore this warning");
$sharedocused++;
} elsif ($_ =~ /^(\%\%PORTDOCS\%\%)?\%\%DOCSDIR\%\%/) {
$sharedocused++;
}
if ($_ =~ /^share\/examples\//) {
- &perror("WARN", $file, $., "consider using EXAMPLESDIR macro");
+ &perror("WARN", $file, $., "IFF your port is EXAMPLESDIR-safe ".
+ "(that is, a user can override EXAMPLESDIR when building ".
+ "this port and the port will still work correctly) consider ".
+ "using EXAMPLESDIR macro; if you are unsure if this port is ".
+ "EXAMPLESDIR-safe, then ignore this warning");
}
{
my $tmpportname = quotemeta($makevar{PORTNAME});
if ($_ =~ /^share\/$tmpportname\//) {
- &perror("WARN", $file, $., "consider using DATADIR macro");
+ &perror("WARN", $file, $., "IFF your port is DATADIR-safe ".
+ "(that is, a user can override DATADIR when building ".
+ "this port and the port will still work correctly) ".
+ "consider using DATADIR macro; if you are unsure if ".
+ "this port is DATADIR-safe, then ignore this warning");
}
}
@@ -1660,6 +1676,15 @@ ruby sed sh sort sysctl touch tr which xargs xmkmf
}
#
+ # whole file: check for --mandir and --infodir when GNU_CONFIGURE
+ #
+ if ($makevar{GNU_CONFIGURE} ne '' &&
+ $makevar{CONFIGURE_ARGS} =~ /(man|info)dir/) {
+ &perror("WARN", $file, -1, "--mandir and --infodir are not needed ".
+ "in CONFIGURE_ARGS as they are already set in bsd.port.mk");
+ }
+
+ #
# slave port check
#
my $masterdir = $makevar{MASTERDIR};
@@ -1705,6 +1730,7 @@ ruby sed sh sort sysctl touch tr which xargs xmkmf
$tmp = $rawwhole;
# keep comment, blank line, comment in the same section
$tmp =~ s/(#.*\n)\n+(#.*)/$1$2/g;
+ $tmp =~ s/\\\n\n/\n/g;
@sections = split(/\n\n+/, $tmp);
for ($i = 0; $i <= $#sections; $i++) {
if ($sections[$i] !~ /\n$/) {
@@ -2421,6 +2447,7 @@ FETCH_DEPENDS DEPENDS_TARGET
}
}
}
+
foreach my $i (@linestocheck) {
$tmp =~ s/$i[?+]?=[^\n]+\n//g;
}