We need some Go stuff as listed in ${WRKSRC}/go.mod to run tests.
This duplicates a bit of bsd.go.mk, but I'd rather not mess with
that. If there's a better way, please let me know.

Works for me.

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/boringssl/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile    25 Apr 2023 19:16:30 -0000      1.1.1.1
+++ Makefile    26 Apr 2023 13:06:42 -0000
@@ -7,6 +7,20 @@ GH_PROJECT =   boringssl
 GH_COMMIT =    de2d610a341f5a4b8c222425890537cb84c91400
 DISTNAME =     boringssl-20230425
 
+MASTER_SITES0 =        https://proxy.golang.org/
+
+DISTFILES +=   ${GH_DISTFILE}
+
+BORING_GOMOD += golang.org/x/crypto    v0.6.0
+BORING_GOMOD += golang.org/x/net       v0.7.0
+BORING_GOMOD += golang.org/x/sys       v0.5.0
+BORING_GOMOD += golang.org/x/term      v0.5.0
+
+.for _modpath _modver in ${BORING_GOMOD}
+DISTFILES +=   go_modules/{}${_modpath}/@v/${_modver}.zip:0
+DISTFILES +=   go_modules/{}${_modpath}/@v/${_modver}.mod:0
+.endfor
+
 CATEGORIES =   security
 
 MAINTAINER =   Bob Beck <b...@openbsd.org>, \
@@ -27,5 +41,9 @@ CONFIGURE_ARGS +=     -DCMAKE_INSTALL_PREFIX
 BUILD_DEPENDS =                lang/go
 
 PORTHOME =             ${WRKSRC}
+
+do-test:
+       env HOME=${WRKSRC} GOPROXY=file://${DISTDIR}/go_modules \
+               ninja -C ${WRKBUILD} run_tests
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/security/boringssl/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    25 Apr 2023 19:16:30 -0000      1.1.1.1
+++ distinfo    26 Apr 2023 13:01:36 -0000
@@ -1,2 +1,18 @@
 SHA256 (boringssl-20230425-de2d610a.tar.gz) = 
2Bu5eOgBxqNUcTDevIpOjPGgJ/GBatu1ZtbVDTCDppQ=
+SHA256 (go_modules/golang.org/x/crypto/@v/v0.6.0.mod) = 
G2poNFWjuIK2rFPyJ1KWDoe9kQQKlNbyxcthJh4jidg=
+SHA256 (go_modules/golang.org/x/crypto/@v/v0.6.0.zip) = 
gcqIrzcc/1qERCuijiPY9CzME4fI/hUuVeh7pK+eGsc=
+SHA256 (go_modules/golang.org/x/net/@v/v0.7.0.mod) = 
Qex26iFy8+4wMeOPmlNZOaWE1rs170gIVP3LjCAmcBs=
+SHA256 (go_modules/golang.org/x/net/@v/v0.7.0.zip) = 
BgVSBkUmqQrJsL3OK6CrNFkt7MlCjRRBw8lyL4U80pA=
+SHA256 (go_modules/golang.org/x/sys/@v/v0.5.0.mod) = 
8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
+SHA256 (go_modules/golang.org/x/sys/@v/v0.5.0.zip) = 
z0czasG/Z1+m1t1axTmbAUPFE0BMRJ+j8zgKWBI8eQg=
+SHA256 (go_modules/golang.org/x/term/@v/v0.5.0.mod) = 
DW9YIoqtwaZSjmdV2gGFFlZuOuXFIB963hdz9W+o2TQ=
+SHA256 (go_modules/golang.org/x/term/@v/v0.5.0.zip) = 
fYnEmrQTBpUBKKD0t8Z/uOLS9jfs6OAk5s840XozGTs=
 SIZE (boringssl-20230425-de2d610a.tar.gz) = 32281549
+SIZE (go_modules/golang.org/x/crypto/@v/v0.6.0.mod) = 171
+SIZE (go_modules/golang.org/x/crypto/@v/v0.6.0.zip) = 1761232
+SIZE (go_modules/golang.org/x/net/@v/v0.7.0.mod) = 123
+SIZE (go_modules/golang.org/x/net/@v/v0.7.0.zip) = 1559354
+SIZE (go_modules/golang.org/x/sys/@v/v0.5.0.mod) = 33
+SIZE (go_modules/golang.org/x/sys/@v/v0.5.0.zip) = 1886681
+SIZE (go_modules/golang.org/x/term/@v/v0.5.0.mod) = 67
+SIZE (go_modules/golang.org/x/term/@v/v0.5.0.zip) = 19924

Reply via email to