git: f52bf4043122 - main - net/slackcat: fix build on riscv64

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Fri, 24 Mar 2023 20:56:58 UTC
The branch main has been updated by fuz:

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

commit f52bf4043122a570acbdd63e58d367f8619efef8
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-03-24 16:33:44 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-03-24 20:54:53 +0000

    net/slackcat: fix build on riscv64
    
    Bump golang.org/x/sys dependency to a version new enough
    to support riscv64-freebsd.
    
    Sponsored by:   Berliner Linux User Group e.V.
    Approved by:    portmgr (build fix blanket)
---
 net/slackcat/Makefile                       |  7 +++++-
 net/slackcat/distinfo                       |  4 +++-
 net/slackcat/files/patch-go.mod             | 24 ++++++++++++++++++++
 net/slackcat/files/patch-go.sum             |  8 +++++++
 net/slackcat/files/patch-vendor_modules.txt | 35 +++++++++++++++++++++++++++++
 5 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/net/slackcat/Makefile b/net/slackcat/Makefile
index 528512b1ed20..1e8c2ec4a887 100644
--- a/net/slackcat/Makefile
+++ b/net/slackcat/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	slackcat
 DISTVERSION=	1.7.3
-PORTREVISION=	9
+PORTREVISION=	10
 CATEGORIES=	net
 MASTER_SITES=	https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_PROJECT}/${DISTVERSIONFULL}/:gomod
 DISTFILES=	go.mod:gomod
@@ -16,10 +16,15 @@ USES=		go:modules
 USE_GITHUB=	yes
 GH_ACCOUNT=	bcicen
 GH_TAGNAME=	5c4e4410002c
+GH_TUPLE=	golang:sys:v0.6.0:sys
 
 GO_MODULE=	github.com/${GH_ACCOUNT}/${GH_PROJECT}
 GO_BUILDFLAGS=	-ldflags="-s -w -X main.version=${DISTVERSION} -X main.build=${GH_TAGNAME}"
 
 PLIST_FILES=	bin/slackcat
 
+pre-patch:
+	${RM} -r ${WRKSRC}/vendor/golang.org/x/sys
+	${LN} -s ${WRKDIR}/sys-* ${WRKSRC}/vendor/golang.org/x/sys
+
 .include <bsd.port.mk>
diff --git a/net/slackcat/distinfo b/net/slackcat/distinfo
index 699e69efd289..d792dcc25f8f 100644
--- a/net/slackcat/distinfo
+++ b/net/slackcat/distinfo
@@ -1,5 +1,7 @@
-TIMESTAMP = 1656123971
+TIMESTAMP = 1679674827
 SHA256 (go/net_slackcat/bcicen-slackcat-1.7.3-5c4e4410002c_GH0/go.mod) = 98640a46a3b3a14c84f7df4e83548785e563c11de563893623766350452ce8e0
 SIZE (go/net_slackcat/bcicen-slackcat-1.7.3-5c4e4410002c_GH0/go.mod) = 355
 SHA256 (go/net_slackcat/bcicen-slackcat-1.7.3-5c4e4410002c_GH0/bcicen-slackcat-1.7.3-5c4e4410002c_GH0.tar.gz) = 680a799ad877d4165a84fc176bb4dc922e0f24ab4ff457715fe1bbefa3785ea2
 SIZE (go/net_slackcat/bcicen-slackcat-1.7.3-5c4e4410002c_GH0/bcicen-slackcat-1.7.3-5c4e4410002c_GH0.tar.gz) = 28255
+SHA256 (go/net_slackcat/bcicen-slackcat-1.7.3-5c4e4410002c_GH0/golang-sys-v0.6.0_GH0.tar.gz) = b4f6d17c7a128f76169964b437cb66b3f2dbf9a33361928ec19dfecf7b03fc54
+SIZE (go/net_slackcat/bcicen-slackcat-1.7.3-5c4e4410002c_GH0/golang-sys-v0.6.0_GH0.tar.gz) = 1434234
diff --git a/net/slackcat/files/patch-go.mod b/net/slackcat/files/patch-go.mod
new file mode 100644
index 000000000000..e63a547e5222
--- /dev/null
+++ b/net/slackcat/files/patch-go.mod
@@ -0,0 +1,24 @@
+--- go.mod.orig	2023-03-24 16:21:50 UTC
++++ go.mod
+@@ -1,12 +1,19 @@
+ module github.com/bcicen/slackcat
+ 
+-go 1.16
++go 1.17
+ 
+ require (
+ 	github.com/BurntSushi/toml v0.3.0
+ 	github.com/fatih/color v1.5.0
+-	github.com/mattn/go-colorable v0.1.8 // indirect
+ 	github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c
+ 	github.com/slack-go/slack v0.8.1
+ 	github.com/urfave/cli v1.20.0
++)
++
++require (
++	github.com/gorilla/websocket v1.4.2 // indirect
++	github.com/mattn/go-colorable v0.1.8 // indirect
++	github.com/mattn/go-isatty v0.0.12 // indirect
++	github.com/pkg/errors v0.8.0 // indirect
++	golang.org/x/sys v0.6.0 // indirect
+ )
diff --git a/net/slackcat/files/patch-go.sum b/net/slackcat/files/patch-go.sum
new file mode 100644
index 000000000000..cc6feb500556
--- /dev/null
+++ b/net/slackcat/files/patch-go.sum
@@ -0,0 +1,8 @@
+--- go.sum.orig	2023-03-24 16:21:52 UTC
++++ go.sum
+@@ -27,3 +27,5 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/n
+ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
+ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/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=
diff --git a/net/slackcat/files/patch-vendor_modules.txt b/net/slackcat/files/patch-vendor_modules.txt
new file mode 100644
index 000000000000..5dd8396ec7b7
--- /dev/null
+++ b/net/slackcat/files/patch-vendor_modules.txt
@@ -0,0 +1,35 @@
+--- vendor/modules.txt.orig	2023-03-24 16:22:18 UTC
++++ vendor/modules.txt
+@@ -5,19 +5,22 @@ github.com/BurntSushi/toml
+ ## explicit
+ github.com/fatih/color
+ # github.com/gorilla/websocket v1.4.2
++## explicit; go 1.12
+ github.com/gorilla/websocket
+ # github.com/mattn/go-colorable v0.1.8
+-## explicit
++## explicit; go 1.13
+ github.com/mattn/go-colorable
+ # github.com/mattn/go-isatty v0.0.12
++## explicit; go 1.12
+ github.com/mattn/go-isatty
+ # github.com/pkg/errors v0.8.0
++## explicit
+ github.com/pkg/errors
+ # github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c
+ ## explicit
+ github.com/skratchdot/open-golang/open
+ # github.com/slack-go/slack v0.8.1
+-## explicit
++## explicit; go 1.13
+ github.com/slack-go/slack
+ github.com/slack-go/slack/internal/backoff
+ github.com/slack-go/slack/internal/errorsx
+@@ -27,5 +30,6 @@ github.com/slack-go/slack/slackutilsx
+ # github.com/urfave/cli v1.20.0
+ ## explicit
+ github.com/urfave/cli
+-# golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae
++# golang.org/x/sys v0.6.0
++## explicit; go 1.17
+ golang.org/x/sys/unix