Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2024 06:56:44 GMT
From:      Matthias Fechner <mfechner@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 88be22d2a6ab - 2024Q3 - devel/gitlab-shell: use new feature from go.mk to download go.mod from gitlab
Message-ID:  <202407210656.46L6uidT069049@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2024Q3 has been updated by mfechner:

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

commit 88be22d2a6ab5c35259f89876e0d43a0d4e3c43f
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2024-07-03 09:23:22 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-07-21 05:39:05 +0000

    devel/gitlab-shell: use new feature from go.mk to download go.mod from gitlab
    
    (cherry picked from commit f1ff7793f1812ccc1faf02c62f780514738040b4)
---
 devel/gitlab-shell/Makefile | 38 ++++----------------------------------
 1 file changed, 4 insertions(+), 34 deletions(-)

diff --git a/devel/gitlab-shell/Makefile b/devel/gitlab-shell/Makefile
index 814f47ad695d..256e37e42f64 100644
--- a/devel/gitlab-shell/Makefile
+++ b/devel/gitlab-shell/Makefile
@@ -14,10 +14,12 @@ LICENSE=	MIT
 # https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/720
 #BUILD_DEPENDS=	heimdal>=0:security/heimdal
 
-USES=		gmake go:modules,no_targets,1.22 pkgconfig
+USES=		gmake go:modules,no_targets,1.21 pkgconfig
 
 USE_GITLAB=	yes
 GL_ACCOUNT=	gitlab-org
+GO_MOD_DIST=	gitlab
+GO_MODULE=	gitlab.com/gitlab-org/gitlab-shell/v14
 
 MAKE_ENV=	GOFLAGS="${GO_BUILDFLAGS}"
 # make sure to pass go build options into make process
@@ -27,31 +29,6 @@ ALL_TARGET=	build
 USERS=		git
 GROUPS=		git
 
-# 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/gitlab-shell/-/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:
-	@if [ ! -e ${DISTDIR}/${DIST_SUBDIR}/.go-post-fetch-done ]; then\
-		${ECHO_MSG} "Copy go.mod as go mod download will modify it, which breaks checksum check" ;\
-		(cd ${DISTDIR}/${DIST_SUBDIR}; ${CP} go.mod go.mod.orig) ;\
-		${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) ;\
-		${ECHO_MSG} "Restore previous go.mod" ;\
-		(cd ${DISTDIR}/${DIST_SUBDIR}; ${MV} go.mod.orig go.mod) ;\
-		${TOUCH} ${DISTDIR}/${DIST_SUBDIR}/.go-post-fetch-done;\
-	fi;
-# ---------------------------
-
 VARLOGDIR=	/var/log/gitlab-shell
 
 PLIST_FILES+=	"@dir(git,,755) ${VARLOGDIR}"
@@ -85,11 +62,4 @@ post-install:
 		${SED} -E -e '/sample$$/ s#^#@sample #; \
 		s#${DATADIR_REL}/bin#@(,,555) ${DATADIR_REL}/bin#; ' >> ${TMPPLIST}
 
-go-pre-delete-distfiles:
-	@if [ -e ${DISTDIR}/${DIST_SUBDIR}/.go-post-fetch-done ]; then\
-		${RM} ${DISTDIR}/${DIST_SUBDIR}/.go-post-fetch-done || ${TRUE};\
-	fi
-
-.include <bsd.port.pre.mk>
-delete-distfiles: go-pre-delete-distfiles
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407210656.46L6uidT069049>