git: 012100cf9861 - main - irc/komanda-cli: fix building on riscv64

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Tue, 21 Mar 2023 12:54:53 UTC
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=012100cf9861d75ec1ef708ede78501737910490

commit 012100cf9861d75ec1ef708ede78501737910490
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-03-17 14:52:00 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-03-21 12:53:48 +0000

    irc/komanda-cli: fix building on riscv64
    
    Bump golang.org/x/sys dependency to a version new enough to
    support risc64-freebsd.  While we are at it:
    
     - remove useless GH_TUPLE entries (upstream vendors these)
     - only strip if stripping is requested
    
    Sponsored by:   Berliner Linux User Group e.V.
    Approved by:    portmgr (build fix blanket)
    Differential Revision: https://reviews.freebsd.org/D39152
---
 irc/komanda-cli/Makefile                       | 27 +++--------
 irc/komanda-cli/distinfo                       | 40 ++--------------
 irc/komanda-cli/files/patch-go.mod             | 38 +++++++++++++++
 irc/komanda-cli/files/patch-go.sum             | 27 +++++++++++
 irc/komanda-cli/files/patch-vendor_modules.txt | 65 ++++++++++++++++++++++++++
 5 files changed, 140 insertions(+), 57 deletions(-)

diff --git a/irc/komanda-cli/Makefile b/irc/komanda-cli/Makefile
index 452aac3d71a3..3647a598f491 100644
--- a/irc/komanda-cli/Makefile
+++ b/irc/komanda-cli/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	komanda-cli
 DISTVERSION=	g20190920
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	irc
 
 MAINTAINER=	lcook@FreeBSD.org
@@ -14,31 +14,14 @@ USES=		go:modules
 USE_GITHUB=	yes
 GH_ACCOUNT=	mephux
 GH_TAGNAME=	b5ba03b
-GH_TUPLE=	0xAX:notificator:d81462e38c21:0xax_notificator/vendor/github.com/0xAX/notificator \
-		BurntSushi:toml:v0.3.1:burntsushi_toml/vendor/github.com/BurntSushi/toml \
-		alecthomas:kingpin:v2.2.6:alecthomas_kingpin/vendor/gopkg.in/alecthomas/kingpin.v2 \
-		alecthomas:template:fb15b899a751:alecthomas_template/vendor/github.com/alecthomas/template \
-		alecthomas:units:c3de453c63f4:alecthomas_units/vendor/github.com/alecthomas/units \
-		davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \
-		fluffle:goirc:v1.0.1:fluffle_goirc/vendor/github.com/fluffle/goirc \
-		golang:mock:v1.1.1:golang_mock/vendor/github.com/golang/mock \
-		golang:net:3b0461eec859:golang_net/vendor/golang.org/x/net \
-		golang:sys:953cdadca894:golang_sys/vendor/golang.org/x/sys \
-		hectane:go-nonblockingchan:v0.1.0:hectane_go_nonblockingchan/vendor/github.com/hectane/go-nonblockingchan \
-		jroimartin:gocui:v0.4.0:jroimartin_gocui/vendor/github.com/jroimartin/gocui \
-		konsorten:go-windows-terminal-sequences:v1.0.1:konsorten_go_windows_terminal_sequences/vendor/github.com/konsorten/go-windows-terminal-sequences \
-		mattn:go-runewidth:v0.0.4:mattn_go_runewidth/vendor/github.com/mattn/go-runewidth \
-		mephux:common:c3a670c8b76e:mephux_common/vendor/github.com/mephux/common \
-		nsf:termbox-go:93860e161317:nsf_termbox_go/vendor/github.com/nsf/termbox-go \
-		sirupsen:logrus:v1.4.2:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
-		worg:merger:94181de72ed1:worg_merger/vendor/github.com/worg/merger
+GH_TUPLE=	golang:sys:v0.6.0:sys
 
 _BUILD_SHA=	${GH_TAGNAME}
 _BUILD_COUNT=	138
 _BUILD_TAG=	${_BUILD_COUNT}.${_BUILD_SHA}
 
 GO_BUILDFLAGS=	-ldflags "\
-		-s -w \
+		${STRIP} -w \
 		-X main.Build=${_BUILD_TAG}"
 
 PLIST_FILES=	bin/${PORTNAME}
