pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint Updated pkglint to 5.4.19.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1c2a38683c26
branches:  trunk
changeset: 359794:1c2a38683c26
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Mar 17 22:43:34 2017 +0000

description:
Updated pkglint to 5.4.19.

Changes since 5.4.18:

* Added generated Go yacc source files to CVS, since starting with Go 1.8
  the yacc tool is no longer part of the core distribution. The dependency
  on yacc would pull in all the Go tools, which are quite a few, and some
  of these do not currently build since they depend on go-crypto. See
  https://mail-index.netbsd.org/tech-pkg/2017/03/17/msg017900.html

diffstat:

 pkgtools/pkglint/Makefile                       |    10 +-
 pkgtools/pkglint/files/licenses/licensesyacc.go |   471 ++++++++
 pkgtools/pkglint/files/shellyacc.go             |  1250 +++++++++++++++++++++++
 3 files changed, 1724 insertions(+), 7 deletions(-)

diffs (truncated from 1764 to 300 lines):

diff -r 11a980fb15ce -r 1c2a38683c26 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Fri Mar 17 22:41:17 2017 +0000
+++ b/pkgtools/pkglint/Makefile Fri Mar 17 22:43:34 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.511 2017/03/16 20:03:22 bsiegert Exp $
+# $NetBSD: Makefile,v 1.512 2017/03/17 22:43:34 rillig Exp $
 
-PKGNAME=       pkglint-5.4.18
+PKGNAME=       pkglint-5.4.19
 DISTFILES=     # none
 CATEGORIES=    pkgtools
 
@@ -9,7 +9,6 @@
 COMMENT=       Verifier for NetBSD packages
 LICENSE=       2-clause-bsd
 CONFLICTS+=    pkglint4-[0-9]*
-BUILD_DEPENDS+=        go-tools>=1.8:../../devel/go-tools
 
 NO_CHECKSUM=   yes
 USE_LANGUAGES= c
@@ -27,13 +26,10 @@
        ${RUN} ${MKDIR} ${WRKDIR}/pkglint
        ${RUN} cd ${FILESDIR} && ${PAX} -rw . ${WRKDIR}/pkglint
 
-pre-build:
-       ${RUN} env GOPATH=${WRKDIR}:${BUILDLINK_DIR}/gopkg go generate ${GO_BUILD_PATTERN}
-
 pre-install:
        ${RUN} rm -rf ${WRKDIR}/pkg
 
-do-install: do-install-man
+post-install: do-install-man
 
 .include "../../mk/bsd.prefs.mk"
 
