pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Don't warn about the GNU_CONFIG...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b23c6810a94a
branches: trunk
changeset: 516512:b23c6810a94a
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Jul 22 05:28:45 2006 +0000
description:
Don't warn about the GNU_CONFIGURE/USE_LANGUAGES combination when a
comment in that line contains the word "c" in either case, or if objc is
specified, since that enables the C compiler, too.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 7bf16096d82f -r b23c6810a94a pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Jul 22 05:10:54 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Jul 22 05:28:45 2006 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.659 2006/07/21 19:09:23 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.660 2006/07/22 05:28:45 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -6279,9 +6279,14 @@
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"(?:^|\s+)c(?:\s+|$)") {
+ my (undef, $op, $value, $comment) = ($1, $2, $3, $4);
+
+ if (defined($comment) && $comment =~ qr"(?:^|\s+)c(?:\s+|$)"i) {
+ # Don't emit a warning, since the comment
+ # probably contains a statement that C is
+ # really not needed.
+
+ } elsif ($value !~ qr"(?:^|\s+)(?:c|objc)(?:\s+|$)") {
$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.");
}
Home |
Main Index |
Thread Index |
Old Index