svn commit: r566511 - head/Mk/Uses

Dmitri Goutnik dmgk at FreeBSD.org
Wed Feb 24 22:39:57 UTC 2021


Author: dmgk
Date: Wed Feb 24 22:39:56 2021
New Revision: 566511
URL: https://svnweb.freebsd.org/changeset/ports/566511

Log:
  Mk/Uses/go.mk: Escape module names
  
  Escape module names according to the GOPROXY protocol [1].
  
  "To avoid ambiguity when serving from case-insensitive file systems,
  the $module and $version elements are case-encoded by replacing every
  uppercase letter with an exclamation mark followed by the corresponding
  lower-case letter."
  
  [1] https://golang.org/ref/mod#module-proxy
  
  Reported by:	yuri

Modified:
  head/Mk/Uses/go.mk

Modified: head/Mk/Uses/go.mk
==============================================================================
--- head/Mk/Uses/go.mk	Wed Feb 24 22:30:48 2021	(r566510)
+++ head/Mk/Uses/go.mk	Wed Feb 24 22:39:56 2021	(r566511)
@@ -126,7 +126,7 @@ GO_MODVERSION=	${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\2/:M
 GO_MODFILE=	${GO_MODVERSION}.mod
 GO_DISTFILE=	${GO_MODVERSION}.zip
 DIST_SUBDIR=	go/${PKGORIGIN:S,/,_,g}/${DISTNAME}
-MASTER_SITES=	${GO_GOPROXY}/${GO_MODNAME}/@v/
+MASTER_SITES=	${GO_GOPROXY}/${GO_MODNAME:C/([A-Z])/!\1/g:tl}/@v/
 DISTFILES=	${GO_MODFILE} ${GO_DISTFILE}
 EXTRACT_ONLY=	${GO_DISTFILE}
 WRKSRC=		${WRKDIR}/${GO_MODNAME}@${GO_MODVERSION}


More information about the svn-ports-all mailing list