On Tue, Jan 14, 2025 at 03:35:18PM +0100, Theo Buehler wrote:
> On Tue, Jan 14, 2025 at 03:33:01PM +0100, Theo Buehler wrote:
> > On Tue, Jan 14, 2025 at 01:58:14PM +0000, Stuart Henderson wrote:
> > > If GH_TAGNAME contains /, the git-archive is generated with the /
> > > replaced by -. Currently we need per-port mess to reset WRKDIST but
> > > it can be handled automatically.
> > >
> > > OK?
> >
> > ok
> >
> > > The DIST_TUPLE equivalent confused me, so is left as an exercise for
> > > any interested readers. ;)
> >
> > This seems to work in a quick test with uacme 1.7.6, but presumably this
> > ugly repetition wants to be deduplicated (not sure why this wasn't done).
>
> Case in point: I missed a g at the end of the first one.
Same with deduplication. I feel like testing this in a bulk build might
be reasonable in case there are some unusual edge cases.
Index: dist-tuple.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/dist-tuple.port.mk,v
diff -u -p -r1.17 dist-tuple.port.mk
--- dist-tuple.port.mk 29 Feb 2024 21:20:51 -0000 1.17
+++ dist-tuple.port.mk 15 Jan 2025 13:55:26 -0000
@@ -27,9 +27,9 @@ ERRORS += "Fatal: invalid choice for DIS
_subdir =
. if "${_id}" == "HASH" || "${_id:C/^[0-9a-f]{10,40}$/HASH/}" != "HASH"
# set DISTNAME if not done by the port and add refs/tags/ subdir
-DISTNAME ?= ${_project}-${_id:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/}
+DISTNAME ?=
${_project}-${_id:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/:S,/,-,g}
_subdir = refs/tags/
-_DT_WRKDIST ?=
${WRKDIR}/${_project}-${_id:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/}
+_DT_WRKDIST ?= ${WRKDIR}/${DISTNAME}
. else
_DT_WRKDIST ?= ${WRKDIR}/${_project:C,^.*/,,}-${_id}
. endif