pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files In buildlink3.mk files, bsd.fas...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/79da49c46144
branches:  trunk
changeset: 522563:79da49c46144
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue Dec 12 22:13:38 2006 +0000

description:
In buildlink3.mk files, bsd.fast.prefs.mk should be included instead of
bsd.prefs.mk.

Fixed the regular expression for buildlink3.mk files containing
PKG_BUILD_OPTIONS code.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 77913f024460 -r 79da49c46144 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue Dec 12 21:56:44 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue Dec 12 22:13:38 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.687 2006/12/12 21:56:44 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.688 2006/12/12 22:13:38 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -5828,6 +5828,11 @@
                        }
 
                        if ($includefile eq "../../mk/bsd.prefs.mk") {
+                               if ($line->fname =~ qr"buildlink3\.mk$") {
+                                       $line->log_note("For efficiency reasons, please include bsd.fast.prefs.mk instead of bsd.prefs.mk.");
+                               }
+                               $seen_bsd_prefs_mk = true;
+                       } elsif ($includefile eq "../../mk/bsd.fast.prefs.mk") {
                                $seen_bsd_prefs_mk = true;
                        }
 
@@ -6243,7 +6248,7 @@
        while (true) {
                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"^\.if !empty\(PKG_BUILD_OPTIONS\.\Q${bl_pkgbase}\E:M\S+\)$")
                 || expect($lines, \$lineno, qr"^\.endif$")) {
                        $have_dependencies = true;
                        $need_empty_line = true;



Home | Main Index | Thread Index | Old Index