pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Changed the type of PKG_OPTIO...
details: https://anonhg.NetBSD.org/pkgsrc/rev/268fb388ed12
branches: trunk
changeset: 504206:268fb388ed12
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Dec 06 22:07:35 2005 +0000
description:
- Changed the type of PKG_OPTIONS_VAR from Varname to PkgOptionsVar. Added
a check that PKGBASE is not used in PKG_OPTIONS_VAR.
- Added some macros to the list of portable CPP macro names.
diffstat:
pkgtools/pkglint/files/makevars.map | 4 ++--
pkgtools/pkglint/files/pkglint.pl | 21 ++++++++++++++++++---
2 files changed, 20 insertions(+), 5 deletions(-)
diffs (73 lines):
diff -r 7e56a9048e9e -r 268fb388ed12 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map Tue Dec 06 21:54:25 2005 +0000
+++ b/pkgtools/pkglint/files/makevars.map Tue Dec 06 22:07:35 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.49 2005/12/02 18:47:58 rillig Exp $
+# $NetBSD: makevars.map,v 1.50 2005/12/06 22:07:35 rillig Exp $
#
# This file contains the guessed type of some variables, according to
@@ -151,7 +151,7 @@
PKG_OPTIONS_OPTIONAL_GROUPS List
PKG_OPTIONS_REQUIRED_GROUPS List
PKG_OPTIONS_SET List
-PKG_OPTIONS_VAR Varname
+PKG_OPTIONS_VAR PkgOptionsVar
PKG_PRESERVE Yes
PKG_SKIP_REASON List+ of ShellWord
PKG_SUFX Userdefined
diff -r 7e56a9048e9e -r 268fb388ed12 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue Dec 06 21:54:25 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue Dec 06 22:07:35 2005 +0000
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.427 2005/12/06 17:37:06 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.428 2005/12/06 22:07:35 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -1654,6 +1654,7 @@
checkline_mk_shelltext($line, $shellcmd);
}
+sub checkline_mk_vartype_basic($$$$$);
sub checkline_mk_vartype_basic($$$$$) {
my ($line, $varname, $type, $value, $comment) = @_;
my ($value_novar);
@@ -1798,6 +1799,16 @@
$line->log_warning("\"${value}\" is not a valid package name. A valid package name has the form packagename-version, where version consists only of digits, letters and dots.");
}
+ } elsif ($type eq "PkgOptionsVar") {
+ checkline_mk_vartype_basic($line, $varname, "Varname", $value, $comment);
+ if ($value =~ qr"\$\{PKGBASE[:\}]") {
+ $line->log_error("PKGBASE must not be used in PKG_OPTIONS_VAR.");
+ $line->explain(
+ "PKGBASE is defined in bsd.pkg.mk, which is included as the",
+ "very last file, but PKG_OPTIONS_VAR is evaluated earlier.",
+ "Use \${PKGNAME:C/-[0-9].*//} instead.");
+ }
+
} elsif ($type eq "PkgRevision") {
if ($value !~ qr"^\d+$") {
$line->log_warning("\"${value}\" is not a valid Integer.");
@@ -2767,11 +2778,15 @@
__mips
__sparc
+ __APPLE__
+ __bsdi__
+ __CYGWIN__
__DragonFly__
- __FreeBSD__
+ __FreeBSD__ __FreeBSD_version
__INTERIX
__linux__
- __NetBSD__
+ __MINGW32__
+ __NetBSD__ __NetBSD_Version_
__OpenBSD__
__SVR4
__sun
Home |
Main Index |
Thread Index |
Old Index