summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-11-20 13:14:17 +0000
committerrillig <rillig@pkgsrc.org>2005-11-20 13:14:17 +0000
commit9ba2c8022827feea9834ea49cdb357756f182b84 (patch)
tree78d2c6dea88eca2106ad93ab00994d68126f8467 /pkgtools
parent1a84a612a0fd59202d57e405d844db18bd72ae85 (diff)
downloadpkgsrc-9ba2c8022827feea9834ea49cdb357756f182b84.tar.gz
Updated pkglint to 4.43.2.
- Renamed the type Dependency to DependencyWithPath. - Added new types Dependency, PlatformTuple and RelativePkgDir. - Added some of the common variables to the list of typed variables.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/makevars.map17
-rw-r--r--pkgtools/pkglint/files/pkglint.pl29
3 files changed, 43 insertions, 7 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 50d5c1091cf..d3f75e42fde 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.302 2005/11/20 10:55:43 rillig Exp $
+# $NetBSD: Makefile,v 1.303 2005/11/20 13:14:17 rillig Exp $
#
-DISTNAME= pkglint-4.43.1
+DISTNAME= pkglint-4.43.2
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map
index 7f901ab5c4b..f189ca1d2aa 100644
--- a/pkgtools/pkglint/files/makevars.map
+++ b/pkgtools/pkglint/files/makevars.map
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.35 2005/11/19 17:22:21 rillig Exp $
+# $NetBSD: makevars.map,v 1.36 2005/11/20 13:14:17 rillig Exp $
#
# This file contains the guessed type of some variables, according to
@@ -49,10 +49,12 @@ BDB_ACCEPTED List* of { db1 db2 db3 db4 }
BDB_DEFAULT Userdefined
BDB_LIBS Readonly
BDB_TYPE Readonly
-BUILDLINK_DEPENDS List*
+BUILDLINK_DEPENDS List of Dependency
+BUILDLINK_PKGSRCDIR RelativePkgDir
+BUILDLINK_RECOMMENDED List of Dependency
BUILDLINK_TRANSFORM List
BUILD_DEFS List of Varname
-BUILD_DEPENDS List of Dependency
+BUILD_DEPENDS List of DependencyWithPath
BUILD_DIRS List* of WrksrcSubdirectory
BUILD_USES_MSGFMT Yes
BUILTIN_X11_TYPE Readonly
@@ -65,7 +67,7 @@ CONFIGURE_ARGS List
CONFIGURE_DIRS List* of WrksrcSubdirectory
CONFIGURE_ENV List
CPPFLAGS List
-DEPENDS List of Dependency
+DEPENDS List of DependencyWithPath
DISTFILES List* of Filename
DISTNAME Filename
EMACS_BIN Readonly
@@ -89,6 +91,7 @@ FILES_SUBST List
GCC_REQD List
GNU_CONFIGURE Yes
HOMEPAGE URL
+INCOMPAT_CURSES List* of PlatformTuple
INSTALL_DIRS List* of WrksrcSubdirectory
INSTALL_UNSTRIPPED YesNo
KRB5BASE Readonly
@@ -106,12 +109,16 @@ MANZ Yes
MASTER_SITES List* of URL
MYSQL_VERSIONS_ACCEPTED List* of { 40 41 50 }
MYSQL_VERSION_DEFAULT Userdefined
+NOT_FOR_COMPILER List* of { ccc gcc icc ido mipspro mipspro-ucode sunpro xlc }
+NOT_FOR_PLATFORM List* of PlatformTuple
NO_BUILD Yes
NO_CHECKSUM Yes
NO_CONFIGURE Yes
NO_MTREE Yes
NO_PKGTOOLS_REQD_CHECK Yes
NO_PKG_REGISTER Yes
+ONLY_FOR_COMPILER List* of { ccc gcc icc ido mipspro mipspro-ucode sunpro xlc }
+ONLY_FOR_PLATFORM List* of PlatformTuple
PAMBASE Readonly
PAM_ACCEPTED List* of { linux-pam openpam solaris-pam }
PAM_DEFAULT Userdefined
@@ -142,11 +149,13 @@ PKG_JVM_DEFAULT Userdefined
PKG_LEGACY_OPTIONS List* of Option
PKG_OPTIONS Readonly
PKG_OPTIONS_DEPRECATED_WARNINGS List*
+PKG_OPTIONS_GROUP List*
PKG_OPTIONS_LEGACY_OPTS List*
PKG_OPTIONS_LEGACY_VARS List*
PKG_OPTIONS_NONEMPTY_SETS List*
PKG_OPTIONS_OPTIONAL_GROUPS List*
PKG_OPTIONS_REQUIRED_GROUPS List*
+PKG_OPTIONS_SET List*
PKG_OPTIONS_VAR Varname
PKG_PRESERVE Yes
PKG_SKIP_REASON List
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index ed7da6eb402..7e787861f6d 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -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.369 2005/11/20 10:07:45 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.370 2005/11/20 13:14:17 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -1589,6 +1589,11 @@ sub checktext_basic_vartype($$$$$) {
}
} elsif ($type eq "Dependency") {
+ if ($value eq $value_novar && $value !~ qr"^[-*+.0-9<=>\@A-Z_a-z\[\]]+$") {
+ $line->log_warning("\"${value}\" is not a valid dependency.");
+ }
+
+ } elsif ($type eq "DependencyWithPath") {
if ($value =~ regex_unresolved) {
# don't even try to check anything
} elsif ($value =~ qr":\.\./\.\./([^/]+)/([^/]+)$") {
@@ -1683,9 +1688,31 @@ sub checktext_basic_vartype($$$$$) {
$line->log_error("${varname} must not be set outside the package Makefile.");
}
+ } elsif ($type eq "PlatformTuple") {
+ my $part = qr"(?:\[[^\]]+\]|[^-\[])+";
+ if ($value =~ qr"^(${part})-(${part})-(${part})$") {
+ my ($opsys, $os_version, $arch) = ($1, $2, $3);
+
+ if ($opsys !~ qr"^(?:\*|Darwin|DragonFly|FreeBSD|Interix|Linux|NetBSD|OpenBSD|SunOS|IRIX)$") {
+ $line->log_warning("Unknown operating system: ${opsys}");
+ }
+ # no check for $os_version
+ if ($arch !~ qr"^(?:\*|i386|alpha|amd64|arc|arm|arm32|cobalt|convex|dreamcast|hpcmips|hpcsh|hppa|ia64|m68k|m88k|mips|mips64|mipsel|mipseb|mipsn32|ns32k|pc532|pmax|powerpc|rs6000|s390|sparc|sparc64|vax|x86_64)$") {
+ $line->log_warning("Unknown hardware architecture: ${arch}");
+ }
+
+ } else {
+ $line->log_warning("\"${value}\" is not a valid platform tuple.");
+ }
+
} elsif ($type eq "Readonly") {
$line->log_error("\"${varname}\" is a read-only variable and therefore must not be modified.");
+ } elsif ($type eq "RelativePkgDir") {
+ if ($value !~ qr"^\.\./\.\./[^/]+/[^/]+$") {
+ $line->log_warning("\"${value}\" is not a valid relative package directory.");
+ }
+
} elsif ($type eq "Stage") {
if ($value !~ qr"^(?:pre|do|post)-(?:extract|patch|configure|build|install)$") {
$line->log_warning("Invalid stage name. Use one of {pre,do,post}-{extract,patch,configure,build,install}.");