git: bd7b119c2f9e - main - www/gitlab-pages: update to 15.7.5

From: Matthias Fechner <mfechner_at_FreeBSD.org>
Date: Mon, 30 Jan 2023 21:31:46 UTC
The branch main has been updated by mfechner:

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

commit bd7b119c2f9e4b278215bca23fcdc785a4167817
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2023-01-30 21:13:00 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2023-01-30 21:25:39 +0000

    www/gitlab-pages: update to 15.7.5
    
    Required for gitlab-ce 15.7 update
    Changelog:
    https://gitlab.com/gitlab-org/gitlab-pages/-/blob/master/CHANGELOG.md
---
 www/gitlab-pages/Makefile | 34 +++++++++++++++++++++++++++-------
 www/gitlab-pages/distinfo | 10 +++++-----
 2 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/www/gitlab-pages/Makefile b/www/gitlab-pages/Makefile
index 98db0a1217af..831feca1e9ef 100644
--- a/www/gitlab-pages/Makefile
+++ b/www/gitlab-pages/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	gitlab-pages
-PORTVERSION=	1.63.0
-PORTREVISION=	1
+PORTVERSION=	15.7.5
 DISTVERSIONPREFIX=	v
 CATEGORIES=	www
 
@@ -11,11 +10,34 @@ WWW=		https://gitlab.com/gitlab-org/gitlab-pages
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		gmake go:modules
+USES=		go:modules
 GO_MODULE=	gitlab.com/gitlab-org/gitlab-pages
 
-GO_BUILDFLAGS=	-ldflags="-X main.VERSION=${PORTVERSION} -X main.REVISION=${GITHASH}"
-GO_PKGNAME=	gitlab.com/gitlab-org/gitlab-pages
+USE_GITLAB=	yes
+GL_ACCOUNT=	gitlab-org
+# Find this here: https://gitlab.com/gitlab-org/gitlab-pages/-/tags/
+GL_COMMIT=	5830a8685703e74b9a2d7736c139c255b6a9a9be
+
+# 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} \
+		ca_root_nss>0:security/ca_root_nss
+MASTER_SITES+=	https://gitlab.com/gitlab-org/gitlab-pages/-/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 ${PORTNAME} 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)
+# ---------------------------
+
+GO_BUILDFLAGS=	-ldflags="-X 'main.VERSION=${PORTVERSION}' -X 'main.REVISION=${GL_COMMIT}'"
 
 PLIST_FILES=	bin/gitlab-pages
 
@@ -24,8 +46,6 @@ USE_RC_SUBR=	gitlab_pages
 USERS=		gitlab-pages
 GROUPS=		gitlab-pages
 
-GO_BUILDFLAGS+=	--ldflags="-X main.VERSION=${PORTVERSION} -X main.REVISION=${GITHASH}"
-
 do-install:
 	${INSTALL_PROGRAM} ${WRKDIR}/bin/gitlab-pages ${STAGEDIR}${PREFIX}/bin/gitlab-pages
 
diff --git a/www/gitlab-pages/distinfo b/www/gitlab-pages/distinfo
index b78af2262ef0..b112df0190e5 100644
--- a/www/gitlab-pages/distinfo
+++ b/www/gitlab-pages/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1669459268
-SHA256 (go/www_gitlab-pages/gitlab-pages-v1.63.0/v1.63.0.mod) = 407883ba322b73d1526b585fb5a2570826c39759adf176965e8a37b1cf664f2d
-SIZE (go/www_gitlab-pages/gitlab-pages-v1.63.0/v1.63.0.mod) = 2938
-SHA256 (go/www_gitlab-pages/gitlab-pages-v1.63.0/v1.63.0.zip) = 3727d65bb2fbd4e32899ae6c9564218aebbf2f66102daedc490023a4430ba1f4
-SIZE (go/www_gitlab-pages/gitlab-pages-v1.63.0/v1.63.0.zip) = 368380
+TIMESTAMP = 1675107900
+SHA256 (go/www_gitlab-pages/gitlab-org-gitlab-pages-5830a8685703e74b9a2d7736c139c255b6a9a9be_GL0/go.mod) = 407883ba322b73d1526b585fb5a2570826c39759adf176965e8a37b1cf664f2d
+SIZE (go/www_gitlab-pages/gitlab-org-gitlab-pages-5830a8685703e74b9a2d7736c139c255b6a9a9be_GL0/go.mod) = 2938
+SHA256 (go/www_gitlab-pages/gitlab-org-gitlab-pages-5830a8685703e74b9a2d7736c139c255b6a9a9be_GL0/gitlab-org-gitlab-pages-5830a8685703e74b9a2d7736c139c255b6a9a9be_GL0.tar.gz) = acc4e14c002479360875e5a5e8d92c401386b840085bad18bacde6a56cf2cb67
+SIZE (go/www_gitlab-pages/gitlab-org-gitlab-pages-5830a8685703e74b9a2d7736c139c255b6a9a9be_GL0/gitlab-org-gitlab-pages-5830a8685703e74b9a2d7736c139c255b6a9a9be_GL0.tar.gz) = 227264