diff -r 11a980fb15ce -r 1c2a38683c26 pkgtools/pkglint/files/licenses/licensesyacc.go
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/pkglint/files/licenses/licensesyacc.go   Fri Mar 17 22:43:34 2017 +0000
@@ -0,0 +1,471 @@
+//line licenses.y:2
+package licenses
+
+import __yyfmt__ "fmt"
+
+//line licenses.y:2
+//line licenses.y:8
+type liyySymType struct {
+       yys  int
+       Node *Condition
+}
+
+const ltNAME = 57346
+const ltAND = 57347
+const ltOR = 57348
+const ltOPEN = 57349
+const ltCLOSE = 57350
+
+var liyyToknames = [...]string{
+       "$end",
+       "error",
+       "$unk",
+       "ltNAME",
+       "ltAND",
+       "ltOR",
+       "ltOPEN",
+       "ltCLOSE",
+}
+var liyyStatenames = [...]string{}
+
+const liyyEofCode = 1
+const liyyErrCode = 2
+const liyyInitialStackSize = 16
+
+//line yacctab:1
+var liyyExca = [...]int{
+       -1, 1,
+       1, -1,
+       -2, 0,
+}
+
+const liyyNprod = 7
+const liyyPrivate = 57344
+
+var liyyTokenNames []string
+var liyyStates []string
+
+const liyyLast = 15
+
+var liyyAct = [...]int{
+
+       6, 7, 3, 11, 4, 1, 0, 5, 2, 9,
+       10, 6, 7, 0, 8,
+}
+var liyyPact = [...]int{
+
+       0, -1000, 6, -1000, -1000, 0, 0, 0, -5, -1000,
+       -1000, -1000,
+}
+var liyyPgo = [...]int{
+
+       0, 5, 8, 2,
+}
+var liyyR1 = [...]int{
+
+       0, 1, 2, 2, 2, 3, 3,
+}
+var liyyR2 = [...]int{
+
+       0, 1, 1, 3, 3, 1, 3,
+}
+var liyyChk = [...]int{
+
+       -1000, -1, -2, -3, 4, 7, 5, 6, -2, -3,
+       -3, 8,
+}
+var liyyDef = [...]int{
+
+       0, -2, 1, 2, 5, 0, 0, 0, 0, 3,
+       4, 6,
+}
+var liyyTok1 = [...]int{
+
+       1,
+}
+var liyyTok2 = [...]int{
+
+       2, 3, 4, 5, 6, 7, 8,
+}
+var liyyTok3 = [...]int{
+       0,
+}
+
+var liyyErrorMessages = [...]struct {
+       state int
+       token int
+       msg   string
+}{}
+
+//line yaccpar:1
+
+/*     parser for yacc output  */
+
+var (
+       liyyDebug        = 0
+       liyyErrorVerbose = false
+)
+
+type liyyLexer interface {
+       Lex(lval *liyySymType) int
+       Error(s string)
+}
+
+type liyyParser interface {
+       Parse(liyyLexer) int
+       Lookahead() int
+}
+
+type liyyParserImpl struct {
+       lval  liyySymType
+       stack [liyyInitialStackSize]liyySymType
+       char  int
+}
+
+func (p *liyyParserImpl) Lookahead() int {
+       return p.char
+}
+
+func liyyNewParser() liyyParser {
+       return &liyyParserImpl{}
+}
+
+const liyyFlag = -1000
+
+func liyyTokname(c int) string {
+       if c >= 1 && c-1 < len(liyyToknames) {
+               if liyyToknames[c-1] != "" {
+                       return liyyToknames[c-1]
+               }
+       }
+       return __yyfmt__.Sprintf("tok-%v", c)
+}
+
+func liyyStatname(s int) string {
+       if s >= 0 && s < len(liyyStatenames) {
+               if liyyStatenames[s] != "" {
+                       return liyyStatenames[s]
+               }
+       }
+       return __yyfmt__.Sprintf("state-%v", s)
+}
+
+func liyyErrorMessage(state, lookAhead int) string {
+       const TOKSTART = 4
+
+       if !liyyErrorVerbose {
+               return "syntax error"
+       }
+
+       for _, e := range liyyErrorMessages {
+               if e.state == state && e.token == lookAhead {
+                       return "syntax error: " + e.msg
+               }
+       }
+
+       res := "syntax error: unexpected " + liyyTokname(lookAhead)
+
+       // To match Bison, suggest at most four expected tokens.
+       expected := make([]int, 0, 4)
+
+       // Look for shiftable tokens.
+       base := liyyPact[state]
+       for tok := TOKSTART; tok-1 < len(liyyToknames); tok++ {
+               if n := base + tok; n >= 0 && n < liyyLast && liyyChk[liyyAct[n]] == tok {
+                       if len(expected) == cap(expected) {
+                               return res
+                       }
+                       expected = append(expected, tok)
+               }
+       }
+
+       if liyyDef[state] == -2 {
+               i := 0
+               for liyyExca[i] != -1 || liyyExca[i+1] != state {
+                       i += 2
+               }
+
+               // Look for tokens that we accept or reduce.
+               for i += 2; liyyExca[i] >= 0; i += 2 {
+                       tok := liyyExca[i]
+                       if tok < TOKSTART || liyyExca[i+1] == 0 {
+                               continue
+                       }
+                       if len(expected) == cap(expected) {
+                               return res
+                       }
+                       expected = append(expected, tok)
+               }
+
+               // If the default action is to accept or reduce, give up.
+               if liyyExca[i+1] != 0 {
+                       return res
+               }
+       }
+
+       for i, tok := range expected {
+               if i == 0 {
+                       res += ", expecting "
+               } else {
+                       res += " or "
+               }
+               res += liyyTokname(tok)
+       }
+       return res
+}
+
+func liyylex1(lex liyyLexer, lval *liyySymType) (char, token int) {
+       token = 0
+       char = lex.Lex(lval)
+       if char <= 0 {
+               token = liyyTok1[0]
+               goto out
+       }
+       if char < len(liyyTok1) {
+               token = liyyTok1[char]
+               goto out
+       }
+       if char >= liyyPrivate {
+               if char < liyyPrivate+len(liyyTok2) {
+                       token = liyyTok2[char-liyyPrivate]
+                       goto out
+               }
+       }
+       for i := 0; i < len(liyyTok3); i += 2 {
+               token = liyyTok3[i+0]
+               if token == char {
+                       token = liyyTok3[i+1]
+                       goto out
+               }
+       }
+
+out:
+       if token == 0 {
+               token = liyyTok2[1] /* unknown char */
+       }
+       if liyyDebug >= 3 {
+               __yyfmt__.Printf("lex %s(%d)\n", liyyTokname(token), uint(char))
+       }
+       return char, token
+}
+
+func liyyParse(liyylex liyyLexer) int {
+       return liyyNewParser().Parse(liyylex)
+}
+
+func (liyyrcvr *liyyParserImpl) Parse(liyylex liyyLexer) int {
+       var liyyn int
+       var liyyVAL liyySymType
+       var liyyDollar []liyySymType
+       _ = liyyDollar // silence set and not used
+       liyyS := liyyrcvr.stack[:]



Home | Main Index | Thread Index | Old Index