git: 235662c48e66 - main - devel/gitaly: use new feature from go.mk to download go.mod from gitlab

From: Matthias Fechner <mfechner_at_FreeBSD.org>
Date: Thu, 11 Jul 2024 13:37:03 UTC
The branch main has been updated by mfechner:

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

commit 235662c48e66534de2a9db7e9c924e172ae26d04
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2024-06-19 09:23:03 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-07-11 13:36:42 +0000

    devel/gitaly: use new feature from go.mk to download go.mod from gitlab
---
 devel/gitaly/Makefile | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/devel/gitaly/Makefile b/devel/gitaly/Makefile
index 1a98c0ab91ff..e83df9830150 100644
--- a/devel/gitaly/Makefile
+++ b/devel/gitaly/Makefile
@@ -26,29 +26,13 @@ CPE_VENDOR=	gitlab
 
 USE_GITLAB=	yes
 GL_ACCOUNT=	gitlab-org
+GO_MOD_DIST=	gitlab
+GO_MODULE=	gitlab.com/gitlab-org/gitaly/v16
 
 MAKE_ENV=	GOFLAGS="${GO_BUILDFLAGS}"
 # make sure to pass go build options into make process
 MAKE_ENV+=	${GO_ENV}
 
-# for go dependencies
-# Gitlab hosts there dependencies on their own platform and not on go-proxy
-# so we download the required go.mod file from gitlab
-# lines are taken from go.mk
-# ---------------------------
-FETCH_DEPENDS=	${GO_CMD}:${GO_PORT}
-MASTER_SITES+=	https://gitlab.com/gitlab-org/gitaly/-/raw/v${DISTVERSION}/
-DISTFILES+=	go.mod
-DIST_SUBDIR=	go/${PKGORIGIN:S,/,_,g}/${DISTNAME}
-EXTRACT_ONLY+=	${DISTFILES:N*.mod\:*:N*.mod:C/:.*//}
-_USES_fetch+=	800:go-post-fetch
-go-post-fetch:
-	@${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies";
-	@(cd ${DISTDIR}/${DIST_SUBDIR}; \
-		[ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \
-		${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all)
-# ---------------------------
-
 post-patch:
 	${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/config.toml.example
 	${MV} ${WRKSRC}/config.toml.example ${WRKSRC}/config.toml.sample