pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Added c99 to the list of known ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/77913f024460
branches:  trunk
changeset: 522562:77913f024460
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue Dec 12 21:56:44 2006 +0000

description:
Added c99 to the list of known languages.

Following existing practice, the variable PKG_BUILD_OPTIONS.* may be
queried in buildlink3.mk files in the .include section, and no warning
is generated anymore.

diffstat:

 pkgtools/pkglint/files/makevars.map |   4 ++--
 pkgtools/pkglint/files/pkglint.pl   |  10 ++++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r 7ea885aa3426 -r 77913f024460 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Tue Dec 12 21:55:27 2006 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Tue Dec 12 21:56:44 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.146 2006/12/06 00:46:27 wiz Exp $
+# $NetBSD: makevars.map,v 1.147 2006/12/12 21:56:44 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -659,7 +659,7 @@
 USE_IMAKE              Yes [m:s]
 USE_JAVA               { run yes } [$package]
 USE_JAVA2              { YES yes no 1.4 1.5 } [$package]
-USE_LANGUAGES          List of { c c++ fortran java objc } [m:s,c:s,o:s]
+USE_LANGUAGES          List of { c c99 c++ fortran java objc } [m:s,c:s,o:s]
 USE_LIBTOOL            Yes [$package]
 USE_MAKEINFO           Yes [$package]
 USE_MSGFMT_PLURALS     Yes [$package]
diff -r 7ea885aa3426 -r 77913f024460 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue Dec 12 21:55:27 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue Dec 12 21:56:44 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.686 2006/12/06 23:42:43 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.687 2006/12/12 21:56:44 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -6241,8 +6241,10 @@
        my $have_dependencies = false;
        my $need_empty_line = false;
        while (true) {
-               if (expect($lines, \$lineno, qr"^\.include \"\.\./\.\./([^/]+/[^/]+)/buildlink3\.mk\"$")
-                || expect($lines, \$lineno, qr"^\.include \"\.\./\.\./mk/(\S+)\.buildlink3\.mk\"$")) {
+               if (expect($lines, \$lineno, qr"^\.\s*include \"\.\./\.\./([^/]+/[^/]+)/buildlink3\.mk\"$")
+                || expect($lines, \$lineno, qr"^\.\s*include \"\.\./\.\./mk/(\S+)\.buildlink3\.mk\"$")
+                || expect($lines, \$lineno, qr"^\.if !empty\(PKG_BUILD_OPTIONS\.${bl_pkgbase}:M\S+\)$")
+                || expect($lines, \$lineno, qr"^\.endif$")) {
                        $have_dependencies = true;
                        $need_empty_line = true;
                } elsif ($have_dependencies && expect($lines, \$lineno, qr"^$")) {
@@ -6594,7 +6596,7 @@
                        # probably contains a statement that C is
                        # really not needed.
 
-               } elsif ($value !~ qr"(?:^|\s+)(?:c|objc)(?:\s+|$)") {
+               } elsif ($value !~ qr"(?:^|\s+)(?:c|c99|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