[Midnightbsd-cvs] mports: ports-mgmt/portlint: * Add a check to see if EXTRACT_SUFX is
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 13 16:35:38 EDT 2008
Log Message:
-----------
* Add a check to see if EXTRACT_SUFX is ".zip" and suggest USE_ZIP instead [1]
* Remove the now obsoleted DEPENDS macro
* Remove the obsoleted Java 1.0 check
* Add support for USE_CDRTOOLS
* Add a check for direct usage of gs (i.e. ghostscript) [2]
* bsd.php.mk can now be included after bsd.port.pre.mk [1]
* Tighten the check on *_DEPENDS so that it only looks at BUILD, FETCH, PATCH,
LIB, and RUN DEPENDS [2]
Modified Files:
--------------
mports/ports-mgmt/portlint:
Makefile (r1.5 -> r1.6)
mports/ports-mgmt/portlint/src:
portlint.pl (r1.4 -> r1.5)
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/ports-mgmt/portlint/Makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -L ports-mgmt/portlint/Makefile -L ports-mgmt/portlint/Makefile -u -r1.5 -r1.6
--- ports-mgmt/portlint/Makefile
+++ ports-mgmt/portlint/Makefile
@@ -9,8 +9,7 @@
#
PORTNAME= portlint
-PORTVERSION= 2.9.1
-PORTREVISION= 4
+PORTVERSION= 2.9.4
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none
Index: portlint.pl
===================================================================
RCS file: /home/cvs/mports/ports-mgmt/portlint/src/portlint.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -L ports-mgmt/portlint/src/portlint.pl -L ports-mgmt/portlint/src/portlint.pl -u -r1.4 -r1.5
--- ports-mgmt/portlint/src/portlint.pl
+++ ports-mgmt/portlint/src/portlint.pl
@@ -47,7 +47,7 @@
# version variables
my $major = 2;
my $minor = 9;
-my $micro = 2;
+my $micro = 4;
sub l { '[{(]'; }
sub r { '[)}]'; }
@@ -1188,7 +1188,6 @@
(?:LIB)?RUBY
LINUX_PREFIX
OPENSSL
- PHP
PYTHON
QT2?
QT_VER
@@ -1437,13 +1436,6 @@
}
}
- if ($whole =~ /\n(_USE_BSD_JAVA_MK_1_0)[+?:!]?=/) {
- &perror("WARN", $file, -1, "This port uses bsd.java.mk 1.0 syntax. ".
- "You should consider updating it to 2.0 syntax. ".
- "Please refer to the Porter's Handbook for further ".
- "information");
- }
-
#
# whole file: direct use of command names
#
@@ -1992,6 +1984,10 @@
&perror("WARN", $file, -1, "EXTRACT_SUFX is \".tar.bz2.\" ".
"You should use USE_BZIP2 instead.");
}
+ if ($extractsufx eq '.zip') {
+ &perror("WARN", $file, -1, "EXTRACT_SUFX is \".zip\" ".
+ "You should use USE_ZIP instead.");
+ }
} else {
print "OK: no EXTRACT_SUFX seen, using default value.\n"
if ($verbose);
@@ -2301,10 +2297,10 @@
# NOTE: EXEC_DEPENDS is obsolete, so it should not be listed.
@linestocheck = qw(
EXTRACT_DEPENDS LIB_DEPENDS PATCH_DEPENDS BUILD_DEPENDS RUN_DEPENDS
-FETCH_DEPENDS DEPENDS DEPENDS_TARGET
+FETCH_DEPENDS DEPENDS_TARGET
);
- if ($tmp =~ /(LIB_|BUILD_|RUN_|FETCH_)?DEPENDS/) {
+ if ($tmp =~ /^(PATCH_|EXTRACT_|LIB_|BUILD_|RUN_|FETCH_)DEPENDS/m) {
&checkearlier($file, $tmp, @varnames);
my %seen_depends;
@@ -2312,8 +2308,8 @@
if (!defined $ENV{'PORTSDIR'}) {
$ENV{'PORTSDIR'} = $portsdir;
}
- foreach my $i (grep(/^[A-Z_]*DEPENDS[?+]?=/, split(/\n/, $tmp))) {
- $i =~ s/^([A-Z_]*DEPENDS)[?+]?=[ \t]*//;
+ foreach my $i (grep(/^(PATCH_|EXTRACT_|LIB_|BUILD_|RUN_|FETCH_)*DEPENDS[?+]?=/, split(/\n/, $tmp))) {
+ $i =~ s/^((PATCH_|EXTRACT_|LIB_|BUILD_|RUN_|FETCH_)*DEPENDS)[?+]?=[ \t]*//;
$j = $1;
$seen_depends{$j}++;
if ($j ne 'DEPENDS' &&
@@ -2332,27 +2328,18 @@
print "OK: checking dependency value for $j.\n"
if ($verbose);
- if (($j eq 'DEPENDS'
- && scalar(@l) != 1 && scalar(@l) != 2)
- || ($j ne 'DEPENDS'
+ if (($j ne 'DEPENDS'
&& scalar(@l) != 2 && scalar(@l) != 3)) {
&perror("WARN", $file, -1, "wrong dependency value ".
"for $j. $j requires ".
- ($j eq 'DEPENDS'
- ? "1 or 2 "
- : "2 or 3 ").
+ "2 or 3 ".
"colon-separated tuples.");
next;
}
my %m = ();
- if ($j eq 'DEPENDS') {
- $m{'dir'} = $l[0];
- $m{'tgt'} = $l[1];
- } else {
- $m{'dep'} = $l[0];
- $m{'dir'} = $l[1];
- $m{'tgt'} = $l[2];
- }
+ $m{'dep'} = $l[0];
+ $m{'dir'} = $l[1];
+ $m{'tgt'} = $l[2];
print "OK: dep=\"$m{'dep'}\", ".
"dir=\"$m{'dir'}\", tgt=\"$m{'tgt'}\"\n"
if ($verbose);
@@ -2406,6 +2393,20 @@
"USE_LIBLTDL.");
}
+ # check CDRTOOLS
+ if ($m{'dir'} =~ /(cdrtools|cdrtools-cjk)$/) {
+ &perror("WARN", $file, -1, "dependency to $1 ".
+ "listed in $j. consider using ".
+ "USE_CDRTOOLS.");
+ }
+
+ # check GHOSTSCRIPT
+ if ($m{'dep'} eq "gs") {
+ &perror("WARN", $file, -1, "dependency to gs ".
+ "listed in $j. consider using ".
+ "USE_GHOSTSCRIPT(_BUILD|_RUN).");
+ }
+
# check JAVALIBDIR
if ($m{'dep'} =~ m|share/java/classes|) {
&perror("FATAL", $file, -1, "you should use \${JAVALIBDIR} ".
More information about the Midnightbsd-cvs
mailing list