pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint pkgtools/pkglint: update to 5.7.20
details: https://anonhg.NetBSD.org/pkgsrc/rev/fb3ee0ba2c08
branches: trunk
changeset: 399791:fb3ee0ba2c08
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Aug 16 21:00:17 2019 +0000
description:
pkgtools/pkglint: update to 5.7.20
Changes since 5.7.19:
* Fixed warning about unknown C++ standard versions, which had appeared
after the code in mk/compiler.mk changed.
diffstat:
pkgtools/pkglint/Makefile | 5 ++---
pkgtools/pkglint/files/options.go | 4 ++--
pkgtools/pkglint/files/pkgsrc.go | 13 +++++--------
pkgtools/pkglint/files/vardefs.go | 12 ++++++------
pkgtools/pkglint/files/vardefs_test.go | 9 ++-------
5 files changed, 17 insertions(+), 26 deletions(-)
diffs (115 lines):
diff -r ba72eea50ea5 -r fb3ee0ba2c08 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Fri Aug 16 19:33:15 2019 +0000
+++ b/pkgtools/pkglint/Makefile Fri Aug 16 21:00:17 2019 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.592 2019/08/14 15:45:46 bsiegert Exp $
+# $NetBSD: Makefile,v 1.593 2019/08/16 21:00:17 rillig Exp $
-PKGNAME= pkglint-5.7.19
-PKGREVISION= 1
+PKGNAME= pkglint-5.7.20
CATEGORIES= pkgtools
DISTNAME= tools
MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/}
diff -r ba72eea50ea5 -r fb3ee0ba2c08 pkgtools/pkglint/files/options.go
--- a/pkgtools/pkglint/files/options.go Fri Aug 16 19:33:15 2019 +0000
+++ b/pkgtools/pkglint/files/options.go Fri Aug 16 21:00:17 2019 +0000
@@ -68,7 +68,7 @@
return false
}
-// checkLineUpper checks a line from the upper part of an options.mk file,
+// handleUpperLine checks a line from the upper part of an options.mk file,
// before bsd.options.mk is included.
func (ck *OptionsLinesChecker) handleUpperLine(mkline *MkLine) bool {
switch {
@@ -153,7 +153,7 @@
"and write the condition like this, which has the same effect",
"as the !empty(...).",
"",
- "\t.if ${PKG_OPTIONS.packagename:Moption}")
+ "\t.if ${PKG_OPTIONS:Moption}")
}
}
diff -r ba72eea50ea5 -r fb3ee0ba2c08 pkgtools/pkglint/files/pkgsrc.go
--- a/pkgtools/pkglint/files/pkgsrc.go Fri Aug 16 19:33:15 2019 +0000
+++ b/pkgtools/pkglint/files/pkgsrc.go Fri Aug 16 21:00:17 2019 +0000
@@ -202,13 +202,6 @@
}
categoryDir := src.File(category)
- error := func() []string {
- if errorIfEmpty {
- dummyLine.Errorf("Cannot find package versions of %q in %q.", re, categoryDir)
- }
- src.listVersions[cacheKey] = nil
- return nil
- }
var names []string
for _, fileInfo := range src.ReadDir(category) {
@@ -218,7 +211,11 @@
}
}
if len(names) == 0 {
- return error()
+ if errorIfEmpty {
+ dummyLine.Errorf("Cannot find package versions of %q in %q.", re, categoryDir)
+ }
+ src.listVersions[cacheKey] = nil
+ return nil
}
// In the pkgsrc directories, the major versions of packages are
diff -r ba72eea50ea5 -r fb3ee0ba2c08 pkgtools/pkglint/files/vardefs.go
--- a/pkgtools/pkglint/files/vardefs.go Fri Aug 16 19:33:15 2019 +0000
+++ b/pkgtools/pkglint/files/vardefs.go Fri Aug 16 21:00:17 2019 +0000
@@ -315,19 +315,19 @@
languages := make(map[string]bool)
if mklines != nil {
for _, mkline := range mklines.mklines {
- if mkline.IsDirective() && mkline.Directive() == "for" {
- words := mkline.ValueFields(mkline.Args())
- if len(words) > 2 && words[0] == "_version_" {
- for _, word := range words[2:] {
- languages[intern(word)] = true
- }
+ if mkline.IsVarassign() && mkline.Varname() == "_CXX_STD_VERSIONS" {
+ words := mkline.ValueFields(mkline.Value())
+ for _, word := range words {
+ languages[intern(word)] = true
}
}
}
}
+
alwaysAvailable := [...]string{
"ada", "c", "c99", "c++", "c++11", "c++14",
"fortran", "fortran77", "java", "objc", "obj-c++"}
+
for _, language := range alwaysAvailable {
languages[language] = true
}
diff -r ba72eea50ea5 -r fb3ee0ba2c08 pkgtools/pkglint/files/vardefs_test.go
--- a/pkgtools/pkglint/files/vardefs_test.go Fri Aug 16 19:33:15 2019 +0000
+++ b/pkgtools/pkglint/files/vardefs_test.go Fri Aug 16 21:00:17 2019 +0000
@@ -33,16 +33,11 @@
" sunpro",
"_PSEUDO_COMPILERS= ccache distcc f2c g95",
"",
- ".for _version_ in gnu++14 c++14 gnu++11 c++11 gnu++0x c++0x gnu++03 c++03",
+ "_CXX_STD_VERSIONS= gnu++14 c++14 gnu++11 c++11 gnu++0x c++0x gnu++03 c++03",
+ ".for _version_ in ${_CXX_STD_VERSIONS}",
". if !empty(USE_LANGUAGES:M${_version_})",
"USE_LANGUAGES+= c++",
". endif",
- ".endfor",
- "",
- ".for _version_", // Just for code coverage.
- ".endfor",
- "",
- ".for version in c99 c200x", // Just for code coverage.
".endfor")
t.SetUpVartypes()
Home |
Main Index |
Thread Index |
Old Index