Download raw body.
lang/zig moved to Codeberg
On Mon, 30 Mar 2026 10:00:54 +0100
Stuart Henderson <stu@spacehopper.org> wrote:
> It seems like it should be that simple, doesn't it.
>
> That was one of the "nothing I try works".
>
> > The codeberg ports' dist-tuple variables change along these lines,
> > as shown by running the change through my
> > https://github.com/rfht/dist-tuple.test:
> >
> > -_DT_WRKDIST = **WRKDIR**/gumbo-parser-0.13.2
> > +_DT_WRKDIST = **WRKDIR**/gumbo-parser
> >
> > -_DT_WRKDIST = **WRKDIR**/leiningen-2.12.0
> > +_DT_WRKDIST = **WRKDIR**/leiningen
> >
> > etc...
>
> make show=WRKDIST tells a different story.
Diff below should solve this; it works for me here with codeberg ports.
The issue is that bsd.port.mk checks for DISTNAME before _DT_WRKDIST and
then sets the WRKDIST based on that. There should be no change other
than for codeberg projects, as dist-tuple.port.mk sets
_DT_WRKDIST ?= ${WRKDIR}/${_distname}
for !codeberg.
Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
diff -u -p -r1.1647 bsd.port.mk
--- bsd.port.mk 17 Jan 2026 22:30:08 -0000 1.1647
+++ bsd.port.mk 30 Mar 2026 22:00:32 -0000
@@ -894,10 +894,10 @@ _WRKDIRS += ${WRKOBJDIR_MFS}/${_WRKDIR_S
WRKDIST ?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME:C/^[vV]([0-9])/\1/:S,/,-,g}
.elif !empty(GH_COMMIT)
WRKDIST ?= ${WRKDIR}/${GH_PROJECT}-${GH_COMMIT}
-.elif defined(DISTNAME)
-WRKDIST ?= ${WRKDIR}/${DISTNAME}
.elif !empty(_DT_WRKDIST)
WRKDIST ?= ${_DT_WRKDIST}
+.elif defined(DISTNAME)
+WRKDIST ?= ${WRKDIR}/${DISTNAME}
.else
WRKDIST ?= ${WRKDIR}
.endif
Index: dist-tuple.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/dist-tuple.port.mk,v
diff -u -p -r1.20 dist-tuple.port.mk
--- dist-tuple.port.mk 7 Jan 2026 16:49:11 -0000 1.20
+++ dist-tuple.port.mk 30 Mar 2026 22:00:32 -0000
@@ -30,7 +30,11 @@ _subdir =
_distname ?= ${_project}-${_id:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/:S,/,-,g}
DISTNAME ?= ${_distname}
_subdir = refs/tags/
+. if "${_template}" == "codeberg"
+_DT_WRKDIST ?= ${WRKDIR}/${_project}
+. else
_DT_WRKDIST ?= ${WRKDIR}/${_distname}
+. endif
. else
_DT_WRKDIST ?= ${WRKDIR}/${_project:C,^.*/,,}-${_id}
. endif
lang/zig moved to Codeberg