summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/pkglint.pl
diff options
context:
space:
mode:
authorrillig <rillig>2006-07-21 05:02:52 +0000
committerrillig <rillig>2006-07-21 05:02:52 +0000
commit418012426a6105e5c12fe68bf908edd5a5de8723 (patch)
tree3bb38fce9057f6c4fd4cdb3f6b9863e2346e7677 /pkgtools/pkglint/files/pkglint.pl
parente95ff770157a1b0a832d9ae20680beceba8b160b (diff)
downloadpkgsrc-418012426a6105e5c12fe68bf908edd5a5de8723.tar.gz
Warn if GNU_CONFIGURE is set but USE_LANGUAGES does not contain "c", since
that one is needed in almost all cases.
Diffstat (limited to 'pkgtools/pkglint/files/pkglint.pl')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl15
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 2e07e10e577..d9ce98830ea 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.657 2006/07/18 21:13:22 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.658 2006/07/21 05:02:52 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -6275,6 +6275,19 @@ sub checkfile_package_Makefile($$$) {
$pkgctx_vardef->{"RESTRICTED"}->log_error("Restricted packages must have a LICENSE.");
}
+ if (exists($pkgctx_vardef->{"GNU_CONFIGURE"}) && exists($pkgctx_vardef->{"USE_LANGUAGES"})) {
+ my $languages_line = $pkgctx_vardef->{"USE_LANGUAGES"};
+
+ if ($languages_line->text =~ regex_varassign) {
+ my (undef, $op, $value, undef) = ($1, $2, $3, $4);
+
+ if ($value !~ qr"\bc\b") {
+ $pkgctx_vardef->{"GNU_CONFIGURE"}->log_warning("GNU_CONFIGURE almost always needs a C compiler, ...");
+ $languages_line->log_warning("... but \"c\" is not added to USE_LANGUAGES.");
+ }
+ }
+ }
+
my $distname_line = $pkgctx_vardef->{"DISTNAME"};
my $pkgname_line = $pkgctx_vardef->{"PKGNAME"};