Skip to content

Commit

Permalink
www/oneshot: fix build on riscv64
Browse files Browse the repository at this point in the history
Bump golang.org/x/{net,sys} dependency to a version new enough
to support riscv64-freebsd.  Also only strip if requested.

Sponsored by:	Berliner Linux User Group e.V.
Approved by:	portmgr (build fix blanket)
  • Loading branch information
clausecker committed Mar 22, 2023
1 parent 48996f8 commit 58e6888
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 3 deletions.
13 changes: 11 additions & 2 deletions www/oneshot/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PORTNAME= oneshot
DISTVERSIONPREFIX= v
DISTVERSION= 1.5.1
PORTREVISION= 11
PORTREVISION= 12
CATEGORIES= www

MAINTAINER= lcook@FreeBSD.org
Expand All @@ -12,13 +12,16 @@ LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

USES= go:modules
USE_GITHUB= nodefault
GH_TUPLE= golang:net:v0.8.0:net \
golang:sys:v0.6.0:sys

_BUILD_VERSION= ${DISTVERSIONFULL}
_BUILD_DATE= $$(date +%d-%B-%Y)

GO_MODULE= github.com/raphaelreyna/${PORTNAME}
GO_BUILDFLAGS= -ldflags "\
-s -w \
${STRIP} -w \
-X ${GO_MODULE}/cmd.version=${_BUILD_VERSION} \
-X ${GO_MODULE}/cmd.date=${_BUILD_DATE}"

Expand All @@ -30,6 +33,12 @@ OPTIONS_SUB= yes

MANPAGES_DESC= Build and install auto-generated manpages

pre-patch:
.for m in net sys
${RM} -r ${WRKSRC}/vendor/golang.org/x/$m
${LN} -s ${WRKDIR}/$m-* ${WRKSRC}/vendor/golang.org/x/$m
.endfor

do-build-MANPAGES-on:
cd ${GO_WRKSRC} && \
${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} run ${GO_BUILDFLAGS} \
Expand Down
6 changes: 5 additions & 1 deletion www/oneshot/distinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
TIMESTAMP = 1631183436
TIMESTAMP = 1679410791
SHA256 (go/www_oneshot/oneshot-v1.5.1/v1.5.1.mod) = a6f3b5b7eb6ce37bc0886068ed434c221b2c7347d9f245946d3c96606e6494ea
SIZE (go/www_oneshot/oneshot-v1.5.1/v1.5.1.mod) = 309
SHA256 (go/www_oneshot/oneshot-v1.5.1/v1.5.1.zip) = 6cc3c397610c0c7d1ec0327520ede8cec0adff862952ee161d7612e9a3537b64
SIZE (go/www_oneshot/oneshot-v1.5.1/v1.5.1.zip) = 663396
SHA256 (go/www_oneshot/oneshot-v1.5.1/golang-net-v0.8.0_GH0.tar.gz) = f9e2128a2d6861db0595428c7cce62fe5a131348a6c7651b6efa8b03d0b10831
SIZE (go/www_oneshot/oneshot-v1.5.1/golang-net-v0.8.0_GH0.tar.gz) = 1244302
SHA256 (go/www_oneshot/oneshot-v1.5.1/golang-sys-v0.6.0_GH0.tar.gz) = b4f6d17c7a128f76169964b437cb66b3f2dbf9a33361928ec19dfecf7b03fc54
SIZE (go/www_oneshot/oneshot-v1.5.1/golang-sys-v0.6.0_GH0.tar.gz) = 1434234
28 changes: 28 additions & 0 deletions www/oneshot/files/patch-go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
--- go.mod.orig 2023-03-21 14:55:12 UTC
+++ go.mod
@@ -1,6 +1,6 @@
module github.com/raphaelreyna/oneshot

-go 1.16
+go 1.17

require (
github.com/google/uuid v1.2.0
@@ -10,4 +10,17 @@ require (
github.com/raphaelreyna/ez-cgi v0.7.3
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.3
+)
+
+require (
+ github.com/cenkalti/backoff v2.2.1+incompatible // indirect
+ github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/miekg/dns v1.1.27 // indirect
+ github.com/russross/blackfriday/v2 v2.0.1 // indirect
+ github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
+ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
+ golang.org/x/net v0.8.0 // indirect
+ golang.org/x/sys v0.6.0 // indirect
+ gopkg.in/yaml.v2 v2.2.2 // indirect
)
20 changes: 20 additions & 0 deletions www/oneshot/files/patch-go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- go.sum.orig 2023-03-21 14:55:15 UTC
+++ go.sum
@@ -139,6 +139,8 @@ golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM=
golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
+golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -155,6 +157,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/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/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
69 changes: 69 additions & 0 deletions www/oneshot/files/patch-vendor_modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
--- vendor/modules.txt.orig 2023-03-21 14:57:41 UTC
+++ vendor/modules.txt
@@ -1,48 +1,59 @@
# github.com/cenkalti/backoff v2.2.1+incompatible
+## explicit
github.com/cenkalti/backoff
# github.com/cpuguy83/go-md2man/v2 v2.0.0
+## explicit; go 1.12
github.com/cpuguy83/go-md2man/v2/md2man
# github.com/google/uuid v1.2.0
## explicit
github.com/google/uuid
# github.com/gorilla/mux v1.7.4
-## explicit
+## explicit; go 1.12
github.com/gorilla/mux
# github.com/grandcat/zeroconf v1.0.0
-## explicit
+## explicit; go 1.13
github.com/grandcat/zeroconf
# github.com/inconshreveable/mousetrap v1.0.0
+## explicit
github.com/inconshreveable/mousetrap
# github.com/jf-tech/iohelper v1.0.2
-## explicit
+## explicit; go 1.13
github.com/jf-tech/iohelper
# github.com/miekg/dns v1.1.27
+## explicit; go 1.12
github.com/miekg/dns
# github.com/raphaelreyna/ez-cgi v0.7.3
-## explicit
+## explicit; go 1.14
github.com/raphaelreyna/ez-cgi/pkg/cgi
# github.com/russross/blackfriday/v2 v2.0.1
+## explicit
github.com/russross/blackfriday/v2
# github.com/shurcooL/sanitized_anchor_name v1.0.0
+## explicit
github.com/shurcooL/sanitized_anchor_name
# github.com/spf13/cobra v1.0.0
-## explicit
+## explicit; go 1.12
github.com/spf13/cobra
github.com/spf13/cobra/doc
# github.com/spf13/pflag v1.0.3
## explicit
github.com/spf13/pflag
# golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
+## explicit
golang.org/x/crypto/ed25519
golang.org/x/crypto/ed25519/internal/edwards25519
-# golang.org/x/net v0.0.0-20200602114024-627f9648deb9
+# golang.org/x/net v0.8.0
+## explicit; go 1.17
golang.org/x/net/bpf
golang.org/x/net/internal/iana
golang.org/x/net/internal/socket
golang.org/x/net/ipv4
golang.org/x/net/ipv6
-# golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd
+# golang.org/x/sys v0.6.0
+## explicit; go 1.17
+golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
golang.org/x/sys/windows
# gopkg.in/yaml.v2 v2.2.2
+## explicit
gopkg.in/yaml.v2

0 comments on commit 58e6888

Please sign in to comment.