summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-07-21 05:02:52 +0000
committerrillig <rillig@pkgsrc.org>2006-07-21 05:02:52 +0000
commita90cfbf3b81c647eec40a526512e96e01840cf26 (patch)
tree3bb38fce9057f6c4fd4cdb3f6b9863e2346e7677 /pkgtools
parentd9579252eece82e3002ef5e1fd05948c09b0f742 (diff)
downloadpkgsrc-a90cfbf3b81c647eec40a526512e96e01840cf26.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')
-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"};