From owner-svn-ports-head@freebsd.org  Sun Mar 22 05:50:32 2020
Return-Path: <owner-svn-ports-head@freebsd.org>
Delivered-To: svn-ports-head@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F89C278196;
 Sun, 22 Mar 2020 05:50:32 +0000 (UTC)
 (envelope-from ashish@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 48lRSS0Xqdz457M;
 Sun, 22 Mar 2020 05:50:32 +0000 (UTC)
 (envelope-from ashish@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FD1720B10;
 Sun, 22 Mar 2020 05:50:31 +0000 (UTC)
 (envelope-from ashish@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02M5oVFF024813;
 Sun, 22 Mar 2020 05:50:31 GMT (envelope-from ashish@FreeBSD.org)
Received: (from ashish@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02M5oUPg024809;
 Sun, 22 Mar 2020 05:50:30 GMT (envelope-from ashish@FreeBSD.org)
Message-Id: <202003220550.02M5oUPg024809@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ashish set sender to
 ashish@FreeBSD.org using -f
From: Ashish SHUKLA <ashish@FreeBSD.org>
Date: Sun, 22 Mar 2020 05:50:30 +0000 (UTC)
To: ports-committers@freebsd.org, svn-ports-all@freebsd.org,
 svn-ports-head@freebsd.org
Subject: svn commit: r528898 - in head/security/gopass: . files
X-SVN-Group: ports-head
X-SVN-Commit-Author: ashish
X-SVN-Commit-Paths: in head/security/gopass: . files
X-SVN-Commit-Revision: 528898
X-SVN-Commit-Repository: ports
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-ports-head@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for the ports tree for head
 <svn-ports-head.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-ports-head>, 
 <mailto:svn-ports-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-ports-head/>
List-Post: <mailto:svn-ports-head@freebsd.org>
List-Help: <mailto:svn-ports-head-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-ports-head>,
 <mailto:svn-ports-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Mar 2020 05:50:32 -0000

Author: ashish
Date: Sun Mar 22 05:50:30 2020
New Revision: 528898
URL: https://svnweb.freebsd.org/changeset/ports/528898

Log:
  - Add patches to fix brokenness in curses UI
  - Pet portlint
  
  PR:		244955
  Approved by:	Sascha Holzleiter <sascha at root-login dot org> (maintainer)

Added:
  head/security/gopass/files/
  head/security/gopass/files/patch-vendor_github.com_gdamore_tcell_termbox_compat.go   (contents, props changed)
  head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_gui.go   (contents, props changed)
  head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_keybinding.go   (contents, props changed)
Modified:
  head/security/gopass/Makefile

Modified: head/security/gopass/Makefile
==============================================================================
--- head/security/gopass/Makefile	Sun Mar 22 05:47:50 2020	(r528897)
+++ head/security/gopass/Makefile	Sun Mar 22 05:50:30 2020	(r528898)
@@ -4,7 +4,7 @@
 PORTNAME=	gopass
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.8.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 
 MAINTAINER=	sascha@root-login.org
@@ -13,6 +13,9 @@ COMMENT=	Gopass is a rewrite of the pass password mana
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+ONLY_FOR_ARCHS=	amd64
+ONLY_FOR_ARCHS_REASON=	Upstream only supports amd64
+
 RUN_DEPENDS=	git:devel/git \
 		gpg2:security/gnupg
 
@@ -20,14 +23,17 @@ USES=		go
 USE_GITHUB=	yes
 GH_ACCOUNT=	gopasspw
 
-ONLY_FOR_ARCHS=	amd64
-ONLY_FOR_ARCHS_REASON=	Upstream only supports amd64
-
 GO_PKGNAME=	github.com/${GH_ACCOUNT}/${PORTNAME}
 
 PLIST_FILES=	bin/gopass \
 		etc/bash_completion.d/gopass.sh \
 		share/zsh/site-functions/_gopass
+
+pre-build:
+	${GREP} -FRl github.com/nsf/termbox-go \
+		${WRKSRC}/vendor/github.com/jroimartin/gocui/ | \
+		${XARGS} ${REINPLACE_CMD} -e \
+		s,github.com/nsf/termbox-go,github.com/gdamore/tcell/termbox,
 
 post-install:
 	@${STAGEDIR}${PREFIX}/bin/gopass completion bash > ${WRKDIR}/gopass.comp.sh

Added: head/security/gopass/files/patch-vendor_github.com_gdamore_tcell_termbox_compat.go
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gopass/files/patch-vendor_github.com_gdamore_tcell_termbox_compat.go	Sun Mar 22 05:50:30 2020	(r528898)
@@ -0,0 +1,158 @@
+--- vendor/github.com/gdamore/tcell/termbox/compat.go.orig	2019-07-26 09:44:40 UTC
++++ vendor/github.com/gdamore/tcell/termbox/compat.go
+@@ -1,4 +1,4 @@
+-// Copyright 2016 The TCell Authors
++// Copyright 2020 The TCell Authors
+ //
+ // Licensed under the Apache License, Version 2.0 (the "License");
+ // you may not use file except in compliance with the License.
+@@ -12,7 +12,7 @@
+ // See the License for the specific language governing permissions and
+ // limitations under the License.
+ 
+-// Package termbox is a compatibility layer to allow tcells to emulate
++// Package termbox is a compatibility layer to allow tcell to emulate
+ // the github.com/nsf/termbox package.
+ package termbox
+ 
+@@ -236,63 +236,83 @@ const (
+ 
+ // Keys codes.
+ const (
+-	KeyF1         = Key(tcell.KeyF1)
+-	KeyF2         = Key(tcell.KeyF2)
+-	KeyF3         = Key(tcell.KeyF3)
+-	KeyF4         = Key(tcell.KeyF4)
+-	KeyF5         = Key(tcell.KeyF5)
+-	KeyF6         = Key(tcell.KeyF6)
+-	KeyF7         = Key(tcell.KeyF7)
+-	KeyF8         = Key(tcell.KeyF8)
+-	KeyF9         = Key(tcell.KeyF9)
+-	KeyF10        = Key(tcell.KeyF10)
+-	KeyF11        = Key(tcell.KeyF11)
+-	KeyF12        = Key(tcell.KeyF12)
+-	KeyInsert     = Key(tcell.KeyInsert)
+-	KeyDelete     = Key(tcell.KeyDelete)
+-	KeyHome       = Key(tcell.KeyHome)
+-	KeyEnd        = Key(tcell.KeyEnd)
+-	KeyArrowUp    = Key(tcell.KeyUp)
+-	KeyArrowDown  = Key(tcell.KeyDown)
+-	KeyArrowRight = Key(tcell.KeyRight)
+-	KeyArrowLeft  = Key(tcell.KeyLeft)
+-	KeyCtrlA      = Key(tcell.KeyCtrlA)
+-	KeyCtrlB      = Key(tcell.KeyCtrlB)
+-	KeyCtrlC      = Key(tcell.KeyCtrlC)
+-	KeyCtrlD      = Key(tcell.KeyCtrlD)
+-	KeyCtrlE      = Key(tcell.KeyCtrlE)
+-	KeyCtrlF      = Key(tcell.KeyCtrlF)
+-	KeyCtrlG      = Key(tcell.KeyCtrlG)
+-	KeyCtrlH      = Key(tcell.KeyCtrlH)
+-	KeyCtrlI      = Key(tcell.KeyCtrlI)
+-	KeyCtrlJ      = Key(tcell.KeyCtrlJ)
+-	KeyCtrlK      = Key(tcell.KeyCtrlK)
+-	KeyCtrlL      = Key(tcell.KeyCtrlL)
+-	KeyCtrlM      = Key(tcell.KeyCtrlM)
+-	KeyCtrlN      = Key(tcell.KeyCtrlN)
+-	KeyCtrlO      = Key(tcell.KeyCtrlO)
+-	KeyCtrlP      = Key(tcell.KeyCtrlP)
+-	KeyCtrlQ      = Key(tcell.KeyCtrlQ)
+-	KeyCtrlR      = Key(tcell.KeyCtrlR)
+-	KeyCtrlS      = Key(tcell.KeyCtrlS)
+-	KeyCtrlT      = Key(tcell.KeyCtrlT)
+-	KeyCtrlU      = Key(tcell.KeyCtrlU)
+-	KeyCtrlV      = Key(tcell.KeyCtrlV)
+-	KeyCtrlW      = Key(tcell.KeyCtrlW)
+-	KeyCtrlX      = Key(tcell.KeyCtrlX)
+-	KeyCtrlY      = Key(tcell.KeyCtrlY)
+-	KeyCtrlZ      = Key(tcell.KeyCtrlZ)
+-	KeyBackspace  = Key(tcell.KeyBackspace)
+-	KeyBackspace2 = Key(tcell.KeyBackspace2)
+-	KeyTab        = Key(tcell.KeyTab)
+-	KeyEnter      = Key(tcell.KeyEnter)
+-	KeyEsc        = Key(tcell.KeyEscape)
+-	KeyPgdn       = Key(tcell.KeyPgDn)
+-	KeyPgup       = Key(tcell.KeyPgUp)
+-	MouseLeft     = Key(tcell.KeyF63) // arbitrary assignments
+-	MouseRight    = Key(tcell.KeyF62)
+-	MouseMiddle   = Key(tcell.KeyF61)
+-	KeySpace      = Key(tcell.Key(' '))
++	KeyF1             = Key(tcell.KeyF1)
++	KeyF2             = Key(tcell.KeyF2)
++	KeyF3             = Key(tcell.KeyF3)
++	KeyF4             = Key(tcell.KeyF4)
++	KeyF5             = Key(tcell.KeyF5)
++	KeyF6             = Key(tcell.KeyF6)
++	KeyF7             = Key(tcell.KeyF7)
++	KeyF8             = Key(tcell.KeyF8)
++	KeyF9             = Key(tcell.KeyF9)
++	KeyF10            = Key(tcell.KeyF10)
++	KeyF11            = Key(tcell.KeyF11)
++	KeyF12            = Key(tcell.KeyF12)
++	KeyInsert         = Key(tcell.KeyInsert)
++	KeyDelete         = Key(tcell.KeyDelete)
++	KeyHome           = Key(tcell.KeyHome)
++	KeyEnd            = Key(tcell.KeyEnd)
++	KeyArrowUp        = Key(tcell.KeyUp)
++	KeyArrowDown      = Key(tcell.KeyDown)
++	KeyArrowRight     = Key(tcell.KeyRight)
++	KeyArrowLeft      = Key(tcell.KeyLeft)
++	KeyCtrlA          = Key(tcell.KeyCtrlA)
++	KeyCtrlB          = Key(tcell.KeyCtrlB)
++	KeyCtrlC          = Key(tcell.KeyCtrlC)
++	KeyCtrlD          = Key(tcell.KeyCtrlD)
++	KeyCtrlE          = Key(tcell.KeyCtrlE)
++	KeyCtrlF          = Key(tcell.KeyCtrlF)
++	KeyCtrlG          = Key(tcell.KeyCtrlG)
++	KeyCtrlH          = Key(tcell.KeyCtrlH)
++	KeyCtrlI          = Key(tcell.KeyCtrlI)
++	KeyCtrlJ          = Key(tcell.KeyCtrlJ)
++	KeyCtrlK          = Key(tcell.KeyCtrlK)
++	KeyCtrlL          = Key(tcell.KeyCtrlL)
++	KeyCtrlM          = Key(tcell.KeyCtrlM)
++	KeyCtrlN          = Key(tcell.KeyCtrlN)
++	KeyCtrlO          = Key(tcell.KeyCtrlO)
++	KeyCtrlP          = Key(tcell.KeyCtrlP)
++	KeyCtrlQ          = Key(tcell.KeyCtrlQ)
++	KeyCtrlR          = Key(tcell.KeyCtrlR)
++	KeyCtrlS          = Key(tcell.KeyCtrlS)
++	KeyCtrlT          = Key(tcell.KeyCtrlT)
++	KeyCtrlU          = Key(tcell.KeyCtrlU)
++	KeyCtrlV          = Key(tcell.KeyCtrlV)
++	KeyCtrlW          = Key(tcell.KeyCtrlW)
++	KeyCtrlX          = Key(tcell.KeyCtrlX)
++	KeyCtrlY          = Key(tcell.KeyCtrlY)
++	KeyCtrlZ          = Key(tcell.KeyCtrlZ)
++	KeyCtrlUnderscore = Key(tcell.KeyCtrlUnderscore)
++	KeyBackspace      = Key(tcell.KeyBackspace)
++	KeyBackspace2     = Key(tcell.KeyBackspace2)
++	KeyTab            = Key(tcell.KeyTab)
++	KeyEnter          = Key(tcell.KeyEnter)
++	KeyEsc            = Key(tcell.KeyEscape)
++	KeyPgdn           = Key(tcell.KeyPgDn)
++	KeyPgup           = Key(tcell.KeyPgUp)
++	KeySpace          = Key(tcell.Key(' '))
++	KeyTilde          = Key(tcell.Key('~'))
++
++	// The following assignments are provided for termbox
++	// compatibility.  Their use in applications is discouraged.
++	// The mouse keys are completely not supported as tcell uses
++	// a separate mouse event instead of key strokes.
++	MouseLeft         = Key(tcell.KeyF63) // arbitrary assignments
++	MouseRight        = Key(tcell.KeyF62)
++	MouseMiddle       = Key(tcell.KeyF61)
++	MouseRelease      = Key(tcell.KeyF60)
++	MouseWheelUp      = Key(tcell.KeyF59)
++	MouseWheelDown    = Key(tcell.KeyF58)
++	KeyCtrl2          = Key(tcell.KeyNUL) // termbox defines theses
++	KeyCtrl3          = Key(tcell.KeyEscape)
++	KeyCtrl4          = Key(tcell.KeyCtrlBackslash)
++	KeyCtrl5          = Key(tcell.KeyCtrlRightSq)
++	KeyCtrl6          = Key(tcell.KeyCtrlCarat)
++	KeyCtrl7          = Key(tcell.KeyCtrlUnderscore)
++	KeyCtrlSlash      = Key(tcell.KeyCtrlUnderscore)
++	KeyCtrlRsqBracket = Key(tcell.KeyCtrlRightSq)
++	KeyCtrlBackslash  = Key(tcell.KeyCtrlBackslash)
++	KeyCtrlLsqBracket = Key(tcell.KeyCtrlLeftSq)
+ )
+ 
+ // Modifiers.

Added: head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_gui.go
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_gui.go	Sun Mar 22 05:50:30 2020	(r528898)
@@ -0,0 +1,15 @@
+--- vendor/github.com/jroimartin/gocui/gui.go.orig	2019-07-26 09:44:40 UTC
++++ vendor/github.com/jroimartin/gocui/gui.go
+@@ -115,11 +115,7 @@ func (g *Gui) SetRune(x, y int, ch rune, fgColor, bgCo
+ // Rune returns the rune contained in the cell at the given position.
+ // It checks if the position is valid.
+ func (g *Gui) Rune(x, y int) (rune, error) {
+-	if x < 0 || y < 0 || x >= g.maxX || y >= g.maxY {
+-		return ' ', errors.New("invalid point")
+-	}
+-	c := termbox.CellBuffer()[y*g.maxX+x]
+-	return c.Ch, nil
++	return ' ', errors.New("unimplemented")
+ }
+ 
+ // SetView creates a new view with its top-left corner at (x0, y0)

Added: head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_keybinding.go
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gopass/files/patch-vendor_github.com_jroimartin_gocui_keybinding.go	Sun Mar 22 05:50:30 2020	(r528898)
@@ -0,0 +1,23 @@
+--- vendor/github.com/jroimartin/gocui/keybinding.go.orig	2019-07-26 09:44:40 UTC
++++ vendor/github.com/jroimartin/gocui/keybinding.go
+@@ -78,9 +78,9 @@ const (
+ 
+ // Keys combinations.
+ const (
+-	KeyCtrlTilde      Key = Key(termbox.KeyCtrlTilde)
++//	KeyCtrlTilde      Key = Key(termbox.KeyCtrlTilde)
+ 	KeyCtrl2              = Key(termbox.KeyCtrl2)
+-	KeyCtrlSpace          = Key(termbox.KeyCtrlSpace)
++//	KeyCtrlSpace          = Key(termbox.KeyCtrlSpace)
+ 	KeyCtrlA              = Key(termbox.KeyCtrlA)
+ 	KeyCtrlB              = Key(termbox.KeyCtrlB)
+ 	KeyCtrlC              = Key(termbox.KeyCtrlC)
+@@ -123,7 +123,7 @@ const (
+ 	KeyCtrlUnderscore     = Key(termbox.KeyCtrlUnderscore)
+ 	KeySpace              = Key(termbox.KeySpace)
+ 	KeyBackspace2         = Key(termbox.KeyBackspace2)
+-	KeyCtrl8              = Key(termbox.KeyCtrl8)
++//	KeyCtrl8              = Key(termbox.KeyCtrl8)
+ )
+ 
+ // Modifier allows to define special keys combinations. They can be used