On Wed, Jul 13, 2022 at 12:27:18PM +0000, Klemens Nanni wrote:
> No functional change, but this hurts less while reading and would reduce
> the initial diff about MASTER_SITES_GITHUB handling.
> 
> I might as well become
>       GH_DISTNAME = 
> ${GH_TAGNAME:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/}
>       DISTNAME ?=   ${GH_DISTNAME}
>       GH_DISTFILE = ${GH_DISTNAME}-${EXTRACT_SUFX}
> 
> and GH_DISTNAME might be useful for porters, but then I had to a)
> document the new variable and b) do the same for the GH_COMMIT case as
> well (this part is only about GH_TAGNAME ports).
> 
> So just go with an internal variable to reduce duplication (until
> someone finds GH_DISTNAME useful enough).
> 
> OK?

correct diff this time.


Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1576
diff -u -p -r1.1576 bsd.port.mk
--- bsd.port.mk 6 Jul 2022 09:30:41 -0000       1.1576
+++ bsd.port.mk 13 Jul 2022 12:36:44 -0000
@@ -612,8 +612,9 @@ GH_ACCOUNT ?=
 GH_PROJECT ?=
 
 .if !empty(GH_PROJECT) && !empty(GH_TAGNAME)
-DISTNAME ?=    
${GH_PROJECT}-${GH_TAGNAME:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/}
-GH_DISTFILE = 
${GH_PROJECT}-${GH_TAGNAME:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/}${EXTRACT_SUFX}
+_GH_TAG_DIST = ${GH_TAGNAME:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/}
+DISTNAME ?=   ${GH_PROJECT}-${_GH_TAG_DIST}
+GH_DISTFILE = ${GH_PROJECT}-${_GH_TAG_DIST}${EXTRACT_SUFX}
 .endif
 
 PKGNAME ?= ${DISTNAME}

Reply via email to