@@ -46,6 +29,10 @@ PORTDOCS=	README.md
 
 OPTIONS_DEFINE=	DOCS
 
+pre-patch:
+	${RM} -r ${WRKSRC}/vendor/golang.org/x/sys
+	${LN} -s ${WRKDIR}/sys-* ${WRKSRC}/vendor/golang.org/x/sys
+
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}
diff --git a/irc/komanda-cli/distinfo b/irc/komanda-cli/distinfo
index 50d7886baeb4..31ccfa6aef16 100644
--- a/irc/komanda-cli/distinfo
+++ b/irc/komanda-cli/distinfo
@@ -1,39 +1,5 @@
-TIMESTAMP = 1589640002
+TIMESTAMP = 1679064444
 SHA256 (mephux-komanda-cli-g20190920-b5ba03b_GH0.tar.gz) = 73900ce20eb9cbb0ef50cf3b37fffdda902ddaeac549e8b8a7222513d28cd7de
 SIZE (mephux-komanda-cli-g20190920-b5ba03b_GH0.tar.gz) = 1393222
-SHA256 (0xAX-notificator-d81462e38c21_GH0.tar.gz) = 2f2ee6603a02f87aacd20a5fd47201572caeb5bd24cf27807e34fdff28d69ecd
-SIZE (0xAX-notificator-d81462e38c21_GH0.tar.gz) = 39778
-SHA256 (BurntSushi-toml-v0.3.1_GH0.tar.gz) = 6593da894578ba510a470735ffbdc88ce88033094dc5a8f4d3957ab87e18803f
-SIZE (BurntSushi-toml-v0.3.1_GH0.tar.gz) = 42077
-SHA256 (alecthomas-kingpin-v2.2.6_GH0.tar.gz) = 4624eae43489de8a71ea60efaf6744c581b6bd62909f7514c484c1ea0efaba5a
-SIZE (alecthomas-kingpin-v2.2.6_GH0.tar.gz) = 44383
-SHA256 (alecthomas-template-fb15b899a751_GH0.tar.gz) = 2e2a44375eca48ce941182504b5d13aa98182b9a3f64ace33bfda52208bd0f5e
-SIZE (alecthomas-template-fb15b899a751_GH0.tar.gz) = 55339
-SHA256 (alecthomas-units-c3de453c63f4_GH0.tar.gz) = b2eb77de46e677edb150bb4bf81d213416a477525980e315264cbd70b22d0ece
-SIZE (alecthomas-units-c3de453c63f4_GH0.tar.gz) = 3485
-SHA256 (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 7d82b9bb7291adbe7498fe946920ab3e7fc9e6cbfc3b2294693fad00bf0dd17e
-SIZE (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 42152
-SHA256 (fluffle-goirc-v1.0.1_GH0.tar.gz) = 05e1d03714c827dc88b4d04bb9380d37dc2d83f350dcee015fe8d4f1ba24493b
-SIZE (fluffle-goirc-v1.0.1_GH0.tar.gz) = 141321
-SHA256 (golang-mock-v1.1.1_GH0.tar.gz) = c705c0239c4ca21bdacf5e9391f9012937f6becfd97926ce28408ae53165122d
-SIZE (golang-mock-v1.1.1_GH0.tar.gz) = 43394
-SHA256 (golang-net-3b0461eec859_GH0.tar.gz) = a22a8864fdc90a79d953afad48ec799386daee4bfe93ecc50ccca4b77c2a9329
-SIZE (golang-net-3b0461eec859_GH0.tar.gz) = 1099281
-SHA256 (golang-sys-953cdadca894_GH0.tar.gz) = fb56f244784dac7e7f66fc0ff9f5ff6adbd49ccb8f3625285e6e39254b64c12f
-SIZE (golang-sys-953cdadca894_GH0.tar.gz) = 1353286
-SHA256 (hectane-go-nonblockingchan-v0.1.0_GH0.tar.gz) = f74986ddebd4a74687f8638f26e2ce7822c6f4d99dc786ffa05489a20e4936ec
-SIZE (hectane-go-nonblockingchan-v0.1.0_GH0.tar.gz) = 2473
-SHA256 (jroimartin-gocui-v0.4.0_GH0.tar.gz) = 7dbb46356f9eee2d52c68cf664f9527cb7b84e746e61cc9000566a0b9eec8dec
-SIZE (jroimartin-gocui-v0.4.0_GH0.tar.gz) = 28376
-SHA256 (konsorten-go-windows-terminal-sequences-v1.0.1_GH0.tar.gz) = e36c5a5de388bf72db3037b47f025b09e574be8d0bc74b3e44c960cba0880e87
-SIZE (konsorten-go-windows-terminal-sequences-v1.0.1_GH0.tar.gz) = 1909
-SHA256 (mattn-go-runewidth-v0.0.4_GH0.tar.gz) = 1973c2de25bc69c3786a00e8118f4d22aa0d040bdfe46c8c8c30419b23e53dfe
-SIZE (mattn-go-runewidth-v0.0.4_GH0.tar.gz) = 19827
-SHA256 (mephux-common-c3a670c8b76e_GH0.tar.gz) = 91652b403c66353031a2df078d87cdf872b44e5df5c15e95e08419bd58de3711
-SIZE (mephux-common-c3a670c8b76e_GH0.tar.gz) = 12294
-SHA256 (nsf-termbox-go-93860e161317_GH0.tar.gz) = b6b53b3ddc63fad46434f5eb173642898e320fca00ee264b6e7275eb81f5b2e4
-SIZE (nsf-termbox-go-93860e161317_GH0.tar.gz) = 32772
-SHA256 (sirupsen-logrus-v1.4.2_GH0.tar.gz) = 67f2ddf467b7e63d2d2529d227946a331e245aeef7e2e4521ae82647b5ef84d9
-SIZE (sirupsen-logrus-v1.4.2_GH0.tar.gz) = 41373
-SHA256 (worg-merger-94181de72ed1_GH0.tar.gz) = 04f760ec1d07264738553ccc4e77754382aaa43d803b52e43210ef99175c931f
-SIZE (worg-merger-94181de72ed1_GH0.tar.gz) = 4563
+SHA256 (golang-sys-v0.6.0_GH0.tar.gz) = b4f6d17c7a128f76169964b437cb66b3f2dbf9a33361928ec19dfecf7b03fc54
+SIZE (golang-sys-v0.6.0_GH0.tar.gz) = 1434234
diff --git a/irc/komanda-cli/files/patch-go.mod b/irc/komanda-cli/files/patch-go.mod
new file mode 100644
index 000000000000..f6f6d2064347
--- /dev/null
+++ b/irc/komanda-cli/files/patch-go.mod
@@ -0,0 +1,38 @@
+--- go.mod.orig	2023-03-17 14:50:00 UTC
++++ go.mod
+@@ -1,23 +1,28 @@
+ module github.com/mephux/komanda-cli
+ 
+-go 1.13
++go 1.17
+ 
+ require (
+ 	github.com/0xAX/notificator v0.0.0-20181105090803-d81462e38c21
+ 	github.com/BurntSushi/toml v0.3.1
+-	github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
+-	github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
+ 	github.com/davecgh/go-spew v1.1.1
+ 	github.com/fluffle/goirc v1.0.1
+-	github.com/hectane/go-attest v0.1.2 // indirect
+ 	github.com/hectane/go-nonblockingchan v0.1.0
+ 	github.com/jroimartin/gocui v0.4.0
+-	github.com/mattn/go-runewidth v0.0.4 // indirect
+ 	github.com/mephux/common v0.0.0-20170531153046-c3a670c8b76e
+ 	github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317
+ 	github.com/sirupsen/logrus v1.4.2
+ 	github.com/worg/merger v0.0.0-20151129084618-94181de72ed1
+-	golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac // indirect
+-	golang.org/x/tools v0.0.0-20190918171317-3d643c64ae6b // indirect
+ 	gopkg.in/alecthomas/kingpin.v2 v2.2.6
++)
++
++require (
++	github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
++	github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
++	github.com/golang/mock v1.1.1 // indirect
++	github.com/hectane/go-attest v0.1.2 // indirect
++	github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
++	github.com/mattn/go-runewidth v0.0.4 // indirect
++	golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
++	golang.org/x/sys v0.6.0 // indirect
+ )
diff --git a/irc/komanda-cli/files/patch-go.sum b/irc/komanda-cli/files/patch-go.sum
new file mode 100644
index 000000000000..1943130ce88b
--- /dev/null
+++ b/irc/komanda-cli/files/patch-go.sum
@@ -0,0 +1,27 @@
+--- go.sum.orig	2023-03-17 14:50:03 UTC
++++ go.sum
+@@ -38,22 +38,14 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4
+ github.com/worg/merger v0.0.0-20151129084618-94181de72ed1 h1:1f86uztkkTvTGbwAKhDvxgRR58Lo9dApJCeFA0h94dk=
+ github.com/worg/merger v0.0.0-20151129084618-94181de72ed1/go.mod h1:HDawecgPZ4NVthfNX/guuO8Enc4PXVSV3Nw84rarOf4=
+ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+-golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac h1:8R1esu+8QioDxo4E4mX6bFztO+dMTM49DNAaWfO5OeY=
+-golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+-golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3 h1:dgd4x4kJt7G4k4m93AYLzM8Ni6h2qLTfh9n9vXJT3/0=
+ golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+ golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
+ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
+ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
++golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
++golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+-golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ=
+-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+-golang.org/x/tools v0.0.0-20190918171317-3d643c64ae6b h1:2mMGF62XpF35V5wwcjnGKw5Rb4J955nU92Cg948i3+4=
+-golang.org/x/tools v0.0.0-20190918171317-3d643c64ae6b/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+ gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
+ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
diff --git a/irc/komanda-cli/files/patch-vendor_modules.txt b/irc/komanda-cli/files/patch-vendor_modules.txt
new file mode 100644
index 000000000000..034fba3dd428
--- /dev/null
+++ b/irc/komanda-cli/files/patch-vendor_modules.txt
@@ -0,0 +1,65 @@
+--- vendor/modules.txt.orig	2023-03-17 14:50:38 UTC
++++ vendor/modules.txt
+@@ -1,41 +1,61 @@
+ # github.com/0xAX/notificator v0.0.0-20181105090803-d81462e38c21
++## explicit
+ github.com/0xAX/notificator
+ # github.com/BurntSushi/toml v0.3.1
++## explicit
+ github.com/BurntSushi/toml
+ # github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
++## explicit
+ github.com/alecthomas/template
+ github.com/alecthomas/template/parse
+ # github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4
++## explicit
+ github.com/alecthomas/units
+ # github.com/davecgh/go-spew v1.1.1
++## explicit
+ github.com/davecgh/go-spew/spew
+ # github.com/fluffle/goirc v1.0.1
++## explicit
+ github.com/fluffle/goirc/client
+ github.com/fluffle/goirc/logging
+ github.com/fluffle/goirc/state
+ # github.com/golang/mock v1.1.1
++## explicit
+ github.com/golang/mock/gomock
++# github.com/hectane/go-attest v0.1.2
++## explicit
+ # github.com/hectane/go-nonblockingchan v0.1.0
++## explicit
+ github.com/hectane/go-nonblockingchan
+ # github.com/jroimartin/gocui v0.4.0
++## explicit
+ github.com/jroimartin/gocui
+ # github.com/konsorten/go-windows-terminal-sequences v1.0.1
++## explicit
+ github.com/konsorten/go-windows-terminal-sequences
+ # github.com/mattn/go-runewidth v0.0.4
++## explicit
+ github.com/mattn/go-runewidth
+ # github.com/mephux/common v0.0.0-20170531153046-c3a670c8b76e
++## explicit
+ github.com/mephux/common
+ # github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317
++## explicit
+ github.com/nsf/termbox-go
+ # github.com/sirupsen/logrus v1.4.2
++## explicit
+ github.com/sirupsen/logrus
+ # github.com/worg/merger v0.0.0-20151129084618-94181de72ed1
++## explicit
+ github.com/worg/merger
+ # golang.org/x/net v0.0.0-20190620200207-3b0461eec859
++## explicit; go 1.11
+ golang.org/x/net/context
+ golang.org/x/net/internal/socks
+ golang.org/x/net/proxy
+-# golang.org/x/sys v0.0.0-20190422165155-953cdadca894
++# golang.org/x/sys v0.6.0
++## explicit; go 1.17
+ golang.org/x/sys/unix
+ # gopkg.in/alecthomas/kingpin.v2 v2.2.6
++## explicit
+ gopkg.in/alecthomas/kingpin.v2