[Midnightbsd-cvs] mports: ports-mgmt/portlint: Customize for MidnightBSD a little.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Jun 20 02:58:20 EDT 2008


Log Message:
-----------
Customize for MidnightBSD a little.

Check for LICENSE and require it!

Modified Files:
--------------
    mports/ports-mgmt/portlint:
        Makefile (r1.4 -> r1.5)
    mports/ports-mgmt/portlint/src:
        portlint.pl (r1.2 -> r1.3)

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/ports-mgmt/portlint/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -L ports-mgmt/portlint/Makefile -L ports-mgmt/portlint/Makefile -u -r1.4 -r1.5
--- ports-mgmt/portlint/Makefile
+++ ports-mgmt/portlint/Makefile
@@ -10,14 +10,13 @@
 
 PORTNAME=	portlint
 PORTVERSION=	2.9.1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none
 
 MAINTAINER=	ports at MidnightBSD.org
 COMMENT=	A verifier for mports directory
-
 LICENSE=	unknown
 
 NO_BUILD=	yes
Index: portlint.pl
===================================================================
RCS file: /home/cvs/mports/ports-mgmt/portlint/src/portlint.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -L ports-mgmt/portlint/src/portlint.pl -L ports-mgmt/portlint/src/portlint.pl -u -r1.2 -r1.3
--- ports-mgmt/portlint/src/portlint.pl
+++ ports-mgmt/portlint/src/portlint.pl
@@ -181,14 +181,13 @@
 my @varlist =  qw(
 	PORTNAME PORTVERSION PORTREVISION PORTEPOCH PKGNAME PKGNAMEPREFIX
 	PKGNAMESUFFIX DISTVERSIONPREFIX DISTVERSION DISTVERSIONSUFFIX
-	DISTNAME DISTFILES CATEGORIES MASTERDIR MAINTAINER MASTER_SITES
+	DISTNAME DISTFILES CATEGORIES MASTERDIR MAINTAINER LICENSE MASTER_SITES
 	WRKDIR WRKSRC NO_WRKSUBDIR PATCHDIR SCRIPTDIR FILESDIR
 	PKGDIR COMMENT DESCR PLIST PKGCATEGORY PKGINSTALL PKGDEINSTALL
 	PKGREQ PKGMESSAGE MD5_FILE .CURDIR USE_LDCONFIG USE_AUTOTOOLS
 	INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER
 	PLIST_FILES OPTIONS INSTALLS_OMF USE_GETTEXT USE_RC_SUBR
 	DIST_SUBDIR ALLFILES IGNOREFILES CHECKSUM_ALGORITHMS INSTALLS_ICONS
-	LICENSE
 );
 
 my $cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", @varlist);
@@ -1476,6 +1475,7 @@
 				&& $curline !~ /^NO_PACKAGE(.)?=[^\n]+$i/m
 				&& $curline !~ /^NO_CDROM(.)?=[^\n]+$i/m
 				&& $curline !~ /^MAINTAINER(.)?=[^\n]+$i/m
+				&& $curline !~ /^LICENSE(.)?=[^\n]+$i/m
 				&& $curline !~ /^CATEGORIES(.)?=[^\n]+$i/m
 				&& $curline !~ /^\s*#.+$/m
 				&& $curline !~ /\-\-$i/m
@@ -2213,7 +2213,7 @@
 
 	&checkearlier($file, $tmp, @varnames);
 	&checkorder('MAINTAINER', $tmp, $file, qw(
-MAINTAINER COMMENT
+MAINTAINER COMMENT LICENSE
 	));
 
 	$tmp = "\n" . $tmp;
@@ -2229,7 +2229,7 @@
 		}
 		if ($newport && $addr =~ /ports\@freebsd.org/i) {
 			&perror("WARN", $file, -1, "new ports should not be maintained by ".
-				"ports\@FreeBSD.org.");
+				"ports\@MidnightBSD.org.");
 		}
 		$tmp =~ s/\nMAINTAINER\??=[^\n]+//;
 	} elsif ($whole !~ /\nMAINTAINER[?]?=/) {
@@ -2251,8 +2251,26 @@
 		}
 	}
 
+        if ($tmp !~ /\nLICENSE(.)?=/) {
+                &perror("FATAL", $file, -1, "LICENSE has to be there.") unless (
+$slaveport && $makevar{COMMENT} ne '');
+        } elsif ($1 ne '') {
+                &perror("WARN", $file, -1, "unless this is a master port, LICENSE
+ has to be set by \"=\", ".
+                        "not by \"$1=\".") unless ($masterport);
+        } else { # check for correctness
+                if (($makevar{LICENSE} !~ /^["a-z]/) || ($makevar{LICENSE} =~
+ m/\.$/)) { #"
+                        &perror("WARN", $file, -1, "LICENSE should begin with a
+letter, and end without a period");
+                } elsif (length($makevar{COMMENT}) > 70) {
+                        &perror("WARN", $file, -1, "LICENSE exceeds 70 character
+s limit.");
+                }
+        }
+
 	push(@varnames, qw(
-MAINTAINER COMMENT
+MAINTAINER COMMENT LICENSE
 	));
 
 	#


More information about the Midnightbsd-cvs mailing list